praisonai serve command launches various PraisonAI server types with unified discovery support.
Server Types
| Command | Description |
|---|---|
praisonai serve agents | Launch agents as HTTP API |
praisonai serve recipe | Launch recipe runner server |
praisonai serve mcp | Launch MCP server |
praisonai serve tools | Launch tools as MCP server |
praisonai serve a2a | Launch A2A protocol server |
praisonai serve a2u | Launch A2U event stream server |
praisonai serve unified | Launch unified server with all providers |
Quick Start
Usage
Basic Server
Custom Port and Host
Alternative Flag Style
API Endpoints
When the server starts, it automatically creates these endpoints:| Endpoint | Method | Description |
|---|---|---|
/agents | POST | Run ALL agents sequentially |
/agents/{name} | POST | Run a specific agent |
/agents/list | GET | List all available agents |
/health | GET | Health check |
/docs | GET | Swagger API documentation |
Run All Agents
Run Specific Agent
List Available Agents
Example agents.yaml
Integration with n8n
The serve command works seamlessly with n8n workflows:- Visualize agent execution flow
- Add conditional logic between agents
- Integrate with other n8n nodes
Use Cases
Microservices
Expose agents as REST APIs for microservice architectures
n8n Integration
Connect agents to n8n workflows for automation
Web Applications
Backend API for web or mobile applications
Testing
Test agents via HTTP requests during development
Python SDK Equivalent
The serve command is equivalent to:Command Options
Global Options
| Option | Default | Description |
|---|---|---|
--port | 8765 | Server port |
--host | 127.0.0.1 | Server host |
--auth | none | Auth type (none, api-key, jwt) |
--api-key | - | API key for authentication |
Agents Server Options
| Option | Description |
|---|---|
--file | YAML file with agent definitions |
--stream | Enable SSE streaming |
MCP Server Options
| Option | Description |
|---|---|
--transport | Transport type (http, sse, stdio) |
--tools | Comma-separated tool names |
Recipe Server Options
| Option | Description |
|---|---|
--config | Server configuration file |
--preload | Preload recipes on startup |
Discovery Endpoint
All servers expose a unified discovery endpoint at/__praisonai__/discovery:
Server-Specific Commands
A2A Server
A2U Server
MCP Server
Tools MCP Server
Related
- Endpoints CLI - Client for all server types
- n8n Integration
- Workflows
- A2A Server
- Tools MCP Server

