الأول في العالم واجهة موحّدة لأطر تشغيل الوكلاءمفتوح المصدر4.6kمدعوم بواسطة UHP

ثلاث طرق للبدء

البدء السريع

اربط واجهة خلفية متكاملة للوكلاء بتطبيقك باستخدام مفتاح API واحد، دون الحاجة إلى هندسة إطار التشغيل.

ابدأ في HarnessRouter صِف ما ينبغي أن يفعله، واضبط إطار تشغيل الوكلاء الخاص به في HarnessRouter. بعد ذلك يبني وكيل البرمجة تطبيقك ويربطه بـ HarnessRouter باستخدام مفتاح API.
ابدأ من قاعدة الشيفرة الخاصة بك
  1. 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، في الطرفية أو في تطبيق سطح المكتب.

    الصقه في وكيل البرمجة الخاص بك

    الصق الموجّه في Claude Code أو Codex، في الطرفية أو في تطبيق سطح المكتب.

  2. 02

    عندما يسألك، أخبره بما تريد بناءه

    وكيل مسك الدفاتر01 / 03

    أنشئ وكيل مسك الدفاتر بواجهة موجّهة للمستخدمين. اقرأ فاتورة، واستخرج اسم المورّد والإجمالي والضريبة، ثم أعدّ مسودة القيد المحاسبي. لا يتضمن ذلك أي استشارة ضريبية أو قانونية.

    انسخ الموجّه أولًا لإلغاء القفل

  3. 03

    أنشئ مفتاح API

    عندما يطلب منك وكيل البرمجة، الصق المفتاح في نافذة الإدخال الآمنة للأسرار. سيخزّن المفتاح باسم HR_API_KEY على خادم تطبيقك.

    احتفظ به سرًّا. الصق المفتاح فقط في النافذة الآمنة التي يفتحها وكيل البرمجة لديك. لا تلصقه أبدًا في المحادثة العادية، أو ملفات الشيفرة المصدرية، أو AGENTS.md، أو شيفرة المتصفح، أو السجلات، أو لقطات الشاشة.

  4. 04

    يبني تطبيقك

    يبني الميزة داخل تطبيقك ويحافظ على تصميمه. وفي مجلد فارغ، يُنشئ أولًا تطبيق ويب صغيرًا.

  5. 05

    يتصل بـ HarnessRouter

    • يحفظ الإعداد
    • يتحقق منه بمهمة حقيقية