█

AI/TLDR

मुझे पिलाएं कॉफ़ी
मुझे एक कॉफ़ी पिलाएँ

HarnessRouter

एक सेल्फ़-होस्टेड API, जो Codex, Claude Code, Hermes और अन्य agent harnesses को product backends के रूप में चलाता है

Coding-Agent Harnesses & RuntimesOpen core
भाषा
Python
लाइसेंस
Apache-2.0
$docker run -d --name harnessrouter \
संक्षेप में

HarnessRouter क्या है?

HarnessRouter एक सेल्फ़-होस्टेड API, जो Codex, Claude Code, Hermes और अन्य agent harnesses को product backends के रूप में चलाता है. यह AI Coding टूल्स की Coding-Agent Harnesses & Runtimes श्रेणी में आता है; ओपन सोर्स है, Python में लिखा गया है और Apache-2.0 लाइसेंस के तहत है। शुरू करने के लिए: container शुरू करें.

सारांश

HarnessRouter एक infrastructure layer है, जो Codex और Claude Code जैसे मौजूदा agent harnesses को आपके अपने product के लिए plug-and-play backends में बदल देती है। हर harness को अलग से integrate करने और हर एक के लिए sessions, streaming, file handling, cancellation और failure handling दोबारा बनाने के बजाय, आपका product एक ही integration करता है और हर request पर harness चुनता है। इस repository का Community Edition self-hosted, Apache-2.0 संस्करण है: आप इसे अपने infrastructure पर, अपनी model-provider keys के साथ चलाते हैं, और इसके लिए HarnessRouter account की ज़रूरत नहीं है।

Animated diagram comparing separate integrations with four harnesses against a single HarnessRouter integration
Without HarnessRouter, each harness multiplies the infrastructure work; with it, the product keeps one integrationHarnessRouter README ↗

यह एक single Docker container के रूप में आता है, जिसमें तीन services हैं। Console (एकमात्र publish किया गया port, 3000) web UI और API entry point है; Gateway OpenAI Responses-compatible API और harness lifecycle को सेवा देता है; और Runner हर session के लिए अलग operating-system users वाले workspaces में harnesses चलाता है। /data volume database, files, secrets, इंस्टॉल किए गए harness CLIs और workspaces को restarts के बीच बनाए रखता है। पहली बार launch होने पर यह enabled harness CLIs इंस्टॉल करता है; इसकी setup गाइड में Claude Code, Codex, Hermes, Pi, DeepSeek Harness, OpenCode, Qwen Code, Gemini CLI, Cline, Oh My Pi, goose और Kimi Code CLI समेत backends की सूची है।

API Unified Harness Protocol (UHP) का पालन करती है, जो एक खुला, versioned standard है और जिसका task surface जानबूझकर OpenAI Responses API के साथ compatible रखा गया है, ताकि मौजूदा Responses SDKs और streaming parsers इससे बात कर सकें। आप metadata.harness_id से harness चुनते हैं, previous_response_id से session आगे बढ़ाते हैं, server-sent events के रूप में progress stream करते हैं, input files जोड़ते हैं और outputs प्राप्त करते हैं। Repository में UHP specification, इसके OpenAPI और JSON Schemas, और एक conformance suite भी है। एक managed HarnessRouter Cloud वही API contract serverless sandboxes के साथ देता है, और स्थानीय रूप से बनाए गए custom harnesses को उस पर upload किया जा सकता है।

यह क्या करता है

  • एक OpenAI Responses-compatible API, जो कई agent harnesses को सपोर्ट करता है और हर request पर metadata.harness_id से harness चुनने देता है
  • स्थायी sessions, स्ट्रीमिंग से प्रगति, इनपुट फ़ाइलें और जनरेट हुए artifacts, रद्द करना, संरचित त्रुटियाँ और execution traces
  • वेब Console से मॉडल प्रोवाइडर जोड़ें (अपनी key लाएँ), टास्क चलाएँ, और निर्देश, MCP टूल्स व स्किल्स के साथ custom harnesses बनाएँ
  • सेल्फ़-होस्टेड, एक Docker कंटेनर: इसमें Console, Gateway और Runner हैं, हर सेशन के लिए अलग वर्कस्पेस, और नेटिव फ़ाइलसिस्टम, शेल व Git सपोर्ट
  • हर रिक्वेस्ट के लिए एनवायरनमेंट वेरिएबल्स, जो रिक्वेस्ट हेडर्स या सेव किए गए सीक्रेट्स से लिए जाते हैं और रिस्पॉन्स, स्ट्रीम व ट्रेसेस से छिपा दिए जाते हैं
  • Unified Harness Protocol का रेफ़रेंस इम्प्लीमेंटेशन, जिसमें स्कीमा और कन्फ़ॉर्मेंस सूट शामिल हैं

शुरू करें

Community Edition एक Docker image से चलता है। आपको Docker, लगभग 4 GB disk और किसी model provider की API key चाहिए; HarnessRouter account की ज़रूरत नहीं है।

Container शुरू करें

Named volume database, files, इंस्टॉल किए गए harness CLIs और workspaces को restarts के बीच बनाए रखता है। --user मत जोड़ें: entrypoint और Runner को per-session users मैनेज करने के लिए root चाहिए।

