ワンクリックで
harness-agents
Add or use full agent harness runtimes like Claude Code, Codex, Pi, Cursor, Mastra, or ACP agents inside Agent Native.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Add or use full agent harness runtimes like Claude Code, Codex, Pi, Cursor, Mastra, or ACP agents inside Agent Native.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
How to look up version-matched Agent Native framework docs in node_modules. Use before coding against @agent-native/core APIs or advanced features.
Use Content for repo-backed Markdown/MDX docs, blogs, resources, rich document editing, local components, shareable copies, and Content local-file workspaces. Prefer Content actions over raw filesystem writes when available.
All AI features in Clips — titles, summaries, chapters, tags, filler-word removal — delegate to the agent chat via sendToAgentChat except the narrow media pipeline path: transcription. Use when adding any AI-powered feature.
How Clips shares recordings — composes with the framework sharing skill and adds password, expiry, embed URLs, and view-counting. Use when wiring the share dialog, building embed links, adding a password, or debugging who can see a recording.
Cross-platform pattern for handling messaging integration webhooks (Slack, Telegram, WhatsApp, email, etc.) on serverless hosts. Use when adding a new integration adapter, debugging dropped messages, or wiring long-running agent work into a webhook handler.
Turn ordinary text plans into rich interactive visual plans with diagrams, file maps, annotated code, open questions, and UI/prototype review when useful.
| name | harness-agents |
| description | Add or use full agent harness runtimes like Claude Code, Codex, Pi, Cursor, Mastra, or ACP agents inside Agent Native. |
| scope | dev |
Full agent harnesses are not AgentEngine providers. Use the AgentHarness
substrate in @agent-native/core/agent/harness.
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.
import {
registerBuiltinAgentHarnesses,
resolveAgentHarness,
} from "@agent-native/core/agent/harness";
registerBuiltinAgentHarnesses();
const harness = resolveAgentHarness("ai-sdk-harness:codex");
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,
});
Use saveAgentHarnessSession, updateAgentHarnessSession, and
getLatestAgentHarnessSessionForThread. The resumeState is opaque; Agent
Native stores it but does not inspect it.
Harness runs are projected into the shared BackgroundAgentRun shape with
createAgentHarnessBackgroundAgentController() and are available through the
existing run routes as goalId=agent-harness.
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"],
});
@zed-industries/agent-client-protocol) is an optional
dependency loaded lazily; installPackage surfaces a clear install hint.@google/gemini-cli, @zed-industries/claude-code-acp)
is a separate external CLI the user installs; presets launch it through npx
by default and the command/args are overridable because agent ACP entry flags
still evolve.permissionMode maps onto ACP session/request_permission using the reported
tool-call kind: reads always run, edits run under allow-edits, everything
risky prompts unless allow-all. Approvals surface as approval-request
events; answer them through the harness session's approve().resumeState carries the ACP sessionId; resume works when the agent
advertises the loadSession capability and degrades to a fresh session
otherwise.fs/read_text_file and fs/write_text_file are served against the session
workspace and refuse paths that escape it; terminal methods are not advertised
(the agent uses its own shell).installPackage.defineAction auth, request context, timeouts, truncation, and
read-only metadata.run-code tool executes through a pluggable SandboxAdapter
(packages/core/src/coding-tools/sandbox/). The default
LocalChildProcessAdapter spawns a locked-down local Node child process;
swap it via AGENT_NATIVE_SANDBOX or registerSandboxAdapter() for a
Docker/remote/durable backend (the lever to exceed the hosted ~40s code-exec
ceiling). An adapter only runs the already-prepared, non-secret module source
— it never sees app secrets. See the Sandbox Adapters doc; agent-native add sandbox docker emits a full Docker-adapter recipe.2) so delegation
chains can't fan out indefinitely. Override at deploy time with
AGENT_NATIVE_MAX_SUBAGENT_DEPTH (0 disables sub-agents; clamped to 16).
Enforcement is ambient via evaluateSubagentDepth in
packages/core/src/server/agent-teams.ts — independent of any tool-level
guard. See the Agent Teams doc for the depth model.AgentEngine.application_state; it belongs in the harness
session SQL table.adding-a-feature — feature parity across UI/actions/instructions/state.delegate-to-agent — background agents use run-manager infrastructure.external-agents — expose openable resources and external-agent surfaces.storing-data — durable SQL state and additive schema changes.