Python SDK for AI agent monitoring, LLM cost tracking, benchmarking, and more. Integrates with most LLMs and agent frameworks including CrewAI, Agno, OpenAI Agents SDK, Langchain, Autogen, AG2, and CamelAI
Python agentagentopsagents-sdkaianthropicautogencost-estimationcrewaievalsevaluation-metricsgroqlangchainllmmistralollamaopenaiopenai-agents
docs: add Haystack integration docs and links (#1233)
Alex Reibmanca8863cd7cda
diff --git a/docs/mint.json b/docs/mint.jsonindex 3af5008a..10300ff4 100644--- a/docs/mint.json+++ b/docs/mint.json@@ -144,6 +144,7 @@"v2/integrations/anthropic","v2/integrations/autogen","v2/integrations/crewai",+ "v2/integrations/haystack","v2/integrations/google_adk","v2/integrations/google_generative_ai","v2/integrations/langchain",diff --git a/docs/v2/examples/examples.mdx b/docs/v2/examples/examples.mdxindex f7e818cc..4bbd0c87 100644--- a/docs/v2/examples/examples.mdx+++ b/docs/v2/examples/examples.mdx@@ -60,6 +60,10 @@ description: 'Examples of AgentOps with various integrations'Google Agent Development Kit integration</Card>+ <Card title="Haystack" icon={<img src="https://www.github.com/agentops-ai/agentops/blob/main/docs/images/external/haystack/haystack-logo.png?raw=true" alt="Haystack" />} iconType="image" href="/v2/integrations/haystack">+ Monitor your Haystack agents with AgentOps+ </Card>+<Card title="OpenAI Agents SDK" icon={<img src="https://www.github.com/agentops-ai/agentops/blob/main/docs/images/external/openai/openai-logomark.png?raw=true" alt="OpenAI Agents SDK" />} iconType="image" href="/v2/examples/openai_agents">OpenAI Agents SDK workflow walkthrough</Card>@@ -81,4 +85,4 @@ description: 'Examples of AgentOps with various integrations'<script type="module" src="/scripts/github_stars.js" /><script type="module" src="/scripts/scroll-img-fadein-animation.js" /><script type="module" src="/scripts/button_heartbeat_animation.js" />-<script type="module" src="/scripts/adjust_api_dynamically.js" />\ No newline at end of file+<script type="module" src="/scripts/adjust_api_dynamically.js" />diff --git a/docs/v2/integrations/haystack.mdx b/docs/v2/integrations/haystack.mdxnew file mode 100644index 00000000..a23386eb--- /dev/null+++ b/docs/v2/integrations/haystack.mdx@@ -0,0 +1,83 @@+---+title: Haystack+description: "Monitor your Haystack agents with AgentOps"+---++[Haystack](https://docs.haystack.deepset.ai/docs/installation) is a flexible framework for building production-ready AI agents. AgentOps makes monitoring your Haystack agents seamless.++## Installation++<CodeGroup>+```bash pip+pip install agentops haystack-ai python-dotenv+```+```bash poetry+poetry add agentops haystack-ai python-dotenv+```+```bash uv+uv pip install agentops haystack-ai python-dotenv+```+</CodeGroup>++<Warning>+We currently only support Haystack 2.x.+</Warning>++## Setting Up API Keys++You'll need API keys for AgentOps and whatever model provider you use with Haystack (e.g. OpenAI):++- **AGENTOPS_API_KEY**: From your [AgentOps Dashboard](https://app.agentops.ai/)+- **OPENAI_API_KEY**: From the [OpenAI Platform](https://platform.openai.com/api-keys) *(if using OpenAI models)*++Set these as environment variables or in a `.env` file.++<CodeGroup>+```bash Export to CLI+export AGENTOPS_API_KEY="your_agentops_api_key_here"+export OPENAI_API_KEY="your_openai_api_key_here"+```+```txt Set in .env file+AGENTOPS_API_KEY="your_agentops_api_key_here"+OPENAI_API_KEY="your_openai_api_key_here"+```+</CodeGroup>++Then load them in your Python code:++```python+from dotenv import load_dotenv+import os++load_dotenv()+AGENTOPS_API_KEY = os.getenv("AGENTOPS_API_KEY")+OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")+```++## Usage++Integrating AgentOps with Haystack only takes a few lines:++```python+import agentops+from haystack.components.generators.openai import OpenAIGenerator++agentops.init(AGENTOPS_API_KEY)++generator = OpenAIGenerator(model="gpt-4o-mini", api_key=OPENAI_API_KEY)+result = generator.run(prompt="In one sentence, what is AgentOps?")+print(result["replies"][0])+```++Run your script and visit the [AgentOps Dashboard](https://app.agentops.ai/drilldown) to monitor the trace.++## Examples++- [Simple Haystack example (OpenAI)](https://github.com/AgentOps-AI/agentops/blob/main/examples/haystack/haystack_example.py)+- [Haystack Azure OpenAI Chat example](https://github.com/AgentOps-AI/agentops/blob/main/examples/haystack/azure_haystack_example.py)++<script type="module" src="/scripts/github_stars.js"></script>+<script type="module" src="/scripts/scroll-img-fadein-animation.js"></script>+<script type="module" src="/scripts/button_heartbeat_animation.js"></script>+<script type="module" src="/scripts/adjust_api_dynamically.js"></script>+diff --git a/docs/v2/introduction.mdx b/docs/v2/introduction.mdxindex 8e1ed367..cd794a5d 100644--- a/docs/v2/introduction.mdx+++ b/docs/v2/introduction.mdx@@ -27,6 +27,7 @@ Prefer asking your IDE? Install the Mintlify <a href="/v2/usage/mcp-docs"><stron<Card title="AutoGen" icon={<img src="https://www.github.com/agentops-ai/agentops/blob/main/docs/images/external/autogen/autogen-logo.svg?raw=true" alt="AutoGen" />} iconType="image" href="/v2/integrations/autogen" /><Card title="CrewAI" icon={<img src="https://www.github.com/agentops-ai/agentops/blob/main/docs/images/external/crewai/crewai-logo.png?raw=true" alt="CrewAI" />} iconType="image" href="/v2/integrations/crewai" /><Card title="Google ADK" icon={<img src="https://www.github.com/agentops-ai/agentops/blob/main/docs/images/external/google-adk/google-adk-logo.png?raw=true" alt="Google ADK" />} iconType="image" href="/v2/integrations/google_adk" />+ <Card title="Haystack" icon={<img src="https://www.github.com/agentops-ai/agentops/blob/main/docs/images/external/haystack/haystack-logo.png?raw=true" alt="Haystack" />} iconType="image" href="/v2/integrations/haystack" /><Card title="LangChain" icon={<img src="https://www.github.com/agentops-ai/agentops/blob/main/docs/images/external/langchain/langchain-logo.svg?raw=true" alt="LangChain" />} iconType="image" href="/v2/integrations/langchain" /><Card title="OpenAI Agents (Python)" icon={<img src="https://www.github.com/agentops-ai/agentops/blob/main/docs/images/external/openai/openai-logomark.png?raw=true" alt="OpenAI Agents Python" />} iconType="image" href="/v2/integrations/openai_agents_python" /><Card title="OpenAI Agents (TypeScript)" icon={<img src="https://www.github.com/agentops-ai/agentops/blob/main/docs/images/external/openai/openai-logomark.png?raw=true" alt="OpenAI Agents JS" />} iconType="image" href="/v2/integrations/openai_agents_js" />