Skip to content

Commit

Permalink
docs: poetry, env variables, favicon (#218)
Browse files Browse the repository at this point in the history
  • Loading branch information
siyangqiu authored May 22, 2024
1 parent eaa00d7 commit 45ac351
Show file tree
Hide file tree
Showing 11 changed files with 77 additions and 23 deletions.
Binary file modified docs/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/api-keys.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 5 additions & 9 deletions docs/mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -82,4 +78,4 @@
"apiHost": "https://us.i.posthog.com"
}
}
}
}
9 changes: 7 additions & 2 deletions docs/v0/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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 pip
pip install agentops
````
```
```bash poetry
poetry add agentops
```
</CodeGroup>

### Add the AgentOps SDK to your agent in 3 easy steps

Expand Down
19 changes: 19 additions & 0 deletions docs/v1/details/environment-variables.mdx
Original file line number Diff line number Diff line change
@@ -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
```
7 changes: 6 additions & 1 deletion docs/v1/details/langchain-callback-handler.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,14 @@ As an alternative to instrumenting, the Langchain Callback Handler is available.
## Usage

### Install Dependencies
```shell
<CodeGroup>
```bash pip
pip install agentops[langchain]
```
```bash poetry
poetry add agentops[langchain]
```
</CodeGroup>

### Disable Instrumentation

Expand Down
17 changes: 15 additions & 2 deletions docs/v1/details/tracking-llm-calls.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
9 changes: 7 additions & 2 deletions docs/v1/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,18 @@ title: "Installing AgentOps"

## Install the SDK

```bash bash
<CodeGroup>
```bash pip
pip 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>
Expand Down
7 changes: 6 additions & 1 deletion docs/v1/integrations/cohere.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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 pip
pip install agentops
```
```bash poetry
poetry add agentops
```
</CodeGroup>

## Get an API key

Expand Down
10 changes: 8 additions & 2 deletions docs/v1/integrations/crewai.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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 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/).
Expand Down
8 changes: 4 additions & 4 deletions docs/v1/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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 AgentOps
dashboard along with the full LLM chat histories, cost, token counts, etc.


Expand Down Expand Up @@ -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>
Expand Down

0 comments on commit 45ac351

Please sign in to comment.