Skip to main content
One vocabulary spans the SDK: 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

Write approval= on both @tool and Agent. One word means one mental model — no guessing which surface uses which spelling.
Hold an Agent or PraisonAIAgents object? Call launch(protocol="mcp"). Writing an imperative script? Call serve_agents([...]). Both resolve to the same server.
requires_approval= warns on every use — including explicit False. Swap it for approval= to silence the DeprecationWarning.

Tool Approval

@tool(approval=…) decorator reference

Agent Approval

Agent(approval=…) config and the dangerous-tools registry

Serve Agents

serve_agents([...]) — what launch(protocol='mcp') delegates to

Agents MCP

launch(protocol='mcp') ergonomics and Docker