Agent Harnesses

Point coding-agent CLIs at a Dynamo deployment

以 Markdown 格式查看

Dynamo exposes v1/chat/completions, v1/responses, and v1/messages, so any agent that uses these APIs can talk to a Dynamo endpoint even if it is not listed in this guide. This guide focuses on popular agent harnesses that send stable session IDs. Dynamo normalizes these IDs for tracing and other explicitly configured consumers.

1

Start a local agent endpoint

To locally test these out, we have a small script that runs an SGLang-backed zai-org/GLM-4.7-Flash endpoint. This script starts a TP2 instance on port 8000 and enables request tracing for replay and visualization. By default traces are saved in /tmp/dynamo-request-trace-$(date +%Y%m%d-%H%M%S)

To start it, run:

$bash examples/backends/sglang/launch/agg_agent.sh
2

Configure a harness

Codex uses the Responses API. Add a local provider in ~/.codex/config.toml:

1[model_providers.dynamo]
2name = "dynamo"
3base_url = "http://localhost:8000/v1"
4wire_api = "responses"
$# replace -m <model> with your model
$codex -m zai-org/GLM-4.7-Flash -c model_provider=dynamo

Dynamo maps Codex’s thread-id header to session_id. A spawned child thread also sends x-codex-parent-thread-id, which Dynamo maps to parent_session_id.

Drive a Harness from Another Agent

Use the repository’s .agents/skills/dynamo-agent-harness skill when an agent needs to keep a Claude Code, Codex, or OpenCode session open across multiple prompts while Dynamo serves the model. The skill uses Agent Client Protocol (ACP) and injects the provider configuration through the child process environment instead of adding harness configuration files to the delegated worktree.

The skill pins the Claude Code and Codex ACP adapters. If a harness release changes the model, endpoint, session header, authentication, or mode configuration, update this page and the skill in the same change after running a persistent two-turn tool smoke test.

Compaction Signals

An agent harness can compact older conversation history into a summary when its context approaches a limit. The harness creates the summary request and keeps the logical session ID stable. Dynamo observes supported compaction signals but does not start compaction.

HarnessSignal recognized by DynamoNormalized agent context
Codexx-codex-turn-metadata with request_kind set to compactionagent_context.compaction
Claude CodeNo supported mappingUnset
OpenCodeNo supported mappingUnset

For Codex, Dynamo preserves the optional trigger, reason, implementation, phase, and strategy values. The object appears only on the inference request that creates the summary. Invalid JSON and other request kinds leave it unset.

Workers receive the field in AgentContext but do not act on it.

Compaction metadata is passive. It does not rotate session_id, change request routing, or evict KV cache blocks. See Agent Tracing for the request-trace format.

See Also