Skip to main content

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. Extensible to a variety of LLMs and LLM providers.

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.

Demos

Short demo of using the PythonTool to download a COVID-19 dataset, and perform some basic processing/visualization/analysis/etc.

Watch the video
click to watch original video on youtube

MCP Demos

# Install with MCP support (includes langchain-mcp-adapters + fastmcp)
uv pip install -e ".[mcp]"

# Vision demo with local MCP server
python demos/demo_mcp_vision.py

# External MCP server (DuckDuckGo search via npx)
python demos/demo_mcp_duckduckgo.py

# HTTP MCP server (Context7 - requires API key)
export CONTEXT7_API_KEY="your-api-key"
python demos/demo_mcp_context7.py

To use mcp tools with archytas, you will need to install the optional deps uv pip install -e ".[mcp]"

Read the mcp quick start doc for more info

Quickstart

# clone and install
git clone git@github.com:jataware/archytas.git
cd archytas
uv pip install -e .

# 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
uv 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 or a `custom_prelude` (if desired)
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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

archytas-2.0.0b1.tar.gz (81.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

archytas-2.0.0b1-py3-none-any.whl (96.7 kB view details)

Uploaded Python 3

File details

Details for the file archytas-2.0.0b1.tar.gz.

File metadata

  • Download URL: archytas-2.0.0b1.tar.gz
  • Upload date:
  • Size: 81.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for archytas-2.0.0b1.tar.gz
Algorithm Hash digest
SHA256 55e54ee5bfc562ee83eab99a925a5b98409bebdf2f7f492a67284180e8009e71
MD5 bff817ebef8c89ba979a2df69d508068
BLAKE2b-256 769f9c343d3dc0df0d2815b39757c39648f085e6cf7e0315a9dbc53c3b69e34b

See more details on using hashes here.

Provenance

The following attestation bundles were made for archytas-2.0.0b1.tar.gz:

Publisher: publish.yml on jataware/archytas

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file archytas-2.0.0b1-py3-none-any.whl.

File metadata

  • Download URL: archytas-2.0.0b1-py3-none-any.whl
  • Upload date:
  • Size: 96.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for archytas-2.0.0b1-py3-none-any.whl
Algorithm Hash digest
SHA256 b559fbafa3bced1e395d3ae80b42e4daf2edab2de95b79c9b5cee75cbbc3fe68
MD5 f025b5c820d98945030f2d4579d49002
BLAKE2b-256 9cf6a96e19971474a7f9ff327b352702838d7dc80d6241b9cca034d450ce8736

See more details on using hashes here.

Provenance

The following attestation bundles were made for archytas-2.0.0b1-py3-none-any.whl:

Publisher: publish.yml on jataware/archytas

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page