Skip to content

armgit / burr

Public Imported from GitHub
0

Build applications that make decisions (chatbots, agents, simulations, etc...). Monitor, trace, persist, and execute on your own infrastructure.

2.5 KB
Raw Blame

Multi Agent Collaboration

This example resembles the example found originally here.

show me the prompts

With Hamilton the prompts can be found in the module func_agent.py.

The Hamilton code creates the following dataflow:

dataflow

Tracing

You'll see that in application.py we have some lightweight tracing set up for Hamilton. This is a simple way to plug into Burr's tracer functionality -- this will allow you to see more in the Burr UI.

More functionality is on the roadmap!

Running the example

Install the dependencies:

pip install "apache-burr[start]" -r requirements.txt

Make sure you have the API Keys in your environment:

export OPENAI_API_KEY=YOUR_KEY
export TAVILY_API_KEY=YOUR_KEY

Run the notebook: Open In Colab or do it manually:

jupyter notebook

and open the notebook notebook.ipynb.

python application.py

Application run: hamilton image

What to adjust

There are a few things:

  1. The query that you provide for the agents to work over. This is just a matter of setting the query variable in the initial state passed in to the application.
  2. You can adjust the prompts used in the actual function calls in func_agent.py.