Documentation / For integrators

Harness profile reference

A harness profile is what the daemon knows about an agent app before (and beside) what its adapter says: how its agent reaches the tools, how wakes reach it, its hooks, its rules. This page lists every field, who may set it, and the profiles that ship. The type is HarnessProfile in packages/protocol/src/harness.ts.

Where a profile comes from

Order Source File source
1 the person's own, open-artifacts harness add <profile.json> <home>/harnesses/<name>.json user (or none)
2 what your adapter reported in hello (profile) the same file adapter
3 shipped with Open Artifacts packages/daemon/harnesses/<name>.json ($OPEN_ARTIFACTS_HARNESS_PROFILES to override the folder) shipped
4 none of these — the default: level: "L1", entry: "mcp", wake: ["inbox"], agentName: "Agent"
  • The person's file replaces the shipped profile (laid over the default). An adapter's report never overwrites it.
  • An adapter's report is laid over the shipped profile. Fields an adapter may not set, or with the wrong shape, are dropped.
  • open-artifacts harness list [--json] shows the profile in effect for each harness and where it comes from.
  • open-artifacts harness remove <name> removes the file in <home>/harnesses/; the shipped profile is in effect again. A shipped profile is never removed.
  • harness add and harness remove are the person's decisions: run inside an agent's session they are refused.

Fields

Field Type Adapter may set Means
name string no (it is hello.harness) the harness name
title string yes shown to people: the Shell's Ask pane, open-session button and menu, and the home page's owner badge (left out, the harness name is shown as it is)
agentName string yes what the harness calls its agent
level L1 | L2 | L3 yes a short name: MCP only, MCP and hooks, a full adapter
entry harness-api | mcp | mod yes how the harness reaches the daemon
plugin string yes the package of the harness plugin
mcp { command, args } no how to start the MCP bridge
sessionEnv string yes the environment variable that holds the session id in a tool's process
skillsDir path no where the harness looks for skills
wake ("live" | "inbox")[] yes wake routes, in order
wakesIdle boolean yes false: nothing can start a turn in an idle session; messages wait for the person's next turn
open "browser" yes where a page goes when no adapter shows it; left out: the agent gives the link. With the person's "Open agents' artifacts in this app" on (settings.json's openInDesktop), the browser step goes to Open Artifacts Desktop first
markers string[] yes environment variables the harness sets in its agent's commands (person-only commands are refused where they are set)
hookDialect name or mapping yes the hook format (below)
nudge { command, args, env?, envFile? } no the command that starts a turn in an idle session
start { command, args, env?, envFile?, session?, models?, modelsFrom? } no the command that starts a new session of the app for an artifact no session owns (below)
generate { command, args, input, output, isolation, models?, efforts?, listModels?, knownModels?, env?, images? } no the command line that writes text for a page's model call (below)
sessionWorkspace "codex-rollout" no how to find a session's folder when nothing said it
caps AdapterCaps yes how far the harness goes in each dimension (Harness API)
policy { offer?, reuse?, artifacts?, roles?, confirm? } yes rules that are data (below)
rules string, at most 4000 characters yes rules that are text: delivered first in MCP initialize instructions, skill.get, quickstart, publish and adopt, where they win over the instructions that follow; they change no permission
commands string[] yes the harness's command names, e.g. ["artifact"]
toolNames { Artifact?, ArtifactData?, ArtifactComments? } yes the names the harness gave the tools
source shipped | adapter | user no where the profile came from

The fields an adapter may not set are the ones that would make the daemon run a command (mcp, nudge, start, generate), write somewhere (skillsDir) or read files (sessionWorkspace). They come only from a shipped file or the person's own.

policy

