Agents are the conversational core of the platform. Each agent wraps an LLM with a system prompt, tools, knowledge bases, and optional MCP servers. Agents use a ReAct loop to reason about user messages, call tools as needed, and generate streaming responses. Sessions maintain conversation history across multiple turns.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.
Common Patterns
Create an agent, assign tools and knowledge bases, then use the streaming endpoint for conversations. Pass session_id to continue multi-turn conversations. For human-in-the-loop workflows, configure hooks and use the approve endpoint when approval_requested events are received.Agent CRUD
GET /api/agents
List all agents.POST /api/agents
Create a new agent.GET /api/agents/
Get an agent by ID.Agent ID
PATCH /api/agents/
Update an agent’s name, model, system prompt, or settings.Agent ID
DELETE /api/agents/
Delete an agent.Agent ID
Tool Assignments
POST /api/agents//tools
Assign a tool to the agent.Agent ID
GET /api/agents//tools
List tool assignments for the agent.Agent ID
PATCH /api/agents//tools/
Update tool assignment configuration.Agent ID
Assignment ID
DELETE /api/agents//tools/
Remove a tool assignment from the agent.Agent ID
Assignment ID
Knowledge Base Assignments
POST /api/agents//knowledge-bases
Link a knowledge base to the agent. Creates a dynamic search tool.Agent ID
GET /api/agents//knowledge-bases
List knowledge base assignments for the agent.Agent ID
DELETE /api/agents//knowledge-bases/
Remove a knowledge base from the agent.Agent ID
Assignment ID
MCP Servers
POST /api/agents//mcp-servers
Add an MCP server to the agent.Agent ID
GET /api/agents//mcp-servers
List MCP servers for the agent.Agent ID
PUT /api/agents//mcp-servers/
Update an MCP server configuration.Agent ID
MCP Server ID
DELETE /api/agents//mcp-servers/
Remove an MCP server from the agent.Agent ID
MCP Server ID
Hooks
POST /api/agents//hooks
Add a hook to the agent (pre/post execution events).Agent ID
GET /api/agents//hooks
List hooks for the agent.Agent ID
DELETE /api/agents//hooks/
Remove a hook from the agent.Agent ID
Hook ID
Execution
GET /api/agents//sessions
List chat sessions for the agent.Agent ID
POST /api/agents//run
Run agent synchronously (no tools, no streaming). Returns full response.Agent ID
POST /api/agents//run/stream
Run agent with streaming SSE. Supports tools, ReAct loop, and multi-turn via session_id.Agent ID
POST /api/agents/runs//approve
Approve or deny a pending tool call (human-in-the-loop).Run ID
Error Responses
| Status | Code | Description |
|---|---|---|
| 400 | invalid_config | Invalid agent configuration (e.g., unsupported model, invalid temperature) |
| 404 | agent_not_found | No agent exists with the given ID |
| 409 | tool_conflict | The tool is already assigned to this agent |