Multi-Agent Example
How to track operations from multiple different agents
View Notebook on Github
Multi-Agent Support
This is an example implementation of tracking operations from two separate agents
Installation
Setup
Import the necessary libraries:
Set up your API keys:
Initialize AgentOps at the beginning of your application:
Creating Multiple Agents
Now let’s create a few agents using the @agent
decorator:
Instantiate your agents:
Using Different Agents
Now we can use these agents to complete different tasks. Any LLM calls that go through these classes will be tagged as agent calls in AgentOps.
Default Agent Behavior
If we make an LLM call outside of the context of a tracked agent, it gets assigned to the Default Agent.
Further Reading
Check out other advanced examples like OpenAI Assistants integration.