Beyond basic tools and knowledge bases, agents support three powerful configuration options: MCP (Model Context Protocol) servers for external tool integrations, hooks for triggering webhooks on agent lifecycle events, and an approval flow that pauses execution until a human approves sensitive tool calls. This guide walks through each one.Documentation Index
Fetch the complete documentation index at: https://docs.powabase.ai/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites:
- An agent created (see Build an Agent guide)
Add an MCP server
Connect an external MCP server to your agent. The agent discovers and calls tools exposed by the MCP server over SSE transport during runs.Endpoint: Response:
POST /api/agents/{id}/mcp-serversThe agent connects to the MCP server at the start of each run to discover available tools. Tools are then available alongside builtin tools and knowledge base search.
Configure a webhook hook
Add an HTTP webhook hook that fires before each tool call. Use hooks to log tool usage, enforce policies, or notify external systems.Endpoint:
POST /api/agents/{id}/hooksHook events: PreToolUse (before tool execution), PostToolUse (after tool execution). Use the optional matcher field to target a specific tool by name.
Enable approval flow
Add an approval hook to the agent. When a tool call matches, the run pauses and emits an
approval_requested SSE event. The run waits until you approve or reject via the API.Endpoint: POST /api/agents/{id}/hooksSet matcher to a specific tool name to only require approval for that tool, or omit matcher to require approval for all tool calls.
Approve a pending tool call
When an approval_requested event pauses a run, call the approve endpoint to allow execution to continue, or reject to skip the tool call.Endpoint:
POST /api/agents/runs/{run_id}/approveAfter approval, the SSE stream resumes and the tool executes normally. After rejection, the agent skips the tool call and may choose an alternative approach or respond to the user.
What’s Next
Agents & Tools
Understand the full tool system including MCP, builtins, and custom tools.
Orchestration
Coordinate multiple agents working together.
Agents API Reference
Full endpoint documentation for agents.