Skip to content

Commit

Permalink
Merge branch 'main' into multiple-sessions
Browse files Browse the repository at this point in the history
# Conflicts:
#	docs/v1/usage/tracking-agents.mdx
  • Loading branch information
bboynton97 committed Jul 9, 2024
2 parents 8d1afc7 + 99e8222 commit ef36b5c
Show file tree
Hide file tree
Showing 27 changed files with 101 additions and 117 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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/external/logo/banner-badge-docs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"$schema": "https://mintlify.com/schema.json",
"name": "AgentOps",
"logo": {
"dark": "https://raw.githubusercontent.com/AgentOps-AI/agentops/35d5682866921a9e28d8ef66ae3c3b3d92d8fa6b/img/logo.png",
"light": "https://raw.githubusercontent.com/AgentOps-AI/agentops/35d5682866921a9e28d8ef66ae3c3b3d92d8fa6b/img/logo.png"
"dark": "/images/external/logo/banner-badge-docs-resized-white.png",
"light": "/images/external/logo/banner-badge-docs-resized-black.png"
},
"favicon": "/favicon.png",
"colors": {
Expand Down
3 changes: 3 additions & 0 deletions docs/v1/concepts/core-concepts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,6 @@ Optionally, agents may also have:
### Threads

*Details coming soon.*

<script type="module" src="/scripts/github_stars.js"></script>
<script type="module" src="/scripts/adjust_api_dynamically.js"></script>
3 changes: 3 additions & 0 deletions docs/v1/concepts/decorators.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ Sometimes your agent system will use functions that are important to track as [`
Adding this decorator above any function will allow every instance of that function call to be tracked and displayed
in your [Session](v1/concepts/sessions) Drill-Down on the dashboard.
<script type="module" src="/scripts/github_stars.js"></script>
<script type="module" src="/scripts/adjust_api_dynamically.js"></script>
3 changes: 3 additions & 0 deletions docs/v1/concepts/events.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,6 @@ def scrape_website(url: str):
record(tool_event)
```
</CodeGroup>

<script type="module" src="/scripts/github_stars.js"></script>
<script type="module" src="/scripts/adjust_api_dynamically.js"></script>
5 changes: 4 additions & 1 deletion docs/v1/concepts/host-env.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,7 @@ AgentOps users can opt out of certain environment data collection by setting the
AGENTOPS_ENV_DATA_OPT_OUT=True
```

For more questions on privacy and data usage, please [send us an email](mailto:[email protected])
For more questions on privacy and data usage, please [send us an email](mailto:[email protected])

<script type="module" src="/scripts/github_stars.js"></script>
<script type="module" src="/scripts/adjust_api_dynamically.js"></script>
5 changes: 4 additions & 1 deletion docs/v1/concepts/sessions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,7 @@ _More info for the curious_
Under the hood, `agentops.init()` sets up a `Client` object with various configuration options like your API key, worker thread options
for when to send out batches of events, etc. Whenever you start a new session, these configuration options will automatically
be applied. You can also apply different configuration options when you start a new session by passing in a
[Configuration](/v1/usage/sdk-reference/#configuration) object.
[Configuration](/v1/usage/sdk-reference/#configuration) object.

<script type="module" src="/scripts/github_stars.js"></script>
<script type="module" src="/scripts/adjust_api_dynamically.js"></script>
5 changes: 4 additions & 1 deletion docs/v1/concepts/tags.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,7 @@ agentops.add_tags(['appended tag'])
## Session Drill-down
1. Click the session selector button
2. In the session selector, click "Tags"
3. Choose what tags to search by
3. Choose what tags to search by

<script type="module" src="/scripts/github_stars.js"></script>
<script type="module" src="/scripts/adjust_api_dynamically.js"></script>
3 changes: 3 additions & 0 deletions docs/v1/examples.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,6 @@ mode: "wide"
![thumbnail](https://cdn.loom.com/sessions/thumbnails/679d65cc06f148299e8dffc459d053ab-with-play.gif)
</Card>
</CardGroup>

<script type="module" src="/scripts/github_stars.js"></script>
<script type="module" src="/scripts/adjust_api_dynamically.js"></script>
Binary file added docs/v1/img/chart-waterfall.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 3 additions & 17 deletions docs/v1/integrations/autogen.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Autogen has comprehensive [documentation](https://microsoft.github.io/autogen/do
poetry add agentops
```
</CodeGroup>
<Check>Give us a star](https://github.com/AgentOps-AI/agentops) on GitHub while you're at it (you may be our <span id="stars-text">2,000th</span> 😊)</Check>
<Check>[Give us a star](https://github.com/AgentOps-AI/agentops) on GitHub while you're at it (you may be our <span id="stars-text">2,000th</span> 😊)</Check>
</Step>
<Step title="Install Autogen">
<CodeGroup>
Expand Down Expand Up @@ -80,19 +80,5 @@ Autogen has comprehensive [documentation](https://microsoft.github.io/autogen/do
</Step>
</Steps>

<script>
{window.addEventListener('load', function() {
fetch("https://api.github.com/repos/AgentOps-AI/agentops")
.then((response) => response.json())
.then((data) => {
const stars = Math.ceil(data.stargazers_count / 1000) * 1000;
const dataContainer = document.getElementById("stars-text");
dataContainer.innerHTML = `${stars.toLocaleString()}th`;

})
.catch((error) => {
console.error("Error:", error);
document.getElementById("stars-text").textContent = 'Error loading data.';
});
})}
</script>
<script type="module" src="/scripts/github_stars.js"></script>
<script type="module" src="/scripts/adjust_api_dynamically.js"></script>
18 changes: 2 additions & 16 deletions docs/v1/integrations/cohere.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -115,19 +115,5 @@ This is a living integration. Should you need any added functionality message us
```
</CodeGroup>

<script>
{window.addEventListener('load', function() {
fetch("https://api.github.com/repos/AgentOps-AI/agentops")
.then((response) => response.json())
.then((data) => {
const stars = Math.ceil(data.stargazers_count / 1000) * 1000;
const dataContainer = document.getElementById("stars-text");
dataContainer.innerHTML = `${stars.toLocaleString()}th`;

})
.catch((error) => {
console.error("Error:", error);
document.getElementById("stars-text").textContent = 'Error loading data.';
});
})}
</script>
<script type="module" src="/scripts/github_stars.js"></script>
<script type="module" src="/scripts/adjust_api_dynamically.js"></script>
28 changes: 6 additions & 22 deletions docs/v1/integrations/crewai.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,16 @@ Crew has comprehensive [documentation](https://docs.crewai.com) available as wel
</CodeGroup>
<Check>[Give us a star](https://github.com/AgentOps-AI/agentops) on GitHub while you're at it (you may be our <span id="stars-text">2,000th</span> 😊)</Check>
</Step>
<Step title="Install Crew from the AgentOps fork">
<Step title="Install Crew with AgentOps">
<Warning>
At this time, Crew with AgentOps integration is in pre-release. In the interim, an official fork has been
made available. After official support is released, this fork will be deprecated and developers will
be encouraged to use the core Crew SDK.
Crew and AgentOps have an official partnership, adding first-class agent observability to all Crew runs.
</Warning>
<CodeGroup>
```bash pip
pip install git+https://github.com/AgentOps-AI/crewAI.git@main
pip install 'crewai[agentops]'
```
```bash poetry
poetry add git+https://github.com/AgentOps-AI/crewAI.git@main
poetry add 'crewai[agentops]'
```
</CodeGroup>
</Step>
Expand Down Expand Up @@ -106,19 +104,5 @@ agentops.init(skip_auto_end_session=True)
<Card title="Markdown Validator" icon="markdown" href="https://github.com/Agentops-AI/crewAI-examples/tree/main/markdown_validator" />
</CardGroup>

<script>
{window.addEventListener('load', function() {
fetch("https://api.github.com/repos/AgentOps-AI/agentops")
.then((response) => response.json())
.then((data) => {
const stars = Math.ceil(data.stargazers_count / 1000) * 1000;
const dataContainer = document.getElementById("stars-text");
dataContainer.innerHTML = `${stars.toLocaleString()}th`;

})
.catch((error) => {
console.error("Error:", error);
document.getElementById("stars-text").textContent = 'Error loading data.';
});
})}
</script>
<script type="module" src="/scripts/github_stars.js"></script>
<script type="module" src="/scripts/adjust_api_dynamically.js"></script>
11 changes: 6 additions & 5 deletions docs/v1/integrations/langchain.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ AgentOps works seamlessly with applications built using Langchain.
poetry add agentops[langchain]
```
</CodeGroup>
<Check>
[Give us a star](https://github.com/AgentOps-AI/agentops) on GitHub while you're at it (you may be our 2,000th 😊)
</Check>
<Check>[Give us a star](https://github.com/AgentOps-AI/agentops) on GitHub while you're at it (you may be our <span id="stars-text">2,000th</span> 😊)</Check>
</Step>
<Step title="Set up your import statements">
Import the following Langchain and AgentOps dependencies
Expand Down Expand Up @@ -87,7 +85,7 @@ AgentOps works seamlessly with applications built using Langchain.

## Full Examples

<CodeGroup>
<CodeGroup className="adjust-api-key">
```python python
import os
from langchain.chat_models import ChatOpenAI
Expand All @@ -107,4 +105,7 @@ AgentOps works seamlessly with applications built using Langchain.
callbacks=[handler], # You must pass in a callback handler to record your agent
handle_parsing_errors=True)
```
</CodeGroup>
</CodeGroup>

<script type="module" src="/scripts/github_stars.js"></script>
<script type="module" src="/scripts/adjust_api_dynamically.js"></script>
20 changes: 4 additions & 16 deletions docs/v1/integrations/litellm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Call 100+ LLMs using the same Input/Output Format

LiteLLM also supports many [providers](https://docs.litellm.ai/docs/providers)

<Check>[Give us a star](https://github.com/AgentOps-AI/agentops) on GitHub while you're at it (you may be our <span id="stars-text">2,000th</span> 😊)</Check>

## Using AgentOps with LiteLLM

### Requires litellm>=1.3.1
Expand All @@ -38,19 +40,5 @@ response = await litellm.acompletion(model="claude-3", messages=messages)

```

<script>
{window.addEventListener('load', function() {
fetch("https://api.github.com/repos/AgentOps-AI/agentops")
.then((response) => response.json())
.then((data) => {
const stars = Math.ceil(data.stargazers_count / 1000) * 1000;
const dataContainer = document.getElementById("stars-text");
dataContainer.innerHTML = `${stars.toLocaleString()}th`;

})
.catch((error) => {
console.error("Error:", error);
document.getElementById("stars-text").textContent = 'Error loading data.';
});
})}
</script>
<script type="module" src="/scripts/github_stars.js"></script>
<script type="module" src="/scripts/adjust_api_dynamically.js"></script>
18 changes: 2 additions & 16 deletions docs/v1/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,5 @@ View a meta-analysis of all of your sessions in a single view.
<img height="200" src="https://github.com/AgentOps-AI/agentops/blob/cf67191f13e0e2a09446a61b7393e1810b3eee95/docs/images/overview.png?raw=true" />
</Frame>

<script>
{window.addEventListener('load', function() {
fetch("https://api.github.com/repos/AgentOps-AI/agentops")
.then((response) => response.json())
.then((data) => {
const stars = Math.ceil(data.stargazers_count / 1000) * 1000;
const dataContainer = document.getElementById("stars-text");
dataContainer.innerHTML = `${stars.toLocaleString()}th`;

})
.catch((error) => {
console.error("Error:", error);
document.getElementById("stars-text").textContent = 'Error loading data.';
});
})}
</script>
<script type="module" src="/scripts/github_stars.js"></script>
<script type="module" src="/scripts/adjust_api_dynamically.js"></script>
18 changes: 2 additions & 16 deletions docs/v1/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -154,19 +154,5 @@ agentops.end_session('Success')
</Card>
</CardGroup>

<script>
{window.addEventListener('load', function() {
fetch("https://api.github.com/repos/AgentOps-AI/agentops")
.then((response) => response.json())
.then((data) => {
const stars = Math.ceil(data.stargazers_count / 1000) * 1000;
const dataContainer = document.getElementById("stars-text");
dataContainer.innerHTML = `${stars.toLocaleString()}th`;

})
.catch((error) => {
console.error("Error:", error);
document.getElementById("stars-text").textContent = 'Error loading data.';
});
})}
</script>
<script type="module" src="/scripts/github_stars.js"></script>
<script type="module" src="/scripts/adjust_api_dynamically.js"></script>
Empty file.
28 changes: 28 additions & 0 deletions docs/v1/scripts/stars.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
function updateStars() {
fetch("https://api.github.com/repos/AgentOps-AI/agentops")
.then((response) => response.json())
.then((data) => {
const stars = Math.ceil(data.stargazers_count / 100) * 100 + 100;
setTimeout(() => {
const dataContainer = document.getElementById("stars-text");
dataContainer.innerHTML = `${stars.toLocaleString()}th`;
}, 50);
})
.catch((error) => {
// console.error("Github Stars pull error:", error);
});
}

function addNewEventListeners() {
setTimeout(() => {
document.querySelectorAll('li, a').forEach(element => {
element.addEventListener('click', updateStars);
});
}, 50);
}

window.addEventListener('load', function() {
updateStars();
const observer = new MutationObserver(addNewEventListeners);
observer.observe(document.body, { childList: true, subtree: true });
});
5 changes: 4 additions & 1 deletion docs/v1/usage/environment-variables.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,7 @@ AGENTOPS_API_ENDPOINT=https://api.agentops.ai
AGENTOPS_LOGGING_LEVEL=INFO
# Whether to opt out of recording environment data. <FALSE, TRUE>. Defaults to FALSE
AGENTOPS_ENV_DATA_OPT_OUT=FALSE
```
```

<script type="module" src="/scripts/github_stars.js"></script>
<script type="module" src="/scripts/adjust_api_dynamically.js"></script>
5 changes: 4 additions & 1 deletion docs/v1/usage/langchain-callback-handler.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,7 @@ response = chain.invoke({"animal": "bears"})

If your project uses Langchain for Agents, Events and Tools, it may be easier to use the callback Handler for observability.

If your project uses models with Langchain that are not yet supported by AgentOps, they can be supported by the Handler.
If your project uses models with Langchain that are not yet supported by AgentOps, they can be supported by the Handler.

<script type="module" src="/scripts/github_stars.js"></script>
<script type="module" src="/scripts/adjust_api_dynamically.js"></script>
3 changes: 3 additions & 0 deletions docs/v1/usage/recording-events.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@ Record any child of the [Event type](/v1/concepts/events) or ErrorEvent.
from agentops import record, ActionEvent
record(ActionEvent("event_type1"))
```

<script type="module" src="/scripts/github_stars.js"></script>
<script type="module" src="/scripts/adjust_api_dynamically.js"></script>
5 changes: 4 additions & 1 deletion docs/v1/usage/sdk-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -151,4 +151,7 @@ Stores the configuration settings for AgentOps clients.
[Reference](/v1/usage/langchain-callback-handler)

This callback handler is intended to be used as an option in place of AgentOps auto-instrumenting. This is only useful
when using Langchain as your LLM calling library.
when using Langchain as your LLM calling library.

<script type="module" src="/scripts/github_stars.js"></script>
<script type="module" src="/scripts/adjust_api_dynamically.js"></script>
5 changes: 4 additions & 1 deletion docs/v1/usage/tracking-agents.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,7 @@ agent.completion(...)
session.end_session()
```

In this example, we create a custom agent class. We initialize an agent object and pass in the session to ensure the agent is assigned properly.
In this example, we create a custom agent class. We initialize an agent object and pass in the session to ensure the agent is assigned properly.

<script type="module" src="/scripts/github_stars.js"></script>
<script type="module" src="/scripts/adjust_api_dynamically.js"></script>
3 changes: 3 additions & 0 deletions docs/v1/usage/tracking-llm-calls.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@ To get started, just follow the quick start guide.
Get started with AgentOps in under 5 minutes
</Card>
</CardGroup>

<script type="module" src="/scripts/github_stars.js"></script>
<script type="module" src="/scripts/adjust_api_dynamically.js"></script>

0 comments on commit ef36b5c

Please sign in to comment.