Installation
Quick Start
What Gets Traced
The integration captures events from the OpenAI Agents SDK’s built-in tracing system:- Agent runs — trace-level events with workflow name and metadata
- LLM generations — model, input messages, output, token usage (input_tokens/output_tokens)
- Tool/function calls — function name, input arguments, output, duration, and errors
- Handoffs — from/to agent names for multi-agent workflows (TypeScript only)
- Errors — captured with error type and message in event properties
- Finish reason — extracted from response status or generation output (
ai.finish_reason) - Extended token categories — cached tokens (
ai.usage.cached_tokens) and reasoning/thoughts tokens (ai.usage.thoughts_tokens) for OpenAI o1/o3 models
Configuration
Projects
Route events to a specific project by passing its slug asprojectId (project_id in Python):
X-Raindrop-Project-Id header on every event. Omit it (or pass "default") to use your org’s default Production project, which is the existing behavior. Single-project orgs need nothing new.
Multiple projects in one process (Python)
Available inraindrop-ai>=0.0.56. Each RaindropOpenAIAgents wrapper owns
its own raindrop.Raindrop client, so its manual APIs —
flush(), identify(), track_signal() — route to that wrapper’s project
independently:
Mixed processes — TypeScript (a tracing-enabled
raindrop-ai js-sdk client alongside this integration). If the same Node process also constructs a tracing-enabled raindrop-ai js-sdk client, its Traceloop pipeline auto-instruments the underlying LLM libraries process-wide — so calls made through this integration package additionally produce auto-instrumented spans that route to the js-sdk pipeline owner’s project. This is pre-existing behavior, unrelated to per-instance routing. Run mixed setups with a single project, or scope the integration’s calls with the js-sdk client’s asCurrent().Identify Users
Associate a user identity with optional traits for analytics:Track Signals
Attach feedback, labels, or other signals to an existing event:Multi-Agent Workflows
The integration automatically captures handoffs between agents:Flushing and Shutdown
Always callflush() before your process exits to ensure all telemetry is shipped:
Known Limitations (Python)
- Handoffs are not individually captured in the Python SDK. The TypeScript SDK captures full span trees including handoffs.
- Multi-response traces: In multi-agent workflows with handoffs, only the last response’s data survives per trace.