Agents

Burr allows you to create agents that can interact with each other via State.

Multi-Agent Example

Here we list the different agent examples we have with Burr.

Divide and Conquer

A single agent can usually operate effectively using a handful of tools within a single domain, but even using powerful models like gpt-4, it can be less effective at using many tools.

One way to approach complicated tasks is through a “divide-and-conquer” approach: create a “specialized agent” for each task or domain and route tasks to the correct “expert”. This means that each agent can become a sequence of LLM calls that chooses how to use a specific “tool”.

The examples we link to below are inspired by the paper AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation by Wu, et. al.. They can be found in this part of our repository.

We have two implementations that show case this. One uses LangChain’s LCEL, the other uses Hamilton. From a Burr standpoint they look pretty similar as Burr doesn’t care what code you use within an action, or how you set up your state. Each implementation has a notebook.ipynb that shows the basics. The application.py files contain extra things like examples of tracing and hooks.

LangChain/LCEL:

Hamilton:

Templates

We have the bones of a few applications that can be used to create agents. These are not fully fleshed out, but they can be used as a starting point for creating your own agents.

We have the following templates:

  1. multi_modal_agent

  2. multi_agent_collaboration

  3. agent_supervisor

  4. hierarchical_agent_teams

See the templates directory under examples in our repository for the code.