Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions agentops/instrumentation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ class InstrumentorConfig(TypedDict):
"min_version": "0.1.0",
},
"google.genai": {
"module_name": "agentops.instrumentation.google_generativeai",
"class_name": "GoogleGenerativeAIInstrumentor",
"module_name": "agentops.instrumentation.google_genai",
"class_name": "GoogleGenAIInstrumentor",
"min_version": "0.1.0",
"package_name": "google-genai", # Actual pip package name
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
logger = logging.getLogger(__name__)

# Import after defining constants to avoid circular imports
from agentops.instrumentation.google_generativeai.instrumentor import GoogleGenerativeAIInstrumentor # noqa: E402
from agentops.instrumentation.google_genai.instrumentor import GoogleGenAIInstrumentor # noqa: E402

Check warning on line 34 in agentops/instrumentation/google_genai/__init__.py

View check run for this annotation

Codecov / codecov/patch

agentops/instrumentation/google_genai/__init__.py#L34

Added line #L34 was not covered by tests

__all__ = [
"LIBRARY_NAME",
"LIBRARY_VERSION",
"GoogleGenerativeAIInstrumentor",
"GoogleGenAIInstrumentor",
]
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
"""Attribute extractors for Google Generative AI instrumentation."""

from agentops.instrumentation.google_generativeai.attributes.common import (
from agentops.instrumentation.google_genai.attributes.common import (

Check warning on line 3 in agentops/instrumentation/google_genai/attributes/__init__.py

View check run for this annotation

Codecov / codecov/patch

agentops/instrumentation/google_genai/attributes/__init__.py#L3

Added line #L3 was not covered by tests
get_common_instrumentation_attributes,
extract_request_attributes,
)
from agentops.instrumentation.google_generativeai.attributes.model import (
from agentops.instrumentation.google_genai.attributes.model import (

Check warning on line 7 in agentops/instrumentation/google_genai/attributes/__init__.py

View check run for this annotation

Codecov / codecov/patch

agentops/instrumentation/google_genai/attributes/__init__.py#L7

Added line #L7 was not covered by tests
get_model_attributes,
get_generate_content_attributes,
get_stream_attributes,
get_token_counting_attributes,
)
from agentops.instrumentation.google_generativeai.attributes.chat import (
from agentops.instrumentation.google_genai.attributes.chat import (

Check warning on line 13 in agentops/instrumentation/google_genai/attributes/__init__.py

View check run for this annotation

Codecov / codecov/patch

agentops/instrumentation/google_genai/attributes/__init__.py#L13

Added line #L13 was not covered by tests
get_chat_attributes,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
from agentops.logging import logger
from agentops.semconv import SpanAttributes, LLMRequestTypeValues, MessageAttributes
from agentops.instrumentation.common.attributes import AttributeMap
from agentops.instrumentation.google_generativeai.attributes.common import (
from agentops.instrumentation.google_genai.attributes.common import (

Check warning on line 8 in agentops/instrumentation/google_genai/attributes/chat.py

View check run for this annotation

Codecov / codecov/patch

agentops/instrumentation/google_genai/attributes/chat.py#L8

Added line #L8 was not covered by tests
extract_request_attributes,
get_common_instrumentation_attributes,
)
from agentops.instrumentation.google_generativeai.attributes.model import (
from agentops.instrumentation.google_genai.attributes.model import (

Check warning on line 12 in agentops/instrumentation/google_genai/attributes/chat.py

View check run for this annotation

Codecov / codecov/patch

agentops/instrumentation/google_genai/attributes/chat.py#L12

Added line #L12 was not covered by tests
_extract_content_from_prompt,
_set_response_attributes,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
get_common_attributes,
_extract_attributes_from_mapping,
)
from agentops.instrumentation.google_generativeai import LIBRARY_NAME, LIBRARY_VERSION
from agentops.instrumentation.google_genai import LIBRARY_NAME, LIBRARY_VERSION

Check warning on line 12 in agentops/instrumentation/google_genai/attributes/common.py

View check run for this annotation

Codecov / codecov/patch

agentops/instrumentation/google_genai/attributes/common.py#L12

Added line #L12 was not covered by tests

# Common mapping for config parameters
REQUEST_CONFIG_ATTRIBUTES: AttributeMap = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from agentops.logging import logger
from agentops.semconv import SpanAttributes, LLMRequestTypeValues, MessageAttributes
from agentops.instrumentation.common.attributes import AttributeMap
from agentops.instrumentation.google_generativeai.attributes.common import (
from agentops.instrumentation.google_genai.attributes.common import (

Check warning on line 8 in agentops/instrumentation/google_genai/attributes/model.py

View check run for this annotation

Codecov / codecov/patch

agentops/instrumentation/google_genai/attributes/model.py#L8

Added line #L8 was not covered by tests
extract_request_attributes,
get_common_instrumentation_attributes,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@

from agentops.logging import logger
from agentops.instrumentation.common.wrappers import WrapConfig, wrap, unwrap
from agentops.instrumentation.google_generativeai import LIBRARY_NAME, LIBRARY_VERSION
from agentops.instrumentation.google_generativeai.attributes.model import (
from agentops.instrumentation.google_genai import LIBRARY_NAME, LIBRARY_VERSION
from agentops.instrumentation.google_genai.attributes.model import (

Check warning on line 20 in agentops/instrumentation/google_genai/instrumentor.py

View check run for this annotation

Codecov / codecov/patch

agentops/instrumentation/google_genai/instrumentor.py#L19-L20

Added lines #L19 - L20 were not covered by tests
get_generate_content_attributes,
get_token_counting_attributes,
)
from agentops.instrumentation.google_generativeai.stream_wrapper import (
from agentops.instrumentation.google_genai.stream_wrapper import (

Check warning on line 24 in agentops/instrumentation/google_genai/instrumentor.py

View check run for this annotation

Codecov / codecov/patch

agentops/instrumentation/google_genai/instrumentor.py#L24

Added line #L24 was not covered by tests
generate_content_stream_wrapper,
generate_content_stream_async_wrapper,
)
Expand Down Expand Up @@ -96,7 +96,7 @@
]


class GoogleGenerativeAIInstrumentor(BaseInstrumentor):
class GoogleGenAIInstrumentor(BaseInstrumentor):

Check warning on line 99 in agentops/instrumentation/google_genai/instrumentor.py

View check run for this annotation

Codecov / codecov/patch

agentops/instrumentation/google_genai/instrumentor.py#L99

Added line #L99 was not covered by tests
"""An instrumentor for Google Generative AI (Gemini) API.

This class provides instrumentation for Google's Generative AI API by wrapping key methods
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@

from agentops.semconv import SpanAttributes, LLMRequestTypeValues, CoreAttributes, MessageAttributes
from agentops.instrumentation.common.wrappers import _with_tracer_wrapper
from agentops.instrumentation.google_generativeai.attributes.model import (
from agentops.instrumentation.google_genai.attributes.model import (

Check warning on line 17 in agentops/instrumentation/google_genai/stream_wrapper.py

View check run for this annotation

Codecov / codecov/patch

agentops/instrumentation/google_genai/stream_wrapper.py#L17

Added line #L17 was not covered by tests
get_generate_content_attributes,
get_stream_attributes,
)
from agentops.instrumentation.google_generativeai.attributes.common import (
from agentops.instrumentation.google_genai.attributes.common import (

Check warning on line 21 in agentops/instrumentation/google_genai/stream_wrapper.py

View check run for this annotation

Codecov / codecov/patch

agentops/instrumentation/google_genai/stream_wrapper.py#L21

Added line #L21 was not covered by tests
extract_request_attributes,
)

Expand Down
7 changes: 5 additions & 2 deletions docs/mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,9 @@
{
"group": "Integrations",
"pages": [
"v2/integrations/anthropic",
"v2/integrations/ag2",
"v2/integrations/autogen",
"v2/integrations/anthropic",
"v2/integrations/crewai",
"v2/integrations/google_adk",
"v2/integrations/gemini",
Expand All @@ -188,7 +189,9 @@
"v2/usage/advanced-configuration",
"v2/usage/tracking-llm-calls",
"v2/usage/tracking-agents",
"v2/usage/recording-operations"
"v2/usage/recording-operations",
"v2/usage/trace-decorator",
"v2/usage/manual-trace-control"
],
"version": "v2"
},
Expand Down
30 changes: 15 additions & 15 deletions docs/v1/examples/examples.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ mode: "wide"
Manage multiple sessions at the same time
</Card>

<Card title="OpenAI Assistants" icon={<img src="/images/external/openai/openai-logomark.png" alt="OpenAI Assistants" />} iconType="image" href="/v1/integrations/openai" href="/v1/examples/openai_assistants">
<Card title="OpenAI Assistants" icon={<img src="https://www.github.com/agentops-ai/agentops/blob/main/docs/images/external/openai/openai-logomark.png?raw=true" alt="OpenAI Assistants" />} iconType="image" href="/v1/integrations/openai" href="/v1/examples/openai_assistants">
Observe OpenAI Assistants
</Card>
</CardGroup>
Expand All @@ -33,19 +33,19 @@ mode: "wide"
Integration with AI21's language models
</Card>

<Card title="Anthropic" icon={<img src="/images/external/anthropic/anthropic_icon_slate.png" alt="Anthropic" />} iconType="image" href="/v1/integrations/anthropic">
<Card title="Anthropic" icon={<img src="https://www.github.com/agentops-ai/agentops/blob/main/docs/images/external/anthropic/anthropic_icon_slate.png?raw=true" alt="Anthropic" />} iconType="image" href="/v1/integrations/anthropic">
Track observations from Claude, Haiku and Sonnet series of models
</Card>

<Card title="AG2" icon={<img src="/images/external/autogen/ag2.svg" alt="AG2"/>} iconType="image" href="/v1/integrations/autogen">
<Card title="AG2" icon={<img src="https://www.github.com/agentops-ai/agentops/blob/main/docs/images/external/autogen/ag2.svg?raw=true" alt="AG2"/>} iconType="image" href="/v1/integrations/autogen">
AG2 (Formerly AutoGen) multi-agent conversible workflow with tool usage
</Card>

<Card title="CamelAI" icon={<img src="/images/external/camel/camel.png" alt="CamelAI" />} iconType="image" href="/v1/examples/camel">
<Card title="CamelAI" icon={<img src="https://www.github.com/agentops-ai/agentops/blob/main/docs/images/external/camel/camel.png?raw=true" alt="CamelAI" />} iconType="image" href="/v1/examples/camel">
Track and analyze CAMEL agents
</Card>

<Card title="Cohere" icon={<img src="/images/external/cohere/cohere-logo.svg" alt="Cohere" />} iconType="image" href="/v1/integrations/cohere">
<Card title="Cohere" icon={<img src="https://www.github.com/agentops-ai/agentops/blob/main/docs/images/external/cohere/cohere-logo.svg?raw=true" alt="Cohere" />} iconType="image" href="/v1/integrations/cohere">
First class support for Command-R-Plus and chat streaming
</Card>

Expand All @@ -57,15 +57,15 @@ mode: "wide"
Ultra-fast LLM inference with Groq Cloud
</Card>

<Card title="Gemini" icon={<img src="/images/external/deepmind/gemini-logo.png" alt="Gemini" />} iconType="image" href="/v1/integrations/gemini">
<Card title="Gemini" icon={<img src="https://www.github.com/agentops-ai/agentops/blob/main/docs/images/external/deepmind/gemini-logo.png?raw=true" alt="Gemini" />} iconType="image" href="/v1/integrations/gemini">
Explore Google DeepMind's Gemini with observation via AgentOps
</Card>

<Card title="Haystack" icon={<img src="/images/external/haystack/haystack-logo.png" alt="Haystack" />} iconType="image" href="/v1/integrations/haystack">
<Card title="Haystack" icon={<img src="https://www.github.com/agentops-ai/agentops/blob/main/docs/images/external/haystack/haystack-logo.png?raw=true" alt="Haystack" />} iconType="image" href="/v1/integrations/haystack">
Monitor your Haystack agents with AgentOps
</Card>

<Card title="LangChain" icon={<img src="/images/external/langchain/langchain-logo.svg" alt="LangChain" />} iconType="image" href="/v1/examples/langchain">
<Card title="LangChain" icon={<img src="https://www.github.com/agentops-ai/agentops/blob/main/docs/images/external/langchain/langchain-logo.svg?raw=true" alt="LangChain" />} iconType="image" href="/v1/examples/langchain">
Jupyter Notebook with a sample LangChain integration
</Card>

Expand All @@ -77,39 +77,39 @@ mode: "wide"
Unified interface for multiple LLM providers
</Card>

<Card title="Mistral" icon={<img src="/images/external/mistral/mistral-ai-icon.png" alt="Mistral" />} iconType="image" href="/v1/integrations/mistral">
<Card title="Mistral" icon={<img src="https://www.github.com/agentops-ai/agentops/blob/main/docs/images/external/mistral/mistral-ai-icon.png?raw=true" alt="Mistral" />} iconType="image" href="/v1/integrations/mistral">
Support for Mistral AI's open-weight models
</Card>

<Card title="MultiOn" icon="atom" href="/v1/examples/multion">
Create an autonomous browser agent capable of navigating the web and extracting information
</Card>

<Card title="Ollama" icon={<img src="/images/external/ollama/ollama-icon.png" alt="Ollama" />} iconType="image" href="/v1/examples/ollama">
<Card title="Ollama" icon={<img src="https://www.github.com/agentops-ai/agentops/blob/main/docs/images/external/ollama/ollama-icon.png?raw=true" alt="Ollama" />} iconType="image" href="/v1/examples/ollama">
Simple Ollama integration with AgentOps
</Card>

<Card title="OpenAI" icon={<img src="/images/external/openai/openai-logomark.png" alt="OpenAI" />} iconType="image" href="/v1/integrations/openai">
<Card title="OpenAI" icon={<img src="https://www.github.com/agentops-ai/agentops/blob/main/docs/images/external/openai/openai-logomark.png?raw=true" alt="OpenAI" />} iconType="image" href="/v1/integrations/openai">
First class support for GPT family of models
</Card>

<Card title="REST API" icon="bolt-lightning" href="/v1/examples/restapi">
Create a REST server that performs and observes agent tasks
</Card>

<Card title="smolagents" icon={<img src="https://github.com/AgentOps-AI/agentops/blob/main/docs/images/external/huggingface/hf-logo.png" alt="smolagents" />} iconType="image" iconType="solid" href="/v1/integrations/smolagents">
<Card title="smolagents" icon={<img src="https://github.com/AgentOps-AI/agentops/blob/main/docs/images/external/huggingface/hf-logo.png?raw=true" alt="smolagents" />} iconType="image" iconType="solid" href="/v1/integrations/smolagents">
Track HuggingFace's smolagents with AgentOps seamlessly
</Card>

<Card title="SwarmZero" icon={<img src="/images/external/swarmzero/swarmzero_logo.png" alt="SwarmZero" />} iconType="image" href="/v1/integrations/swarmzero">
<Card title="SwarmZero" icon={<img src="https://www.github.com/agentops-ai/agentops/blob/main/docs/images/external/swarmzero/swarmzero_logo.png?raw=true" alt="SwarmZero" />} iconType="image" href="/v1/integrations/swarmzero">
SwarmZero multi-agent framework for AI Agents and AI Swarms with AgentOps support
</Card>

<Card title="TaskWeaver" icon={<img src="/images/external/microsoft/microsoft_logo.svg" alt="TaskWeaver" />} iconType="image" href="/v1/integrations/taskweaver">
<Card title="TaskWeaver" icon={<img src="https://www.github.com/agentops-ai/agentops/blob/main/docs/images/external/microsoft/microsoft_logo.svg?raw=true" alt="TaskWeaver" />} iconType="image" href="/v1/integrations/taskweaver">
First class support for Microsoft TaskWeaver
</Card>

<Card title="xAI" icon={<img src="/images/external/xai/xai-logo.png" alt="xAI" />} iconType="image" href="/v1/integrations/xai">
<Card title="xAI" icon={<img src="https://www.github.com/agentops-ai/agentops/blob/main/docs/images/external/xai/xai-logo.png?raw=true" alt="xAI" />} iconType="image" href="/v1/integrations/xai">
Observe the power of Grok and Grok Vision with AgentOps
</Card>
</CardGroup>
Expand Down
22 changes: 11 additions & 11 deletions docs/v1/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ mode: "wide"
## Integrate with developer favorite agent frameworks

<CardGroup cols={2}>
<Card title="OpenAI Agents SDK" icon={<img src="/images/external/openai/openai-logomark.png" alt="OpenAI Agents SDK" />} iconType="image" href="/v1/integrations/agentssdk" />
<Card title="CrewAI" icon={<img src="/images/external/crew/crew.png" alt="CrewAI"/>} iconType="image" href="/v1/integrations/crewai" />
<Card title="AG2" icon={<img src="/images/external/autogen/ag2.svg" alt="AG2"/>} iconType="image" href="/v1/integrations/autogen" />
<Card title="AutoGen" icon={<img src="/images/external/microsoft/microsoft_logo.svg" alt="AutoGen" />} iconType="image" href="/v1/integrations/autogen" />
<Card title="Anthropic" icon={<img src="/images/external/anthropic/anthropic_icon_slate.png" alt="Anthropic" />} iconType="image" href="/v1/integrations/anthropic" />
<Card title="Ollama" icon={<img src="/images/external/ollama/ollama-icon.png" alt="Ollama" />} iconType="image" href="/v1/integrations/ollama" />
<Card title="Cohere" icon={<img src="/images/external/cohere/cohere-logo.svg" alt="Cohere" />} iconType="image" href="/v1/integrations/cohere" />
<Card title="OpenAI Agents SDK" icon={<img src="https://www.github.com/agentops-ai/agentops/blob/main/docs/images/external/openai/openai-logomark.png?raw=true" alt="OpenAI Agents SDK" />} iconType="image" href="/v1/integrations/agentssdk" />
<Card title="CrewAI" icon={<img src="https://www.github.com/agentops-ai/agentops/blob/main/docs/v1/img/docs-icons/crew.png?raw=true" alt="CrewAI"/>} iconType="image" href="/v1/integrations/crewai" />
<Card title="AG2" icon={<img src="https://www.github.com/agentops-ai/agentops/blob/main/docs/images/external/autogen/ag2.svg?raw=true" alt="AG2"/>} iconType="image" href="/v1/integrations/autogen" />
<Card title="AutoGen" icon={<img src="https://www.github.com/agentops-ai/agentops/blob/main/docs/images/external/microsoft/microsoft_logo.svg?raw=true" alt="AutoGen" />} iconType="image" href="/v1/integrations/autogen" />
<Card title="Anthropic" icon={<img src="https://www.github.com/agentops-ai/agentops/blob/main/docs/images/external/anthropic/anthropic_icon_slate.png?raw=true" alt="Anthropic" />} iconType="image" href="/v1/integrations/anthropic" />
<Card title="Ollama" icon={<img src="https://www.github.com/agentops-ai/agentops/blob/main/docs/images/external/ollama/ollama-icon.png?raw=true" alt="Ollama" />} iconType="image" href="/v1/integrations/ollama" />
<Card title="Cohere" icon={<img src="https://www.github.com/agentops-ai/agentops/blob/main/docs/images/external/cohere/cohere-logo.svg?raw=true" alt="Cohere" />} iconType="image" href="/v1/integrations/cohere" />
<Card title="Groq" icon="bolt" href="https://docs.agentops.ai/v1/integrations/groq" />
</CardGroup>

Expand Down Expand Up @@ -42,27 +42,27 @@ You also get helpful debugging info such as any SDK versions you were on if you'
LLM calls are presented as a familiar chat history view, and charts give you a breakdown of the types of events that were called and how long they took.

<Frame type="glass" caption="Session Summary">
<img height="200" src="/images/session-summary.gif" />
<img height="200" src="https://github.com/AgentOps-AI/agentops/blob/main/docs/images/session-summary.gif?raw=true" />
</Frame>

Find any past sessions from your Session Drawer.
<Frame type="glass" caption="Session Drawer">
<img height="250" src="/images/session-drawer.gif" />
<img height="250" src="https://github.com/AgentOps-AI/agentops/blob/main/docs/images/session-drawer.gif?raw=true" />
</Frame>

Most powerful of all is the Session Waterfall. On the left, a time visualization of all your LLM calls, Action events, Tool calls, and Errors.
On the right, specific details about the event you've selected on the waterfall. For instance the exact prompt and completion for a given LLM call.
Most of which has been automatically recorded for you.

<Frame type="glass" caption="Session Waterfall">
<img height="200" src="/images/session-waterfall.gif" />
<img height="200" src="https://github.com/AgentOps-AI/agentops/blob/main/docs/images/session-waterfall.gif?raw=true" />
</Frame>


### Session Overview
View a meta-analysis of all of your sessions in a single view.
<Frame type="glass" caption="Session Overview">
<img height="200" src="/images/overview.png" />
<img height="200" src="https://github.com/AgentOps-AI/agentops/blob/main/docs/images/overview.png?raw=true" />
</Frame>

<script type="module" src="/scripts/github_stars.js"></script>
Expand Down
Loading
Loading