Field Values Means
offer asked (default), allowed make artifacts only when asked, or offer them for the types the person allowed
reuse workspace (default), session, none how far quickstart looks for an existing artifact to reuse
artifacts home, workspace where a session's new artifacts go when the call names no folder and neither the person nor the project chose: under the person's Open Artifacts folder (~/OpenArtifacts/<project>/<slug>), or in the session's workspace (<workspace>/artifacts/<slug>, with a .gitignore when the daemon makes that folder in a Git checkout). Left out: home. Say workspace when your app does not let its agent write outside the working folder (Settings)
roles { <role>: { create?, modify?, remove?, reply? } } what a session of each role may do (tools)
confirm ActionKind[] the action kinds the person approves each time; the skill tells the agent so

nudge

{
  "nudge": {
    "command": ["${env:OPEN_ARTIFACTS_CODEX_BIN}", "/Applications/ChatGPT.app/Contents/Resources/codex-cli/bin/codex", "codex"],
    "args": ["queue", "--thread", "${session}", "--message", "${text}"]
  }
}

command is a program, or a list to try in order (a path, ~/…, a name on PATH, or ${env:NAME}; a list inside the list is a program with arguments that go first). ${session} and ${text} in args become one argument each. No shell is used. env adds variables (${file.<field>} reads envFile, ${env:NAME} the daemon's own). envFile is { dir, pattern, pid? }: a JSON file the running app writes; with none whose process is alive, nothing runs. On Windows only an .exe runs.

A nudge also lets the person hand an artifact no session owns to a session of the app that is not attached: while the nudge can run, the sessions the daemon heard from in the last 24 hours are listed in the Ask pane under Recent sessions (recent of GET harnesses, Harness API). The nudge then runs with how to take the artifact over as ${text}, and the session becomes the owner when the command succeeds.

~/ in command and envFile.dir, here and in start, is the person's home folder, or $OPEN_ARTIFACTS_APP_HOME when that is set (the tests set it to an empty folder, so they never find an app that keeps its files there, such as a running Antigravity).

start

How an app that has no adapter starts a new session for an artifact no session owns: the person picks the app's "New session" in the artifact's page, and the daemon runs the app's own command line (artifacts.start with adapter: "profile:<name>", Harness API). An app whose connected adapter declares caps.sessions.start is asked with session.start instead.

{
  "start": {
    "command": ["${env:OPEN_ARTIFACTS_ANTIGRAVITY_AGENTAPI}", "~/.gemini/antigravity/bin/agentapi",
                ["/Applications/Antigravity.app/Contents/Resources/bin/language_server", "agentapi"]],
    "args": ["new-conversation", ["--model=${model}"], ["--title=${title}"], "--", "${text}"],
    "envFile": { "dir": "~/.gemini/antigravity/daemon", "pattern": "^hub_\\d+\\.json$", "pid": "pid" },
    "env": { "ANTIGRAVITY_LS_ADDRESS": "127.0.0.1:${file.httpPort}", "ANTIGRAVITY_CSRF_TOKEN": "${file.csrfToken}" },
    "session": "response.newConversation.conversationId",
    "modelsFrom": {
      "url": "http://127.0.0.1:${file.httpPort}/exa.language_server_pb.LanguageServerService/GetAvailableModels",
      "headers": { "Connect-Protocol-Version": "1", "x-codeium-csrf-token": "${file.csrfToken}" },
      "ids": "response.agentModelSorts.*.groups.*.modelIds.*",
      "label": "response.models.${id}.displayName"
    },
    "models": [{ "id": "flash_lite", "label": "Flash Lite" }, { "id": "flash", "label": "Flash" }, { "id": "pro", "label": "Pro" }]
  }
}
Key Means
command, env, envFile as a nudge's
args the arguments (at most 64). Exactly one is ${text} alone, outside any group: the session's first message (what the person wrote, then the take-over prompt), passed as one argument. A list inside the list is an optional group (at most 8 arguments): ${model} (the id the person picked from models or modelsFrom) and ${title} (the artifact's title, made one line, at most 200 characters) may only be in a group. A group is left out whole when a value it names is missing, or when a value would begin one of its arguments with -, where the command could take it for an option
session where the new session's id is in the JSON the command prints on standard output: field names joined by ., at most 8. Found, that session becomes the artifact's owner at once (the daemon learns its folder when the session itself reaches it). Left out or not found, the owner stays empty until the new session adopts the artifact, as its first message says
models [{ id, label }], at most 32, no id twice: the models the person picks from. An id matches ^[A-Za-z0-9][A-Za-z0-9._:/@+-]{0,199}$. models (or modelsFrom) needs a ${model} group, and a ${model} group needs models or modelsFrom. The picker starts on Default model, which passes no ${model}: the app picks. Left out: no picker, and the session runs on the app's default. With modelsFrom, shown only when the running app does not list its own
modelsFrom { url, headers?, body?, ids, label? }: where the running app lists the models it offers now, shown in place of models. The daemon POSTs body (a JSON object, default {}) to url with headers (at most 16; content-type: application/json unless one is given) when the picker asks for the app's models, and keeps the answer a minute (PROFILE_MODELS_TTL_MS). url is http: or https: on 127.0.0.1, localhost or [::1], and is checked again once filled in; it and the header values may name only ${file.<field>}, fields of envFile, which modelsFrom then needs. ids is where the model ids are in the JSON answer: field names joined by ., at most 12, where * is every item of a list (or every value of an object); ids that do not match the models pattern are skipped, each id counts once, at most 100 (PROFILE_MODELS_FROM_MAX). label is where a model's label is, written as ids, where a field ${id} stands for that model's id; none there: the id itself. An app that does not answer in 5 seconds (PROFILE_MODELS_TIMEOUT_MS), answers an error or names no models gets models, and the daemon's log says why

