Skip to Content
AgentShield
Integrations

Integration Overview

How agents connect to AgentShield, which client to choose, and the guarantee every integration shares. No tool runs outside the gateway.

Every integration does the same two things: it signs requests with the agent's key, and it routes each tool call through the gateway's authorize and execute endpoints. None of them accepts a local function to run, so an agent built on them has no path that bypasses policy.

Choose a client

You are building withUsePackage
Plain PythonPython SDKagentshield_sdk
Node.js / TypeScriptTypeScript SDK@agentshield/sdk (source)
LangGraph graph with a tool nodeLangGraphagentshield_langgraph.GatewayToolNode
LangChain or LangGraph agents with typed toolsLangChainagentshield_langchain.GatewayTool
CrewAI crewsCrewAIagentshield_crewai.GatewayCrewTool
Any MCP host (stdio)MCPpython -m agentshield_mcp
Another languageRequest signing + Gateway APIYour own client

How the pieces fit

  • Client.call_tool / callTool raises Denied or ApprovalRequired instead of executing. LangGraph and MCP use this path and turn those exceptions into tool errors.
  • agentshield_sdk.tools.invoke is the framework-neutral layer used by LangChain and CrewAI. It converts every outcome, including deny, approval, and gateway errors, into a JSON string the model can read, and can wait for approval.

Shared guarantees

GuaranteeHow it is enforced
No local executionConstructors accept a client and names or specs only. Passing func, coroutine, callables, or extra fields raises TypeError
Signed bytes are the sent bytesClients serialize once, sign that buffer, and send it
Seeds stay localSeeds live in client memory; repr/toString omit them
No redirectsThe Python transport raises on a redirect; the TypeScript transport uses redirect: "error"
Arguments boundExecute sends the same arguments that were authorized
Content warningsWhen analysis flags a result, the client adds a warning for the model

Mapping tools to policy

Every integration ultimately sends tool_name, operation, resource, and arguments. Decide these deliberately:

  • tool_name selects the adapter: sample.echo or http.request.
  • operation is the policy action. Use distinct operations for reads and writes (http.get versus http.post) so policy can treat them differently.
  • resource is what policy resource rules compare. With LangChain and CrewAI you can fix it per tool so the model cannot change it.

One agent per permission set

The integration's identity is the AgentShield agent whose seed the client holds. If two parts of your system need different permissions, register two agents with two policies rather than sharing one seed.

Was this page helpful?

On this page