AdmissibleAI

Anthropic Integration Docs

Route Claude client-side Tool Use through Admissible before local tools run.

Status: Experimental. Admissible governs client-side Claude Tool Use, not Anthropic server-executed tools.

Want the shortest path first? Start with the Anthropic quickstart.

Overview

The Anthropic integration governs Claude client-side Tool Use by routing proposed tool_use blocks through Admissible before application-owned tools execute. It returns Claude-compatible tool_result blocks for allowed, denied, deferred, modified, and failed calls.

Package status

# @admissible-ai/anthropic is experimental.# The package is published, but this integration remains preview guidance.

After public publish

npm install @admissible-ai/anthropic @admissible-ai/sdk @anthropic-ai/sdk

Architecture

Claude proposes tool calls. Admissible evaluates them. Your local application code runs only after the runtime admits the action.

Flow

  • Claude tool_use
  • Admissible /v2/execute
  • optional /v2/commit for durable tools
  • tool_result returned to Claude

Client tools vs server tools

Client tools

Client tools are inside the Admissible execution boundary because your application owns the local tool execution.

  • Claude returns tool_use blocks
  • your app routes them through Admissible
  • local run functions execute only after allow
  • tool_result blocks go back to Claude

Server tools

Server tools are executed by Anthropic and are not directly governed by Admissible.

  • execution happens on Anthropic infrastructure
  • this package does not directly govern those executions
  • use an Admissible-controlled client/tool gateway when your application must own the execution boundary

Native helper

Start with createAdmissibleAnthropic. It wraps anthropic.messages.create, forwards client tool definitions to Claude, handles tool rounds, and adds Admissible execution history to the final response.

Native helper

import Anthropic from "@anthropic-ai/sdk";import { AdmissibleClient } from "@admissible-ai/sdk";import { createAdmissibleAnthropic } from "@admissible-ai/anthropic";const anthropic = new Anthropic({  apiKey: process.env.ANTHROPIC_API_KEY,});const admissible = new AdmissibleClient({  baseUrl: process.env.ADMISSIBLE_API_URL,  apiKey: process.env.ADMISSIBLE_API_KEY,});const client = createAdmissibleAnthropic({  anthropic,  admissible,  agentId: "claude-tool-agent",  sessionId: "session-123",  environmentName: "staging",  tools: [readReleaseStatus, sendCustomerEmail],});const response = await client.messages.create({  model: "claude-sonnet-4-5",  max_tokens: 1024,  messages: [    {      role: "user",      content: "Check payments and send the customer email if it is ready.",    },  ],});

Low-level helper

Use createAdmissibleAnthropicTools only when your application already owns the Claude message loop. You must send the returned tool results as the immediate next user message after Claude's assistant message that contained tool calls.

Low-level helper

const managed = createAdmissibleAnthropicTools(tools, {  admissible,  agentId: "claude-tool-agent",  sessionId: "session-123",  environmentName: "staging",});const executions = await managed.handleToolUses(toolUses, {  conversationId: "conversation-123",  userId: "operator-123",  env: "staging",});// Send these as the immediate next user message after Claude's tool_use response.const toolResults = executions.map((execution) => execution.toolResult);

Durable tools and commit admission

Durable tools need explicit commit metadata. Admissible calls/v2/commit before the local side effect where possible, so denied or deferred commits stop before external systems are touched.

Durable tool

const sendCustomerEmail = {  name: "send_customer_email",  description: "Send a customer-facing email.",  input_schema: {    type: "object",    properties: {      to: { type: "string" },      body: { type: "string" },    },    required: ["to", "body"],  },  commit: {    type: "external",    system: "email",    payload: (input) => input,    rollbackRef: "email:not-sent-yet",  },  async run(input) {    return sendEmail(input);  },};

Tool result handling

Denied, deferred, unknown, unsupported modified, failed, and commit-blocked calls return tool_resultblocks with is_error: true. Claude gets the blocked result instead of a fabricated success.

Inspect decisions

console.log(  response.admissible.toolExecutions.map((execution) => ({    tool: execution.toolName,    execute: execution.executeResponse?.decision,    commit: execution.commitResponse?.decision ?? "n/a",    toolResultError: execution.toolResult.is_error === true,  })),);

Continuity and authority tokens

The native helper preserves Admissible execution context across later Claude tool rounds when the runtime issues an authority token. Multiple sibling tool calls from the same Claude response share the pre-batch context instead of chaining through each other.

No token, no managed continuation

If Admissible does not issue an authority token, the next v2 execute call stays independent rather than reusing stale continuation metadata.

Errors and common mistakes

  • Use ADMISSIBLE_API_URL with https://.
  • Set ANTHROPIC_API_KEY for live Claude calls.
  • Do not expect Anthropic server-executed tools to be governed by this package.
  • Do not skip the immediate tool_result continuation when using the low-level helper.
  • Add commit metadata for durable local or external side effects.
  • Do not assume denied or deferred calls executed.

Limitations

  • Experimental integration preview.
  • No claims over Anthropic server-executed tools.
  • No MCP behavior is added by this package.
  • No hosted approval UI is provided by this integration package.
  • The package is published, but this integration remains experimental.

Troubleshooting

Missing scheme

If the API URL is api.admissible.io instead of https://api.admissible.io, the smoke fails with a configuration error before provider calls start.

Commit denied

A commit-denied durable tool should not run the local side effect. Claude receives a tool_result with is_error: true and can explain the denial.