Agents are the conversational interface to your AI features. This guide creates an agent, gives it a tool and a knowledge base, then demonstrates a streaming multi-turn conversation.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:
- Authentication configured (see Authentication guide)
- Optional: A knowledge base for RAG (see Create a Knowledge Base guide)
Create the agent
Define the agent with a name, LLM model, and system prompt that describes its behavior.Endpoint:
POST /api/agentsAssign a builtin tool
Enable the agent to use builtin tools like database_query, http_request, or code_execute.Endpoint:
POST /api/agents/{id}/toolsLink a knowledge base
Assign a knowledge base so the agent automatically gets a search tool for it. During conversations, the agent can search the KB to ground its responses.Endpoint:
POST /api/agents/{id}/knowledge-basesChat with the agent (streaming)
Send a message and receive a Server-Sent Events (SSE) stream. Events include tool calls, tool results, and the final response.Endpoint:
POST /api/agents/{id}/run/streamSSE events: start, chunk, step_started, tool_call, tool_result, step_completed, approval_requested, complete, error.
What’s Next
Streaming Responses
Deep dive into SSE event handling.
Advanced Agent Config
Add MCP servers, hooks, and approval flows.
Agents & Tools
Understand the ReAct loop and tool system.