始め方は三通り
クイックスタート
ひとつの API キーで、完全なエージェントバックエンドをアプリに組み込めます。ハーネスのエンジニアリングは不要です。
自分のコードベースで始める
- 01
プロンプトをコピーして送信
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.ターミナルまたはデスクトップアプリで、プロンプトをClaude CodeまたはCodexに貼り付けます。 - 02
質問されたら、何を構築したいかを伝える
経理エージェント01 / 03
ユーザー向けUIを備えた経理エージェントを構築します。請求書を読み取り、取引先、合計金額、税額を抽出して仕訳を作成します。税務・法務のアドバイスは行いません。
先にプロンプトをコピーするとロックが解除されます
- 03
APIキーを作成
コーディングエージェントに求められたら、安全なシークレット入力プロンプトにキーを貼り付けてください。キーはアプリのサーバー上に HR_API_KEY として保存されます。
秘密にしてください。 キーは、コーディングエージェントが開くセキュアなモーダルにのみ貼り付けてください。通常のチャット、ソースファイル、AGENTS.md、ブラウザのコード、ログ、スクリーンショットには絶対に貼り付けないでください。
- 04
アプリを構築します
既存アプリのデザインを保ったまま機能を構築します。空のフォルダーの場合は、まず小さなWebアプリを作成します。
- 05