Anthropic and Claude
Permission-checked tool use for the Messages API: a registry that gates each tool, and a loop that signs and records the turn it belongs to.
Anthropic / Claude
Use VorimToolRegistry for permission-checked tool execution with Claude's tool use API.
import Anthropic from "@anthropic-ai/sdk";
import createVorim from "@vorim/sdk";
import { VorimToolRegistry, runAgentLoop } from "@vorim/sdk/integrations/anthropic";
const vorim = createVorim({ apiKey: "agid_sk_live_..." });
const anthropic = new Anthropic();
const registry = new VorimToolRegistry({ vorim, agentId: "agid_acme_a1b2c3d4" });
registry.add({
name: "search_docs",
description: "Search internal documents",
input_schema: { type: "object", properties: { query: { type: "string" } }, required: ["query"] },
execute: async ({ query }) => searchDocs(query),
permission: "agent:read",
});
// Use with Claude messages API
const response = await anthropic.messages.create({
model: "claude-sonnet-4-20250514",
max_tokens: 1024,
messages,
tools: registry.toAnthropicTools(),
});
// Execute tool_use blocks — permission checked + audited automatically
const toolResults = await registry.executeToolUseBlocks(
response.content.filter(b => b.type === "tool_use")
);
// Or use the full agent loop
const answer = await runAgentLoop({
vorim,
agentId: "agid_acme_a1b2c3d4",
anthropic,
model: "claude-sonnet-4-20250514",
systemPrompt: "You are a helpful assistant.",
registry,
userMessage: "Find docs about onboarding",
});typescriptNeed Help?
Book a demo for a walkthrough, or contact us for support. For enterprise needs, reach out at sales@vorim.ai.