ARGO - Agent-based Reasoning, Governance, and Orchestration - is a Python framework for building powerful, collaborative multi-agent systems powered by large language models (LLMs) and other AI components. Inspired by the legendary ship Argo that carried the Argonauts on their epic quest, ARGO unites diverse intelligent agents to reason, govern, and orchestrate complex workflows together.
NOTE: ARGO is a work in progress. The current state is a proof of concept and is not yet ready for production use.
In Greek mythology, the Argo was a ship built by the master craftsman Argus and guided by the goddess Athena. It carried a crew of heroes-the Argonauts-on a daring quest for the Golden Fleece. This legendary voyage symbolizes teamwork, leadership, and the power of collective effort to overcome challenging tasks.
Similarly, ARGO embodies a system where multiple specialized agents collaborate under structured governance and orchestration to solve complex problems that no single agent could tackle alone.
ARGO is a code-first framework, meaning you create agentic workflows by writing Python code. This approach offers flexibility and control over the agentic workflows you build. However, ARGO also provides a very high-level, declarative interface that can be used to define agentic workflows purely with YAML files. Furthermore, ARGO can be run via a CLI to completely automate the execution of agentic workflows.
ARGO is a very lightweight framework, with no complicated dependencies. Just install it via pip
, uv
or any package manager you use.
pip install argo
ARGO can be used primarily in two modes: code-first, and declarative.
The code-first mode involves using the argo
Python package in your code, and is mostly useful if you need a deep integration with your own tools.
Here is a quick hello world example that sets up a basic chat agent with no fancy tools or skills.
We assume you have the relevant environment variables API_KEY
, BASE_URL
and MODEL
exported.
from argo import Agent, LLM, Message, Context
from argo.cli import loop
import dotenv
import os
# load environment variables
dotenv.load_dotenv()
# set a basic callback to print LLM respondes to terminal
def callback(chunk:str):
print(chunk, end="")
# initialize the agent
agent = Agent(
name="Agent",
description="A helpful assistant.",
llm=LLM(model=os.getenv("MODEL"), callback=callback),
)
# basic skill that just replies to user messages
# notice skills *must* be async methods for now
@agent.skill
async def chat(ctx: Context) -> Message:
"""Casual chat with the user.
"""
return await ctx.reply()
# this sets up the chat history and conversation loop
loop(agent)
The same behavior can be achieved with a simpler declarative interface that uses YAML files for defining skills and tools. Here is the equivalent YAML file for the above example.
name: "Casual"
description: "An agent that performs only casual chat."
skills:
- name: "chat"
description: "Casual chat with the user."
steps:
- reply:
You can run the above configuration with the argo
command.
argo <path/to/config.yaml>
Check the examples folder for more detailed examples.
Documentation is still under construction. However, you can check the examples for a quick start.
The following are code-first examples:
- Hello World: The barebones chat app with no extra skills.
- Coder: A simple agent that can aswer math questions with a code interpreter.
- Banker: A simple agent that can manage a (simulated) bank account.
- Search: An agent that can answer factual questions by searching the web.
The following are YAML-first examples:
- Hello World: The barebones chat app with no extra skills.
- Bruno: An agent that refuses to talk about Bruno.
- Psychologist: A simplisitic agent that can counsel the user.
ARGO is designed around the key principles of modularity, flexibility, and simplicity. It is a non-opinionated framework that provides only the barebone functionality to build agentic workflows. As such, there are no concrete implementations of any specific tools or skills, or agentic paradigms like ReAct, Chain of Thought, etc.
However, ARGO gives you the tools to easily instantiate these paradigms and anything else you can dream of with minimal effort. Furthermore, you will find in the documentation plenty of examples using some of the most common agentic paradigms in the literature, including CoT, ReAct, actor-critic, self-consistency, ensembles, and many more.
The following is a very high-level explanation of the architecture and key ideas in ARGO.
The main concept in ARGO is the Agent. An agent encapsulates a set of related functionalities to solve a given domain problem. Ultimately, and agent wraps a language model (LLM) and provides a simple interface for interacting with it via customizable and dynamic prompts.
Agents can use specialized skills, including delegating work on other specialized agents. This allows you to construct hierarchies and workflows to solve complex problems.
Every agent has a set of one or more skills. A skill encapsulates domain knowledge on how to solve a concrete problem. This can require one or more prompts and tools, and it can be as flexible or as rigid as needed.
Think of a skill as a blueprint on how to solve a given problem, starting from a given prompt, and potentially using one or more tools. Skills can be highly structured, detailing at each each step how the agent should respond to specific inputs. However, skills can also leverage the flexibility of LLMs to be as flexible as necessary.
Tools encapsulate external functionality such as calling APIs, running code or commands, or performing other operations that are not directly available to the LLM. Tools are used by skills to extend the capabilities of the agent.
A very important concept in ARGO is the conversation context. This object encapsulates the list of messages available in the current iteration of the conversation, and provides all the methods to interact with the language model intelligently. Furthermore, the context keeps track of where we are in the conversation flow.
A unique feature of ARGO is the capability to "train" agents to become better at solving specific problems. Traditionally, the cheap way to "train" LLM agents is to provide them with a set of examples of how they should behave. But crafting specific examples for each problem is time-consuming and error-prone.
ARGO aims to solve this by interactively building a set of relevant, diverse, and high-quality examples for each pathway in the agentic workflow implemented. This is done by leveraging the LLM's own capabilities to generate and refine examples, plus user guidance to evaluate how well is the agent behaving.
When in training mode, an agent will execute as usual, but it will also collect data about the execution of each skill and tool. This data is then used to generate examples that can be used to improve the agent's performance. Each training session consists of a set of interactions with the user, where the agent will ask for feedback on its behavior at different points.
When the agent deviates from the intended behavior, the user can either discard that experience, or provide natural language feedback to indicate the agent how to modify its behavior. With the right feedback, the agent can re-do the execution of the skill or tool, and try again. This process can be repeated until the agent behaves as expected, at which point the sucessfull interaction is stored.
The result of a training session is a collection of structured examples that can be later provided to a new instance of the same agent to use during inference.
- Improve documentation and examples.
- Add skill definition via YAML.
- Add tool definition via YAML and REST endpoints.
- Add support for skill composition.
- Add support for multi-agent collaboration and delegation.
- Add training mode.
- Refactor the skill interface to use
Context
. - Fix all examples.
- Support for choice prompts in YAML mode.
- Example for
choice
instructions.
- Support for decision prompts in YAML mode.
- Example for
decide
instruction.
- Basic API for declarative agents (YAML mode).
- Example of basic YAML agent.
- CLI entrypoint for loading YAML agents.
- Middleware for skills (
@skill.require
syntax) - Better handling of errors.
- Verbose mode for LLM.
- Several new examples.
- Automatic skill selection and tool invocation.
- Basic architecture for agents, skills, and tools.
Contributions are welcome! Please read the Contribution Guidelines for specific details.
Everyone is expected to follow the Code of Conduct when contributing to this project.
ARGO is released under the MIT License.