AgentOS cannot hot-reload — serve(reload=True) warns and serves without reload.
Quick Start
1
What happens today
serve(reload=True) on a programmatic AgentOS emits a UserWarning and runs without reload:praisonai app --reload prints the same guidance in yellow.2
Get reload with a module factory
Expose your
AgentOS as a module-level factory and run uvicorn against the import string:Why reload is unsupported
Uvicorn’s reload worker runs in a separate process and re-imports the target module. A programmatically builtAgentOS(agents=[...]) has no importable module-level app. The reload worker would start empty and fail, so serve(reload=True) warns and serves without reload rather than crash.
Non-reload serving is unchanged.
AgentOS(agents=[...]).serve() works exactly as before.Common Patterns
Development with reload
Point uvicorn at your factory so edits tomymodule.py reload automatically:
Production without reload
For production, callserve() directly — reload is a development-only convenience:
Best Practices
Use a module factory for live reload
Use a module factory for live reload
Expose
create_app() returning AgentOS(...).get_app() and run uvicorn "mymodule:create_app" --factory --reload. Uvicorn controls the import, so each edit re-imports cleanly.Don't rely on reload in production
Don't rely on reload in production
Reload re-imports on every change and adds overhead. Serve with
AgentOS(...).serve() (no reload) in production.Prefer CLI serve commands for reloadable files
Prefer CLI serve commands for reloadable files
praisonai serve agents --reload, praisonai serve unified --reload, and praisonai serve recipe --reload all hot-reload because they load from a file via an app factory. See Serve.Related
Serve
--reload support across CLI serve commandsRecipe Serve Advanced
App-factory pattern for workers and reload

