CrewAI integration for Agent Observability - multi-agent logging, cost tracking, and compliance
Project description
Agent Observability for CrewAI
Multi-agent observability for CrewAI — track costs, tasks, and delegations across your crew.
Installation
pip install agent-observability-crewai
With CrewAI dependencies:
pip install agent-observability-crewai[crewai]
Quick Start
1. Get API Key
curl -X POST https://api-production-0c55.up.railway.app/v1/register \
-H "Content-Type: application/json" \
-d '{"agent_id":"my-crew"}'
2. Set Environment Variable
export AGENT_OBS_API_KEY=ao_live_your_key_here
3. Add to Your Crew
from crewai import Agent, Task, Crew
from agent_observability_crewai import AgentObservabilityTool
# Create tool for each agent
obs_tool = AgentObservabilityTool(crew_id="research-crew")
researcher = Agent(
role="Researcher",
goal="Find accurate information",
tools=[obs_tool],
verbose=True
)
writer = Agent(
role="Writer",
goal="Create compelling content",
tools=[AgentObservabilityTool(crew_id="research-crew", agent_role="writer")],
verbose=True
)
# Create and run crew
crew = Crew(
agents=[researcher, writer],
tasks=[...]
)
result = crew.kickoff()
Automatic Callback (Alternative)
For fully automatic logging without giving agents the tool:
from crewai import Crew
from agent_observability_crewai import ObservabilityCallback
callback = ObservabilityCallback(crew_id="my-crew")
crew = Crew(
agents=[...],
tasks=[...],
callbacks=[callback] # Logs automatically
)
What Gets Tracked
| Event | Description |
|---|---|
task_started |
When a task begins |
task_complete |
Task finished with duration |
delegation |
Task delegated between agents |
tool_use |
Agent uses a tool |
api_call |
External API calls |
error |
Errors and failures |
CrewAI-Specific Features
Per-Agent Cost Tracking
# Each agent logs with their role
obs = AgentObservabilityTool(
crew_id="sales-crew",
agent_role="lead-qualifier"
)
# Query later: "Show me costs for lead-qualifier role"
Task Delegation Logging
obs_tool.log_delegation(
from_agent="Manager",
to_agent="Researcher",
task="Find competitor pricing",
reason="Requires web search expertise"
)
Task Completion with Metrics
obs_tool.log_task_complete(
task_description="Research competitors",
output="Found 5 competitors...",
cost_usd=0.15,
duration_ms=45000
)
Pricing
| Tier | Logs/Month | Price |
|---|---|---|
| Free | 100,000 | $0 |
| Starter | 1,000,000 | $29/month |
| Professional | 10,000,000 | $199/month |
Why Use This for CrewAI?
Multi-agent systems need observability more than single agents:
- Which agent costs the most? Track per-role spending
- Where are bottlenecks? See task durations per agent
- Delegation chains Audit who delegated what to whom
- Debug failures Trace errors back through agent interactions
Related Packages
- agent-observability — Core Python SDK
- agent-observability-langchain — LangChain integration
- agent-observability-autogpt — AutoGPT plugin
License
MIT License — see LICENSE for details.
Links
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agent_observability_crewai-1.0.0.tar.gz.
File metadata
- Download URL: agent_observability_crewai-1.0.0.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13c1042492615ad051588d1faa100f0c3786d6c0f4cee442ecf02acfdeae45d2
|
|
| MD5 |
179faa00c665ab6090c47193ebfbc824
|
|
| BLAKE2b-256 |
4d9a0a290b0b1d50407ca7f7aff8f7f45f9b9af98e09873b4ab1432e26c9335e
|
File details
Details for the file agent_observability_crewai-1.0.0-py3-none-any.whl.
File metadata
- Download URL: agent_observability_crewai-1.0.0-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bfd54821a259e8bc9354055ac935c811abcf7758918595b51b50159d16599467
|
|
| MD5 |
1625486b043f9b5f20a66c0100b79a09
|
|
| BLAKE2b-256 |
7752cf2918df9428649336cc6a3617c40ea1ee8f2bce5905c74350b9ae9152ff
|