The command runs without a shell and for at most 30 seconds (PROFILE_START_TIMEOUT_MS); on Windows only an .exe runs. The app is offered only while the command can run: its program is found and, with an envFile that env reads, the app is running (a file whose process is alive). There is no reasoning effort to pick: artifacts.start refuses an effort for such an app, and a model that neither models nor the running app's modelsFrom list names.

Like nudge, start is read only from a shipped profile or the person's own file (harness add); one in a profile an adapter reports in hello is dropped and never run.

Shipped: antigravity, the example above (agentapi new-conversation [--model=<id>] [--title=<title>] -- <text>, pointed at the running app by its hub file). It offers the models Antigravity's own model picker lists (Gemini 4 Neon, Carbon and Hydrogen at their thinking levels, for example), in its order, asked of the app's language server (GetAvailableModels, its agentModelSorts); when that does not answer, Antigravity's own tiers, Flash Lite, Flash and Pro. The conversation id the command prints becomes the owner; the conversation's hooks then register it with the daemon as any conversation's do. Checked by hand against Antigravity 2.37.0 on macOS; not on Windows or Linux.

generate

How the person's own installed and signed-in app writes text for a page's model call, on their own plan: the daemon runs its command line in its non-interactive mode. This is the third way an agent app can answer a page's model call (sampling); when the same app is also connected as an adapter that declared caps.sample, or as an MCP client that declared sampling, that way is used first (the adapter, then MCP, then the command line).

