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 with | Use | Package |
|---|---|---|
| Plain Python | Python SDK | agentshield_sdk |
| Node.js / TypeScript | TypeScript SDK | @agentshield/sdk (source) |
| LangGraph graph with a tool node | LangGraph | agentshield_langgraph.GatewayToolNode |
| LangChain or LangGraph agents with typed tools | LangChain | agentshield_langchain.GatewayTool |
| CrewAI crews | CrewAI | agentshield_crewai.GatewayCrewTool |
| Any MCP host (stdio) | MCP | python -m agentshield_mcp |
| Another language | Request signing + Gateway API | Your own client |
How the pieces fit
Rendering diagram…
Client.call_tool/callToolraisesDeniedorApprovalRequiredinstead of executing. LangGraph and MCP use this path and turn those exceptions into tool errors.agentshield_sdk.tools.invokeis 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
| Guarantee | How it is enforced |
|---|---|
| No local execution | Constructors accept a client and names or specs only. Passing func, coroutine, callables, or extra fields raises TypeError |
| Signed bytes are the sent bytes | Clients serialize once, sign that buffer, and send it |
| Seeds stay local | Seeds live in client memory; repr/toString omit them |
| No redirects | The Python transport raises on a redirect; the TypeScript transport uses redirect: "error" |
| Arguments bound | Execute sends the same arguments that were authorized |
| Content warnings | When 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_nameselects the adapter:sample.echoorhttp.request.operationis the policy action. Use distinct operations for reads and writes (http.getversushttp.post) so policy can treat them differently.resourceis 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?