> ## Documentation Index
> Fetch the complete documentation index at: https://docs.budecosystem.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quick Start

> Create and use your first router

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

1. Log in to **Bud AI Foundry**.
2. Open **Routers** from the Bud admin navigation.
3. Click **+ Router**.

## Step 2: Define Router Info

1. Enter a clear name, such as `support-routing-router`.
2. Add a description that explains the routing goal.
3. Keep the default router icon or choose an icon for easier scanning.
4. Click **Next**.

## Step 3: Select a Project

1. Search for the project that should own the router.
2. Select the project row.
3. Click **Create Draft**.

The router is created as a draft with an empty `dag_config`.

```mermaid theme={null}
sequenceDiagram
    participant User
    participant Drawer as New Router Drawer
    participant API as /routers/
    participant Project as Project Context

    User->>Drawer: Enter name and description
    Drawer->>Project: Select project
    Drawer->>API: POST router payload
    API-->>Drawer: Draft router id
    Drawer-->>User: Success and View Router action
```

## Step 4: Open the Router Editor

1. Click **View Router** from the success screen, or open the router card from the Routers list.
2. The detail page loads the router's `dag_config` and available data sources.
3. 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:

1. Add a **Signal** action to evaluate request metadata.
2. Add a **Decision** action for rule evaluation.
3. Add an **Algorithm** action to choose an endpoint.
4. Connect the graph using allowed lanes:
   * Trigger → Signal
   * Trigger → Decision
   * Decision → Algorithm

```mermaid theme={null}
graph LR
    Start((Trigger)) --> Signal[Request Signal]
    Start --> Decision[Routing Decision]
    Signal -. used in rules .-> Decision
    Decision --> Algorithm[Endpoint Algorithm]
```

<Tip>
  Signals and projections are inputs to decisions. They do not fan out to other actions; reference their computed values from decision rules instead.
</Tip>

## Step 6: Configure Parameters

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.

```bash theme={null}
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.
