Integrating AgentOps with Haystack
1
Install the AgentOps SDK
2
Install Haystack
We currently only support Haystack 2.x.
3
Configure your environment
Set your API key as an
.env
variable for easy access.4
Add 3 lines of code
Make sure to call
agentops.init
before calling any openai
, cohere
, crew
, etc models.5
Run your agent
Execute your script and then visit app.agentops.ai/drilldown to monitor your Haystack agent in action. 🕵️
After execution, AgentOps outputs a clickable URL in the console that links directly to your session in the Dashboard.

Clickable link to session
Supported generators
- OpenAI:
haystack.components.generators.openai.OpenAIGenerator
- Azure OpenAI Chat:
haystack.components.generators.chat.AzureOpenAIChatGenerator