TypeScript and Python SDKs that wrap your agent's tools so each call is checked by ACP before it runs, and that give each subagent a narrower API key than its parent. Two things you can do:
- Govern your own tool calls. Wrap any tool with
@governed/governed(). Before it runs, ACP decides allow, ask or deny based on your workspace policy, and output can be redacted on the way back. - Spawn subagents with delegation chains. Use
spawn_subagent()+child_context()(Python) or the equivalent TypeScript helpers to mint a scope-narrowed child API key for any subagent your agent creates. The gateway intersects scopes with the parent, atomically debits the parent's budget, keeps the originating human's identity (originSub), and produces audit logs that trace through the chain. See the agents-building-agents quickstart.
The adapters cover server-deployed agent frameworks: CrewAI, LangChain, Pydantic AI and the Anthropic SDK.
See it in working code: the Governed Agent Recipes: four runnable Python agents (~200 lines each) built on these SDKs. Concepts: runtime authorization · Anthropic Agent SDK integration guide
Node / TypeScript (packages/):
| Package | Purpose | Status |
|---|---|---|
@agenticcontrolplane/governance |
Thin core SDK, framework-agnostic. Wraps any tool handler. | |
@agenticcontrolplane/governance-anthropic |
Adapter for Anthropic Messages API + Claude Agent SDK. |
Python (python/):
| Package | Purpose | Status |
|---|---|---|
acp-governance |
Thin core SDK, framework-agnostic. | |
acp-crewai |
Adapter for CrewAI (includes install_crew_hooks for inter-agent handoff capture). |
|
acp-langchain |
Adapter for LangChain / LangGraph, plus Deep Agents with subagent coverage (acp_langchain.deepagents). |
import { governHandlers, withContext } from "@agenticcontrolplane/governance-anthropic";
const handlers = governHandlers({
web_search: async ({ query }) => doSearch(query),
});
app.post("/run", async (req, res) => {
const token = req.header("authorization")!.slice("Bearer ".length);
await withContext({ userToken: token }, async () => {
// run your tool-use loop; handlers are governed
});
});from crewai.tools import tool
from acp_crewai import governed, install_crew_hooks, set_context
@tool("web_search")
@governed("web_search")
def web_search(query: str) -> str:
return do_search(query)
@app.post("/run")
def run(topic: str, authorization: str = Header(...)):
set_context(user_token=authorization.removeprefix("Bearer ").strip())
crew = Crew(agents=[...], tasks=[...])
install_crew_hooks(crew) # also captures inter-agent handoffs
return {"result": str(crew.kickoff())}from langchain.agents import create_agent
from langchain.tools import tool
from acp_langchain import ACPMiddleware, set_context
@tool
def web_search(query: str) -> str:
return do_search(query)
agent = create_agent(model="openai:gpt-4o-mini", tools=[web_search],
middleware=[ACPMiddleware()]) # every tool, one registrationDeep Agents: from acp_langchain.deepagents import create_deep_agent, same signature as deepagents', with ACP on the main agent and every subagent. Legacy chains / custom StateGraph: stack @governed("web_search") under @tool.
All packages speak the same wire protocol to the ACP gateway, the same shape Claude Code's hook uses:
POST /govern/tool-use:{ tool_name, tool_input, session_id }+Authorization: Bearer <user-jwt>returns{ decision: "allow" | "deny" | "ask", reason? }POST /govern/tool-output: same +tool_outputreturns{ action: "pass" | "redact" | "block", modified_output?, findings? }- Fail-open on network errors, timeouts (5s default), gateway 5xx and a missing configuration. The call proceeds, and the reason is recorded as
fail-open (unreachable)or similar so the lapse is visible.
Third-party frameworks that don't have a first-class adapter can call these endpoints directly. The snippet is about 20 lines in any language.
# Node
npm install
npm run build # build TS packages
npm run typecheck # across the workspace
# Python — install each package editable into a venv
python -m venv .venv && source .venv/bin/activate
pip install -e python/acp-governance -e python/acp-crewai -e python/acp-langchainpackages/ # npm workspace
governance/ # @agenticcontrolplane/governance
governance-anthropic/ # @agenticcontrolplane/governance-anthropic
examples/ # worked examples (Anthropic PR reviewer, framework scout)
python/ # PyPI packages (each standalone)
acp-governance/
acp-crewai/
acp-langchain/
Pre-release. Until 1.0, expect API changes. Pin exact versions in production.
MIT. See LICENSE.
- agentgovbench: the 48-scenario benchmark that scores these adapters
- delegation-chain-spec: ADCS, the open spec for the delegation chains these SDKs mint
- hermes-acp-plugin: native plugin for Hermes Agent
- acp-pr-reviewer-demo: a worked A2A delegation example using these SDKs