A library for pairing LLM agents with tools so they perform open ended tasks
Project description
Archytas: A Tools Interface for AI Agents
Implementation of the ReAct (Reason & Action) framework for Large Language Model (LLM) agents. Mainly targeting OpenAI's GPT-4.
Easily create tools from simple python functions or classes with the @tool
decorator. A tools list can then be passed to the ReActAgent
which will automagically generate a prompt for the LLM containing usage instructions for each tool, as well as manage the ReAct decision loop while the LLM performs its task.
Tools can be anything from internet searches to custom interpreters for your domain. Archytas provides a few built-in demo tools e.g. datetime, fibonacci numbers, and a simple calculator.
Demo
Short demo of using the PythonTool
to download a COVID-19 dataset, and perform some basic processing/visualization/analysis/etc.
Quickstart
# make sure poetry is installed
pip install poetry
# clone and install
git clone git@github.com:jataware/archytas.git
cd archytas
poetry install
# make sure OPENAI_API_KEY var is set
# or pass it in as an argument to the agent
export OPENAI_API_KEY="sk-..."
# run demo
poetry run chat-repl
Simple Usage
Import pre-made tools from the tools module
from archytas.react import ReActAgent, FailedTaskError
from archytas.tools import PythonTool
from easyrepl import REPL
# create the agent with the tools list
some_tools = [PythonTool, ..., etc.]
agent = ReActAgent(tools=some_tools, verbose=True)
# REPL to interact with agent
for query in REPL():
try:
answer = agent.react(query)
print(answer)
except FailedTaskError as e:
print(f"Error: {e}")
Documentation
See the wiki docs for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file archytas-1.2.3.tar.gz
.
File metadata
- Download URL: archytas-1.2.3.tar.gz
- Upload date:
- Size: 40.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 050d1a15b6939fc031fe2ad8ba2a42328d42e240390776e1eca1bbefb7dd1203 |
|
MD5 | 51bb9dc9c37f26404bde6ff2f2a26d5b |
|
BLAKE2b-256 | 5b3b107218f82ed16bf0c09ccd404564cdf02d953a069ab7010ebec444234f6e |
Provenance
The following attestation bundles were made for archytas-1.2.3.tar.gz
:
Publisher:
publish.yml
on jataware/archytas
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
archytas-1.2.3.tar.gz
- Subject digest:
050d1a15b6939fc031fe2ad8ba2a42328d42e240390776e1eca1bbefb7dd1203
- Sigstore transparency entry: 149109430
- Sigstore integration time:
- Predicate type:
File details
Details for the file archytas-1.2.3-py3-none-any.whl
.
File metadata
- Download URL: archytas-1.2.3-py3-none-any.whl
- Upload date:
- Size: 44.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbfa914dcd1a07a4cc4acc3930e0e5e062764685aa519ea9cfcb651e14ee8115 |
|
MD5 | 786e9fefea2cd0658ea7994d501500da |
|
BLAKE2b-256 | d1f7f0bcd0160ee3e2b45a073082b91ecfd36ccdf9d7a4248325b32daea22335 |
Provenance
The following attestation bundles were made for archytas-1.2.3-py3-none-any.whl
:
Publisher:
publish.yml
on jataware/archytas
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
archytas-1.2.3-py3-none-any.whl
- Subject digest:
bbfa914dcd1a07a4cc4acc3930e0e5e062764685aa519ea9cfcb651e14ee8115
- Sigstore transparency entry: 149109431
- Sigstore integration time:
- Predicate type: