AgentKit Studio
Concepts

The three runtimes

A runtime type decides whose execution model serves a run. The three runtimes, their capabilities, when each becomes ready, and the execution policy.

A runtime type (runtime.type) decides whose execution model serves a run. There are exactly three: DSH Native, Star Harness, and Codex (STUDIO_RUNTIME_TYPES in src/runtime-contract.mjs:6).

This page covers each runtime's ownership and capabilities, what has to be true before each one is selectable, and the execution-policy layer that constrains what a run may write.

Why a runtime is not an "engine option"

Reading a runtime as "a different model backend" runs into an immediate contradiction: the same agent definition exposes different capabilities on the three runtimes — some support replay, some support child tasks, some neither. That is a difference in execution ownership, not in configuration.

What you want to doWhat it requires
Replay a past runThe runtime supports replay (Codex and DSH Native do; Star Harness does not)
Have the agent split out child tasksThe runtime supports child-tasks (Star Harness only)
Resume an unfinished turn from historyThe runtime supports resume (Star Harness only)
Deploy the agent as a resident managed runtimeThe runtime is deployable (DSH Native and Codex only)

Choosing a runtime is therefore not a style preference; it decides what you can do later. The runtime is locked at creation and cannot be changed — switching runtimes means creating a new agent.

Star Harness must be installed first

Only Star Harness is pluggable among the three: it is delivered as three npm packages (@kingsoftcloud/agentkit-harness-core / -node / -ui, currently 0.0.25), and Studio depends on them one-way — they do not depend on Studio in return.

RuntimeReady whenWhat you see before that
dsh-nativeReady with Studio—
codexThe official Codex plugin is installed and enabledRun targets shows "Provider not registered" and creation will not offer it
harnessInstalled on the plugin page + enabled + at least one usable workspaceRun targets shows "Not enabled", and the creation button is disabled with "Install and enable Star Harness on the plugin page"

The check is canCreate from starHarnessStatus() (creatableRuntime in src/client/pages/agent-form.mjs:78). For the full procedure see Install, upgrade, and bind Star Harness.

The runtime is locked at creation and cannot be changed — switching runtimes means creating a new agent. Editing an existing Star Harness agent is unaffected by the install state, because creatableRuntime admits editing.

Star Harness has two retired aliases

Historical documentation also called Star Harness "AgentKit Harness" and "Native Harness". Both are retired. Write Star Harness (harness).

The three runtimes

ItemDSH NativeStar HarnessCodex
Valuedsh-nativeharnesscodex
UI nameDSH Native HarnessStar HarnessCodex Agent
Execution ownerDSH itselfThe KSADK Harness native kernelThe Codex App Server adapter inside Studio
Execution modelnativenative-kernelcodex-app-server
Contractagentkit.studio.runtime/v1The DSH native turn contractstudio.codex.adapter/v1
Event ownerDSH sessionThe native run storeThe Studio Codex adapter
Stream ownerdsh-agent/assistant-streamnative-model-portcodex-turn/item
Default for new agentsYesNoNo
Ownership matrix for the three runtimes across the model and tool loop, session transcript, durable run state and Studio seamOwnership matrix for the three runtimes across the model and tool loop, session transcript, durable run state and Studio seam (dark)点击放大 · 滚轮缩放 · 拖拽平移

How to read this: the executor is not the transcript owner — within one runtime, "who runs the model loop" and "who persists the event log" are different entities. Across all four lanes only cancel is shared; every other capability belongs to one implementation and cannot be enabled by configuration.

Capability matrix

CapabilityDSH NativeStar HarnessCodex
session✅—✅
session-events✅——
stream✅—✅
cancel✅✅✅
replay✅—✅
persistence✅——
build-binding✅—✅
native-run—✅—
durable-receipts—✅—
tool-approval—✅—
resume—✅—
child-tasks—✅—

Only cancel is supported by all three. Capability entries are not feature flags and cannot be switched on by configuration — they are part of each runtime's implementation.

Hard rules beyond the runtime

RuleAllowed valuesOut-of-range result
Creating an agentThe 3 official valuesRUNTIME_UNSUPPORTED
Team template rolesDSH Native and Star Harness onlyTEAM_TEMPLATE_RUNTIME_UNSUPPORTED
Team run members (runtime)Local DSH Native and Star Harness onlyTEAM_AGENT_UNSUPPORTED
Managed deploymentDSH Native and Codex onlyNever appears in the deployable list
Managed manifest declarationThe 3 official valuesMANAGED_RUNTIME_IDENTITY_MISMATCH

"Teams exclude Codex members" and "managed deployments exclude Star Harness" are two independent restrictions. Do not merge them into "some scenarios are limited".

Execution policy: the layer that limits writes

The runtime decides who executes; execution policy decides where execution may write. The two are orthogonal.

ModeRankMeaningDefault
read-only0Read only, no workspace writesThe unattended-run default
workspace-write1May write the workspaceYes (cloud execution default)
danger-full-access2Full accessA ceiling, not a default

The ranking runs from least to most privileged. Three hard rules:

  1. Narrowing only, never widening. A requested mode above the deployed ceiling is clamped to the ceiling rather than rejected — so a policy change does not break requests already in flight.
  2. The ceiling defaults to the maximum. Cloud execution defaults to workspace-write with a ceiling of danger-full-access, so all three modes are selectable by default.
  3. Unattended means read-only. The unattended execution policy is read-only with approvalPolicy: never and approval source marked as a runtime policy — nobody can approve, so only reading is possible.

Besides the permission mode, a policy also carries an approval policy whose only values are ask and never. A Star Harness agent additionally carries a native permission policy (mode strict, loose, or custom) that only adds tool constraints and never grants a Host capability. New Star Harness agents default to strict.

What you needWhich page
The raw capability enumeration and contract versionsRuntime and entity contract
RUNTIME_* error codesErrors
How the three runtimes differ in deployment formRuntimes compared
Execution-policy environment variablesEnvironment

On this page