{
  "generate": {
    "command": ["${env:OPEN_ARTIFACTS_CLAUDE_BIN}", "claude"],
    "args": ["-p", "--output-format", "stream-json", "--tools", "", "--system-prompt", "${system}",
             ["--model", "${model}"], ["--effort", "${effort}"], "--max-turns", "1"],
    "input": "stdin",
    "output": "claude-stream-json",
    "models": { "quick": "haiku", "default": "sonnet", "complex": "opus" },
    "isolation": "no-tools"
  }
}
Key Means
command as a nudge's: a program, or a list to try in order (a path, ~/…, a name on PATH, or ${env:NAME})
args the arguments; ${system} (the platform's instructions), ${prompt} (the conversation as one text), ${model}, ${effort} (low, medium or high, or a level efforts lists) and ${image} are filled in, each into the argument it is in, once. A list inside the list is an optional group: passed whole when every placeholder in it has a value, left out whole otherwise, so a flag is never left without its value. ${model} and ${effort} may only be in a group; a group with ${image} is passed once per image
input stdin (the prompt goes to standard input) or arg (it goes into the argument with ${prompt}, which args must then have)
output the reader of its standard output (below)
models each tier's (quick, default, complex) model name as the command line takes it; a tier left out passes no ${model} group, so the CLI's own default answers. The person's own choice in Settings → Models (models.json's harness, see settings) comes first
isolation no-tools: the arguments take every tool away. read-only: they cannot, only make it read-only; the consent dialog then says the command line can still read files on this computer
env variables to add to its environment (${env:NAME} is the daemon's)
images true: it takes images (through a ${image} group, each image's file in the temporary folder)
efforts the levels its ${effort} group takes, of low, medium, high, xhigh and max (default: the first three). Needs a ${effort} group. A page's effort it does not take passes none
listModels { args, output }: how Settings → Models lists the models it takes. args (at most 16, no placeholders) run after command once, with the same environment and empty folder as a round, for at most 20 s; the list is kept a day. output is lines (id or id - Name per line), cursor-models (cursor-agent --list-models), copilot-help-config (the model values of copilot help config) or codex-models (the JSON of codex debug models, hidden models left out). Needs a ${model} group
knownModels names Settings → Models suggests (at most 64), first in the list or alone when it cannot list. Needs a ${model} group
output Reads
text standard output is the answer, handed on as it arrives; no model, usage or in-band errors
claude-stream-json Claude Code's -p --output-format stream-json: text deltas from the stream events, the whole answer and token usage from result, errors and plan limits in-band
cursor-stream-json Cursor's cursor-agent -p --output-format stream-json --stream-partial-output: new assistant text as deltas (reasoning skipped), the answer and usage from result
copilot-jsonl GitHub Copilot CLI's --output-format json --stream on: assistant.message_delta text, the last assistant.message as the final text, usage from session.usage_checkpoint
codex-jsonl Codex's exec --json: the last agent_message as the answer (nothing streams), usage from turn.completed

Like nudge, generate is read only from a shipped profile or the person's own file (harness add); one in a profile an adapter reports in hello is dropped and never run. It never runs through a shell.

Each round:

  • The conversation becomes one prompt: a single user turn is passed as it is; a longer one is written out turn by turn under role markers. The platform's instructions go through ${system} when args has it, else first in the prompt.
  • The program runs in a new, empty temporary folder (removed afterwards), so no project's instructions, settings or MCP servers come with it. Its environment holds only what a command line needs: the home folder and user, PATH, locale and time zone, the temp and platform folders, proxies and extra certificates, and the apps' own config-folder variables (CLAUDE_CONFIG_DIR, CODEX_HOME, COPILOT_HOME), plus the profile's env. No API keys, no agent session markers, no Open Artifacts variables.
  • The round has its own time limit (SAMPLE_ROUND_TIMEOUT_MS, 295 s). The program runs in its own process group: a cancel or a time out ends the whole group, and so does its own end, so a helper it left running (as Cursor's worker-server) does not outlive it. Once the program itself has exited, only what is left of its group is signalled, never its process id, which another program may already have.

How it ends: the text written is the answer. A failure with no text is session_expired when the app is not signed in, rate_limited at a plan limit, otherwise upstream_error in the command line's own words. A non-zero exit or the time running out after some text keeps the text, cut short. Token counts are the command line's when it reports them, else estimated from the characters.

Shipped:

App Program isolation output Tiers
Claude Code $OPEN_ARTIFACTS_CLAUDE_BIN, claude no-tools claude-stream-json haiku, sonnet, opus
Cursor $OPEN_ARTIFACTS_CURSOR_BIN, cursor-agent, ~/.local/bin/cursor-agent read-only (--mode ask) cursor-stream-json the CLI's default
GitHub Copilot $OPEN_ARTIFACTS_COPILOT_BIN, copilot no-tools copilot-jsonl the CLI's default
Codex $OPEN_ARTIFACTS_CODEX_BIN, the ChatGPT app's bundled codex, codex read-only (--sandbox read-only) codex-jsonl the CLI's default

Each was checked against a captured run of the real command line; the readers' tests use those captures.

What the person can choose for each in Settings → Models:

App Models Effort (${effort})
Claude Code suggests haiku, sonnet, opus, fable; any name can be typed --effort: low … max
Cursor its list (--list-models) none: its model names carry it
GitHub Copilot its list (help config) --reasoning-effort: low … max
Codex its list (debug models) -c model_reasoning_effort: low … max

Hook dialects

open-artifacts hook <event> --harness <name> maps the harness's hook events to the daemon's SessionStart, UserPromptSubmit and Stop.

Name Used by
claude-code Claude Code, Codex, ZCode, Devin
cursor Cursor
copilot GitHub Copilot
antigravity Antigravity
grok Grok Build (Claude Code's format; PostToolUse carries the messages, SessionStart and the Stop sent as a session closes only register)

Or a mapping: { events: { <their event>: "SessionStart" | "UserPromptSubmit" | "Stop" }, answer: { <their event>: { field, wrap? } }, session?: [<input field names>], workspace?: [<input field names>] }.

harness add

open-artifacts harness add <profile.json> checks the file before writing it: name must be a harness name, rules at most 4000 characters, nudge { command, args }, start as above, generate as above, markers environment variable names, hookDialect a known name or a mapping, sessionWorkspace a known name. A bad field is refused with a sentence saying its shape.

{
  "name": "my-agent",
  "title": "My Agent",
  "agentName": "My Agent",
  "level": "L2",
  "entry": "mcp",
  "wake": ["inbox"],
  "sessionEnv": "MY_AGENT_SESSION_ID",
  "markers": ["MY_AGENT_SESSION_ID"],
  "hookDialect": "claude-code",
  "open": "browser",
  "caps": { "tools": "mcp", "commands": { "names": ["open-artifacts"] } }
}

Shipped profiles

Name Level Entry Wake Hooks Nudge Session variable
antigravity L2 mcp inbox antigravity yes ANTIGRAVITY_CONVERSATION_ID
chatgpt L1 mcp inbox (wakesIdle: false) — — —
claude-code L2 mcp inbox claude-code — CLAUDE_CODE_SESSION_ID
codex L2 mcp inbox claude-code yes (codex queue) CODEX_THREAD_ID
copilot L2 mcp inbox (wakesIdle: false) copilot — —
cursor L2 mcp inbox (wakesIdle: false) cursor — —
devin L2 mcp inbox (wakesIdle: false) claude-code — —
dsh L3 harness-api live, inbox — — —
grok L2 mcp inbox (wakesIdle: false) grok — GROK_SESSION_ID
hermes L3 harness-api live, inbox — — HERMES_SESSION_KEY
omp L3 harness-api live, inbox — — OMP_BASH_SESSION
orca L1 mcp live, inbox — — — (--session-env ORCA_PANE_KEY)
pi L3 harness-api live, inbox — — PI_SESSION_ID
zcode L2 mcp inbox (wakesIdle: false) claude-code — —

Every shipped profile but chatgpt and dsh says "open": "browser". Every shipped profile but pi, omp and hermes says "policy": { "artifacts": "workspace" }.

orca (the MCP server added in Orca's settings for agents that have no Open Artifacts plugin of their own; see the Orca plugin) has no sessionEnv: Orca sets ORCA_PANE_KEY in every terminal, the person's own commands included, so as a sessionEnv it would mark them as an agent's. Its MCP command names it instead, with open-artifacts mcp --session-env ORCA_PANE_KEY.