@raindrop-ai/pi-agent package automatically instruments Pi (the agent harness and coding agent from pi.dev, source at earendil-works/pi) to capture events, traces, and tool calls. Works with both the programmatic pi-agent-core API and the Pi Coding Agent CLI.
Installation
Quick Start — Programmatic
Quick Start — Pi Coding Agent CLI
RAINDROP_WRITE_KEY in your environment. Traces appear automatically.
Or configure via ~/.pi/agent/raindrop.json:
Configuration
Per-Subscribe Overrides
Override context per subscription when tracking multiple agents:Extension Configuration
The CLI extension reads config from environment variables and JSON files. Precedence: defaults ->~/.pi/agent/raindrop.json -> .pi/raindrop.json -> env vars.
| Setting | Env var | Default |
|---|---|---|
| Write key | RAINDROP_WRITE_KEY | (none) |
| API endpoint | RAINDROP_API_URL | https://api.raindrop.ai/v1 |
| Debug logging | RAINDROP_DEBUG | false |
| Capture system prompt | RAINDROP_CAPTURE_SYSTEM_PROMPT | false |
| Project slug | RAINDROP_PROJECT_ID | (none) |
Projects
Route events to a specific project by passing its slug asprojectId (programmatic) or via RAINDROP_PROJECT_ID / the project_id config-file key (CLI extension):
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.
Supported Versions
@earendil-works/pi-agent-core>= 0.74.0@earendil-works/pi-coding-agent>= 0.74.0 (optional, for CLI extension)