# AI use cases for Agent Router (nidhi-singh02/agent-router)

Repo: [nidhi-singh02/agent-router](https://github.com/nidhi-singh02/agent-router) | Use cases: 4 | Page: https://dedupedai.com/use-cases/nidhi-singh02-agent-router/

Agent Router is a TypeScript command-line tool that picks an AI coding agent (Cursor, Claude Code, Codex, or OpenCode), a model, and a reasoning effort for a task, then starts that agent in a Herdr pane.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Preview which agent and model a task would use: https://dedupedai.com/use-cases/nidhi-singh02-agent-router/preview-agent-route-for-task/
- Launch a task in a Herdr pane with the chosen agent: https://dedupedai.com/use-cases/nidhi-singh02-agent-router/launch-task-in-herdr-pane/
- Check subscription quota before routing a task: https://dedupedai.com/use-cases/nidhi-singh02-agent-router/check-quota-before-routing/
- Let an agent route its next work phase via skill: https://dedupedai.com/use-cases/nidhi-singh02-agent-router/let-agent-route-next-phase/

## How to preview which agent and model a task would use with Agent Router

Repo: [nidhi-singh02/agent-router](https://github.com/nidhi-singh02/agent-router) | Difficulty: Intermediate | Time: 90 minutes | Basis: From the README

Run a dry run to see the agent, model, and effort the router would pick, without launching anything.

**Who it is for:** A developer with several agent subscriptions who wants to check the router's choice before starting paid or quota-limited work.

**The problem:** It is unclear which agent, model, and effort the router would pick for a given task, and starting the wrong one wastes quota.

**The outcome:** A decision card showing the selected agent, model, effort, reason, and quota, with no pane opened and nothing sent.

### Steps

1. Run `git clone https://github.com/nidhi-singh02/agent-router.git` and change into the cloned folder.
2. Run `npm install` and then `npm run build`.
3. Run `npm link -w @agent-router/router` to put `router` on your PATH.
4. Store your TypeSafe key with `security add-generic-password -a "$USER" -s model-router-typesafe -w` on macOS, then add your accounts to `.model-router/config.json`.
5. Run `router run "<task description>" --dry-run` and read the decision card. (inferred, check the README)

### Prompt to paste into your agent

```text
In the agent-router repo, run `router run "<task description>" --dry-run` and report the Selected line, the Why line, and the Quota line from the decision card. Verify that no Herdr pane was opened and no command was started.
```

### Caveat

Routing always calls TypeSafe with no fallback, so the dry run needs a working TypeSafe key and at least one account set up in config.json.

Risk, credentials: Each run sends the task text to TypeSafe, so keep sensitive narrative data out of the task string.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/nidhi-singh02-agent-router/preview-agent-route-for-task/

## How to launch a task in a Herdr pane with the chosen agent with Agent Router

Repo: [nidhi-singh02/agent-router](https://github.com/nidhi-singh02/agent-router) | Difficulty: Intermediate | Time: 90 minutes | Basis: From the README

Let the router pick an agent, open a new Herdr pane, start it, and hand it the task.

**Who it is for:** A developer working inside Herdr who wants to hand a planned task to the best-fitting agent without choosing one by hand.

**The problem:** Choosing between Cursor, Claude Code, Codex, and OpenCode for each task, then starting it and passing the task, is repetitive work.

**The outcome:** A new Herdr pane running the chosen agent, which has received the task and confirmed it began working.

### Steps

1. Complete the setup steps for installing, building, and linking `router`, and configure your accounts.
2. Open a terminal pane inside Herdr so that HERDR_ENV=1 is set.
3. Run `router run "<task description>"` from that pane. (inferred, check the README)
4. Wait for the router to split a new pane, start the agent, and send the task.
5. Run `router session` to see the latest launch and its details.

### Prompt to paste into your agent

```text
In the agent-router repo, run `router run "<task description>"` from inside a Herdr pane and report the exit code. Verify that a new pane opened with the selected agent running, and that `router session` lists this launch.
```

### Caveat

The router only launches from inside a Herdr pane, so running it from a plain terminal will fail unless you use --dry-run.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/nidhi-singh02-agent-router/launch-task-in-herdr-pane/

## How to check subscription quota before routing a task with Agent Router

Repo: [nidhi-singh02/agent-router](https://github.com/nidhi-singh02/agent-router) | Difficulty: Intermediate | Time: 60 minutes | Basis: From the README

Read account usage with the status command so you know which subscriptions still have capacity.

**Who it is for:** A person sharing a team agent subscription, or running out of quota on a personal plan, who needs to see capacity before starting work.

**The problem:** Agent subscriptions run out or fall into a reserve, and starting a task on a depleted account stalls the work.

**The outcome:** A list of accounts with current quota, so you can decide whether to route the task or wait.

### Steps

1. Complete the setup steps and add each agent login to the `accounts` array in `.model-router/config.json`.
2. Enable `"local-session"` in the `collectorPreference` of each account whose status line cache you want read.
3. Run `router status` to confirm the accounts parse.
4. Run `router status --usage` to run the full collector chain and show quota.

### Prompt to paste into your agent

```text
In the agent-router repo, run `router status --usage` and list each account with its quota and whether it is eligible. Verify that shared accounts show their reserve and that no personal account is excluded only because quota is missing.
```

### Caveat

Quota data for Cursor, Claude Code, and Codex comes only from cache files your own status line scripts write, which the router does not install.

Risk, account pooling: Shared accounts use a reserve floor of 0.40 by default, and the router excludes depleted shared accounts, so check the reserve before routing work that others also depend on.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/nidhi-singh02-agent-router/check-quota-before-routing/

## How to let an agent route its next work phase via skill with Agent Router

Repo: [nidhi-singh02/agent-router](https://github.com/nidhi-singh02/agent-router) | Difficulty: Intermediate | Time: 45 minutes | Basis: From the README

Link the model-router skill so an agent can route the next phase of your work through the router.

**Who it is for:** A developer already working inside Claude Code, Codex, or Cursor who wants the agent to hand off the next phase, such as implementation, to a better-suited agent.

**The problem:** An agent working on a plan has no built-in way to send the next phase to a different agent or model that fits the work and quota.

**The outcome:** The agent can route the next phase by using the linked model-router skill, with the choice made by the router.

### Steps

1. Complete the setup steps for installing, building, and configuring the router.
2. Run `ln -s "$PWD/skills/model-router" ~/.claude/skills/model-router` for Claude Code, and the matching links for Codex or Cursor.
3. Start a new session in the agent and ask it to route the next phase of a plan.
4. Check that the agent runs the router rather than doing the phase itself.

### Prompt to paste into your agent

```text
Using the model-router skill from the agent-router repo, route the next phase of the plan at <plan path> and report which agent, model, and effort the router selected. Verify that the router decision card appears in the output before any work starts.
```

### Caveat

The README says the router routes one phase per task and does not answer the question itself, so the launched agent still does the work.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/nidhi-singh02-agent-router/let-agent-route-next-phase/
