Documentation Index
Fetch the complete documentation index at: https://raindrop.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
Installation
Quick Start
What Gets Traced
The Pydantic AI integration automatically captures:- Agent runs — input prompt, output text (including structured Pydantic model output), model name
- Token usage — input_tokens and output_tokens from the agent result
- Finish reason —
pydantic_ai.finish_reasoncaptured from the last model response (e.g."stop","length","tool_call") - Errors — error type and message captured in event properties, then re-raised to the caller
- Async support — both
run()(async) andrun_sync()(sync) are instrumented - Double-wrap guard — calling
wrap()twice on the same agent is a safe no-op
Configuration
| Parameter | Type | Default | Description |
|---|---|---|---|
api_key | str | None | None | Raindrop API key. When None or empty, telemetry is disabled |
user_id | str | None | None | Associate all events with a user |
convo_id | str | None | None | Group events into a conversation |
tracing_enabled | bool | True | Enable/disable tracing in raindrop.init() |
bypass_otel_for_tools | bool | True | Bypass OpenTelemetry for tool calls |
debug | bool | False | Enable DEBUG-level logging for the package |
Structured Output
The integration handles Pydantic AI’s structured output types — the output is serialized to JSON for telemetry:Async Usage
The wrapper supports both sync and async agent runs:Identifying Users
Useidentify() to associate a user with traits:
str, int, bool, or float.
Tracking Signals
Usetrack_signal() to record feedback, edits, or custom signals:
| Parameter | Type | Default | Description |
|---|---|---|---|
event_id | str | required | The event ID to attach the signal to |
name | str | required | Signal name |
signal_type | "default" | "feedback" | "edit" | "default" | Type of signal |
timestamp | str | None | None | ISO-8601 timestamp |
properties | dict | None | None | Extra properties |
attachment_id | str | None | None | Attachment identifier |
comment | str | None | None | Comment text |
after | str | None | None | ”After” value for edit signals |
sentiment | "POSITIVE" | "NEGATIVE" | None | None | Sentiment |
Flushing and Shutdown
Always callflush() before your process exits to ensure all telemetry is shipped:
Factory Function (Legacy)
Thecreate_raindrop_pydantic_ai() factory is available for backwards compatibility:
Known Limitations
run_stream()is not instrumented — onlyrun()andrun_sync()are captured. Streaming runs produce no telemetry.- Multi-step agent runs: In agents with multiple LLM calls (e.g., tool use loops), only the final result’s data is captured. Intermediate LLM calls are not tracked individually.