From 448d63c1154d576244cbe330aee2f9f3dc52cbed Mon Sep 17 00:00:00 2001 From: Braelyn Boynton Date: Wed, 12 Jun 2024 15:25:31 -0700 Subject: [PATCH] autogen docs (#251) --- README.md | 6 +++ docs/v1/integrations/autogen.mdx | 81 ++++++++++++++++++++++++++++++-- 2 files changed, 84 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9aa2d6e8..a945d783 100644 --- a/README.md +++ b/README.md @@ -115,6 +115,12 @@ pip install git+https://github.com/AgentOps-AI/crewAI.git@main - [AgentOps integration example](https://docs.agentops.ai/v1/integrations/crewai) - [Official CrewAI documentation](https://docs.crewai.com/how-to/AgentOps-Observability) +### AutoGen 🤖 +With only two lines of code, add full observability and monitoring to Autogen agents. Set an `AGENTOPS_API_KEY` in your environment and call `agentops.init()` + +- [Autogen Observability Example](https://microsoft.github.io/autogen/docs/notebooks/agentchat_agentops) +- [Autogen - AgentOps Documentation](https://microsoft.github.io/autogen/docs/ecosystem/agentops) + ### Langchain 🦜🔗 AgentOps works seamlessly with applications built using Langchain. To use the handler, install Langchain as an optional dependency: diff --git a/docs/v1/integrations/autogen.mdx b/docs/v1/integrations/autogen.mdx index 058ea617..04922bfc 100644 --- a/docs/v1/integrations/autogen.mdx +++ b/docs/v1/integrations/autogen.mdx @@ -3,6 +3,81 @@ title: Autogen description: "AgentOps provides first class support for Autogen" --- - -Documentation for this integration is coming soon. - \ No newline at end of file +AgentOps and Autogen teamed up to make monitoring Autogen agents dead simple. + +Autogen has comprehensive [documentation](https://microsoft.github.io/autogen/docs) available as well as a great [quickstart](https://microsoft.github.io/autogen/docs/Getting-Started). + +## Adding AgentOps to Autogen agents + + + + + ```bash pip + pip install agentops + ``` + ```bash poetry + poetry add agentops + ``` + + + [Give us a star](https://github.com/AgentOps-AI/agentops) on GitHub while you're at it (you may be our 1,000th 😊) + + + + + ```bash pip + pip install pyautogen + ``` + ```bash poetry + poetry add pyautogen + ``` + + + + 1. Before setting up anything in Autogen, call `agentops.init()` + 2. At the end of your agent run, call `agentops.end_session("Success")` + + ```python python + import agentops + + # Beginning of program (i.e. main.py, __init__.py) + # IMPORTANT: Must be before using any autogen setup + agentops.init() + ... + # End of program (e.g. main.py) + agentops.end_session("Success") # Success|Fail|Indeterminate + ``` + + + Instantiating the AgentOps client will automatically instrument Autogen, meaning you will be able to see all + of your sessions on the AgentOps Dashboard along with the full LLM chat histories, cost, token counts, etc. + + + For more features see our [Usage](/v1/usage) section. + + + + Retrieve an API Key from your Settings > [Projects & API Keys](https://app.agentops.ai/settings/projects) page. + + + + + API keys are tied to individual projects.

+ A Default Project has been created for you, so just click Copy API Key +
+ Set this API Key in your [environment variables](/v1/usage/environment-variables) + ```python .env + AGENTOPS_API_KEY= + ``` +
+ + Execute your program and visit [app.agentops.ai/drilldown](https://app.agentops.ai/drilldown) to observe your Autogen Agent! 🕵️ + + After your run, AgentOps prints a clickable url to console linking directly to your session in the Dashboard + +
{/* Intentionally blank div for newline */} + + + + + \ No newline at end of file