What is a Router?
A router is a directed graph that evaluates an AI request and chooses how it should be handled. Routers are especially useful when a project has multiple endpoints, policies, or optimization strategies but application developers need one stable API target.Router DAG Definition
The Bud admin UI models router graphs with aRouterDAGDefinition shape:
Each step includes an id, display name, action type, parameter object, dependency list, optional condition, optional failure behavior, and optional timeout.
Action Categories
Router actions are fetched dynamically from the router API. The editor uses action metadata for display, parameter forms, outputs, and connection validation.The exact action list is backend-driven. If an expected action does not appear, refresh the router actions catalog or verify that
/routers/actions returns the category and action metadata.Connection Rules
The router editor intentionally supports a constrained topology so routing graphs remain predictable.Allowed Connections
Rejected Connections
- Signal → any node
- Projection → any node
- Decision → Signal, Projection, Decision, or Trigger
- Algorithm → any node
- Plugin → any node
- Trigger → Algorithm or Plugin directly
Parameters and Data Sources
Router action forms can draw options from Bud resources loaded on the detail page:- Clusters use
cluster_idvalues for deployment-compatible workflows. - Models load global model records.
- Projects identify project-scoped routing ownership.
- Providers and credentials support proprietary or cloud-backed actions.
- Endpoints provide deployment targets for algorithm and routing actions.
Save Lifecycle
When you click Save, Bud admin performs these steps:- Flush unsaved action configuration changes.
- Validate action parameters in the editor panel.
- Convert editor steps into API
dag_config.steps. - Add
entry_step,parameters,outputs, dependencies, conditions, andnext_steps. - Update the router and set status to
active.
Status and Operational Metadata
Routers can appear asdraft, active, or inactive. Router cards display step count, execution count, creation time, and last execution time when available.