Skip to content
AgentIDDocs

Type at least two characters to search titles, headings and content.

↑ ↓ to navigate↵ to open
AgentID Docs

Integrations

Claude inference hookNew

Connect an Anthropic Inference Hook of your Claude organization to AgentID. AgentID answers allow or deny for prompts and tool calls before Claude runs them; it cannot rewrite them.

Anthropic's Inference Hooks let a Claude organization send each prompt, and optionally each tool call, to an external endpoint and wait for a verdict before inference. AgentID provides such an endpoint. It is a server-side control: nothing is installed on user devices, and one hook covers the Claude surfaces your Claude organization routes through it.

It complements the Claude plugin and the Claude Desktop companion, which work on the device and can mask and restore values. The hook can only allow or deny.

What it decides

Hook eventWhat AgentID checksDenied when
promptThe newest turn: text, tool results and the text Anthropic extracted from attached documents. Earlier turns are used as contextA guardrail or content policy blocks it, or it contains data that AgentID would mask
tool_call (when your Claude organization validates tool calls)The arguments of every tool call in Claude's latest messageA policy blocks it, or personal data would be sent to a tool according to the Personal data in tool calls setting
Test connectionNothing; it carries no user contentNever, once the request is authenticated
Any other event typeNothingNever; unknown events are allowed

Because a hook cannot rewrite a prompt, masking becomes a denial: the original prompt is stopped before inference, and the denial message contains the masked version of the text (shortened when long) for the user to submit instead. When the sensitive data is in an attachment, the message asks the user to remove or mask it. A denial carries a reference ID that matches the entry in the activity log.

Content AgentID cannot inspect:

  • Images arrive without their content. They are not checked and are not a reason to deny; the event records how many were not inspected.
  • A request is denied as not inspectable when a document's text could not be extracted, when there are more than four attachments, when the newest turn exceeds 64,000 characters, or when a tool result carries binary content.

Set it up

You need an AI system with the Claude Desktop target and admin rights on it, and an owner of the Claude organization.

Create the hook in AgentID

Open the system's Integration tab, find Claude inference hooks and click Set up inference hook. AgentID creates the endpoint values and a dedicated Guard key for this system.

Add the endpoint in Claude

In Claude open Organization settings → Inference hooks → Add endpoint. Paste the Endpoint URL and add both custom headers shown in AgentID: AgentID-Integration-Id and AgentID-Hook-Token. Click Test connection in Claude. AgentID shows that the test arrived.

Save the signing secret

Save the endpoint in Claude. Claude then reveals a signing secret that starts with whsec_. Paste it into AgentID together with your Anthropic tenant id and click Save settings.

Test again

Run Test connection in Claude once more. A signed test marks the hook as active in AgentID.

Until a signing secret is saved, AgentID accepts only the unsigned connection test, which carries no user content; every other unsigned request is rejected. After that, unsigned requests are rejected.

Settings

SettingMeaning
Verdict modeEnforce (deny): AgentID denies as described above. Shadow (log only): AgentID checks and records, and always answers allow
Verdict timeout (ms)Set it to the timeout configured in Claude (1000–10000, default 5000)
Personal data in tool callsDeny when sent outside (default): deny a tool call with personal data in its arguments unless the tool runs on the user's side. Deny every tool call with personal data. Allow
Signing secretsUp to three. When Claude rotates the secret, add the new one, test, then remove the old one. Saved secrets are shown only as a hint
Hook tokenCan be shown, copied and rotated. After a rotation Claude is rejected until you paste the new value into the Claude admin console

Saved changes reach the endpoint within 15 seconds. Removing the hook rejects further requests and deactivates its Guard key; delete the endpoint in the Claude admin console as well.

The AI system's own settings also apply: its guardrails and content policies decide what is blocked or would be masked, and a system in Shadow Mode answers allow like the hook's shadow mode.

Authentication

Every request must carry the integration ID and the hook token. Requests are verified with the Standard Webhooks signature (HMAC-SHA256 over the raw body, with a timestamp tolerance of five minutes), and the tenant ID in the request must match the one you saved. The hook token, the signing secrets and the Guard key are stored encrypted.

Time limits and failures

  • AgentID must answer within the verdict timeout. The full check gets most of that time; if it has not answered, or the check is briefly unavailable, AgentID runs one faster, rule-based check in the time that is left.
  • If both fail, AgentID answers with an error (503) instead of a verdict. What Claude does then (let the request through or stop it) is the failure handling you configured in the Claude admin console, not an AgentID setting.
  • A request body larger than 10 MB is rejected.

What is logged

Each checked prompt and tool call is recorded in the system's activity log as a redacted record, like every other check. Prompts and the tool calls of one Claude conversation are linked as steps of one run. The user is the actor ID that Anthropic sends. Creating, changing and removing the hook, and rotating the token, are recorded in the audit log.

Limits

  • Allow or deny only: no masking in place and no restoration of values in the answer.
  • Claude's answers are not sent to the hook, so they are not checked or logged by it.
  • Images and other content without text are not inspected.
  • The hook sees what your Claude organization routes to it; the share of inspected traffic is set in Claude.