diff --git a/docs/favicon.png b/docs/favicon.png index 6777977e..20aa965f 100644 Binary files a/docs/favicon.png and b/docs/favicon.png differ diff --git a/docs/images/api-keys.png b/docs/images/api-keys.png index c54c2c17..513611d4 100644 Binary files a/docs/images/api-keys.png and b/docs/images/api-keys.png differ diff --git a/docs/mint.json b/docs/mint.json index 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 file diff --git a/docs/v0/quickstart.mdx b/docs/v0/quickstart.mdx index 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 + +```bash pip pip install agentops -```` +``` +```bash poetry +poetry add agentops +``` + ### Add the AgentOps SDK to your agent in 3 easy steps diff --git a/docs/v1/details/environment-variables.mdx b/docs/v1/details/environment-variables.mdx new file mode 100644 index 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= +# Secondary API Key for simultaneously recording to a second project +AGENTOPS_PARENT_KEY= +# The AgentOps API endpoint. Defaults to https://api.agentops.ai +AGENTOPS_API_ENDPOINT=https://api.agentops.ai +# Logging level. +AGENTOPS_LOGGING_LEVEL=INFO +# Whether to opt out of recording environment data. +AGENTOPS_ENV_DATA_OPT_OUT=FALSE +``` \ No newline at end of file diff --git a/docs/v1/details/langchain-callback-handler.mdx b/docs/v1/details/langchain-callback-handler.mdx index 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 + +```bash pip pip install agentops[langchain] ``` +```bash poetry +poetry add agentops[langchain] +``` + ### Disable Instrumentation diff --git a/docs/v1/details/tracking-llm-calls.mdx b/docs/v1/details/tracking-llm-calls.mdx index 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 [engineering@agentops.ai](mailto:engineering@agentops.ai). To get started, just follow the quick start guide. diff --git a/docs/v1/installation.mdx b/docs/v1/installation.mdx index 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 + +```bash pip pip install agentops ``` +```bash poetry +poetry add agentops +``` + ## 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.

A Default Project has been created for you, so just click Copy API Key diff --git a/docs/v1/integrations/cohere.mdx b/docs/v1/integrations/cohere.mdx index 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 + +```bash pip pip install agentops ``` +```bash poetry +poetry add agentops +``` + ## Get an API key diff --git a/docs/v1/integrations/crewai.mdx b/docs/v1/integrations/crewai.mdx index 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` - + +```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 +``` + ## Using Crew Crew 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.mdx index 9b3b3b5d..e186072e 100644 --- a/docs/v1/quickstart.mdx +++ b/docs/v1/quickstart.mdx @@ -17,8 +17,8 @@ agentops.init() ``` -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 AgentOps dashboard 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 Record all of your other events the way AgentOps intends.