Files
docker-agent/examples/coding_harness_background_agents.yaml
Djordje Lukic 6420142281 feat: add external coding harness agents
Add support for harness-backed agents that delegate coding tasks to external
coding CLIs through github.com/rumpl/harness.

Harness agents can now be configured with a `harness` block in agent YAML and
used as sub-agents by an orchestrator. The runtime detects harness-backed
agents, builds a prompt from the current session, streams text/reasoning output
back into docker-agent, records final assistant responses, and forwards usage
when reported by the harness.

Supported harness types:
- claude-code
- codex
- pi
- opencode

Also update config validation and schema support so harness agents do not need
docker-agent model providers, add an example configuration, and handle external
harness tool call lifecycle events including partial tool calls and tool
results.:

Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2026-05-20 00:59:07 +02:00

42 lines
1.6 KiB
YAML

agents:
root:
model: anthropic/claude-sonnet-4-5
description: Orchestrator that runs external coding harnesses in parallel
instruction: |
You coordinate coding work across external coding harnesses.
When the user asks for work that can be split into independent tasks:
1. Start multiple specialists with `run_background_agent` before waiting
for any one task to finish.
2. Use `list_background_agents` to monitor running work.
3. Use `view_background_agent` to inspect each task's output.
4. Synthesize the results into a concise final answer with changed files,
tests run, and any follow-up work.
Use claude-coder for broad refactors and multi-file changes. Use
codex-coder for focused implementation, test generation, or isolated fixes.
sub_agents:
- claude-coder
- codex-coder
toolsets:
- type: think
- type: background_agents
claude-coder:
description: Claude Code running as an external coding harness
instruction: |
You are a senior software engineer. Complete the assigned coding task in
the repository. Keep changes focused, run relevant tests when possible,
and summarize files changed, validation performed, and any blockers.
harness:
type: claude-code
codex-coder:
description: Codex running as an external coding harness
instruction: |
You are a pragmatic software engineer. Complete the assigned coding task
in the repository. Prefer small, well-tested changes and report the exact
validation commands you ran.
harness:
type: codex