The Context Company
Send Agno traces to The Context Company for agent observability and production interaction analysis.
The Context Company is an AI agent observability and customer analytics platform that helps teams understand and improve agents in production. The Agno integration captures agent runs through OpenTelemetry and sends them to The Context Company.
Setup
Install the integration
uv pip install -U "contextcompany[agno]" agno openai yfinanceExport your API keys
export TCC_API_KEY="your_tcc_api_key_here"
export OPENAI_API_KEY="your_openai_api_key_here"Initialize instrumentation
Call instrument_agno() before importing Agno.
from contextcompany.agno import instrument_agno
instrument_agno()
from agno.agent import Agent
from agno.models.openai import OpenAIChat
from agno.tools.yfinance import YFinanceTools
agent = Agent(
name="Stock Price Agent",
model=OpenAIChat(id="gpt-5.2"),
tools=[YFinanceTools()],
)
agent.print_response("What is the current price of NVIDIA?")Captured data
The integration records:
- Agent runs and model calls
- Tool arguments, results, and errors
- Prompts and responses
- Token usage and latency
- Session, user, organization, and custom metadata
The Context Company analyzes production conversations and traces to surface recurring patterns and account-level insights. Teams can inspect the supporting runs and use that context to improve agent behavior.
Run metadata
Use OpenInference's using_attributes context manager to associate a run with a session, user, organization, or named agent:
from openinference.instrumentation import using_attributes
with using_attributes(
metadata={
"tcc.sessionId": "session-123",
"tcc.conversational": "true",
"tcc.agent": "stock-price-agent",
"tcc.userId": "user-123",
"tcc.orgId": "org-456",
"environment": "production",
},
):
agent.print_response("What is the current price of NVIDIA?")