Connect your OpenAI agents to Oversee — two lines of code for full observability
Project description
oversee-agents
Connect your AI agents to Oversee in two lines of code. Supports three agent platforms today — the OpenAI Agents SDK, Anthropic Claude Agents, and Hermes. Extras pick which dependencies install.
Install
# OpenAI Agents SDK
pip install oversee-agents[openai]
# Anthropic Claude Managed Agents (client.beta.agents API)
pip install oversee-agents[anthropic]
# Claude Agent SDK (query() + ClaudeSDKClient)
pip install oversee-agents[claude-agent-sdk]
# Hermes Agent (no extra deps — Hermes provides the runtime)
pip install oversee-agents[hermes]
# All Python-SDK platforms
pip install oversee-agents[all]
Two different Claude products.
[anthropic]instruments the Managed Agents API (client.beta.agents.create()/sessions.stream()).[claude-agent-sdk]instruments the Claude Agent SDK (query()+ClaudeSDKClient, the Claude Code engine). They share a name but are wholly different entry points — pick the one your code actually calls.
OpenAI Agents SDK
from agents import Agent, Runner
from oversee import init
init(api_key="ov_sk_your_key", agent_name="my-agent")
# Your existing code — no changes needed
agent = Agent(name="Support", instructions="You handle customer tickets...")
result = await Runner.run(agent, "Help me with my order")
# Agent appears in your Oversee dashboard automatically
Claude Managed Agents
import anthropic
from oversee import init
init(api_key="ov_sk_your_key", platform="anthropic")
# Your existing code — no changes needed
client = anthropic.Anthropic()
agent = client.beta.agents.create(
name="Coding Assistant",
model={"id": "claude-opus-4-7"},
system="You are a helpful coding assistant.",
tools=[{"type": "agent_toolset_20260401"}],
)
session = client.beta.sessions.create(agent=agent.id, environment_id=env_id)
# Send a message and stream events — both flow into Oversee automatically.
client.beta.sessions.events.create(session.id, events=[{
"type": "user.message",
"content": [{"type": "text", "text": "Hello"}],
}])
for event in client.beta.sessions.stream(session.id):
...
platform="auto" (the default) detects which SDK(s) are installed and
hooks into both when present — useful if your codebase mixes platforms.
Advanced: per-client instrumentation
When monkey-patching at module load is undesirable (multi-tenant
hosts, different telemetry per client), use monitor() to wrap one
client at a time:
from oversee import init, monitor
init(api_key="ov_sk_...", platform="anthropic")
client = monitor(anthropic.Anthropic())
# Only this client emits Oversee spans.
Or use track_session() as a context manager to scope the
agent-name mapping to a block:
from oversee import track_session
with track_session(session_id=session.id, agent_name="coding-assistant"):
for event in client.beta.sessions.stream(session.id):
...
Claude Agent SDK
For the claude-agent-sdk package (query() + the Claude Code
engine) — distinct from the Managed Agents API above.
from claude_agent_sdk import query, ClaudeAgentOptions
from oversee import init
# Call init() BEFORE importing/using query so the patch is in place.
init(api_key="ov_sk_your_key", agent_name="my-agent", platform="claude-agent-sdk")
async for message in query(
prompt="Refactor the auth module",
options=ClaudeAgentOptions(system_prompt="You are a senior engineer."),
):
... # your existing handling — spans flow into Oversee automatically
Each run becomes a set of Oversee spans: an agent_registration
(from options.system_prompt), message_received / llm_output /
tool_call per message, and an agent_run_complete carrying the
run's token usage + cost (from the SDK's ResultMessage).
ClaudeSDKClient's streaming (receive_response) is instrumented the
same way.
Hermes Agent
Hermes discovers plugins via Python entry points, so installing this package is enough — no separate plugin scaffold to copy.
pip install oversee-agents[hermes]
hermes plugins enable oversee
If you'd rather drop the plugin in by hand:
cp -r $(python -c "import oversee.hermes_plugin, os; \
print(os.path.dirname(oversee.hermes_plugin.__file__))") \
~/.hermes/plugins/oversee
Configure via environment variables (Hermes will prompt for these
on plugins enable thanks to plugin.yaml's requires_env):
export OVERSEE_API_KEY="ov_sk_your_key"
export OVERSEE_ENDPOINT="https://your-oversee/v1/traces" # optional
Or from chat after the first start:
/oversee connect https://your-oversee/v1/traces
/oversee apikey ov_sk_your_key
/oversee capture on
/oversee status
What gets captured on Hermes
- Agent identity —
~/.hermes/SOUL.md, plusmemory.mdwhencapture_outputsis on. Sent once on gateway start. - Every
post_tool_callhook — tool name, parameter keys (not values, unless capture is on), and the tool's result (capture-only). /oversee statusin chat to verify telemetry is flowing.
What gets captured
- Agent identity (name, instructions/system prompt) — sent once when each unique agent is first constructed.
- Every LLM call (model, duration, token usage).
- Every tool call (name, duration, success/failure).
- Agent handoffs.
- Guardrail checks.
- Run completion.
By default, message content is NOT captured — only metadata. Enable with init(capture_outputs=True) for full visibility.
Environment variables
| Variable | Purpose |
|---|---|
OVERSEE_API_KEY |
Your Oversee API key. Sent as the X-Oversee-Api-Key header. |
OVERSEE_ENDPOINT |
Custom OTLP/HTTP endpoint. Defaults to the Oversee cloud. |
OVERSEE_AGENT_NAME |
Default service.name for spans. Defaults to openai-agent. |
OVERSEE_CAPTURE_OUTPUTS |
Set to true (case-insensitive) to enable content capture. |
Explicit arguments to init() always win over environment variables.
How it works
init() does three things:
- OpenTelemetry pipeline — creates a
TracerProviderwith an OTLP/HTTP exporter pointed at the Oversee endpoint, authenticated via theX-Oversee-Api-Keyheader. - OpenAI Agents SDK bridge — registers the
openai-agents-opentelemetryprocessor so all agent runs (LLM calls, tools, handoffs, guardrails) flow into the OTEL pipeline. - Identity capture — monkey-patches
Agent.__init__so each unique(name, instructions)pair emits oneagent_registrationspan. This is what makes Oversee's Claude-generated descriptions accurate from day one.
If the OpenAI Agents SDK or its OTEL adapter isn't installed, init() logs a warning and degrades to OTEL-only mode (manual spans still ship).
Privacy
The default configuration sends only metadata to Oversee — agent name, system prompt (as part of registration), LLM model name, tool names, span durations. No user messages, no model responses, no tool inputs/outputs.
Setting capture_outputs=True enables the CaptureProcessor, which adds:
oversee.message.contenton user-prompt spans.oversee.response.contenton model-response spans.oversee.tool.resulton tool-call spans.
Each is truncated to 10 000 characters. Same attribute names and truncation budget as the Oversee OpenClaw plugin.
License
MIT
Project details
Release history Release notifications | RSS feed
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 oversee_agents-0.1.0.tar.gz.
File metadata
- Download URL: oversee_agents-0.1.0.tar.gz
- Upload date:
- Size: 31.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4face7abf77cb9bc47d22ff3faf55dc0d1a17f1513a568cdfe2bef8dcd06fbaf
|
|
| MD5 |
3bd867f1f841e40975aea8fbd6dc2812
|
|
| BLAKE2b-256 |
651060ab510e6af5351b786b5f1044e92e1b9fa34ce7c7fb11edeaf53087c511
|
File details
Details for the file oversee_agents-0.1.0-py3-none-any.whl.
File metadata
- Download URL: oversee_agents-0.1.0-py3-none-any.whl
- Upload date:
- Size: 34.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ca099dc4ca5934963d11445d38a538b9cb00e686e36256242a001a81eb60590
|
|
| MD5 |
2b8d6e31aaa8623a3b19c4c5f2bfea61
|
|
| BLAKE2b-256 |
30b7d16b45faf1965221b19980f91d2892654783d3e68c46a805c077b0319339
|