Agent Launch API
Deploy PraisonAI agents as HTTP API endpoints using thelaunch() method.
Base URL
8000 for single agents, 3030 commonly used in examples.
Starting the Server
Single Agent
Multiple Agents
Endpoints
POST /
Send a message to the agent and receive a response. Request| Field | Type | Required | Description |
|---|---|---|---|
message | string | Yes | The message to send to the agent |
| Field | Type | Description |
|---|---|---|
response | string | The agent’s response |
Configuration Options
| Parameter | Type | Default | Description |
|---|---|---|---|
path | str | / | URL path for the endpoint |
port | int | 8000 | Port to listen on |
host | str | 0.0.0.0 | Host address to bind |
debug | bool | False | Enable debug logging |
cors_origins | list | None | Allowed CORS origins |
api_key | str | None | API key for authentication |
protocol | str | http | Protocol: http or mcp |
Multiple Endpoints
Deploy multiple agents on the same server:Authentication
Whenapi_key is set, include it in requests:
Error Responses
| Status | Description |
|---|---|
400 | Bad request - invalid JSON or missing message |
401 | Unauthorized - invalid or missing API key |
500 | Internal server error |
Python Client Example
See Also
- MCP Server API - Deploy as MCP server
- A2A API - Agent-to-Agent protocol
- AG-UI API - Frontend integration
- Deploy Guide - Production deployment

