This guide walks through creating a draft router, configuring its first routing graph, saving it, and calling it through the chat completions API.
Step 1: Navigate to Routers
- Log in to Bud AI Foundry.
- Open Routers from the Bud admin navigation.
- Click + Router.
Step 2: Define Router Info
- Enter a clear name, such as
support-routing-router.
- Add a description that explains the routing goal.
- Keep the default router icon or choose an icon for easier scanning.
- Click Next.
Step 3: Select a Project
- Search for the project that should own the router.
- Select the project row.
- Click Create Draft.
The router is created as a draft with an empty dag_config.
Step 4: Open the Router Editor
- Click View Router from the success screen, or open the router card from the Routers list.
- The detail page loads the router’s
dag_config and available data sources.
- The editor also fetches actions from
/routers/actions so action labels, parameters, and categories match the backend catalog.
Step 5: Add Routing Actions
Start with a simple graph:
- Add a Signal action to evaluate request metadata.
- Add a Decision action for rule evaluation.
- Add an Algorithm action to choose an endpoint.
- Connect the graph using allowed lanes:
- Trigger → Signal
- Trigger → Decision
- Decision → Algorithm
Signals and projections are inputs to decisions. They do not fan out to other actions; reference their computed values from decision rules instead.
Click each action and fill the required parameters. Depending on the action metadata, fields may reference:
- Clusters
- Models
- Projects
- Providers
- Credentials
- Endpoints
- Weighted or ordered endpoint lists
- Content rules or string lists
The editor validates required fields before saving unsaved action changes.
Step 7: Save and Activate
Click Save. The UI maps editor steps into dag_config.steps, sets entry_step, preserves parameters and outputs, and updates the router with status active.
Step 8: Use the Router
From the Routers list, open the router menu and choose Use Router. Copy the generated cURL, Python, or JavaScript snippet.
curl --location 'https://your-bud-api.example.com/v1/chat/completions' \
--header 'Authorization: Bearer {API_KEY_HERE}' \
--header 'Content-Type: application/json' \
--data '{
"model": "support-routing-router",
"messages": [{"role": "user", "content": "Your input message here"}]
}'
Once the request is accepted, Bud evaluates the router graph and routes the request according to your configured decisions and algorithms.