Skip to main content
AgentOps makes monitoring your Haystack agents seamless. Haystack, much like AutoGen, is a flexible framework that supports multiple models. For detailed installation instructions and feature overviews, refer to the Haystack documentation.

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.
Read more about environment variables in Advanced Configuration
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.

Supported generators

  • OpenAI: haystack.components.generators.openai.OpenAIGenerator
  • Azure OpenAI Chat: haystack.components.generators.chat.AzureOpenAIChatGenerator

Full Examples

You can refer to the following examples -