Skip to content

CilantroStudio/tono

Repository files navigation

Tono

image GitHub License Build Discord

Tono is a framework for building autonomous AI agents.

Features

  • 🔋 Batteries included - Tono provides a basic set of tools for building autonomous AI agents
  • 🚀 Automatic tool definition inference from function definition and reStructuredText docstrings
  • ✨ Support for OpenAI models
  • ✨ Support for Anthropic models

Installation

You can install Tono using pip:

pip install "tono-ai[all]"

If you only want to use the OpenAI models, run:

pip install "tono-ai[openai]"

Alternatively, if you would only like to use the Anthropic models, run:

pip install "tono-ai[anthropic]"

Quickstart

Here is a simple example of how to use Tono to build an autonomous AI agent:

import openai
from tono import Agent
from tono.models.openai import CompletionClient
from tono.tools import http_request, write_to_file


openai_client = openai.OpenAI(api_key="your-api-key")
client = CompletionClient(client=openai_client)

agent = Agent(
    name="gpt-agent",
    client=client,
    tools=[write_to_file, http_request],
    context=[
        {
            "role": "assistant",
            "content": "You are a helpful assistant that...",
        }
    ],
)

agent.start(objective="Use the supplied tools to...")

Contributing

We are passionate about supporting contributors of all levels of experience and would love to see you get involved in the project. See the contributing guide to get started.

License

Tono is licensed under the MIT License.