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: poetry, env variables, favicon (#218)
Shawn Qiu45ac351f038c
diff --git a/docs/favicon.png b/docs/favicon.pngindex 6777977e..20aa965f 100644Binary files a/docs/favicon.png and b/docs/favicon.png differdiff --git a/docs/images/api-keys.png b/docs/images/api-keys.pngindex c54c2c17..513611d4 100644Binary files a/docs/images/api-keys.png and b/docs/images/api-keys.png differdiff --git a/docs/mint.json b/docs/mint.jsonindex 5cfe2075..5d746cbe 100644--- a/docs/mint.json+++ b/docs/mint.json@@ -50,22 +50,18 @@"v1/details/recording-events","v1/details/tracking-agents","v1/details/tracking-llm-calls",- "v1/details/more-models-with-litellm"+ "v1/details/more-models-with-litellm",+ "v1/details/environment-variables"]},{"group": "Integrations",- "pages": ["v1/integrations/crewai", "v1/integrations/cohere"]- },{- "group": "Other Info","pages": [- "v1/details/host-env"+ "v1/integrations/crewai",+ "v1/integrations/cohere"]},{- "group": "Integrations",- "pages": ["v1/integrations/crewai"]- },{"group": "Other Info","pages": ["v1/details/host-env"@@ -82,4 +78,4 @@"apiHost": "https://us.i.posthog.com"}}-}+}\ No newline at end of filediff --git a/docs/v0/quickstart.mdx b/docs/v0/quickstart.mdxindex 4d73954c..9f0d0220 100644--- a/docs/v0/quickstart.mdx+++ b/docs/v0/quickstart.mdx@@ -51,9 +51,14 @@ You can retrieve an API from [your account page](https://app.agentops.ai/account### Install the SDK-```shell shell+<CodeGroup>+```bash pippip install agentops-````+```+```bash poetry+poetry add agentops+```+</CodeGroup>### Add the AgentOps SDK to your agent in 3 easy stepsdiff --git a/docs/v1/details/environment-variables.mdx b/docs/v1/details/environment-variables.mdxnew file mode 100644index 00000000..fcba6fe2--- /dev/null+++ b/docs/v1/details/environment-variables.mdx@@ -0,0 +1,19 @@+---+title: "Environment Variables"+description: "Environment Variables that AgentOps will look for"+---++### Sample .env file++```.env+# API KEY for using AgentOps. Find this in your settings page+AGENTOPS_API_KEY=<YOUR API KEY>+# Secondary API Key for simultaneously recording to a second project+AGENTOPS_PARENT_KEY=<YOUR PARENT KEY>+# The AgentOps API endpoint. Defaults to https://api.agentops.ai+AGENTOPS_API_ENDPOINT=https://api.agentops.ai+# Logging level. <DEBUG, INFO, CRITICAL>+AGENTOPS_LOGGING_LEVEL=INFO+# Whether to opt out of recording environment data. <FALSE, TRUE>+AGENTOPS_ENV_DATA_OPT_OUT=FALSE+```\ No newline at end of filediff --git a/docs/v1/details/langchain-callback-handler.mdx b/docs/v1/details/langchain-callback-handler.mdxindex 51dd2a48..eeedcf60 100644--- a/docs/v1/details/langchain-callback-handler.mdx+++ b/docs/v1/details/langchain-callback-handler.mdx@@ -19,9 +19,14 @@ As an alternative to instrumenting, the Langchain Callback Handler is available.## Usage### Install Dependencies-```shell+<CodeGroup>+```bash pippip install agentops[langchain]```+```bash poetry+poetry add agentops[langchain]+```+</CodeGroup>### Disable Instrumentationdiff --git a/docs/v1/details/tracking-llm-calls.mdx b/docs/v1/details/tracking-llm-calls.mdxindex aa0df498..7cb3cdba 100644--- a/docs/v1/details/tracking-llm-calls.mdx+++ b/docs/v1/details/tracking-llm-calls.mdx@@ -3,8 +3,21 @@ title: "Tracking LLM Calls"description: "Tracking LLM Calls using the AgentOps SDK"----When the AgentOps SDK detects the `openai` as an installable module, it will automatically-start tracking OpenAI calls by instrumenting chat completions to track their usage.+### How it works++When the AgentOps SDK detects the `openai`, `litellm`, or `cohere` as installed modules, it will automatically+start tracking their usage. No further work is required from you! 😊++### Not working?++Try these steps:+1. Make sure you have the latest version of the AgentOps SDK installed. We are constantly updating it to support new LLM libraries and releases.+2. Make sure you are calling `agentops.init()` *after* importing the LLM module but *before* you are calling the LLM method.+3. Make sure the `instrument_llm_calls` parameter of `agentops.init()` is set to `True` (default).++Still not working? Please let us know! You can find us on [Discord](https://discord.gg/DR2abmETjZ),+ [GitHub](https://github.com/AgentOps-AI/agentops),+ or email us at [[email protected]](mailto:[email protected]).To get started, just follow the quick start guide.diff --git a/docs/v1/installation.mdx b/docs/v1/installation.mdxindex 0ca170c4..69684b0b 100644--- a/docs/v1/installation.mdx+++ b/docs/v1/installation.mdx@@ -4,13 +4,18 @@ title: "Installing AgentOps"## Install the SDK-```bash bash+<CodeGroup>+```bash pippip install agentops```+```bash poetry+poetry add agentops+```+</CodeGroup>## Get an API key-Retrieve an API Key from your [settings](https://app.agentops.ai/settings/projects) page.+Retrieve an API Key from the Settings > [Projects & API Keys](https://app.agentops.ai/settings/projects) page.API keys are tied to individual projects.<br></br>A Default Project has been created for you, so just click <span style={{ padding: "5px 10px", backgroundColor: "black", color: "white", borderRadius: "5px"}}>Copy API Key</span>diff --git a/docs/v1/integrations/cohere.mdx b/docs/v1/integrations/cohere.mdxindex 35acb75f..a27ec1e5 100644--- a/docs/v1/integrations/cohere.mdx+++ b/docs/v1/integrations/cohere.mdx@@ -5,9 +5,14 @@ description: "AgentOps's support for Cohere(>=5.4.0) is first class like Jack Ha## Install the SDK-```bash bash+<CodeGroup>+```bash pippip install agentops```+```bash poetry+poetry add agentops+```+</CodeGroup>## Get an API keydiff --git a/docs/v1/integrations/crewai.mdx b/docs/v1/integrations/crewai.mdxindex 30f6bcaa..1cc2d61d 100644--- a/docs/v1/integrations/crewai.mdx+++ b/docs/v1/integrations/crewai.mdx@@ -16,8 +16,14 @@ be encouraged to use the core Crew SDK.**Install crew from the AgentOps Fork:**-`pip install git+https://github.com/AgentOps-AI/crewAI.git@main`-+<CodeGroup>+```bash pip+pip install git+https://github.com/AgentOps-AI/crewAI.git@main+```+```bash poetry+poetry add git+https://github.com/AgentOps-AI/crewAI.git@main+```+</CodeGroup>## Using CrewCrew has comprehensive [documentation](https://docs.crewai.com) available as well as a great [Crew Quickstart](https://docs.crewai.com/how-to/Creating-a-Crew-and-kick-it-off/).diff --git a/docs/v1/quickstart.mdx b/docs/v1/quickstart.mdxindex 9b3b3b5d..e186072e 100644--- a/docs/v1/quickstart.mdx+++ b/docs/v1/quickstart.mdx@@ -17,8 +17,8 @@ agentops.init(<INSERT YOUR API KEY HERE>)```</CodeGroup>-When openai has been imported, instantiating the AgentOps client will automatically-instrument chat completions. You will be able to see all of your sessions on the AgentOps+When the `openai`, `litellm`, or `cohere` packages have been imported, instantiating the AgentOps client will automatically+instrument them, meaning you will be able to see all of your sessions on the AgentOpsdashboard along with the full LLM chat histories, cost, token counts, etc.@@ -99,9 +99,9 @@ That's all you need to get started! Check out the documentation below to see how<CardGroup cols={2}><Card- title="Recording Events"+ title="Examples and Video Guides"icon="square-code"- href="/v1/details/recording-events"+ href="/v1/examples">Record all of your other events the way AgentOps intends.</Card>