| Example | Description |
|---|---|
| Custom FastAPI App | Mount AgentOS on an existing FastAPI base_app so a custom /customers route is served alongside AgentOS routes. |
| Custom Health Endpoint | Add a custom health endpoint to your AgentOS app. |
| Custom Lifespan | Example AgentOS app where the agent has a custom lifespan. |
| Handle Custom Events | Yield a CustomEvent subclass from an async tool that reads session_state, streamed through AgentOS agent and team run endpoints. |
| Override Routes | Preserve your FastAPI app’s conflicting routes with on_route_conflict="preserve_base_app". |
| Pass Dependencies to Agent | Example for AgentOS to show how to pass dependencies to an agent. |
| Update From Lifespan | Register a second agent and resync AgentOS from a FastAPI lifespan function. |
Customize
Customize
AgentOS customization examples: custom FastAPI apps, health endpoints, lifespans, route overrides, dependencies, and custom events.