@raindrop-ai/claude-managed-agents
v0.0.10
Published
Claude Managed Agents integration for Raindrop
Maintainers
Keywords
Readme
@raindrop-ai/claude-managed-agents
Raindrop integration for Anthropic's Claude Managed Agents. Automatically captures events, traces, and tool call spans from managed agent sessions.
Installation
npm install @raindrop-ai/claude-managed-agents @anthropic-ai/sdkQuick Start
import Anthropic from "@anthropic-ai/sdk";
import { createRaindropClaudeManagedAgents } from "@raindrop-ai/claude-managed-agents";
const client = new Anthropic();
const raindrop = createRaindropClaudeManagedAgents({
writeKey: process.env.RAINDROP_WRITE_KEY, // Optional — omitting disables telemetry
userId: "user-123",
});
const wrapped = raindrop.wrap(client);
const session = await wrapped.beta.sessions.create({
agent: agentId,
environment_id: envId,
title: "My session",
});
const stream = await wrapped.beta.sessions.events.stream(session.id);
await wrapped.beta.sessions.events.send(session.id, {
events: [{ type: "user.message", content: [{ type: "text", text: "Hello" }] }],
});
for await (const event of stream) {
if (event.type === "agent.message") {
for (const block of event.content) {
process.stdout.write(block.text);
}
} else if (event.type === "session.status_idle") {
break;
}
}
await raindrop.shutdown();Projects
If your org has multiple projects, route events to a specific one by passing its slug as projectId:
const raindrop = createRaindropClaudeManagedAgents({
writeKey: process.env.RAINDROP_WRITE_KEY,
projectId: "support-prod",
});This sets the X-Raindrop-Project-Id header on every event and trace. Omit it (or pass "default") to use your org's default Production project — the existing behavior. Single-project orgs need nothing new.
Payload size limits
Text fields (session input/output, span tool payloads) are capped at
1,000,000 characters per field and truncated with a
...[truncated by raindrop] marker. The cap is enforced before (or during)
serialization, so oversized payloads cost the cap — not the payload — on your
event loop, and large events land truncated instead of being rejected at the
ingest size limit.
Documentation
Full documentation with configuration options, signals, user identification, and more:
docs.raindrop.ai/integrations/claude-managed-agents
License
MIT
Application Git identity
Set appGit on createRaindropClaudeManagedAgents to override commitSha, commitDirty, and optional ordinary branch, or pass false to opt out. The revision is unknown by default because ambient deploy/CI and observer working-directory metadata are ignored. Local Git discovery requires an explicit sourceDirectory (or RAINDROP_GIT_SOURCE_DIRECTORY); explicit RAINDROP_COMMIT_SHA values are honored. Automatic branch discovery requires detectBranch: true.
