Herdr
Herdr is an open-source app that runs coding agents in tabs. The agents run in herdr-core, a server on your machine, so they continue when you close the window. Herdr has no model settings of its own. Each agent that it runs uses its own provider.
To use the exchange in Herdr, start each agent with the Arc CLI. This guide adds arc commands to the menu that starts agents in Herdr.
This guide follows the AGENTS.md file that Herdr writes in ~/.config/herdr-app. Check each step against your Herdr release.
Before you start
-
A workspace with a balance. See API keys.
-
The Arc CLI, with a saved key:
curl -fsSL https://inference.ai.exchange/cli/install.sh | bash arc login -
Herdr from herdr.dev.
-
For the status of Claude Code in Herdr, Claude Code 2.1.326 or newer.
1. Start an agent in a tab
Open a terminal tab in Herdr and start an agent with arc:
arc claude
arc sets the base URL, the key and the model for that process only. A plain claude in another tab still uses your own account.
Put the flags of arc before the flags of the agent. arc reads its own flags (--model, --cap, --filter) until the first flag that it does not know. It sends the rest to the agent.
arc claude --cap 0.50 -p "explain this repository" # correct
arc claude -p "explain this repository" --cap 0.50 # Claude Code refuses --cap
2. Add the agents to the menu
The + menu in the tab bar starts agents. Herdr reads its entries from ~/.config/herdr-app/programs.json. Run this command to add an entry for each agent that arc starts and that is on your PATH:
arc desktop herdr
- Each entry is named
arc-<tool>, such asarc-claude-code. It runsarc <tool>with the full path ofarc, so Herdr finds it without your shell'sPATH. - The file holds no key.
arcreads the saved key, model and cap each time that it starts an agent. - Add
--modelor--capto put that flag on each entry.--printshows the change and does not make it. - Run the command again after you install another agent.
arc desktop remove herdrtakes out only these entries. Your other entries stay.
Herdr reads the file again when it changes. Run herdr-app status to see an error in the file.
Write the entries yourself
To start an agent with other flags, add an entry by hand. For example, this entry starts Claude Code with Auto, ranked by price:
{
"programs": {
"claude-cheap": {
"name": "Claude, cheapest (Architect)",
"icon": "icons/claude.svg",
"run": ["arc", "claude", "--model", "architect.auto:cheapest", "--cap", "0.50"]
}
}
}
- Do not name an entry
arc-<tool>with a tool id fromarc tools, such asarc-opencode.arc desktop herdrreplaces and removes the entries with those names. runmust name a program or a shell function. The launcher does not expand an alias.- If Herdr cannot find
arc, write its full path inrun.which arcshows it.
3. Check it works
- Open + in the tab bar and choose Claude Code (Architect).
- Send a short request.
- Open Credits → Receipts and check for the charge.
The tab shows the status of the agent: working, done, or waiting for you. Herdr gets the status from the agent through the OSC 7501 control sequence. Claude Code before 2.1.326 stops this report, and Herdr then shows the tab as a shell.
Control the cost
Herdr does not stop an agent when you close the window. An agent continues to send requests, and the exchange continues to charge for them.
--caplimits what one request can cost. It does not limit a session.- To limit the total, give Herdr its own key with a spend limit. See API keys.
Agents on other machines
Herdr can add a machine over SSH with hc machine add. An agent on that machine uses the arc and the key of that machine. Install the Arc CLI and run arc login there too.
Troubleshooting
| Symptom | Cause and fix |
|---|---|
The + menu has no arc entry |
Run arc desktop to check that Herdr is set up. Run herdr-app status to see an error in programs.json. |
| An agent is not in the menu | Install the agent, then run arc desktop herdr again. Only agents on PATH get an entry. |
| The tab closes with an error at start | Herdr cannot find arc. If arc moved, run arc desktop herdr again. For an entry that you wrote, use the full path in run. |
unknown option '--cap' |
Put the flags of arc before the flags of the agent. |
| The tab shows a shell and no status | Update Claude Code to 2.1.326 or newer. If you have two copies, run which -a claude in a login shell. The launcher uses the first one. |
401 |
Run arc login again on that machine. |
402 |
Add credit to the workspace or check the key's spend limit. |
See Errors for the exchange's error codes.
Next steps
- Arc CLI: the models, the caps and the settings of
arc. - Claude Code: what
arc claudesets. - API keys: key scope and spend limits.