Skip to content
David-Andrew Samson edited this page Apr 27, 2023 · 9 revisions

Archytas

A toolbox for having LLM agents interact with tools to solve tasks in an environment. This is largely centered around the ReAct (Reason & Action) framework which has the LLM think, pick tools, and specify input, all in a loop until it decides it has completed the task. Similar in functionality to LangChain, but arguably a better implementation

Tools

Built-in Tools

  • ask_user
  • datetime
  • timestamp
  • PythonTool

Demo Tools

  • fib_n
  • example_tool
  • calculator
  • Jackpot
  • ModelSimulation

Function Tools

You can easily create simple custom tools by wrapping functions with the provided @tool decorator

from archytas.tools import tool

@tool()
def example_tool(arg1:int, arg2:str='', arg3:dict=None) -> int:
    """
    Simple 1 sentence description of the tool

    More detailed description of the tool. This can be multiple lines.
    Explain more what the tool does, and what it is used for.

    Args:
        arg1 (int): Description of the first argument.
        arg2 (str): Description of the second argument. Defaults to ''.
        arg3 (dict): Description of the third argument. Defaults to {}.

    Returns:
        int: Description of the return value

    Examples:
        >>> example_tool(1, 'hello', {'a': 1, 'b': 2})
        3
        >>> example_tool(2, 'world', {'a': 1, 'b': 2})
        4
    """
    return 42

Toolsets and Stateful Tools

It's straightforward to create sets of related tools, and stateful tools by using the provided @toolset decorator on a class