Clearception
Developer Integrations

Claude Agent SDK integration

AvailableDocumentation version 1.0 · Applies to TrustFabric · Updated 2026-10-30

Route every tool call through a can_use_tool callback that calls the gateway inside your own runner. Enforcement level: enforced.

When you build an agent with the Claude Agent SDK, the can_use_tool callback decides whether each tool call may run. Calling the TrustFabric gateway from that callback, inside a runner you operate, mediates the execution path: the tool does not run unless the gateway answers ALLOW.

Agents registered this way are recorded at the enforced level. The runner holds a workload token; the agent never holds approver permissions.

Callback sketch

Field names in this sample are illustrative and may change between API versions.

# integrations/trustfabric/agent_sdk_guard.py
from claude_agent_sdk import ClaudeAgentOptions
from agent_sdk_guard import TrustFabricGuard

guard = TrustFabricGuard(repository="acme/client-ledger-service", jurisdiction="EU")
options = ClaudeAgentOptions(can_use_tool=guard.can_use_tool)
# Any answer other than ALLOW, or no answer, denies the tool call.