Loading...
Loading...
Use this skill when creating or editing an agent.yaml (or .yml/.hcl) configuration file for Docker Agent (cagent), including defining agents, models/providers, built-in or MCP toolsets, multi-agent teams with sub_agents. Even if the user just says they want to "build an AI agent with Docker", "make a coding agent config", "add a tool to my agent", or "set up a team of agents", this skill applies. Covers agent properties (model, instruction, toolsets, sub_agents, fallback), the models/providers sections, built-in toolsets (filesystem, shell, think, todo, memory, fetch), MCP toolset references, and named commands.
npx skill4agent add docker/skills docker-agent-configdocker agentcagentagent.yamlagentsmodelinstructiontoolsetssub_agentsmodelsproviderscommandsuse_commandsagent.yamlagent.ymlagent.hcldocker agent run--safety--sandboxdocker-agent-runserve mcp/api/a2a/acp/chatshare push/pulldocker agent evaldocker-agent-deploydocker-build-strategiesdocker-compose-patternsagents:rootagents:
root:
model: anthropic/claude-sonnet-4-5
description: A coding assistant
instruction: |
You are an expert developer. Help users write clean,
efficient code. Explain your reasoning step by step.
toolsets:
- type: filesystem
- type: shell
- type: thinkmodeldescriptioninstructioninstruction_filedescriptioninstruction_file..instructioninstructioninstruction_fileinstruction_fileinstructionprovider/modelmodels:providertemperaturemax_tokensthinking_budgetmodels:
claude:
provider: anthropic
model: claude-sonnet-4-5
max_tokens: 64000
agents:
root:
model: claudeopenaianthropicgoogleamazon-bedrockdmrollamamistralgroqxaitogetherazuregithub-copilotopenrouter<PROVIDER>_API_KEYdocker agent models --alldocker agent setupagent.yamltoken_key~/.config/cagent/.envdocker agent setupdmr/<model>fallbackagents:
root:
model: anthropic/claude-sonnet-4-5
fallback:
models: [openai/gpt-5, google/gemini-3.5-flash]
retries: 2 # per model, for 5xx errors
cooldown: 1m # stick with fallback after a 429providers:base_urltoken_keyproviders:
my_gateway:
base_url: https://api.example.com/v1
token_key: MY_API_KEY
models:
my_model:
provider: my_gateway
model: gpt-4ofilesystemshellthinktodotasksmemoryfetchbackground-jobsscriptlspapitoolsets:
- type: filesystem
- type: shelltype: todoshelltoolsets:
- type: mcp
ref: docker:duckduckgoreferences/toolsets-and-providers.mddefer: truereadonly: truesub_agents: [name, ...]transfer_task# Fragment: coder and reviewer are defined separately in the full asset.
agents:
root:
sub_agents: [coder, reviewer]assets/team-agent.yamlreadonly: truesub_agentsmyorg/agent:tagname@sha256:...transfer_tasksub_agentscommands:agent:redact_secrets: truemax_iterationsmax_consecutive_tool_callsinstructioninstruction_file${env.VAR}docker agent setuptoken_key: MY_API_KEYdocker agent rundocker-agent-rundocker-agent-deployreferences/toolsets-and-providers.mdreferences/sources.mdassets/team-agent.yamlchecks/verification.md