Factories
Build agents, teams, and workflows from validated request context.
Factories construct a component for a request. Client input customizes the component; authorization decisions must use trusted middleware claims.
| Example | Description |
|---|---|
| Basic factory | Construct an agent for each request. |
| Validated input | Validate factory_input against a Pydantic schema. |
| JWT and RBAC | Choose capabilities from verified identity and scopes. |
| Tiered models | Select a model through factory configuration. |
| Team factory | Construct a team for the request. |
| Workflow factory | Construct a workflow for the request. |
| Async factory | Await asynchronous component construction. |
| Custom research schema | Build the standalone PostgreSQL-backed research example. |