instrument-agent

Instrument AI agents with Raindrop SDK tracing and verify runs in Workshop.

1.1k|63|Updated May 1, 2026
One-click install
npx skills add https://github.com/raindrop-ai/cli --skill instrument-agent
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: instrument-agent
Source: https://github.com/raindrop-ai/cli/tree/main/skills/instrument-agent
Command: npx skills add https://github.com/raindrop-ai/cli --skill instrument-agent

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Setting up observability for an AI agent is error-prone: SDK APIs change quickly, repos have unknown telemetry setups, and it is hard to confirm traces actually reach the local debugger. This Skill guides the full instrumentation workflow so a real agent run appears in Raindrop Workshop with useful LLM and tool spans.

Core Features & Use Cases

  • Guided instrumentation workflow: Discovers the agent entry point, runtime, package manager, and existing telemetry (OpenTelemetry, Sentry, Datadog) before making the smallest safe edit.
  • Stack-specific SDK paths: Covers TypeScript core SDK, Vercel AI SDK, Claude Agent SDK, Python, Rust, and framework integrations like LangChain and Pydantic AI, always consulting current Raindrop docs first.
  • Two-phase verification: Phase 1 proves a basic run reaches Workshop; Phase 2 enriches it with properties, LLM spans, and tool execution spans.
  • Use Case: You open a repo whose agent produces no traces, run the skill, and it updates the raindrop-ai package, wraps the agent entry point with begin/finish calls, points the app at the local Workshop endpoint, and confirms a visible run.

Quick Start

Ask your AI coding agent to set up Raindrop tracing for your agent and verify a run appears in Workshop.

Frequently Asked Questions about instrument-agent

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add Raindrop tracing to my AI agent?

Update the raindrop-ai package to the latest version, point the app at the local Workshop endpoint via RAINDROP_LOCAL_DEBUGGER, and wrap one real agent entry point with begin/finish calls or an SDK wrapper. Then run one invocation and confirm it appears in Workshop.

How do I trace a Vercel AI SDK or Claude Agent SDK app?

Use the dedicated integrations @raindrop-ai/ai-sdk or @raindrop-ai/claude-agent-sdk, which wrap the SDK once and accept per-call eventMetadata. Verify the invoked code calls the wrapped client, since unwrapped calls run normally but are not tracked.

Can I use Raindrop tracing with existing OpenTelemetry or Sentry setup?

Yes, but do not create a second tracer provider or NodeSDK. Find the telemetry initializer that runs in the agent process and attach Raindrop through the supported external OpenTelemetry shape documented in the installed package.

Why is Workshop empty after instrumenting my agent?

Common causes are the command not exercising the instrumented entry point, the app process missing the local Workshop env config, calling the unwrapped client instead of the wrapper, or missing flush before a short-lived process exits. Confirm Workshop is reachable at localhost:5899 first.

Does the Python raindrop-ai package support Workshop tracing?

Yes, use raindrop.begin before the agent loop and interaction.finish after the final output or error for Phase 1. Do not rely on track_ai as a Phase 1 path, and update the package to the latest version before editing instrumentation.