mirror of
https://github.com/docker/docker-agent.git
synced 2026-11-04 10:02:15 +00:00
Assisted-By: claude-opus-4-5 Signed-off-by: David Gageot <david.gageot@docker.com>
49 lines
1.9 KiB
YAML
49 lines
1.9 KiB
YAML
# This example demonstrates the background_agents toolset, which lets a
|
|
# coordinator dispatch work to multiple sub-agents in parallel rather than
|
|
# waiting for each one sequentially.
|
|
#
|
|
# The coordinator fans out research tasks to two specialists at the same time,
|
|
# joins their results, and synthesises a final answer once both are done.
|
|
|
|
agents:
|
|
root:
|
|
model: anthropic/claude-sonnet-4-5
|
|
description: Research coordinator that dispatches work in parallel
|
|
instruction: |
|
|
You are a research coordinator. When the user asks a question:
|
|
|
|
1. Break the question into independent research tasks.
|
|
2. Dispatch each task to the appropriate sub-agent using
|
|
`run_background_agent` so they run in parallel.
|
|
3. Call `wait_background_agents` with both task IDs to join their results.
|
|
If `all_done` is false after a timeout, wait again. Inspect each task's
|
|
status and handle failures before synthesising the findings.
|
|
4. Synthesise the findings into a clear, well-structured answer.
|
|
|
|
Always run independent tasks concurrently — do not wait for one to
|
|
finish before starting the next.
|
|
sub_agents: [web_researcher, code_analyst]
|
|
toolsets:
|
|
- type: think
|
|
- type: background_agents
|
|
|
|
web_researcher:
|
|
model: openai/gpt-4o
|
|
description: Searches the web for information and summarises findings
|
|
instruction: |
|
|
You are a web researcher. Use the search tools to find relevant,
|
|
up-to-date information. Provide concise summaries with sources.
|
|
toolsets:
|
|
- type: mcp
|
|
ref: docker:duckduckgo
|
|
|
|
code_analyst:
|
|
model: anthropic/claude-sonnet-4-5
|
|
description: Analyses local code and provides technical insights
|
|
instruction: |
|
|
You are a code analyst. Read the codebase to answer technical
|
|
questions. Reference specific files and line numbers in your answers.
|
|
toolsets:
|
|
- type: filesystem
|
|
- type: shell
|