launch
Method
This is a method of the Agent class in the agent module.Launch the agent as an HTTP API endpoint or an MCP server.
Signature
Parameters
str
default:"'/'"
API endpoint path (default: ’/’) for HTTP, or base path for MCP.
int
default:"8000"
Server port (default: 8000)
str
default:"'0.0.0.0'"
Server host (default: ‘0.0.0.0’)
bool
default:"False"
Enable debug mode for uvicorn (default: False)
str
default:"'http'"
“http” to launch as FastAPI, “mcp” to launch as MCP server.
Returns
Any
None
Uses
rstriplogging.errorFastAPIlogging.warningrequest.jsonHTTPExceptionrequest.formasyncio.iscoroutinefunctionachatasyncio.get_event_loop
Source
View on GitHub
praisonaiagents/agent/agent.py at line 6826
