approval= gates tools and agents, and launch(protocol=...) serves them.
Quick Start
1
Gate a tool
approval=True on @tool registers the tool at "high" risk.2
Gate an agent
The same word gates the agent —
approval="high" asks before any high-risk tool.3
Serve over MCP
launch(protocol="mcp") publishes the agent(s) over MCP — same launch() as protocol="http".The two words
launch(protocol="mcp") delegates to serve_agents(...), so single- and multi-agent serving share one endpoint (/mcp), one tool schema (ask_{name} + list_agents), and one session model.
Deprecated spellings
Old spellings still work but are on the way out.Best Practices
Prefer approval= everywhere
Prefer approval= everywhere
Write
approval= on both @tool and Agent. One word means one mental model — no guessing which surface uses which spelling.Pick the launch idiom that fits your code
Pick the launch idiom that fits your code
Hold an
Agent or PraisonAIAgents object? Call launch(protocol="mcp"). Writing an imperative script? Call serve_agents([...]). Both resolve to the same server.Migrate off requires_approval
Migrate off requires_approval
requires_approval= warns on every use — including explicit False. Swap it for approval= to silence the DeprecationWarning.Related
Tool Approval
@tool(approval=…) decorator referenceAgent Approval
Agent(approval=…) config and the dangerous-tools registryServe Agents
serve_agents([...]) — what launch(protocol='mcp') delegates toAgents MCP
launch(protocol='mcp') ergonomics and Docker
