harness-agents
하는 일
이 스킬은 Claude Code, Codex, Cursor 같은 완전한 하네스를 Agent-Native에 고유한 런타임 계층으로 추가하는 방법을 설명합니다. 실행 시작, 세션 상태 저장, 백그라운드 작업 표시를 다룹니다. 이 에이전트들을 앱 안에서 쓰려는 개발자를 위한 스킬입니다.
사용하는 경우
- ✓Claude Code나 Codex가 Agent-Native 앱 안에서 작업을 실행하기를 원할 때.
- ✓외부 에이전트 프로그램의 세션 상태를 턴 사이에 저장해야 할 때.
- ✓앱에서 백그라운드 에이전트 실행을 보여 주고 싶을 때.
스킬 링크
https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/harness-agents/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“Codex가 내 앱 안에서 코딩 작업을 실행하고, 나중에 이어서 할 수 있도록 세션을 유지하게 해 주실 수 있나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
개발자는 하네스 어댑터를 등록하고, 실행 관리자를 통해 실행을 시작합니다. 세션 상태는 앱의 데이터베이스에 저장되고, 하네스는 자체 반복 루프를 유지합니다.
기술 내용 (원본 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
자주 묻는 질문
하네스는 모델 제공자와 같은 것인가요?
아니요. 완전한 하네스는 자체 루프와 상태를 가지므로, 모델 제공자처럼 연결되지 않는다고 이 스킬은 말합니다.
누가 저장된 세션 상태를 읽을 수 있나요?
프레임워크는 상태를 들여다보지 않고 저장합니다. Agent-Native에게 상태는 불투명하기 때문입니다.
어떤 하네스가 지원되나요?
이 스킬은 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
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
design-exploration
7.6k에이전트가 여러 UI 디자인 방향을 나란히 보여 주고, 사용자가 하나를 고르면 그 디자인을 다듬도록 돕습니다.
visual-edit
7.6k에이전트가 실행 중인 로컬 앱을 시각 편집기에 열어, 실제 화면을 함께 검토하고 편집하도록 돕습니다.
turn-into-app
7.6k워크플로, 스프레드시트 또는 프로젝트를 데이터가 채워진 세련된 시각 앱으로 바꾸고, 컨트롤 뒤에서 에이전트가 작업하도록 합니다.
visual-plan
7.6k일반 텍스트 계획을 다이어그램, 파일 맵, 코드 조각, 열린 질문이 담긴 대화형 시각 계획으로 바꿔 줍니다.
비슷한 스킬
add-model-provider
394k에이전트가 안전한 설정 명령으로 새 AI 모델 제공자를 OpenClaw에 연결하고, API 키를 평문으로 두지 않으며, 실시간 테스트를 실행하도록 돕습니다.
acp-router
394k에이전트가 OpenClaw를 통해 Claude Code나 Cursor 같은 코딩 도우미에 작업을 전달해, 작업이 그 도구에서 실행되도록 돕습니다.
browser-automation
394k에이전트가 로그인, 탭, 페이지 응답이 멈췄을 때의 복구를 포함해 웹 페이지를 단계별로 조작하도록 가르칩니다.