{
 "schema_version": 1,
 "generated": "2026-10-24",
 "id": "harnessrouter-harnessrouter--run-agent-tasks-from-product-backend",
 "repo": "HarnessRouter/harnessrouter",
 "repo_url": "https://github.com/HarnessRouter/harnessrouter",
 "repo_slug": "harnessrouter-harnessrouter",
 "title": "Run agent tasks from your product backend through one API",
 "page_title": "How to run agent tasks from your product backend through one API with Harnessrouter",
 "summary": "Call a self-hosted, OpenAI Responses-compatible API to run harness tasks from your own backend.",
 "who": "A developer building an AI product who needs agent tasks run by Codex or Claude Code without managing harness setup.",
 "problem": "Each agent harness has its own setup, sessions and failure handling, which slows down adding agent features to a product.",
 "outcome": "Your backend sends a task with a harness ID, gets a response from the agent, and the task appears in the Console workspace.",
 "steps": [
  "Run `docker run -d --name harnessrouter -p 127.0.0.1:3000:3000 -v harnessrouter:/data harnessrouter/harnessrouter` (inferred, check the README)",
  "Run `docker logs -f harnessrouter` and wait for the line `[harnessrouter] ready on :3000`",
  "Open http://localhost:3000, sign in, change the default password in Profile, then add a provider key under Bring Your Own Key",
  "Create an API key under API Keys in the Console and store it as HARNESSROUTER_API_KEY in your backend",
  "Send a POST to /v1/responses with metadata.harness_id set to codex and a model served by your provider"
 ],
 "agent_prompt": "Using the HarnessRouter repo at https://github.com/HarnessRouter/harnessrouter, start a local Community Edition instance and send a POST to <base-url>/v1/responses with metadata.harness_id set to codex and the input 'Reply with exactly: it works.'. Expected output: a response whose text is 'it works.' and a matching task in the Console. Verify the HTTP status is 200 before reporting success.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "45 minutes",
 "basis": "readme",
 "caveat": "The default URL only works when your backend and the CE instance run on the same computer, so other machines or containers need a reachable URL.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "python",
 "requirements": [
  "Docker installed",
  "About 4 GB of free disk space",
  "A provider API key for at least one supported model provider",
  "Python 3 if you use the Idempotency-Key example"
 ],
 "risk": "sensitive",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [
  {
   "tag": "credentials",
   "notice": "The HARNESSROUTER_API_KEY must stay on your backend and never be exposed in browser code."
  }
 ],
 "best": true,
 "score": 1.0,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/harnessrouter-harnessrouter/run-agent-tasks-from-product-backend/",
 "md": "https://dedupedai.com/use-cases/harnessrouter-harnessrouter/run-agent-tasks-from-product-backend/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/harnessrouter-harnessrouter--run-agent-tasks-from-product-backend.json",
 "api_version": "v1"
}
