Two Different API Servers: This page documents the
Agent.launch() HTTP server, which uses PRAISONAI_LAUNCH_AUTH_TOKEN. For the auto-generated API server created by praisonai deploy run --type api (which uses PRAISONAI_API_TOKEN), see API Server Authentication.Agent.launch() or Agents.launch().
Base URL
8000. The server binds to 127.0.0.1 by default.
If
PRAISONAI_LAUNCH_AUTH_TOKEN is set (or your process printed a one-time token because it bound to a non-loopback host), add -H "Authorization: Bearer $PRAISONAI_LAUNCH_AUTH_TOKEN" to every request below. See Authentication.Endpoints
POST /
Send a query to the agent(s). Request:
Response:
POST //
Call a specific agent in multi-agent setup. Request:GET //list
List available agents. Request:GET /health
Health check endpoint. Request:GET /
Root endpoint with welcome message. Request:GET /docs
Swagger UI documentation. Request: Open in browser:http://localhost:8000/docs
Error Responses
Error Format:
Authentication
TheAgent.launch() / Agents.launch() server binds to 127.0.0.1 by default and requires a bearer token whenever PRAISONAI_LAUNCH_AUTH_TOKEN is set. On loopback with no token, requests are keyless. Binding to a non-loopback host (0.0.0.0, a LAN IP) with no token auto-generates a one-time token and prints it to stdout.
Send the token with either header:
401. See Agent API Launch → Authentication for the full three-state model.
Python Client
Related
- Agents Server - Deploy agents as HTTP server
- MCP API - MCP server endpoints
- A2A API - A2A protocol endpoints

