harness-agents
यह क्या करती है
यह स्किल बताती है कि Claude Code, Codex या Cursor जैसा पूरा agent harness अपनी runtime परत के ज़रिए Agent-Native में कैसे जोड़ा जाता है। इसमें रन शुरू करना, session स्टेट सहेजना और बैकग्राउंड काम दिखाना शामिल है। यह उन डेवलपर्स के लिए है जो ऐप के भीतर ये एजेंट चाहते हैं।
कब इस्तेमाल करें
- ✓जब आप चाहते हैं कि Claude Code या Codex Agent-Native ऐप के भीतर कोई काम चलाए।
- ✓जब किसी बाहरी एजेंट प्रोग्राम को टर्न के बीच अपनी session स्टेट सहेजनी हो।
- ✓जब आप ऐप में बैकग्राउंड एजेंट रन दिखाना चाहते हैं।
Skill का लिंक
https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/harness-agents/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“क्या आप Codex को मेरे ऐप के भीतर कोडिंग काम चलाने दे सकते हैं, और उसका session सहेजें ताकि बाद में आगे चल सके?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
डेवलपर harness adapter रजिस्टर करता है और run manager के ज़रिए रन शुरू करता है। session स्टेट ऐप के डेटाबेस में सहेजा जाता है, और harness अपना लूप खुद चलाता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Harness Agents
Rule
Full agent harnesses are not AgentEngine providers. Use the AgentHarness
substrate in @agent-native/core/agent/harness.
Why
AgentEngine is for one model round trip beneath runAgentLoop. Harnesses like
Claude Code, Codex, Pi, Cursor, and Mastra own their own loop, workspace,
native tools, session state, compaction, approval model, and sandbox behavior.
Putting a harness under AgentEngine.stream() double-runs the loop and loses
session lifecycle semantics.
How
- Register or resolve a harness adapter.
import {
registerBuiltinAgentHarnesses,
resolveAgentHarness,
} from "@agent-native/core/agent/harness";
registerBuiltinAgentHarnesses();
const harness = resolveAgentHarness("ai-sdk-harness:codex");
- Start a turn through the run-manager bridge.
import { startAgentHarnessRun } from "@agent-native/core/agent/harness";
startAgentHarnessRun({
runId,
threadId,
adapter: harness,
input: { prompt },
createSession: {
sessionId,
resumeState,
instructions,
sandbox,
permissionMode: "allow-reads",
},
ownerEmail,
orgId,
});
- Persist native session state in SQL.
Use saveAgentHarnessSession, updateAgentHarnessSession, and
getLatestAgentHarnessSessionForThread. The resumeState is opaque; Agent
Native stores it but does not inspect it.
- Surface runs through background agents.
Harness runs are projected into the shared BackgroundAgentRun shape with
createAgentHarnessBackgroundAgentController() and are available through the
existing run routes as goalId=agent-harness.
ACP Agents
Agent-Native can act as an ACP (Agent Client Protocol) client and drive a local coding agent — Gemini CLI, Claude Code, or any ACP-compliant agent — through this same substrate. This is scoped to local coding: the agent is spawned as a child process speaking newline-delimited JSON-RPC over stdio, and inherits the parent environment so it reuses the user's local CLI login. It is not a hosted/sandboxed transport, and it is not a chat/A2A transport.
import {
registerBuiltinAgentHarnesses,
resolveAgentHarness,
} from "@agent-native/core/agent/harness";
registerBuiltinAgentHarnesses();
// Built-in presets (commands overridable via the resolve config):
const gemini = resolveAgentHarness("acp:gemini");
const claude = resolveAgentHarness("acp:claude-code");
// Or any ACP agent by command:
const custom = resolveAgentHarness("acp", {
command: "gemini",
args: ["--experimental-acp"],
});
- The protocol transport (
@zed-industries/agent-client-protocol) is an optional dependency loaded lazily;installPackagesurfaces a clear install hint. - The agent binary (e.g.
@google/gemini-cli,@zed-industries/claude-code-acp) is a separate external CLI the user installs; presets launch it throughnpxby default and the command/args are overridable because agent ACP entry flags still evolve. permissionModemaps onto ACPsession/request_permissionusing the reported tool-call kind: reads always run, edits run underallow-edits, everything risky prompts unlessallow-all. Approvals surface asapproval-requestevents; answer them through the harness session'sapprove().resumeStatecarries the ACPsessionId; resume works when the agent advertises theloadSessioncapability and degrades to a fresh session otherwise.fs/read_text_fileandfs/write_text_fileare served against the session workspace and refuse paths that escape it; terminal methods are not advertised (the agent uses its own shell).
Adapter Guidance
- Keep harness packages optional. Use dynamic imports in adapters and expose an
install hint through
installPackage. - Use the AI SDK harness adapter as one implementation, not as Agent-Native's public abstraction.
- For bridge-backed coding harnesses, require a real sandbox/workspace provider. Do not run arbitrary coding agents in the host process by default.
- Pass only a narrow, intentional set of Agent-Native actions as host tools.
Preserve
defineActionauth, request context, timeouts, truncation, and read-only metadata.
Code Execution Sandbox
- The
run-codetool executes through a pluggableSandboxAdapter(packages/core/src/coding-tools/sandbox/). The defaultLocalChildProcessAdapterspawns a locked-down local Node child process; swap it viaAGENT_NATIVE_SANDBOXor `registerSandboxAdapt
अक्सर पूछे जाने वाले सवाल
क्या harness और model provider एक ही हैं?
नहीं। स्किल कहती है कि पूरे harness अपना लूप और स्टेट खुद संभालते हैं, इसलिए उन्हें model provider के रूप में नहीं जोड़ा जाता।
सहेजी session स्टेट कौन पढ़ सकता है?
फ़्रेमवर्क उसे बिना जांचे सहेजता है, क्योंकि Agent-Native के लिए वह स्टेट अपारदर्शी है।
कौन से harness समर्थित हैं?
स्किल Claude Code, Codex, Pi, Cursor और Mastra सहित कई नाम बताती है।
जानकारी
लेखक का मूल विवरण
Add or use full agent harness runtimes like Claude Code, Codex, Pi, Cursor, Mastra, or ACP agents inside Agent-Native.
repo: BuilderIO/agent-native
लोकप्रियता
- GitHub स्टार
- 7.6k
- रैंकिंग में स्थान
- #13163
- लाइसेंस
- MIT
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
design-exploration
7.6kयह आपके एजेंट को UI के कई डिज़ाइन विकल्प साथ-साथ दिखाने, आपकी पसंद चुनवाने और फिर चुने डिज़ाइन को सुधारने में मदद करती है।
visual-edit
7.6kयह आपके एजेंट को चल रहे लोकल ऐप को विज़ुअल एडिटर में खोलने देती है, ताकि आप उसकी असली स्क्रीन एक साथ देखकर संपादित कर सकें।
turn-into-app
7.6kयह किसी वर्कफ़्लो, स्प्रेडशीट या प्रोजेक्ट को भरी हुई स्क्रीन वाले विज़ुअल ऐप में बदलती है, जिसके कंट्रोल के पीछे एजेंट काम करता है।
visual-plan
7.6kयह सादे टेक्स्ट वाली योजना को डायग्राम, फ़ाइल नक्शों, कोड अंश और खुले सवालों वाली इंटरैक्टिव विज़ुअल योजना में बदलती है।
मिलती-जुलती skills
add-model-provider
394kयह आपके एजेंट को सुरक्षित कमांड से OpenClaw में नया AI मॉडल प्रोवाइडर जोड़ने, API कीज़ को सादे टेक्स्ट से बचाने और लाइव टेस्ट चलाने देती है।
acp-router
394kयह आपके एजेंट को OpenClaw के ज़रिए Claude Code या Cursor जैसे कोडिंग असिस्टेंट को काम भेजने देती है, ताकि काम उसी टूल में चले।
browser-automation
394kयह आपके एजेंट को लॉगिन, टैब और अटकी वेब पेज से उबरने समेत, वेबसाइट पर चरण-दर-चरण काम करना सिखाती है।