bashbash
docker run -d --name harnessrouter \
  -p 127.0.0.1:3000:3000 \
  -v harnessrouter:/data \
  harnessrouter/harnessrouter

पहली बार launch होने का इंतज़ार करें

पहली launch पर enabled harness CLIs इंस्टॉल होते हैं। जब logs में "[harnessrouter] ready on :3000" दिखे, तब आगे बढ़ें, फिर logs देखना बंद करने के लिए Ctrl+C दबाएँ।

bashbash
docker logs -f harnessrouter

Console खोलें

http://localhost:3000 पर जाएँ और username harnessrouter और password harnessrouter से sign in करें। Profile में default password बदलें, और तब तक instance को local ही रखें जब तक आप ऐसा न कर लें।

The Add Integration dialog in the HarnessRouter Console, choosing a model provider and entering its API key
Connecting a model provider with your own keyHarnessRouter README ↗

Model provider जोड़ें

Sidebar में Bring Your Own Key खोलें, Add Integration दबाएँ, कोई provider चुनें, integration को नाम दें और उसकी API key जोड़ें। उसके समर्थित models Console में उपलब्ध हो जाएँगे।

अपना पहला टास्क चलाएँ

Agent harnesses खोलें, कोई harness चुनें और New task चुनें। एक model चुनें, agent को एक ठोस task दें, और उसी session में उसकी progress और output files देखें।

The HarnessRouter Console running a Hermes task that reviews a fictional NDA and opens the redlined output files
A Hermes task in the Console, from prompt to the files it producedHarnessRouter README ↗

अपने backend से इसे कॉल करें

Console में API Keys के तहत key बनाएँ, उसे अपने backend में HARNESSROUTER_API_KEY नाम से सेव करें (browser code में कभी नहीं), और harness id के साथ Responses-compatible endpoint कॉल करें। server-sent events के लिए "stream": true सेट करें। पूरा API $HARNESSROUTER_BASE_URL/v1/openapi.json पर वर्णित है।

bashbash
export HARNESSROUTER_BASE_URL=http://localhost:3000/api/harness

curl --fail-with-body -sS "$HARNESSROUTER_BASE_URL/v1/responses" \
  -H "Authorization: Bearer ${HARNESSROUTER_API_KEY:?}" \
  -H 'content-type: application/json' \
  -d '{
    "input":"Reply with exactly: it works.",
    "metadata":{"harness_id":"codex"},
    "model":"gpt-5.4-mini",
    "stream":false
  }'

कमांड और कोड प्रोजेक्ट के अपने दस्तावेज़ों से लिए गए हैं — हमेशा जांचें आधिकारिक repo ताज़ा जानकारी के लिए।

कब इस्तेमाल करें

  • जब आपके product को agentic features चाहिए और आप हर बार session, streaming और file plumbing लिखे बिना Codex, Claude Code या कोई और harness backend के रूप में चाहते हैं, तब इसे इस्तेमाल करें
  • किसी task के लिए एक API के पीछे harnesses और models की तुलना करने या बदलने के लिए, लागत और लेटेंसी के बीच संतुलन देखते हुए, इसे इस्तेमाल करें
  • जब provider keys, sessions और workspaces को आपके नियंत्रण वाले infrastructure पर ही रहना हो, तब इसे इस्तेमाल करें
  • अपने निर्देशों, MCP tools और skills के साथ कोई दोबारा इस्तेमाल होने वाला custom harness बनाने के लिए इसे इस्तेमाल करें, उसे Console में परखें, और फिर उसकी id से कॉल करें

How HarnessRouter compares

HarnessRouter alongside other open-source coding-agent harnesses & runtimes tools AI/TLDR tracks, ranked by GitHub stars.

टूलस्टारयह क्या करता है
CC Switch★ 159kआपकी चलाई हर coding-agent CLI की provider configuration संभालने वाला एक desktop app
Oh My OpenAgent★ 71.3kएक keyword से चलने वाला, OpenCode और Codex CLI के लिए पहले से कॉन्फ़िगर्ड multi-agent बंडल
herdr★ 53.9kशेल सेशन की जगह लंबे समय तक चलने वाले coding agents के लिए नए सिरे से बना एक terminal multiplexer
oh-my-claudecode★ 41.2kClaude Code के ऊपर मल्टी-एजेंट ऑर्केस्ट्रेशन
DSH Go★ 36.9kएक Android ऐप जो DeepSeek Harness को फ़ोन पर ही चलाता है, या आपके कंप्यूटर पर चल रहे DSH को रिमोट से कंट्रोल करता है
AionUi★ 34.6kऐसा डेस्कटॉप वर्कस्पेस जो अपना एजेंट और दो दर्जन CLI एजेंट एक ही इंटरफ़ेस में चलाता है
cc-connect★ 16.5kTerminal की जगह Slack, Telegram या Feishu से अपना लोकल coding agent चलाएं
HarnessRouter★ 4.6kएक सेल्फ़-होस्टेड API, जो Codex, Claude Code, Hermes और अन्य agent harnesses को product backends के रूप में चलाता है