Three ways to start
Quickstart
Plug a complete agent backend into your app with one API key. No harness engineering.
Start in your codebase
- 01
Copy the prompt and send it
Build an agent-powered feature with HarnessRouter as its agent backend. Start by asking me: What do you want to ship to your users? Ask me if anything else is unclear. 1. Read the setup guide first: https://harnessrouter.ai/agents.md (if you cannot open links, ask me to paste it). 2. Open a secure secret prompt and ask me for my HarnessRouter API key. Store it as HR_API_KEY in my backend environment, replacing the existing value if there is one (any key of this workspace works for every setup in it). Never ask me to paste it into this chat. Never print, log or commit it, and never send it to the browser. 3. Build the feature in my app. If this folder already has an app, add the feature there and keep its design and architecture. If it is empty, create a small web app for it first, and ask me which stack if it is unclear. Then add the HarnessRouter integration. 4. Create one `harness` resource through the HarnessRouter API. Set its `base` to the selected agent harness, then configure its model and instructions. Agent harness: the one the guide recommends for this job. Model: the one the guide recommends. Give it a clear name and the feature’s standing instructions. If one with that name already exists in my workspace, reuse it. 5. Call it from my backend as How it connects says below. 6. Verify: send one real request through my app’s own code path and confirm a result comes back. 7. Tell me its Harness ID. How it connects: My frontend talks only to my backend. It never calls HarnessRouter and never sees the key. My backend calls POST https://api.harnessrouter.ai/v1/responses, sending HR_API_KEY from its own environment as Authorization: Bearer <key>. One user request is one task: input is what my user typed, and metadata.harness_id is the Harness ID of the feature’s own setup on every request the feature sends, never another setup’s. My backend sets the Harness ID; never take it from the browser. Send previous_response_id, the id of the response it continues, only when my user follows up on the same result. Otherwise start a new task: a follow-up carries the earlier context and costs more. A task can take minutes. Send stream: true and pass its events to my frontend as progress, or send background: true and poll GET /v1/responses/{id} until its status is completed, failed, incomplete or cancelled. The finished response’s output holds the answer text, with each file the agent made as an annotation carrying its filename and download_url. GET /v1/sessions/{session_id}/files lists all of the task’s files (session_id is in the response’s metadata). My backend downloads them with the key and serves them to my frontend. Save each task’s response id and session_id with my user’s own record, so my app can show their tasks and continue them. Instructions are stored in the HarnessRouter setup, not in my app’s code or sent with every task. Keep a copy of the setup in my repo as harnessrouter.json (harness_id, name, base, model, instructions). To change it later, fetch the live setup first (it may have been edited in HarnessRouter), update harnessrouter.json, then apply it with the HarnessRouter API.Paste the prompt into Claude Code or Codex, in your terminal or the desktop app. - 02
When it asks, tell it what to build
Bookkeeping agent01 / 03
Build a bookkeeping agent with user-facing UI. Read an invoice, pull the vendor, total and tax, then draft the journal entry. No tax or legal advice.
Copy the prompt first to unlock
- 03
Create an API key
When your coding agent asks, paste the key into its secure secret prompt. It stores the key as HR_API_KEY on your app's server.
Keep it secret. Paste the key only into the secure modal opened by your coding agent. Never paste it into normal chat, source files, AGENTS.md, browser code, logs, or screenshots.
- 04
It builds your app
It builds the feature in your app and keeps its design. In an empty folder, it creates a small web app first.
- 05