diff --git a/_vendor/github.com/docker/docker-agent/docs/concepts/agents/index.md b/_vendor/github.com/docker/docker-agent/docs/concepts/agents/index.md index 17b70ce5e85c..3b32dcd6f662 100644 --- a/_vendor/github.com/docker/docker-agent/docs/concepts/agents/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/concepts/agents/index.md @@ -6,8 +6,6 @@ weight: 10 canonical: https://docs.docker.com/ai/docker-agent/concepts/agents/ --- -_Agents are the core building blocks of Docker Agent. Each agent is an AI-powered entity with a model, instructions, tools, and optional sub-agents._ - ## What is an Agent? An agent in Docker Agent is defined by: @@ -21,7 +19,7 @@ An agent in Docker Agent is defined by: ```yaml agents: root: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: Expert software developer instruction: | You are an expert developer. Write clean, efficient code @@ -64,7 +62,7 @@ Agents can automatically fail over to alternative models when the primary model ```yaml agents: root: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 fallback: models: - openai/gpt-5 @@ -95,14 +93,27 @@ $ docker agent run agent.yaml /greet Commands support environment variable interpolation using JavaScript template literal syntax. Undefined variables expand to empty strings. -## Default Agent +## Built-in Agents + +Docker Agent includes two built-in agents: + +- **`default`**: A capable coding agent with a development workflow, file and shell tools, skills, environment information, and project instructions from `AGENTS.md`. +- **`minimal`**: A small general-purpose configuration with a concise instruction and file, shell, and fetch tools. It uses automatic model selection. -Running `docker agent run` without a config argument uses `docker-agent.yaml`, `docker-agent.yml`, or `docker-agent.hcl` from the current directory when present. Otherwise, it uses a capable built-in default agent for quick tasks without needing any configuration. +The former `coder` built-in is now `default`; use `docker agent run default` for coding tasks. + +### Default Agent + +Running `docker agent run` without a config argument uses `docker-agent.yaml`, `docker-agent.yml`, or `docker-agent.hcl` from the current directory when present. Otherwise, it uses `default`. ```bash # Use the project config or built-in default agent $ docker agent run +# Explicitly choose a built-in agent +$ docker agent run default +$ docker agent run minimal + # Override the default with an alias $ docker agent alias add default /path/to/my-agent.yaml $ docker agent run # now runs your custom agent diff --git a/_vendor/github.com/docker/docker-agent/docs/concepts/distribution/index.md b/_vendor/github.com/docker/docker-agent/docs/concepts/distribution/index.md index 17087fd5319a..9e0f12c24625 100644 --- a/_vendor/github.com/docker/docker-agent/docs/concepts/distribution/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/concepts/distribution/index.md @@ -8,8 +8,6 @@ aliases: - /ai/docker-agent/sharing-agents/ --- -_Package, share, and run agents via OCI-compatible registries — just like container images._ - ## Overview Docker Agent agents can be pushed to any OCI-compatible registry (Docker Hub, GitHub Container Registry, etc.) and pulled/run anywhere. This makes sharing agents as easy as sharing Docker images. diff --git a/_vendor/github.com/docker/docker-agent/docs/concepts/models/index.md b/_vendor/github.com/docker/docker-agent/docs/concepts/models/index.md index cc20031517e3..67f80f435691 100644 --- a/_vendor/github.com/docker/docker-agent/docs/concepts/models/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/concepts/models/index.md @@ -31,9 +31,8 @@ Define models in a `models` section and reference them by name: models: claude: provider: anthropic - model: claude-sonnet-4-5 + model: claude-sonnet-5-5 max_tokens: 64000 - temperature: 0.7 agents: root: @@ -53,7 +52,7 @@ keys are present, but still work with a local fallback: models: smart: first_available: - - anthropic/claude-sonnet-4-5 + - anthropic/claude-sonnet-5-5 - openai/gpt-5 - dmr/ai/qwen3 @@ -96,28 +95,22 @@ Control how much the model "thinks" before responding: | Provider | Format | Values | Default | | ---------- | ---------- | ------------------------------------------------------------------- | -------------------------------- | | OpenAI | string | `minimal`, `low`, `medium`, `high`, `xhigh`, `max` | `medium` (always-reasoning models only) | -| Anthropic | int or str | 1024–32768 tokens, or `adaptive`, `adaptive/`, effort level | off | +| Anthropic | int or str | Fixed budgets: ≥1024 and less than `max_tokens`; or `adaptive`, `adaptive/`, effort level | Model-dependent; Claude 5.x defaults to adaptive | | Gemini 2.5 | int | 0 (off), -1 (dynamic), or token count | -1 (dynamic) | -| Gemini 3 | string | `minimal`, `low`, `medium`, `high` | varies | +| Gemini 3+ | string | `minimal` (Gemini 3), `low`, `medium`, `high`, `xhigh` (Hydrogen/Neon) | varies | | All | string/int | `none` or `0` clears Docker Agent's local config | — | -`none` and `0` are not universal API-level disable switches. On genuine OpenAI -endpoints running GPT-5.x from 5.6 onward or GPT-6 Sol/Luna, `none` is a real -`reasoning_effort` value that Docker Agent sends as-is and the model does not -reason. On GPT-6 Astra and older OpenAI models, `none`/`0` only clear the local `thinking_budget` — omitting the field -has the same effect — and the model falls back to the API's own default effort -(still reasoning internally for always-reasoning models like the o-series). -Providers with a true optional-thinking switch (Gemini 2.5, Claude, local -models) are fully disabled by `none`/`0`. See the -[Thinking / Reasoning guide](../../guides/thinking/index.md#disabling-thinking) -for the full per-provider breakdown. +**Turning thinking off:** Set `thinking_budget` to `none` or `0`. Models that +support disabling reasoning turn it off; others keep reasoning at their default +or minimum effort. Check your model's behavior in the +[Thinking / Reasoning guide](../../guides/thinking/index.md#disabling-thinking). ```yaml models: deep-thinker: provider: anthropic - model: claude-sonnet-4-5 - thinking_budget: 16384 + model: claude-sonnet-5-5 + thinking_budget: high fast-responder: provider: openai @@ -137,7 +130,7 @@ models: ```yaml agents: root: - model: anthropic/claude-sonnet-4-5,openai/gpt-5 + model: anthropic/claude-sonnet-5-5,openai/gpt-5 instruction: You are a helpful assistant. ``` diff --git a/_vendor/github.com/docker/docker-agent/docs/concepts/multi-agent/index.md b/_vendor/github.com/docker/docker-agent/docs/concepts/multi-agent/index.md index 082a38ddf680..87c60a5dc9e6 100644 --- a/_vendor/github.com/docker/docker-agent/docs/concepts/multi-agent/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/concepts/multi-agent/index.md @@ -64,9 +64,9 @@ transfer_task( ``` > [!NOTE] -> **Auto-Approved** +> **Approval rules still apply** > -> Unlike other tools, `transfer_task` is always auto-approved — no user confirmation needed. This allows seamless delegation between agents. +> `transfer_task` carries a read-only hint and normally runs without confirmation under the default policy. Strict mode, permission rules, and hooks can still require approval or block delegation. The delegated agent's own tool calls are checked separately. ## Handoffs Routing @@ -109,7 +109,7 @@ Root ──→ Researcher ──→ Summarizer ──→ Root ```yaml agents: root: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: Coordinator that routes queries instruction: | Route research queries to the researcher. @@ -149,14 +149,14 @@ With `handoffs`, the **model decides** whether to call the `handoff` tool — wh ```yaml agents: root: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: Extracts key facts from the input instruction: | Extract the key facts from the user's input as a bullet list. force_handoff: summarizer summarizer: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: Produces the final summary instruction: | Summarize the extracted facts for the user. @@ -190,12 +190,24 @@ Add it to your coordinator's toolsets: ```yaml agents: root: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: Research coordinator sub_agents: [researcher, analyst, writer] toolsets: - type: think - type: background_agents + researcher: + model: anthropic/claude-sonnet-5-5 + description: Finds relevant research + instruction: Research the assigned topic and report your findings. + analyst: + model: anthropic/claude-sonnet-5-5 + description: Analyzes the project architecture + instruction: Analyze the assigned problem and explain your conclusions. + writer: + model: anthropic/claude-sonnet-5-5 + description: Drafts reports + instruction: Write a clear report from the provided findings. ``` The coordinator can then: @@ -276,7 +288,7 @@ Sub-agents can be backed by external coding CLIs — Claude Code, Codex, opencod ```yaml agents: root: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: Orchestrator that plans and delegates instruction: | Break down coding tasks and delegate to the coding agents. @@ -308,7 +320,7 @@ The orchestrator uses `transfer_task` to send work to a harness sub-agent just l ```yaml agents: root: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: Technical lead coordinating development instruction: | You are a technical lead managing a development team. @@ -319,7 +331,7 @@ agents: - type: think developer: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: Expert software developer instruction: | You are an expert developer. Write clean, efficient code @@ -354,7 +366,7 @@ agents: ```yaml agents: root: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: Research coordinator instruction: | Coordinate research tasks. Delegate web searches to @@ -374,7 +386,7 @@ agents: path: ./research.db writer: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: Content writer instruction: Write clear, well-structured content. toolsets: diff --git a/_vendor/github.com/docker/docker-agent/docs/concepts/tools/index.md b/_vendor/github.com/docker/docker-agent/docs/concepts/tools/index.md index 9bf000b197e5..f98395d90238 100644 --- a/_vendor/github.com/docker/docker-agent/docs/concepts/tools/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/concepts/tools/index.md @@ -56,8 +56,3 @@ toolsets: ``` See [Tool Config](../../configuration/tools/index.md#mcp-tools) for full MCP configuration reference. - -> [!TIP] -> **See also** -> -> For full configuration reference, see [Tool Config](../../configuration/tools/index.md). diff --git a/_vendor/github.com/docker/docker-agent/docs/configuration/agents/index.md b/_vendor/github.com/docker/docker-agent/docs/configuration/agents/index.md index 586d2a5d03a5..6e451841185c 100644 --- a/_vendor/github.com/docker/docker-agent/docs/configuration/agents/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/configuration/agents/index.md @@ -7,8 +7,6 @@ weight: 30 canonical: https://docs.docker.com/ai/docker-agent/configuration/agents/ --- -_Complete reference for defining agents in your YAML configuration._ - A configuration must define at least one agent under `agents`. ## Full Schema @@ -41,6 +39,7 @@ agents: num_history_items: int # Optional: limit conversation history session_compaction: boolean # Optional: disable automatic session compaction (default: true) compaction_threshold: float # Optional: context-window fraction that triggers auto-compaction (0–1, default: 0.9) + compaction_threshold_tokens: int # Optional: absolute token count that triggers auto-compaction (> 0) compaction_model: string # Optional: model used for session-compaction (summary generation) use_toolsets: [list] # Optional: names of top-level toolsets to merge into this agent readonly: boolean # Optional: restrict all toolsets to read-only tools only @@ -104,7 +103,7 @@ agents: | `add_prompt_files` | array | ✗ | List of file paths whose contents are appended to the system prompt. Useful for including coding standards, guidelines, or additional context. | | `add_prompt_files_depth` | int | ✗ | Also list, by path only, the `add_prompt_files` names found up to this many directory levels below the working directory (`1` = direct subdirectories). Contents are not loaded — the agent reads the ones it needs. Useful in monorepos. Default: `0` (no scan). See [Prompt Files](#prompt-files) below. | | `add_description_parameter` | boolean | ✗ | When `true`, adds agent descriptions as a parameter in tool schemas. Helps with tool selection in multi-agent scenarios. | -| `redact_secrets` | boolean | ✗ | Enabled by default; set `false` to opt out. Scrubs detected secrets (API keys, tokens, private keys, etc.) out of tool-call arguments, outgoing chat messages, and tool output before they reach a tool, the model, or downstream consumers. See [Redacting Secrets](#redacting-secrets) below. | +| `redact_secrets` | boolean | ✗ | Enabled by default; set `false` to opt out. Scrubs detected secrets (API keys, tokens, private keys, etc.) out of tool-call arguments, outgoing chat messages, and tool output — including inline document attachments — before they reach a tool, the model, or downstream consumers. See [Redacting Secrets](#redacting-secrets) below. | | `code_mode_tools` | boolean | ✗ | When `true`, replaces the agent's individual tools with a single tool that runs a JavaScript script calling as many of them as needed in one turn. See [Code Mode](../../features/code-mode/index.md). | | `max_iterations` | int | ✗ | Maximum number of tool-calling loops. Default: unlimited (0). Set this to prevent infinite loops. | | `max_consecutive_tool_calls` | int | ✗ | Maximum consecutive identical tool calls before the agent is terminated, preventing degenerate loops. Default: `5`. | @@ -112,7 +111,8 @@ agents: | `max_tool_result_tokens` | int | ✗ | Maximum number of tokens to keep from each tool result when it is added to the session. Oversized results are truncated middle-out: the head and tail are kept and the removed middle is replaced with a truncation marker. Textual documents attached to the result share the same budget. Tokens are approximated as `len/4`. The cap is disabled by default; set a positive value to enable it. `0` and `-1` both leave tool results unbounded. | | `num_history_items` | int | ✗ | Limit the number of conversation history messages sent to the model. Useful for managing context window size with long conversations. Default: unlimited (all messages sent). | | `session_compaction` | boolean | ✗ | When `false`, disables automatic session compaction for this agent: neither the proactive threshold trigger nor the post-overflow auto-recovery runs. The manual `/compact` command remains available. Default: `true`. See the [Context & Compaction guide](../../guides/compaction/index.md). | -| `compaction_threshold` | float | ✗ | Fraction of the model's context window at which proactive auto-compaction triggers. Must be greater than `0` and at most `1`. A `compaction_threshold` set on the agent's model takes precedence. Default: `0.9`. See the [Context & Compaction guide](../../guides/compaction/index.md). | +| `compaction_threshold` | float | ✗ | Fraction of the model's context window at which proactive auto-compaction triggers. Must be greater than `0` and at most `1`. Cannot be combined with `compaction_threshold_tokens` on the same agent. A threshold set on the agent's model takes precedence. Default: `0.9`. See the [Context & Compaction guide](../../guides/compaction/index.md). | +| `compaction_threshold_tokens` | int | ✗ | Absolute token count at which proactive auto-compaction triggers (capped at the model's context window). Must be greater than `0`. Cannot be combined with `compaction_threshold` on the same agent. A threshold set on the agent's model takes precedence. See the [Context & Compaction guide](../../guides/compaction/index.md). | | `compaction_model` | string | ✗ | Model used for session compaction (summary generation). Can be a named model or an inline `provider/model` string. This agent-level value takes precedence over a `compaction_model` set on the agent's model or provider; when none is set, the agent's own model compacts. See the [Context & Compaction guide](../../guides/compaction/index.md). | | `skills` | bool/array | ✗ | Enable automatic skill discovery. `true` loads all discovered local skills, `false` disables them. A list can mix skill sources (`local` or `https://…` URLs) and skill names to include — see [Skills](../../features/skills/index.md). | | `commands` | object | ✗ | Named prompts that can be run with `docker agent run config.yaml /command_name`. Can be simple strings or objects with `instruction` and/or `agent` fields for agent switching, or a `url` field to open a link in the browser (TUI only). See [Named Commands](#named-commands) below. | @@ -198,7 +198,7 @@ into `instruction`: ```yaml agents: root: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: A helpful coding assistant instruction: You are an expert software developer. add_prompt_files: @@ -222,7 +222,7 @@ listing of what it finds, paths only: ```yaml agents: root: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: A coding assistant for a monorepo instruction: You are an expert software developer. add_prompt_files: @@ -322,7 +322,7 @@ Secret redaction is enabled by default. The `redact_secrets` field controls scru 1. A `tool_input_transform` built-in hook that scrubs detected secrets from the **arguments of every tool call**, before the tool sees them. 2. A `before_llm_call` built-in hook that scrubs the same patterns from **outgoing chat messages** — message content, multi-part text content, prior reasoning content, and the JSON-encoded arguments of any tool call still in the conversation — before they reach the model provider. -3. A `tool_response_transform` built-in hook that scrubs **tool output at the source**, so the secret never reaches event consumers, the persisted session file, the `post_tool_use` hook input, or the next LLM call. +3. A `tool_response_transform` built-in hook that scrubs **tool output, its display metadata, and its inline document attachments at the source**, so the secret never reaches event consumers, the persisted session file, the `post_tool_use` hook input, or the next LLM call. When other `tool_response_transform` hooks are configured, the auto-injected redactor runs once **before** them — command hooks receive the whole hook input as JSON on stdin, so the first configured hook does not see the raw tool result — and once **after** them, so a later rewrite cannot reintroduce a secret into the emitted or persisted result. Hooks between an intermediate rewrite and the final pass still see that rewrite, so a transform can expose a secret it introduces to the hooks that follow it until the final scrub. Both automatic passes carry an internal identity that no YAML entry can reproduce, so the final scrub survives hook deduplication, including when you also wire `redact_secrets` explicitly. ```yaml agents: @@ -381,12 +381,12 @@ agents: ## Deferred Tool Loading -Toolsets support `defer` to load tools on-demand and speed up agent startup. See [Deferred Tool Loading](../tools/index.md#deferred-tool-loading) for details. +Toolsets support `defer` to expose tool definitions to the model on demand and reduce prompt size. The underlying toolsets still start normally. See [Deferred Tool Loading](../tools/index.md#deferred-tool-loading) for details. ```yaml agents: root: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: Multi-purpose assistant instruction: You have access to many tools. toolsets: @@ -414,7 +414,7 @@ Automatically switch to backup models when the primary fails: ```yaml agents: root: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 fallback: models: - openai/gpt-5 @@ -461,7 +461,7 @@ You can also set `readonly: true` on an individual toolset to restrict only that agents: # Agent-level readonly: every toolset is restricted to read-only tools. inspector: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: Read-only inspector that can explore but never modify. instruction: Explore the project. Do not make changes. readonly: true @@ -472,7 +472,7 @@ agents: # Toolset-level readonly: only the filesystem toolset is restricted; # the shell toolset keeps all of its tools. mixed: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: Read-only file access, full shell access. instruction: You can read files and run any shell command. toolsets: @@ -486,7 +486,7 @@ See [`examples/readonly.yaml`](https://github.com/docker/docker-agent/blob/main/ > [!NOTE] > **Which tools are read-only?** > -> Whether a tool is read-only is determined by its `ReadOnlyHint` annotation. For built-in tools, read-only operations (list/read/search) carry the hint; mutating operations (write/delete/execute) do not. Custom and MCP tools expose the hint via their own annotations. +> Whether a tool is read-only is determined by its `ReadOnlyHint` annotation. For built-in tools, read-only operations (list/read/search) carry the hint. Delegation wrappers (`transfer_task`, `handoff`, `run_skill`) also carry it for runtime approval because the wrapper only changes control flow or starts a sub-session; the calls that follow are gated separately. They are not advertised as read-only over MCP: an agent containing one is exposed with `readOnlyHint: false`, because the sub-session can write. Mutating operations (write/delete/execute) do not. Custom and MCP tools expose the hint via their own annotations. ## Complete Example @@ -494,7 +494,7 @@ See [`examples/readonly.yaml`](https://github.com/docker/docker-agent/blob/main/ models: claude: provider: anthropic - model: claude-sonnet-4-5 + model: claude-sonnet-5-5 max_tokens: 64000 agents: diff --git a/_vendor/github.com/docker/docker-agent/docs/configuration/agentsignore/index.md b/_vendor/github.com/docker/docker-agent/docs/configuration/agentsignore/index.md index 65e295131721..4e52d1916983 100644 --- a/_vendor/github.com/docker/docker-agent/docs/configuration/agentsignore/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/configuration/agentsignore/index.md @@ -6,8 +6,6 @@ weight: 75 canonical: https://docs.docker.com/ai/docker-agent/configuration/agentsignore/ --- -_Hide files from the agent with a `.agentsignore` file, using the same syntax as `.gitignore`._ - ## Overview Put a `.agentsignore` file in your project and the agent stops seeing the paths it lists. Matched files are absent from directory listings and searches, and reads, writes and edits targeting them are refused. @@ -62,6 +60,10 @@ When `.agentsignore` contains at least one active pattern, the filesystem toolse > [!NOTE] > `.agentsignore` is independent of the filesystem toolset's [`ignore_vcs`](../tools/index.md) option. Setting `ignore_vcs: false` turns off `.gitignore` filtering but does **not** un-hide `.agentsignore` entries. +## Worktrees + +When a source checkout has a [`.worktreeinclude`](../../features/cli/index.md#copy-ignored-files-into-worktrees), files blocked by its `.agentsignore` are skipped even if they match the include patterns. The `.agentsignore` file itself is not copied by that mechanism. A worktree loads its own `.agentsignore` independently; commit or otherwise arrange its rules when needed, including for files already tracked in the worktree. + ## Relationship to `.gitignore` They are separate, and they do different amounts of work. diff --git a/_vendor/github.com/docker/docker-agent/docs/configuration/budget/index.md b/_vendor/github.com/docker/docker-agent/docs/configuration/budget/index.md index 0c96ce28b31f..d3e8a8655377 100644 --- a/_vendor/github.com/docker/docker-agent/docs/configuration/budget/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/configuration/budget/index.md @@ -6,8 +6,6 @@ weight: 75 canonical: https://docs.docker.com/ai/docker-agent/configuration/budget/ --- -_Cap what a single run may spend in money, tokens, or working time._ - ## Overview A budget sets ceilings on a run. When a ceiling is crossed the run stops with a message naming the exact limit that tripped, and the TUI tracks consumption live while the run is still going. @@ -75,8 +73,6 @@ Referencing a budget name that isn't defined is a config error, caught at parse When several agents reference the same budget name they draw from the **same** ceiling — not a copy each. Above, `root` and `researcher` share `shell-work`: together they cannot spend more than `$0.03`. -This is deliberate, and it is the whole reason budgets are worth having. If each agent received its own allowance, a run could spend `max_cost` × N simply by fanning out to N sub-agents, and the ceiling would mean nothing for exactly the workloads that most need one. - Give agents **distinct budget names** when you want independent pots. The same applies to the run-wide `budget`: every sub-session inside a run (transferred tasks, sub-agents, skills) spends from that one wallet. @@ -85,7 +81,7 @@ Compaction model calls also count towards the run-wide budget and the compacted ## Scope: a budget spans the session -Spend accumulates for the life of the **session**, across every message you send — it does not reset each time you hit enter. A `max_cost: 0.50` you could re-spend on every message would not be a ceiling at all. +Spend accumulates for the life of the **session**, across every message you send — it does not reset each time you hit enter. Starting a new session starts a fresh budget. It is a per-session ceiling, not a lifetime quota across sessions. @@ -100,7 +96,7 @@ stored conversation history and cost totals. External `harness:` execution does not use the native budget-enforcement loop. > [!NOTE] -> `max_time` measures the time the agents actually spend **working** — the sum of their turn durations — not wall-clock since the session opened. Because a budget spans a session, and a session sits idle while you read and type, wall-clock would let a budget expire during a coffee break: leave the TUI open for ten minutes and your next message would instantly trip a `max_time` of `2m` without the agent having done anything. +> `max_time` measures the time the agents spend **working** — the sum of their turn durations — not wall-clock time since the session opened. ## What stops a run @@ -118,7 +114,7 @@ Execution stopped after reaching the configured budgets.shell-work.max_cost limit (used $0.0312 of $0.0300). ``` -Unlike [`max_iterations`](../agents/index.md), a budget stop is **terminal** — there is no prompt offering to continue. A budget is a ceiling you set deliberately, so raising it means editing the config rather than answering a dialog. +Unlike [`max_iterations`](../agents/index.md), a budget stop is **terminal** — there is no prompt offering to continue. Edit the config to raise the limit. ## Budget stops in evaluation output @@ -194,6 +190,8 @@ This is the same granularity [`max_iterations`](../agents/index.md) has, and it The `max_tokens` in a budget is a **cumulative** count of tokens across the whole run: fresh input, cache-read input, cache-write input, and output all count towards it. It is unrelated to the provider- or model-level [`max_tokens`](../models/index.md), which caps the output of a single response. +When a server-side fallback (for example [Anthropic server-side fallbacks](../../providers/anthropic/index.md#server-side-fallbacks)) serves a turn, the token budgets count the tokens of every attempt, including declined ones, not just the final model's usage. + It is also not the session's context length: compaction resets that, while the budget keeps counting. ## Examples diff --git a/_vendor/github.com/docker/docker-agent/docs/configuration/commands/index.md b/_vendor/github.com/docker/docker-agent/docs/configuration/commands/index.md index 096151fc6493..5e1573ed6d45 100644 --- a/_vendor/github.com/docker/docker-agent/docs/configuration/commands/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/configuration/commands/index.md @@ -37,7 +37,7 @@ The simplest form: a string value that becomes the instruction sent to the curre ```yaml agents: root: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: A system administrator assistant. instruction: You are a system administrator. commands: @@ -94,7 +94,7 @@ A command with a `url` field opens that URL in the user's default browser instea ```yaml agents: root: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: An agent with handy URL shortcuts. instruction: You are a helpful assistant. commands: @@ -127,7 +127,7 @@ A command with an `agent` field switches the active agent for the rest of the co ```yaml agents: root: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: Main assistant instruction: You are a project coordinator. sub_agents: [planner, reviewer] @@ -141,12 +141,12 @@ agents: agent: reviewer planner: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: Planning specialist instruction: You create detailed project plans. reviewer: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: Code review specialist instruction: You review code and suggest improvements. ``` @@ -178,7 +178,7 @@ commands: agents: root: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: Lead developer instruction: You are the lead developer. Coordinate the team. use_commands: [ci] # reuse the "ci" command group @@ -186,7 +186,7 @@ agents: lint: "Run the linter" # inline command, merged in (wins on conflict) docs-writer: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: Documentation writer instruction: You write and maintain the project documentation. use_commands: [ci] # same group, reused without duplication diff --git a/_vendor/github.com/docker/docker-agent/docs/configuration/flavors/index.md b/_vendor/github.com/docker/docker-agent/docs/configuration/flavors/index.md index 3218fa381e61..bf03779e7e43 100644 --- a/_vendor/github.com/docker/docker-agent/docs/configuration/flavors/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/configuration/flavors/index.md @@ -6,8 +6,6 @@ weight: 95 canonical: https://docs.docker.com/ai/docker-agent/configuration/flavors/ --- -_Ship one agent file with named variants, enabled at run time as YAML patches._ - ## Overview A flavor is a named YAML patch declared in the agent file itself, under the diff --git a/_vendor/github.com/docker/docker-agent/docs/configuration/hcl/index.md b/_vendor/github.com/docker/docker-agent/docs/configuration/hcl/index.md index 1318f35a082f..87a643adad15 100644 --- a/_vendor/github.com/docker/docker-agent/docs/configuration/hcl/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/configuration/hcl/index.md @@ -52,7 +52,7 @@ These two configs are equivalent: models: claude: provider: anthropic - model: claude-sonnet-4-5 + model: claude-sonnet-5-5 agents: root: @@ -67,7 +67,7 @@ agents: ```hcl model "claude" { provider = "anthropic" - model = "claude-sonnet-4-5" + model = "claude-sonnet-5-5" } agent "root" { @@ -102,7 +102,7 @@ In YAML, several sections are maps keyed by name. In HCL, those become labeled b ```hcl model "claude" { provider = "anthropic" - model = "claude-sonnet-4-5" + model = "claude-sonnet-5-5" } agent "root" { @@ -273,7 +273,7 @@ model "smart_router" { model = "gpt-5" routing { - model = "anthropic/claude-sonnet-4-5" + model = "anthropic/claude-sonnet-5-5" examples = [ "Write a detailed technical document", "Review this code for security issues", diff --git a/_vendor/github.com/docker/docker-agent/docs/configuration/hooks/index.md b/_vendor/github.com/docker/docker-agent/docs/configuration/hooks/index.md index d898512efdc9..f32df0d68014 100644 --- a/_vendor/github.com/docker/docker-agent/docs/configuration/hooks/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/configuration/hooks/index.md @@ -6,8 +6,6 @@ weight: 60 canonical: https://docs.docker.com/ai/docker-agent/configuration/hooks/ --- -_Run shell commands at various points during agent execution for deterministic control over behavior._ - ## Overview Hooks allow you to execute shell commands or scripts at key points in an agent's lifecycle. They provide deterministic control that works alongside the LLM's behavior, enabling validation, logging, environment setup, and more. @@ -33,7 +31,7 @@ Docker Agent dispatches the following hook events: | Event | When it fires | Can block? | | --------------------------- | --------------------------------------------------------------------------------- | ---------- | -| `pre_tool_use` | Default lane: approval helper when the safety mode asks; skipped on auto-approved calls | Yes | +| `pre_tool_use` | Default lane: approval helper when the safety mode asks; also vetoes delegation wrappers in balanced; skipped on other auto-approved calls | Yes | | `tool_input_transform` | Before tool guards, permission rules, and safety classification, including auto-approved calls | Yes | | `prompt_file_guard` | Before loaded or retained prompt-file instructions enter storage or a model request | Yes | | `skill_content_guard` | After reading skill text, before expansion or delivery | Yes | @@ -62,7 +60,7 @@ Docker Agent dispatches the following hook events: | `on_agent_switch` | When the runtime moves the active agent (transfer_task, handoff, return) | No | | `on_session_resume` | When the user explicitly approves continuation past `max_iterations` | No | | `on_tool_approval_decision` | After the runtime's approval chain (permissions / yolo / readonly / ask) resolves | No | -| `worktree_create` | After `docker agent run --worktree` creates a git worktree, before the session | Yes | +| `worktree_create` | After a git worktree is created — by `docker agent run --worktree` (before the session) or for a [background agent task](../../tools/background-agents/index.md#isolated-coding-tasks) with `worktree: true` (before the child's tools load) | Yes | | `before_agent_run` | Once per agent activation, before its model runs — can [route](#agent-routing-hooks) to another agent | Yes | | `after_agent_complete` | Once after an agent completes successfully — can [route](#agent-routing-hooks) onward | Yes | @@ -80,7 +78,7 @@ The shared catalog in `pkg/hooks/events` drives configuration validation, dispatch strategy, output aggregation, and strict output validation. Tests keep this table, the configuration fields, and the JSON schema synchronized. “Context” means additional context is consumed by the runtime; `worktree_create` -shows it to the CLI user. The internal preempting `pre_tool_use` lane is parallel, +shows it to the CLI user, or adds it to the instructions of an isolated background task. The internal preempting `pre_tool_use` lane is parallel, collects metadata, and does not rewrite input. | Event | Execution | Can block | Failure default | Context | Rewrite | @@ -185,6 +183,9 @@ For each event dispatch, identical matching hook definitions run once, at the position of the first match. Identity includes every hook field: `name`, `type`, `command`, `args`, `timeout`, `env`, `working_dir`, `on_error`, `strict_output`, `model`, `prompt`, `system_prompt`, and `schema`. Sharing a name or command alone does not make two hooks duplicates. +Hooks synthesized by the runtime additionally carry an internal marker that +cannot be written in configuration, so they are never treated as duplicates of +a user-authored entry. Hooks with different model prompts, environments, working directories, or other options all run. To deliberately run otherwise identical hooks twice, give them @@ -198,7 +199,13 @@ and `on_error: warn` remain distinct from omitted options. This also applies to automatic built-ins: an identical explicit entry runs only once, but adding a name or changing an option makes it a separate invocation. Disable the corresponding agent flag when you want a custom entry *instead of* -the automatic default. +the automatic default. The `tool_response_transform` redaction pair is the +deliberate exception: when it brackets configured transforms, both +auto-injected passes carry an internal marker with no YAML or JSON +representation, so no user-authored entry can reproduce their identity — not +even by copying the pass's `name` and every other option. The final scrub +therefore always survives deduplication, and an explicitly wired redactor runs +as an additional invocation at its configured position. ## Global (user-level) hooks @@ -290,9 +297,10 @@ Built-ins are typically zero-config and faster than equivalent shell hooks becau | `add_recent_commits` | `session_start` | _none_, or `[""]` | Adds `git log --oneline -n N`. `N` defaults to 10; pass a positive integer to override. | | `max_iterations` | `before_llm_call` | `[""]` (required) | Hard-stops the agent after `N` model calls. Stateless: the runtime supplies the iteration counter on every dispatch. | | `snapshot` | `session_start`, `turn_start`, `turn_end`, `pre_tool_use`, `post_tool_use`, `session_end` | _none_ | Records filesystem snapshots in a shadow git repo under the Docker Agent data directory. No-op outside git repos; respects the source repo's ignore rules and skips newly-added files larger than 2 MiB. | -| `redact_secrets` | `tool_input_transform`, `before_llm_call`, `tool_response_transform` | _none_ | Scrubs detected secrets (API keys, tokens, private keys, …) out of tool call arguments, outgoing chat content, and tool output. The same builtin handles all three events and dispatches on the event name. Auto-registered on all three events by `redact_secrets: true` on the agent — see [`examples/redact_secrets_hooks.yaml`](https://github.com/docker/docker-agent/blob/main/examples/redact_secrets_hooks.yaml) for the manual wiring. | +| `redact_secrets` | `tool_input_transform`, `before_llm_call`, `tool_response_transform` | _none_ | Scrubs detected secrets (API keys, tokens, private keys, …) out of tool call arguments, outgoing chat content, and tool output, including the text of inline document attachments and the result metadata. The same builtin handles all three events and dispatches on the event name. Auto-registered on all three events by `redact_secrets: true` on the agent — see [`examples/redact_secrets_hooks.yaml`](https://github.com/docker/docker-agent/blob/main/examples/redact_secrets_hooks.yaml) for the manual wiring. | | `transform_json` | `tool_response_transform` | JSON field names | Keeps only the named top-level fields of a JSON object. Nested values are preserved; missing fields are omitted. No expression language or domain validation. | | `limit_large_tool_results` | `tool_response_transform`, `session_end` | _none_ | **Always-on safety hook** — automatically injected by the runtime, no configuration required. When a tool result from the `filesystem`, `shell`, `background_jobs`, `mcp`, or `a2a` categories exceeds 2,000 lines or 50 KiB, the full payload is written to a per-session temp file and replaced in the conversation with a notice plus a bounded excerpt (up to 2,000 excerpt lines; 50 KiB including the notice): the tail for most tools, but the head for the built-in filesystem `read_file`, whose notice suggests a follow-up call with `line`/`limit` to continue reading. If saving the payload fails, a bounded inline excerpt is returned without a file reference. Background-job excerpts retain status metadata before the log tail. The `session_end` leg deletes the temp directory. Internal toolsets (`memory`, `plan`, `tasks`, `think`, …) are not affected. | +| `keep_awake` | `session_start`, `session_end` | _none_ | CLI-owned sleep inhibitor, controlled by the disabled-by-default `settings.keep_awake` preference. | | `http_post` | Any event | `[URL, body]` | Sends an HTTP POST request with the optional body in `args[1]` to the URL in `args[0]`. Missing or empty URLs are ignored; only HTTP(S) destinations are accepted, using an SSRF-safe transport. | | `safer_shell` | `pre_tool_use` | _none_ | **Deprecated compatibility shim.** The runtime now classifies every shell command natively (`safe` / `destructive` / `unknown`) and gates it through the session's [safety mode](../permissions/index.md#safety-modes), so this builtin no longer emits verdicts. Pinned entries keep working as pure labellers that attach classification metadata (`safety_label`, `blast_radius`, `category`, `reason`) to the call. Filters by tool name internally (no-op for calls other than `shell` and `run_background_job`). | | `unload` | `on_agent_switch` | _none_ | POSTs `{"model": ""}` to each of the previous agent's DMR model endpoints (`/_unload` by default, overridable per-model via `unload_api`) to free the GPU/RAM the just-departing model was holding. Pure HTTP — reads the model snapshot the runtime ships on `on_agent_switch` and depends on no provider-specific runtime state. Non-DMR providers (OpenAI, Anthropic, …) are silently skipped, so cross-provider chains are safe. Errors are logged and swallowed; agent switching never blocks on a slow or unreachable engine (each call has a 10 s timeout). See [`examples/unload_on_switch.yaml`](https://github.com/docker/docker-agent/blob/main/examples/unload_on_switch.yaml). | @@ -311,6 +319,8 @@ Historical tool results are also bounded on outgoing chat and compaction request > `limit_large_tool_results` is injected unconditionally by the runtime — it is always active and cannot be removed from config. +The CLI also installs `keep_awake` on `session_start` and `session_end`. It uses [`github.com/rumpl/keepawake`](https://github.com/rumpl/keepawake) to hold a native sleep inhibitor for each run when `settings.keep_awake` is enabled. The setting is disabled by default and available in both TUIs. Cleanup runs even after cancellation or errors; acquisition failures warn without blocking the agent. This builtin is registered by the CLI, not the base runtime. + A minimal snapshot wiring looks like this: ```yaml @@ -426,8 +436,8 @@ In addition to the common fields, each event ships its own payload: | `tool_input_transform` | `agent_name`, `tool_name`, `tool_use_id`, `tool_category`, `tool_input`, `safety_policy` | | `tool_guard` | `agent_name`, `tool_name`, `tool_use_id`, `tool_category`, `tool_input`, `safety_policy` | | `pre_tool_use` | `agent_name`, `tool_name`, `tool_use_id`, `tool_input` | -| `tool_response_transform` | `tool_name`, `tool_use_id`, `tool_input`, `tool_response` | -| `post_tool_use` | `agent_name`, `tool_name`, `tool_use_id`, `tool_input`, `tool_response`, `tool_error` | +| `tool_response_transform` | `tool_name`, `tool_use_id`, `tool_input`, `tool_response`, `tool_result_meta`, `tool_documents` | +| `post_tool_use` | `agent_name`, `tool_name`, `tool_use_id`, `tool_input`, `tool_response`, `tool_error`, `tool_result_meta`, `tool_documents` | | `permission_request` | `agent_name`, `tool_name`, `tool_use_id`, `tool_input` | | `session_start` | `source` — `startup` for each run stream | | `user_prompt_submit` | `prompt` — the text the user just submitted | @@ -462,7 +472,7 @@ Notes: - `steering_messages` is only populated for `user_steering_messages_submit`. It carries the user messages the runtime just drained from the steering queue — messages submitted while the agent was already working (mid-turn, after the model stopped, or while idle before the first model call). - `prompt` is also populated for `user_followup_submit`, carrying the text of the dequeued follow-up message (a user message queued for end-of-turn processing via the FollowUp API / queue, as opposed to mid-turn steering). - `stop_response` carries the model's final assistant text for `stop`, `after_llm_call`, and `subagent_stop`. `last_user_message` carries the latest user message at dispatch time. -- `model_id` is populated for `after_llm_call` (and `before_llm_call`) in the canonical `/` form (e.g. `anthropic/claude-sonnet-4-5`). For harness agents, `model_id` is the harness label (e.g. `claude-code`) rather than a canonical model name — see [Coding Harnesses](../../features/harnesses/index.md). +- `model_id` is populated for `after_llm_call` (and `before_llm_call`) in the canonical `/` form (e.g. `anthropic/claude-sonnet-5-5`). For harness agents, `model_id` is the harness label (e.g. `claude-code`) rather than a canonical model name — see [Coding Harnesses](../../features/harnesses/index.md). - `usage` and `cost` are populated for `after_llm_call` only. `usage` is the per-call token usage object (`input_tokens`, `output_tokens`, `cached_input_tokens`, `cached_write_tokens`, and `reasoning_tokens` — the last is itself omitted for non-reasoning models); the whole object is absent when the provider reported no usage. `cost` is the USD price of that one model response. For a **native model call** it is the price computed from `usage` and the model's pricing table, and equals the cost the session records for the turn: it is **absent** when the response is unpriced (no pricing data on file, or no usage) and an explicit `0` for a priced call that was free — so a present `cost` is authoritative and an absent one means "unpriced", with no need to cross-check `usage`. Models the catalogue does not price (custom endpoints, local models) can be priced explicitly with the model-level [`cost`](../models/index.md#custom-token-pricing) config. (For harness agents the meaning differs — see the next note.) A cost ledger can therefore record per-call spend from the payload alone, without subscribing to the runtime event channel. - For [harness agents](../../features/harnesses/index.md), `cost` is the harness's own reported total for the call rather than a computed price, and is present only when the harness reported a non-zero cost (some harnesses, e.g. `codex`, report token counts but no cost — those turns carry `usage` with `cost` absent, even though the recorded message stores `0`). - `after_llm_call` fires for **every** model call, including calls made inside sub-sessions (transferred tasks, background agents, skills). For those, `session_id` is the sub-session's id. Summing `cost` across `after_llm_call` events therefore captures **all** spend, including sub-sessions (and even sub-sessions that error before their cost is persisted). Do **not** add a separately-queried session cost total on top: the runtime's own total already recurses into and includes completed sub-session spend, so combining the two double-counts. Pick one source — the summed hook costs — as the authoritative ledger. @@ -527,9 +537,11 @@ Use separate events for operations that must run regardless of approval: rewrite arguments. 3. Existing **`pre_tool_use` with `preempt_yolo: true`** runs next, followed by permission rules and the safety-mode decision. -4. Ordinary **`pre_tool_use`** remains an approval helper: it runs only when the - safety mode asks. Auto-approved calls and explicit permission ask rules skip - it. Keep expensive LLM judges here unless they must inspect every call. +4. Ordinary **`pre_tool_use`** remains an approval helper: it runs when the + safety mode asks. Delegation wrappers auto-approved by balanced also run it, + so an existing deny or ask still applies. Other auto-approved calls and + explicit permission ask rules skip it. Keep expensive LLM judges here unless + they must inspect every call. 5. **`permission_request`** and interactive confirmation remain the fallback. A mandatory guard's `ask` skips approval helpers and forces confirmation. @@ -657,9 +669,19 @@ The `hook_specific_output` for `tool_response_transform` supports: | Field | Type | Description | | ----------------------- | ------ | --------------------------------------------- | | `updated_tool_response` | string | Rewritten tool output (replaces the original) | +| `updated_tool_result_meta` | JSON | Replacement for the tool result's display metadata (for example, the recorded diff of an `edit_file` call). A JSON value replaces the metadata, `null` clears it, and omitting the field leaves it unchanged | +| `updated_tool_documents` | array | Replacement for the tool result's inline document attachments, in the `tools.DocumentContent` shape (`name`, `uri`, `mimeType`, `data`, `text`). MCP servers return text resources as documents with `text` set; they are emitted and persisted with the response, so scrub them here too. A present list replaces the attachments (an empty list drops them); omitting the field leaves them unchanged | This is the symmetric counterpart of `tool_input_transform`'s `updated_input`, applied to tool **results** instead of tool **arguments**. The rewrite reaches every downstream consumer — event subscribers, the persisted session file, the `post_tool_use` hook input, and the next LLM call. Use it to truncate excessive output, scrub PII, or normalise tool dialects. The built-in `redact_secrets` registers itself on this event as the third leg of the redact_secrets feature. +Hooks on `tool_response_transform` and `post_tool_use` also receive `tool_documents`, the inline document attachments the tool returned. MCP servers return text resources this way (the payload is in `text`), and those documents are emitted to event subscribers and persisted in the session next to the textual output. Only `tool_response_transform` hooks can rewrite the list, with `updated_tool_documents`; the rewritten attachments are what gets emitted and persisted, and `post_tool_use` hooks receive the already-transformed list. `redact_secrets` scrubs each attachment's name, URI, MIME type, and text, so a secret carried in an MCP inline-text resource never reaches the session file or the event stream. + +When the agent-level `redact_secrets` flag is on (the default) and other `tool_response_transform` hooks are configured, the auto-injected redactor runs both **before** and **after** them. The leading pass matters because command hooks receive the whole hook input as JSON on stdin: without it, a hook that archives its input would record the original raw tool output, display metadata, and inline document attachments. The trailing pass is the final scrub, so a later rewrite that reintroduces a secret is still caught before the result is emitted, persisted, or handed to `post_tool_use` — for example, a transform placed after an explicitly wired `redact_secrets` entry that rewrites a secret back into the output or the attachments. + +This is not one pass over one value: the first configured transform sees the scrubbed original tool result, but every later transform sees the preceding hook's rewrite, before the final scrub runs (`pkg/hooks/pipeline.go`). A transform can therefore introduce a secret that a following hook observes — including a command hook that records its stdin — and only the final scrub runs after the last configured transform. Both auto-injected passes carry an internal identity that no YAML entry can reproduce, so deduplication cannot drop the final scrub even when an explicit redactor copies the automatic pass's label; an explicit redactor entry stays a separate invocation at its configured position. + +Hooks on `tool_response_transform` and `post_tool_use` also receive `tool_result_meta`, the structured display metadata a tool recorded alongside its text output (the TUI renders completed `edit_file` diffs from it). Only `tool_response_transform` hooks can rewrite it, with `updated_tool_result_meta` (independently of `updated_tool_response`); the rewritten metadata is what gets emitted and persisted. `post_tool_use` hooks receive the already-transformed metadata and cannot change it. `redact_secrets` also scrubs this metadata, and clears it when it cannot be serialized safely. + ### Composing transformations Hooks for the following events run **sequentially in configuration order**: @@ -669,19 +691,30 @@ Hooks for the following events run **sequentially in configuration order**: | `tool_input_transform` | `updated_input` | `tool_input` with the patch applied | | `pre_tool_use` (default lane) | `updated_input` | `tool_input` with the patch applied | | `before_llm_call` | `updated_messages` | The rewritten `messages` array | -| `tool_response_transform` | `updated_tool_response` | The rewritten `tool_response` string | +| `tool_response_transform` | `updated_tool_response`, `updated_tool_result_meta`, `updated_tool_documents` | The rewritten `tool_response` string, `tool_result_meta`, and `tool_documents` list | Every matching hook on these events participates in the sequence, whether it rewrites, observes, or returns a verdict. Each hook sees the most recent successful rewrite. Hooks that return no rewrite leave the current value -unchanged; the runtime receives the final result of the sequence. +unchanged; the runtime receives the final result of the sequence. The +runtime's auto-injected defaults respect that order: the always-on +`limit_large_tool_results` runs last, and when `redact_secrets` is enabled it +runs both ahead of the configured transforms (so the first of them receives a +scrubbed tool result rather than the raw one) and after them (so whatever the +last rewrite left behind is scrubbed before emission and persistence). The +leading pass only sanitizes the original values: a later transform's rewrite +is visible to the hooks that follow it until the final scrub replaces the +secret with a marker, so a command hook placed there can still record a secret +that a previous transform introduced. `updated_input` patches replace only the top-level keys they supply. Other arguments are preserved; nested objects are replaced, not deep-merged. An empty patch does not clear the arguments. Omitting a key no longer removes it; this patch protocol does not support key deletion. `updated_messages` replaces the entire message array, with an empty array treated as no rewrite. An explicit empty -`updated_tool_response` **does** clear the response. +`updated_tool_response` **does** clear the response. A present +`updated_tool_documents` list, including an empty one, replaces the +attachments; omitting the field keeps the current list. Verdicts still aggregate across all matching hooks: a later allow cannot undo a denial, and `pre_tool_use` keeps `deny > ask > allow` precedence. Blocking @@ -1042,7 +1075,9 @@ hooks: fi ``` -Unlike most events, `worktree_create` is dispatched from the CLI rather than the run loop, because the worktree (and the working directory the runtime, session, tools, and snapshot machinery all capture) must be settled before the runtime and session exist. See [`examples/worktree_create_hook.yaml`](https://github.com/docker/docker-agent/blob/main/examples/worktree_create_hook.yaml) for the full file. +`worktree_create` also fires when `run_background_agent` is called with `worktree: true`. Hooks run inside the task's new checkout with `agent_name` and `parent_session_id` set, before the child's toolsets and skills are loaded. Their additional context is added to the child's instructions, and a blocking decision (or error) fails the task; the checkout and branch are retained. + +For `docker agent run --worktree`, `worktree_create` is dispatched from the CLI rather than the run loop, because the worktree (and the working directory the runtime, session, tools, and snapshot machinery all capture) must be settled before the runtime and session exist. See [`examples/worktree_create_hook.yaml`](https://github.com/docker/docker-agent/blob/main/examples/worktree_create_hook.yaml) for the full file. ### Pre-Compact: steer the summary @@ -1260,6 +1295,18 @@ request -> evaluator +-- specialist --------------+-> final answer ``` ```yaml +evaluators: + task_route: + provider: typesafe + model: jev-latest + type: choice + instructions: Classify the work required by the request in input. + choices: + simple: A narrow question or routine explanation. + complex: A problem requiring detailed analysis. + research: A request requiring investigation and evidence. + unclear: A request missing essential information. + agents: root: model: openai/gpt-5-mini @@ -1273,6 +1320,18 @@ agents: routing_policy: routes: {simple: quick, complex: specialist, research: researcher, unclear: clarifier} min_probability: 0.85 + quick: + model: openai/gpt-5-mini + instruction: Answer the question directly. + specialist: + model: openai/gpt-5-mini + instruction: Analyze the problem and explain your conclusions. + researcher: + model: openai/gpt-5-mini + instruction: Investigate the request and report evidence and limitations. + clarifier: + model: openai/gpt-5-mini + instruction: Ask for the missing information needed to answer the request. ``` See [`examples/hook_routing.yaml`](https://github.com/docker/docker-agent/blob/main/examples/hook_routing.yaml) diff --git a/_vendor/github.com/docker/docker-agent/docs/configuration/models/index.md b/_vendor/github.com/docker/docker-agent/docs/configuration/models/index.md index 34b876ae26b4..5a126345aed2 100644 --- a/_vendor/github.com/docker/docker-agent/docs/configuration/models/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/configuration/models/index.md @@ -7,8 +7,6 @@ weight: 40 canonical: https://docs.docker.com/ai/docker-agent/configuration/models/ --- -_Complete reference for defining models with providers, parameters, and reasoning settings._ - ## Full Schema @@ -18,11 +16,12 @@ models: first_available: [list] # Optional: candidate model refs, tried in order by available credentials. # Mutually exclusive with other model settings. provider: string # Required unless using first_available. One of: openai, anthropic, google, amazon-bedrock, - # dmr, mistral, xai, nebius, nvidia, minimax, baseten, daoxe, ovhcloud, groq, fireworks-ai, deepseek, cerebras, togetherai, huggingface, moonshotai, vercel, cloudflare-workers-ai, cloudflare-ai-gateway, requesty, openrouter, api-route, atlascloud, + # dmr, mistral, xai, nebius, nvidia, minimax, baseten, daoxe, ovhcloud, groq, fireworks-ai, deepseek, cerebras, togetherai, huggingface, moonshotai, vercel, cloudflare-workers-ai, cloudflare-ai-gateway, requesty, openrouter, opper, runcrate, api-route, lunaroute, orcarouter, atlascloud, popnow, cloudgpu, obscurify, hopbase, straitly, morse, # azure, ollama, github-copilot, or a named provider defined # under the top-level `providers:` section. model: string # Required: model identifier description: string # Optional: human-readable summary of the model's purpose or strengths + stream_idle_timeout: duration|-1 # Optional: per-model stream idle limit temperature: float # Optional: 0.0–2.0 (provider-dependent; e.g. Anthropic caps at 1.0) max_tokens: integer # Optional: response length limit top_p: float # Optional: 0.0–1.0 @@ -47,22 +46,68 @@ models: output: float # Optional: price per 1M output tokens cache_read: float # Optional: price per 1M cached input tokens cache_write: float # Optional: price per 1M cache-write tokens + context_window: integer # Optional: context window in tokens (metadata; never sent to the provider) provider_opts: # Optional: provider-specific options key: value title_model: string # Optional: model used for session-title generation compaction_model: string # Optional: model used for session-compaction (summary generation) compaction_threshold: float # Optional: context-window fraction that triggers auto-compaction (0–1, default: 0.9) + compaction_threshold_tokens: integer # Optional: absolute token count that triggers auto-compaction (> 0) bypass_models_gateway: boolean # Optional: skip the models gateway for this model (implied by a custom base_url) ``` +## Stream idle timeout + +`runtime.stream_idle_timeout` sets the default for agent conversation streams, +including subagents, inline models, model switches, fallbacks, routed models, +and LLM compaction summaries. Imported agent files use their own runtime +defaults. For each attempt, an explicit routed target setting takes precedence +over the router or fallback entry setting, which takes precedence over the +agent file's runtime setting. + +Use a positive Go duration such as `90s` or `2m30s`, or the integer `-1` to +disable the idle timer, overriding any lower-priority setting. Zero and other +negative values are invalid. An omitted or null value inherits the next setting; +when no setting applies, the idle timer is disabled for all models, including +Gemini Flex and routed requests. A short configured timeout can expire while a +Flex request is still queued. + +The timer measures silence while waiting for the first chunk and between chunks, +not total request duration. Each chunk resets it. If it expires, Docker Agent +cancels the model request and handles the stalled stream as a failure. Disabling +the timer leaves stalled streams waiting until the caller cancels or the +connection closes; normal cancellation still works. Title generation and model +hooks do not use this idle timer: they retain their separate total deadlines +(30 seconds for titles and the configured per-hook timeout). Setting `-1` does +not remove those deadlines. + +```yaml +runtime: + stream_idle_timeout: 10m +models: + slow: + provider: google + model: gemini-2.5-flash + stream_idle_timeout: 20m + local: + provider: ollama + model: llama3 + stream_idle_timeout: -1 +agents: + root: + model: slow + instruction: You are a helpful assistant. +``` + ## Properties Reference | Property | Type | Required | Description | | --------------------- | ---------- | -------- | ------------------------------------------------------------------------------------- | | `first_available` | array | ✗ | Candidate model references tried in order; selects the first whose credentials are configured. Mutually exclusive with other model settings. | -| `provider` | string | ✓/✗ | Required for regular model definitions; omitted for `first_available` selectors. Provider: `openai`, `anthropic`, `google`, `amazon-bedrock`, `dmr`, `mistral`, `xai`, `nebius`, `nvidia`, `minimax`, `baseten`, `daoxe`, `ovhcloud`, `groq`, `fireworks-ai`, `deepseek`, `cerebras`, `togetherai`, `huggingface`, `moonshotai`, `vercel`, `cloudflare-workers-ai`, `cloudflare-ai-gateway`, `requesty`, `openrouter`, `api-route`, `atlascloud`, `azure`, `ollama`, `github-copilot`, `chatgpt`, `opencode`, `opencode-go`, or any [named provider](../../providers/custom/index.md). | -| `model` | string | ✓/✗ | Required for regular model definitions; omitted for `first_available` selectors. Model name (e.g., `gpt-4o`, `claude-sonnet-4-5`, `gemini-3.5-flash`) | +| `provider` | string | ✓/✗ | Required for regular model definitions; omitted for `first_available` selectors. Provider: `openai`, `anthropic`, `google`, `amazon-bedrock`, `dmr`, `mistral`, `xai`, `nebius`, `nvidia`, `minimax`, `baseten`, `daoxe`, `ovhcloud`, `groq`, `fireworks-ai`, `deepseek`, `cerebras`, `togetherai`, `huggingface`, `moonshotai`, `vercel`, `cloudflare-workers-ai`, `cloudflare-ai-gateway`, `requesty`, `openrouter`, `opper`, `runcrate`, `api-route`, `lunaroute`, `orcarouter`, `atlascloud`, `popnow`, `cloudgpu`, `obscurify`, `hopbase`, `straitly`, `morse`, `azure`, `ollama`, `github-copilot`, `chatgpt`, `opencode`, `opencode-go`, or any [named provider](../../providers/custom/index.md). | +| `model` | string | ✓/✗ | Required for regular model definitions; omitted for `first_available` selectors. Model name (e.g., `gpt-4o`, `claude-sonnet-5-5`, `gemini-3.5-flash`) | | `description` | string | ✗ | Informational, human-readable summary of the model's purpose or strengths (e.g., "fast and cheap, good for summaries"). Not sent to the model. Can be combined with `first_available` (a selector's description is kept when it resolves). | +| `stream_idle_timeout` | duration/int | ✗ | Maximum silence between stream chunks; overrides `runtime.stream_idle_timeout`. See [Stream idle timeout](#stream-idle-timeout). | | `temperature` | float | ✗ | Sampling randomness. Range is provider-dependent — typically `0.0–2.0` (Anthropic caps at `1.0`). `0.0` is deterministic. | | `max_tokens` | int | ✗ | Maximum response length in tokens | | `top_p` | float | ✗ | Nucleus sampling threshold (`0.0–1.0`) | @@ -78,10 +123,12 @@ models: | `capabilities` | object | ✗ | Override attachment (input) capabilities for this model. See [Attachment Capability Overrides](#attachment-capability-overrides). | | `output_capabilities` | object | ✗ | Override generative output capabilities for this model, e.g. image generation. Omitted flags are detected from models.dev; explicit values take precedence. Cannot be combined with `first_available`. See [Output Capabilities](#output-capabilities). | | `cost` | object | ✗ | Explicit token pricing in USD per 1M tokens, overriding the built-in catalogue. See [Custom Token Pricing](#custom-token-pricing). | +| `context_window` | int | ✗ | Context window of the model in tokens. Metadata for accounting, compaction and `max_tokens` clamping; never sent to the provider. Must not exceed the models.dev window for the model. Cannot be combined with `first_available`. See [Context Window](#context-window). | | `provider_opts` | object | ✗ | Provider-specific options (see provider pages) | | `title_model` | string | ✗ | Model used for session-title generation. Can be a named model from the `models:` section or an inline `provider/model` string. When omitted, the agent's primary model generates titles. Cannot be combined with `first_available`. | | `compaction_model` | string | ✗ | Model used for session compaction (summary generation). Can be a named model or an inline `provider/model` string. The agent-level `compaction_model` takes precedence over this value, which in turn takes precedence over a provider-level default. When none is set, the primary model compacts. Cannot be combined with `first_available`. See the [Context & Compaction guide](../../guides/compaction/index.md). | -| `compaction_threshold` | float | ✗ | Fraction of the context window at which proactive auto-compaction triggers for agents running this model. Must be greater than `0` and at most `1`. Takes precedence over the agent-level `compaction_threshold`. Cannot be combined with `first_available`. Default: `0.9`. See the [Context & Compaction guide](../../guides/compaction/index.md). | +| `compaction_threshold` | float | ✗ | Fraction of the context window at which proactive auto-compaction triggers for agents running this model. Must be greater than `0` and at most `1`. Takes precedence over any agent-level threshold. Cannot be combined with `compaction_threshold_tokens` or `first_available`. Default: `0.9`. See the [Context & Compaction guide](../../guides/compaction/index.md). | +| `compaction_threshold_tokens` | int | ✗ | Absolute token count at which proactive auto-compaction triggers for agents running this model (capped at the model's context window). Must be greater than `0`. Takes precedence over any agent-level threshold. Cannot be combined with `compaction_threshold` or `first_available`. See the [Context & Compaction guide](../../guides/compaction/index.md). | | `bypass_models_gateway` | boolean | ✗ | When `true`, this model connects directly to its provider even when a models gateway (`--models-gateway` / `DOCKER_AGENT_MODELS_GATEWAY`) is configured. Implied by a custom `base_url`. See [Gateway Bypass](#gateway-bypass). | Built-in provider IDs use models.dev names: `fireworks-ai`, `togetherai`, @@ -232,7 +279,7 @@ models: # Also works for catalogued models, e.g. a negotiated enterprise discount: discounted-sonnet: provider: anthropic - model: claude-sonnet-4-5 + model: claude-sonnet-5-5 cost: input: 2.4 output: 12.0 @@ -254,6 +301,107 @@ models instead). See [`examples/custom-pricing.yaml`](https://github.com/docker/docker-agent/blob/main/examples/custom-pricing.yaml) for a complete example. +## Context Window + +A model's context window drives context-usage accounting, the automatic +compaction threshold, and `max_tokens` clamping. Hosted models get it from the +[models.dev](https://models.dev/) catalogue. Custom endpoints (for example an +`openai_responses` or `openai_chatcompletions` provider with a `base_url`) and +local models often are not in the catalogue, so declare the window yourself: + +```yaml +version: "16" + +providers: + gateway: + api_type: openai_responses + base_url: https://gateway.example.com/v1 + token_key: GATEWAY_API_KEY + +models: + gateway_model: + provider: gateway + model: my-hosted-model + context_window: 200000 # context window in tokens +``` + +`context_window` is **metadata only**. It is never forwarded as a request +parameter, and it never configures the Docker Model Runner engine. + +Precedence for the context window of a model, highest first: + +1. The model-level `context_window`. This is the window for every provider. +2. For the `dmr` provider only, `provider_opts.context_size`. It also sizes the + DMR engine (see [Docker Model Runner](../../providers/dmr/index.md#context-size)), + so it must equal `context_window` when both are set. +3. The window discovered at runtime (for example from the Docker Model Runner + API). +4. The models.dev catalogue. + +`provider_opts.context_size` is **not** read for any other provider. Setting it +on a model that runs on a non-DMR provider (including a `providers:` alias +backed by `openai_responses`, `openai_chatcompletions` or `anthropic`) fails +validation with a message pointing to `context_window`. Move the value to the +model's `context_window` instead, and update the top-level `version` to `"16"` +when migrating an older config: earlier versions reject `context_window` before +migration. If the value is inherited from +`providers..provider_opts.context_size`, remove it from that provider and +set `context_window` on each model using it. Replace inline `provider/model` +references with named entries in `models` when they need a declared window. + +If none applies, the window is unknown: context usage cannot be shown as a +percentage and compaction cannot run. Compaction then reports a session warning +naming the model and asking for `context_window`. Pair a dedicated +`compaction_model` with its own `context_window` when its window is unknown. + +### Compaction thresholds + +`context_window` is capacity, not a fixed-token trigger. `compaction_threshold` +(default `0.9`) or `compaction_threshold_tokens` on the model or agent sets the +blocking compaction threshold against the effective window. Background +compaction (user setting, default `70%`) is a percentage of that blocking +threshold. With `context_window: 200000` and defaults, the foreground trigger +fires above 180,000 tokens and background compaction starts above 126,000 +tokens; the context gauge and `/context` use the same limit. + +A dedicated `compaction_model` caps that limit at the smaller window so the summary +call can ingest the conversation. A 32,000-token compaction model paired with a +200,000-token primary triggers above 28,800 tokens at `0.9`. A larger compaction +window never raises the primary limit; if only one window is known, it is used. +See the [Context & Compaction guide](../../guides/compaction/index.md). + +Validation rejects: + +- a `context_window` that is not a positive integer; +- a DMR `provider_opts.context_size` that conflicts with the model-level value; +- `provider_opts.context_size` on a non-DMR provider. Custom providers and + aliases are judged by the provider they run (an alias backed by + `openai_responses` is non-DMR). The error names the field to move; +- a `context_window` above the context window the models.dev catalogue declares + for the model. The check applies provider defaults and environment expansion + and uses the runtime's catalogue identity, including the original display name + retained during alias resolution. Vertex Model Garden uses `anthropic` for + Anthropic publishers and `google-vertex` for other publishers, retaining their + publisher-prefixed model names; API dispatch remains separate. The check + compares the raw catalogue limit, so the declared value cannot hide a + conflict. The error identifies the model or construction reference, + `context_window`, and the catalogue maximum. + +A model the catalogue has no context limit for (custom endpoints, local models, +uncatalogued names) accepts any positive `context_window`; no cap is guessed. +Fallback, title, compaction, and routing models are checked when constructed, +including inherited provider options on inline references. This does not traverse +unused providers or recursively load auxiliary references on auxiliary models. + +Config loading requires an available models.dev catalogue when a model declares +`context_window`; this is different from an available catalogue that has no limit +for the model. Standalone provider construction (including RAG and SDK callers) +without a catalogue still validates positive windows and DMR/provider-option +constraints, and checks catalogue caps when a store is supplied. + +A `context_window` also cannot be set on a `first_available` selector; set it on +the candidate models instead. + ## Delegating Session-Title Generation The `title_model` field lets a heavyweight primary model hand off the cheap @@ -287,7 +435,7 @@ compaction (summary generation) call to a smaller, faster model: models: primary: provider: anthropic - model: claude-sonnet-4-5 + model: claude-sonnet-5-5 compaction_model: fast fast: provider: anthropic @@ -327,7 +475,7 @@ agent, and automatic compaction can be disabled entirely per agent with models: primary: provider: anthropic - model: claude-sonnet-4-5 + model: claude-sonnet-5-5 compaction_model: fast # Compact at 80% of the window instead of the default 90%. compaction_threshold: 0.8 @@ -357,7 +505,7 @@ models: direct-model: provider: anthropic - model: claude-sonnet-4-5 + model: claude-sonnet-5-5 bypass_models_gateway: true # uses ANTHROPIC_API_KEY directly ``` @@ -435,9 +583,9 @@ Control how much reasoning the model does before responding with `thinking_budge models: claude: provider: anthropic - model: claude-sonnet-4-5 + model: claude-sonnet-5-5 max_tokens: 32768 - thinking_budget: 16384 + thinking_budget: high ``` ### OpenAI @@ -452,7 +600,7 @@ Use an integer token budget or an adaptive effort setting, depending on the mode Use an integer token budget. See [Gemini thinking budgets](../../providers/google/index.md#thinking-budget) for defaults, limits, and dynamic thinking. -### Google Gemini 3 +### Google Gemini 3+ Use a string effort level. See [Gemini thinking budgets](../../providers/google/index.md#thinking-budget) for supported values and examples. @@ -462,7 +610,7 @@ Use a string effort level. See [Gemini thinking budgets](../../providers/google/ thinking_budget: none # or 0 ``` -`none` and `0` both clear Docker Agent's local thinking configuration (omitting `thinking_budget` has the same effect). Whether that reaches the API as a real "off" switch depends on the model — see [Disabling Thinking](../../guides/thinking/index.md#disabling-thinking) in the guide. +`none` and `0` request disabled thinking, but their effect depends on the model. Omitting `thinking_budget` leaves model defaults in place and is not necessarily equivalent: some Claude models disable thinking explicitly, while those that require it use adaptive thinking with low effort. See [Disabling Thinking](../../guides/thinking/index.md#disabling-thinking) in the guide. ## Task Budget @@ -558,7 +706,7 @@ for a complete local-server configuration. ## Custom HTTP Headers For OpenAI-compatible providers (`openai`, `github-copilot`, `mistral`, `xai`, -`nebius`, `nvidia`, `minimax`, `baseten`, `daoxe`, `ovhcloud`, `groq`, `fireworks-ai`, `deepseek`, `cerebras`, `togetherai`, `huggingface`, `moonshotai`, `vercel`, `cloudflare-workers-ai`, `cloudflare-ai-gateway`, `requesty`, `openrouter`, `atlascloud`, `ollama`, and any custom provider using the OpenAI API), +`nebius`, `nvidia`, `minimax`, `baseten`, `daoxe`, `ovhcloud`, `groq`, `fireworks-ai`, `deepseek`, `cerebras`, `togetherai`, `huggingface`, `moonshotai`, `vercel`, `cloudflare-workers-ai`, `cloudflare-ai-gateway`, `requesty`, `openrouter`, `opper`, `runcrate`, `lunaroute`, `orcarouter`, `atlascloud`, `popnow`, `cloudgpu`, `obscurify`, `hopbase`, `straitly`, `morse`, `ollama`, and any custom provider using the OpenAI API), `provider_opts.http_headers` adds arbitrary HTTP headers to every outgoing request: @@ -590,7 +738,7 @@ models: # Anthropic claude: provider: anthropic - model: claude-sonnet-4-5 + model: claude-sonnet-5-5 max_tokens: 64000 # Google Gemini @@ -602,7 +750,7 @@ models: # AWS Bedrock bedrock: provider: amazon-bedrock - model: global.anthropic.claude-sonnet-4-5-20250929-v1:0 + model: global.anthropic.claude-sonnet-5-5 provider_opts: region: us-east-1 diff --git a/_vendor/github.com/docker/docker-agent/docs/configuration/overview/index.md b/_vendor/github.com/docker/docker-agent/docs/configuration/overview/index.md index 47ce1666e167..738fe4958fec 100644 --- a/_vendor/github.com/docker/docker-agent/docs/configuration/overview/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/configuration/overview/index.md @@ -17,7 +17,7 @@ A Docker Agent config can be written in YAML or HCL. The examples on this page u A Docker Agent config has these main sections: -```bash +```yaml # 1. Version — configuration schema version (optional but recommended) version: 16 @@ -31,7 +31,7 @@ metadata: models: claude: provider: anthropic - model: claude-sonnet-4-5 + model: claude-sonnet-5-5 max_tokens: 64000 # 4. Agents — define AI agents with their behavior (at least one is required) @@ -50,6 +50,7 @@ rag: strategies: - type: chunked-embeddings embedding_model: openai/text-embedding-3-small + vector_dimensions: 1536 # 6. MCPs — reusable MCP server definitions (optional) mcps: @@ -155,7 +156,7 @@ See [Provider Credentials](../../providers/overview/index.md#provider-credential | `DOCKER_AGENT_HIDE_TELEMETRY_BANNER`| Set to `1` to suppress the first-run telemetry notice. | | `DOCKER_AGENT_AUTO_UPDATE` | Set to a truthy value (`1`, `true`, `yes`, `on`) to let standalone release binaries self-update before running. See [Optional Self-Updates](../../getting-started/installation/index.md#optional-self-updates). | | `DOCKER_AGENT_NO_TOKEN_EXCHANGE` | Set to `1` to stop Docker Agent from exchanging the access token stored by `docker login` for a Docker token. See [Docker authentication](../../guides/secrets/index.md#docker-authentication). | -| `DOCKER_AGENT_HUB_LOGIN_URL` | Point the token exchange at a Docker staging environment. Ignored unless it is an HTTPS `docker.com` URL. | +| `DOCKER_AGENT_HUB_LOGIN_URL` | Point the token exchange at a Docker staging environment. Ignored unless it is an HTTPS `docker.com` URL. A staging host, such as `hub-stage.docker.com`, also makes Docker Agent read staging sessions from the Docker secrets engine. | | `DOCKER_AGENT_DISABLE_DESKTOP_PROXY` | Set to a truthy value (`1`, `true`, `yes`, `on`) to bypass Docker Desktop's PAC adapter per request and restore standard `HTTP_PROXY`/`HTTPS_PROXY`/`ALL_PROXY`/`NO_PROXY` routing. | > [!NOTE] @@ -278,13 +279,13 @@ Docker Agent validates your configuration at startup: - Named model references must exist in the `models` section - Provider names must be valid (`openai`, `anthropic`, `google`, `dmr`, etc.) - Required environment variables (API keys) must be set -- Tool-specific fields are validated (e.g., `path` is only valid for `memory`) +- Tool-specific fields are validated (e.g., `path` is only valid for `memory` and `tasks`) ## JSON Schema For YAML editor autocompletion and validation, use the [Docker Agent JSON Schema](https://github.com/docker/docker-agent/blob/main/agent-schema.json). Add this to the top of your YAML file: -```bash +```yaml # yaml-language-server: $schema=https://raw.githubusercontent.com/docker/docker-agent/main/agent-schema.json ``` @@ -447,7 +448,7 @@ providers: provider: anthropic token_key: TEAM_ANTHROPIC_KEY max_tokens: 32768 - thinking_budget: 16384 + thinking_budget: high models: azure_gpt: @@ -456,7 +457,7 @@ models: claude: provider: team_anthropic - model: claude-sonnet-4-5 + model: claude-sonnet-5-5 # Inherits max_tokens, thinking_budget from provider agents: @@ -467,7 +468,7 @@ agents: | Field | Description | | --------------------- | ---------------------------------------------------------------------------------------- | | `provider` | Underlying provider type: `openai` (default), `anthropic`, `google`, `amazon-bedrock`, etc. | -| `api_type` | API schema: `openai_chatcompletions` (default) or `openai_responses`. OpenAI-only. | +| `api_type` | API schema: `openai_chatcompletions` or `openai_responses`. If omitted, selected from the model: Responses for supported newer OpenAI models, Chat Completions otherwise. Applies to OpenAI-compatible providers. | | `base_url` | Base URL for the API endpoint. Required for OpenAI-compatible providers. | | `token_key` | Environment variable name for the API token. | | `temperature` | Default sampling temperature. | @@ -494,13 +495,13 @@ Reuse a value verbatim with an anchor and an alias: ```yaml agents: root: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: Coordinator. instruction: &house_rules | You are part of the Acme engineering team. Cite the files you looked at and keep changes minimal. reviewer: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: Reviews code changes. instruction: *house_rules # the same instruction, declared once ``` @@ -510,7 +511,7 @@ Compose a block with a merge key (`<<`), then override individual fields: ```yaml agents: reviewer: &specialist - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: Reviews code changes. instruction: | You are a meticulous software professional. diff --git a/_vendor/github.com/docker/docker-agent/docs/configuration/permissions/index.md b/_vendor/github.com/docker/docker-agent/docs/configuration/permissions/index.md index b04b6a5bfefa..932669cb0e05 100644 --- a/_vendor/github.com/docker/docker-agent/docs/configuration/permissions/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/configuration/permissions/index.md @@ -6,8 +6,6 @@ weight: 70 canonical: https://docs.docker.com/ai/docker-agent/configuration/permissions/ --- -_Control which tools can execute automatically, require confirmation, or are blocked entirely._ - ## Overview Permissions provide fine-grained control over tool execution. You can configure which tools are auto-approved (run without asking), which require user confirmation, and which are completely blocked. @@ -70,6 +68,8 @@ For a **new** root session the first source in this order wins: **Resuming a session never re-applies defaults**: the stored mode is kept unless you pass an explicit `--safety` or `--yolo` flag for that run. Agent switches, handoffs, and delegated sub-agent sessions inherit the active session's mode rather than resetting it. +Delegation wrappers (`transfer_task`, `handoff`, `run_skill`) carry a read-only annotation: by default, launching a sub-session does not prompt by itself. Strict mode still evaluates the launch like any other call, a session-scoped `ask` rule or mandatory guard can still require confirmation, and balanced mode keeps the default `pre_tool_use` deny veto. Every tool call inside the sub-session is evaluated against that session's inherited safety mode and permissions. A fork skill whose toolsets start background work (for example a stdio MCP server) asks before starting them, except under strict (already approved at launch) and autonomous. + Sessions created through the API (`POST /api/sessions`) without a `safety_policy` receive the author-declared defaults (5–6) when their first run starts — the earliest point the agent configuration is loaded. If the server restarts before that first run, the session keeps the historical unset default (7). > [!WARNING] @@ -120,6 +120,8 @@ permissions: The three lists are evaluated in order `deny` → `allow` → `ask`. An `ask:` entry does not override a matching allow rule; narrow or remove the allow rule where confirmation is required. Team-level asks also yield to the active safety mode as described above. +When an `ask:` pattern is provably shadowed by an `allow:` pattern — an unconditional `*` allow, or an argument-free allow whose tool name matches the ask's tool name — Docker Agent logs a warning at startup naming both patterns, since the ask rule can never prompt. Normal runs discard log output, so the warning is only recorded when you run with `--debug`; it is written to the debug log (`~/.cagent/cagent.debug.log` by default, or the path given with `--log-file`) rather than printed to the terminal. A silent startup therefore does not prove that no rule is shadowed. The check is conservative: it does not report glob ask patterns (other than against a `*` allow) or argument-scoped allow patterns. + ## Global Permissions Global permissions let you enforce rules across **all** agents, regardless of which agent config you run. Define them in your user config file: @@ -255,28 +257,39 @@ permissions: - "shell" ``` -### Safe Shell Agent +### Shell Agent with Safety Classification -Allow specific safe commands, block dangerous ones: +Use balanced safety without broad command-prefix allows: ```yaml -permissions: - allow: - - "shell:cmd=ls*" - - "shell:cmd=cat*" - - "shell:cmd=grep*" - - "shell:cmd=find*" - - "shell:cmd=head*" - - "shell:cmd=tail*" - - "shell:cmd=wc*" - deny: - - "shell:cmd=sudo*" - - "shell:cmd=rm*" - - "shell:cmd=mv*" - - "shell:cmd=chmod*" - - "shell:cmd=chown*" +runtime: + safety: balanced ``` +Balanced runs positively classified safe calls automatically and asks for approval +for unknown or destructive calls; it does not automatically deny them. This applies +to both `shell` and `run_background_job`. + +Explicit allow grants authorize matching arguments and override the safety mode's +fallback, including strict and restricted. For example, `shell:cmd=find*` also +authorizes `find / -exec rm -rf {} +` and +`find . -maxdepth 1 -name seed -exec sh -c 'touch marker' {} +`. A command name +alone does not establish that its arguments are safe. Avoid these broad grants +when you want classification to decide whether approval is needed. + +For these two builtin command tools, allow rules whose `cmd` value is a literal +followed by a single `*` reject shell chaining, redirection, and substitutions. +Command-name prefixes such as `cmd=ls*` additionally require a token boundary, +so they do not authorize `lsanything`. Argument and path prefixes such as +`cmd=ls *`, `cmd=git commit *`, and `cmd=ls /tmp/*` retain prefix matching. +Ordinary colons in values (quoted filenames or URLs) remain literal; only +`:key=` introduces another condition. + +This hardening does not inspect execution or write options such as `find -exec`. +Other glob shapes (`cmd=ls**`, `cmd=[l]s*`) and the `command=ls*` condition +retain generic matching and can authorize compound commands. Bare-tool grants, +`cmd=*`, and exact compound-command grants also remain broad explicit opt-ins. + ### MCP Tool Permissions Control MCP tools by their qualified names: diff --git a/_vendor/github.com/docker/docker-agent/docs/configuration/routing/index.md b/_vendor/github.com/docker/docker-agent/docs/configuration/routing/index.md index b96cf4054f54..863bfdb96091 100644 --- a/_vendor/github.com/docker/docker-agent/docs/configuration/routing/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/configuration/routing/index.md @@ -6,8 +6,6 @@ weight: 100 canonical: https://docs.docker.com/ai/docker-agent/configuration/routing/ --- -_Route requests to different models based on the content of user messages._ - ## Overview Model routing lets you define a "router" model that automatically selects the best underlying model based on the user's message. This is useful for cost optimization, specialized handling, or load balancing across models. @@ -30,7 +28,7 @@ models: # Routing rules routing: - - model: anthropic/claude-sonnet-4-5 + - model: anthropic/claude-sonnet-5-5 examples: - "Write a detailed technical document" - "Help me architect this system" @@ -104,7 +102,7 @@ models: provider: openai model: gpt-5-mini # Cheap fallback routing: - - model: anthropic/claude-sonnet-4-5 + - model: anthropic/claude-sonnet-5-5 examples: - "Complex analysis" - "Detailed research" @@ -121,7 +119,7 @@ models: provider: openai model: gpt-5-mini # General fallback routing: - - model: anthropic/claude-sonnet-4-5 + - model: anthropic/claude-sonnet-5-5 examples: - "Write code" - "Debug this function" @@ -144,7 +142,7 @@ models: provider: openai model: gpt-5-mini routing: - - model: anthropic/claude-sonnet-4-5 + - model: anthropic/claude-sonnet-5-5 examples: - "First request pattern" - "Another request type" @@ -165,8 +163,8 @@ $ docker agent run config.yaml --debug Look for log entries like: ```text -"Rule-based router selected model" router=smart_router selected_model=anthropic/claude-sonnet-4-5 -"Route matched" model=anthropic/claude-sonnet-4-5 +"Rule-based router selected model" router=smart_router selected_model=anthropic/claude-sonnet-5-5 +"Route matched" model=anthropic/claude-sonnet-5-5 ``` > [!WARNING] diff --git a/_vendor/github.com/docker/docker-agent/docs/configuration/sandbox/index.md b/_vendor/github.com/docker/docker-agent/docs/configuration/sandbox/index.md index fb2a4e704775..e48bbef570a2 100644 --- a/_vendor/github.com/docker/docker-agent/docs/configuration/sandbox/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/configuration/sandbox/index.md @@ -6,15 +6,11 @@ weight: 80 canonical: https://docs.docker.com/ai/docker-agent/configuration/sandbox/ --- -_Run agents in an isolated [Docker sandbox VM](https://docs.docker.com/ai/sandboxes/)._ - ## Overview Sandbox mode integrates Docker Agent with [Docker Sandboxes](https://docs.docker.com/ai/sandboxes/). -Docker Agent prefers the standalone `sbx` CLI when available and otherwise -uses the `docker sandbox` CLI plugin. `--sbx=false` forces the plugin backend. -The `--sandbox` flag asks the selected backend to create or reuse a VM and -launches Docker Agent inside it. +With `--sandbox`, Docker Agent uses the standalone `sbx` CLI to create or +reuse a VM and launch the agent inside it. For local sandboxes, agent processes run inside the VM and the working directory is mounted read-write. The Docker Agent configuration directory and staged kit are mounted read-only; @@ -22,14 +18,14 @@ resolved built-in agent definitions are also staged read-only so guest aliases c for a local agent config outside the working directory, its parent directory is also mounted read-only. An agent config inside the working directory remains on the read-write mount. Files exposed through these mounts remain accessible to the agent. Docker Agent does not implement the sandbox or -start a raw `docker run` container; it orchestrates the selected sandbox CLI. +start a raw `docker run` container; it orchestrates `sbx`. > [!NOTE] > **Requirements** > > Install and configure [Docker Sandboxes](https://docs.docker.com/ai/sandboxes/) before -> using `--sandbox`. The standalone `sbx` CLI is optional if `docker sandbox` is available. -> Cloud mode requires a cloud-enabled build of the selected CLI and a Docker login; it does not require a local Docker Desktop VM. Kits v3 require a v3-capable sbx release. +> using `--sandbox`, and make sure the standalone `sbx` CLI is on your `PATH`. +> Cloud mode requires a cloud-enabled build of `sbx` and a Docker login; it does not require a local Docker Desktop VM. Kits v3 require a v3-capable sbx release. ## Usage @@ -39,8 +35,8 @@ Enable sandbox mode with the `--sandbox` flag on the `docker agent run` command: docker agent run --sandbox agent.yaml ``` -Docker Agent asks the selected sandbox backend to launch or reuse a sandbox VM, mounts the current -working directory, and runs the agent inside it. +Docker Agent asks `sbx` to launch or reuse a sandbox VM, mount the current +working directory, and run the agent inside it. ## Flags @@ -48,7 +44,6 @@ working directory, and runs the agent inside it. | ------------- | -------------------------------------------- | --------------------------------------------------------------------------------------------------------- | | `--sandbox` | `false` | Enable sandbox mode. | | `--template` | `docker/docker-agent-sbx-templates:latest` | Local OCI image, or an existing cloud template name with `--cloud`. The local default is not forwarded in cloud mode. See [Sandbox templates](#sandbox-templates). | -| `--sbx` | `true` | Prefer standalone `sbx` when available; set `--sbx=false` to force `docker sandbox`. | | `--cloud` | `false` | Run in the cloud; implies `--sandbox`. No automatic host workspace/config upload. | | `--sandbox-kit` | unset | Workload kit reference, passed as sbx's positional launch source. Mutually exclusive with `--template`. | | `--kit` | unset | Additional mixin kit reference; repeatable. | @@ -98,7 +93,7 @@ weakening a kit's restrictions or silently copying local credentials. Any provider, registry, or tool endpoint the agent needs must be reachable under the cloud policy. CLI-specified model, safety, flavor, and prompt options still apply. -Docker Agent uses `sbx --cloud run --detached`, then `exec`: this supports sbx's +Docker Agent uses `sbx --cloud run --detach`, then `exec`: this supports sbx's v3 source builds and multi-kit assembly without launching a second agent TUI. Provisioning messages go to stderr, leaving stdout for the agent (including `--json` output). Piped/headless execution does not allocate a TTY. @@ -341,7 +336,7 @@ docker agent run --sandbox agent.yaml ## How local sandbox mode works -1. `--sandbox` tells Docker Agent to invoke standalone `sbx` when available, or `docker sandbox` otherwise. +1. `--sandbox` tells Docker Agent to invoke the standalone `sbx` CLI. 2. A new sandbox VM is created from the image passed via `--template`. 3. The current working directory is mounted into the VM; the image or workload kit supplies the agent binary. 4. The [auto-kit](#auto-kit) is staged on the host and bind-mounted read-only into the VM, so the agent sees its skills and prompt files inside the sandbox. @@ -367,10 +362,10 @@ This host auto-kit is distinct from an sbx workload/mixin kit. It is built for l For the agent referenced on the command line, the kit collects: - **Local [skills](../../features/skills/index.md)** — every `SKILL.md` discovered on the host (global `~/.codex/skills/`, `~/.claude/skills/`, `~/.agents/skills/`, plus project `.claude/skills/`, `.github/skills/` and `.agents/skills/`) is copied under `/skills//`. The in-sandbox skills loader reads from the kit instead of the (non-existent) host `$HOME`. -- **Prompt files** — every file referenced via the agent's `add_prompt_files` (`AGENTS.md`, `CLAUDE.md`, …) is collected. Files that already live under the working directory are left alone (the live workspace mount surfaces them); files outside it (e.g. an `AGENTS.md` in `$HOME`) are copied under `/prompt_files/`. +- **Prompt files** — every file referenced via the agent's `add_prompt_files` (`AGENTS.md`, `CLAUDE.md`, …) is collected. Paths under the working directory are left to the live workspace mount, even when a file or intermediate directory is a symlink pointing outside it. Such links do not cause their host targets to be copied into the kit and may be unreadable inside the sandbox. Files discovered outside the workspace (e.g. an `AGENTS.md` in `$HOME` or a parent directory) are still copied under `/prompt_files/`, unless they resolve into the workspace. - **A manifest** — `/manifest.json` records what was staged. The on-disk copy is sanitised so it cannot be used to map the host filesystem from inside the sandbox. -Before launch, Docker Agent prints a summary of what was staged so you can see exactly which skills and prompt files the agent will have access to inside the sandbox. +Before launch, Docker Agent prints a summary of staged skills and prompt files, plus prompt-file paths left to the workspace mount. A workspace entry does not guarantee that its symlink target is accessible inside the sandbox. When building a kit, `add_prompt_files` entries must be local relative paths (e.g. `AGENTS.md` or `instructions/AGENTS.md`), not absolute paths or paths diff --git a/_vendor/github.com/docker/docker-agent/docs/configuration/structured-output/index.md b/_vendor/github.com/docker/docker-agent/docs/configuration/structured-output/index.md index 1092dbfff410..55914d1ea1bf 100644 --- a/_vendor/github.com/docker/docker-agent/docs/configuration/structured-output/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/configuration/structured-output/index.md @@ -6,20 +6,10 @@ weight: 90 canonical: https://docs.docker.com/ai/docker-agent/configuration/structured-output/ --- -_Force the agent to respond with JSON matching a specific schema._ - ## Overview Structured output constrains the agent's responses to match a predefined JSON schema. This is useful for building agents that need to produce machine-readable output for downstream processing, API responses, or integration with other systems. -> [!NOTE] -> **When to Use** -> -> - Building API endpoints that need consistent JSON responses -> - Data extraction and transformation pipelines -> - Agents that feed into other automated systems -> - Ensuring predictable output format for parsing - ## Configuration ```yaml @@ -220,7 +210,7 @@ agents: ```yaml agents: classifier: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: Classify support tickets instruction: | Classify the support ticket into the appropriate category @@ -252,4 +242,4 @@ agents: > [!WARNING] > **Tool Limitations** > -> When using native structured output, the agent typically cannot use tools since its response format is constrained to the schema. Design your agent workflow accordingly — native structured output agents work best for single-turn analysis or extraction tasks. Use `mode: tool` when the agent needs to call tools before producing its schema-constrained final answer. +> Native structured output can coexist with tool calls when the provider and model support both; Docker Agent sends the tools alongside the output schema. Check your provider's restrictions rather than assuming tools are disabled. Use `mode: tool` when native schemas are unsupported or you want the final response submitted through an explicit output tool. diff --git a/_vendor/github.com/docker/docker-agent/docs/configuration/telemetry/index.md b/_vendor/github.com/docker/docker-agent/docs/configuration/telemetry/index.md index 55cdfdf7ea88..4c4f66dc6759 100644 --- a/_vendor/github.com/docker/docker-agent/docs/configuration/telemetry/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/configuration/telemetry/index.md @@ -10,10 +10,12 @@ aliases: _Docker Agent collects usage data to help improve the tool. Telemetry can be disabled at any time._ -On first startup, Docker Agent displays a notice about telemetry collection so you're always informed. Ordinary telemetry events are sent asynchronously; selected error events are sent synchronously before exit. +On first startup, Docker Agent displays a notice about telemetry collection. Ordinary telemetry events are sent asynchronously; selected error events are sent synchronously before exit. ## Disabling Telemetry +Telemetry is **enabled by default**. Set `TELEMETRY_ENABLED=false` to opt out: + ```bash # Disable via environment variable $ TELEMETRY_ENABLED=false docker agent run agent.yaml @@ -22,11 +24,6 @@ $ TELEMETRY_ENABLED=false docker agent run agent.yaml $ export TELEMETRY_ENABLED=false ``` -> [!NOTE] -> **Default** -> -> Telemetry is **enabled by default**. Set `TELEMETRY_ENABLED=false` to opt out. - ## What's Collected ✅ - Command names, positional arguments, and success/failure status diff --git a/_vendor/github.com/docker/docker-agent/docs/configuration/tools/index.md b/_vendor/github.com/docker/docker-agent/docs/configuration/tools/index.md index e115044986f8..e6bd10b820de 100644 --- a/_vendor/github.com/docker/docker-agent/docs/configuration/tools/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/configuration/tools/index.md @@ -9,8 +9,6 @@ aliases: - /ai/docker-agent/reference/toolsets/ --- -_Complete reference for configuring built-in tools, MCP tools, and Docker-based tools._ - ## Built-in Tools Built-in tools are included with Docker Agent and require no external dependencies. Add them to your agent's `toolsets` list by `type`. Each tool's dedicated page covers its full configuration options, available operations, and examples. @@ -23,7 +21,7 @@ Built-in tools are included with Docker Agent and require no external dependenci | `shell` | Execute shell commands synchronously | [Shell](../../tools/shell/index.md) | | `background_jobs` | Run and manage long-running shell commands | [Background Jobs](../../tools/background-jobs/index.md) | | `scheduler` | Schedule instructions to run at a time or on a recurring interval | [Scheduler](../../tools/scheduler/index.md) | -| `environment` | Report the OS and resolved shell (read-only, no arguments, auto-approved) | [Environment](../../tools/environment/index.md) | +| `environment` | Report the OS and resolved shell (read-only, no arguments; subject to approval policy) | [Environment](../../tools/environment/index.md) | | `datetime` | Current date and time in a model-chosen format and timezone (read-only) | [Date and Time](../../tools/datetime/index.md) | | `calculator` | Exact arithmetic without code execution | [Calculator](../../tools/calculator/index.md) | | `think` | Reasoning scratchpad | [Think](../../tools/think/index.md) | @@ -134,10 +132,6 @@ Where the aqua registry includes a checksum manifest, downloaded binaries are ve - **Unsupported or weak checksum types (e.g. md5, sha1)** — skipped with a warning; installation proceeds without verification. - **No manifest** — if no checksum is advertised in the registry entry, the binary is installed without verification. -### version_overrides Resolution - -The auto-installer correctly resolves **`version_overrides`** entries in the aqua registry. Many common tools (for example, `fzf`) keep their package configuration — including download URLs and checksums — under `version_overrides` rather than at the top level of their registry entry. These tools previously failed to install silently; they are now handled correctly. - ### Disabling Auto-Install **Per toolset** — set `version` to `"false"` or `"off"`: @@ -168,6 +162,63 @@ Installed binaries are placed in `~/.cagent/tools/bin/` and cached so they are o > [!TIP] > Auto-install supports both Go packages (via `go install`) and GitHub release binaries (via archive download). The aqua registry metadata determines which method is used. +## Experimental MCP Events + +MCP Events push subscriptions (proposed SEP-3415) are disabled by default. +Enable them globally in `~/.config/cagent/config.yaml`: + +```yaml +settings: + experimental: + mcp_events: true +``` + +Compatible servers expose event discovery, subscription, and cancellation tools. +Events enter the agent's recall/steering queue. Push delivery supports stdio and +Streamable HTTP; polling, webhooks, and legacy SSE are not supported. +See [`examples/mcp-events`](https://github.com/docker/docker-agent/tree/main/examples/mcp-events) +for runnable demos. + +## Experimental MCP Skills + +MCP Skills (`io.modelcontextprotocol/skills`, SEP-2640) are disabled by default. +Enable them globally in `~/.config/cagent/config.yaml`: + +```yaml +settings: + experimental: + mcp_skills: true +``` + +When an MCP server declares `resources` and the `io.modelcontextprotocol/skills` +extension under protocol `2026-07-28`, docker-agent integrates its skills into +the built-in skills system (`read_skill`, `read_skill_file`, and +``) under origin-scoped `mcp:/` identifiers. +Skill files are verified against their manifest size, SHA-256 digest, and YAML +frontmatter before entering model context, and are tagged as untrusted external +data without granting `allowed-tools` or local command expansion. +See [`examples/mcp-skills`](https://github.com/docker/docker-agent/tree/main/examples/mcp-skills) +for a runnable demo. + +## Experimental MCP Tasks + +MCP Tasks (`io.modelcontextprotocol/tasks`, SEP-2663) are disabled by default. +Enable them globally in `~/.config/cagent/config.yaml`: + +```yaml +settings: + experimental: + mcp_tasks: true +``` + +When enabled over stdio or Streamable HTTP under protocol `2026-07-28`, +docker-agent advertises the `io.modelcontextprotocol/tasks` extension capability +on requests. If a compatible MCP server responds to `tools/call` with a +`CreateTaskResult` (`resultType: "task"`), docker-agent transparently polls +`tasks/get`, fulfills mid-flight `input_required` elicitation requests via +`tasks/update`, sends cooperative `tasks/cancel` on cancellation, and returns +the completed tool result to the model. + ## Toolset Lifecycle Long-running toolsets — local MCP servers (stdio), remote MCP servers (Streamable HTTP / SSE), and LSP servers — are managed by a single supervisor that can auto-reconnect them when they crash, time out, or drop their session. The `lifecycle` block on the toolset lets you tune that supervisor per toolset. It applies to every `type: mcp` and `type: lsp` toolset. @@ -234,7 +285,7 @@ toolsets: > [!NOTE] > **`required` is not yet enforced** > -> The schema validates this field and the supervisor stores it, but no code path acts on it yet. It is documented now so config files written today keep working when the planned eager-startup phase lands. Picking the `strict` profile is forward-compatible — it will start enforcing `required=true` automatically. +> `required` is informational and does not prevent an agent from starting when a toolset is unavailable. ### Inspecting and restarting toolsets at runtime @@ -280,7 +331,7 @@ The `model` field on a toolset overrides which LLM is invoked for the **next tur models: primary: provider: anthropic - model: claude-sonnet-4-5 + model: claude-sonnet-5-5 fast: provider: anthropic model: claude-haiku-4-5 @@ -374,7 +425,7 @@ See [`examples/toolset_instructions.yaml`](https://github.com/docker/docker-agen ## Deferred Tool Loading -Load tools on-demand to speed up agent startup. When a toolset is deferred, its tools are registered lazily — the tool server process is not started until the agent first calls one of its tools. This is useful for large toolsets (e.g., an MCP server with hundreds of tools) where startup time matters. +Expose tool definitions to the model on demand to reduce prompt size. Deferred toolsets still start normally, including their MCP server processes, but their tool definitions stay hidden until activated. This is useful for large toolsets, such as an MCP server with hundreds of tools; it does not delay server startup. ```yaml toolsets: @@ -426,7 +477,7 @@ models: Every deferred tool is then declared to the API with `defer_loading: true` next to a server-executed `tool_search` tool, so the model discovers and calls deferred tools directly, without a `search_tool`/`add_tool` round trip. `search_tool` and `add_tool` stay available. Toolset `tools`, `read_only`, and skill allow-lists apply to the catalog exactly as they do to regular tools, and so do permissions. -The option is ignored, and the legacy behaviour kept, for models without support (only `openai` models that support deferred tools qualify; the `chatgpt` provider and OpenAI-compatible endpoints, including `openai` with a custom `base_url`, do not), on Chat Completions requests, and on fallback models without the option. Agents using `code_mode_tools` keep the legacy behaviour: wrapped tools are reachable through `run_tools_with_javascript`, while todo and repeatable tools remain directly callable. +The option is ignored, and the legacy behaviour kept, for models without support (only `openai` models that support deferred tools qualify; the `chatgpt` provider and OpenAI-compatible endpoints, including `openai` with a custom `base_url` or `OPENAI_BASE_URL`, do not), on Chat Completions requests, and on fallback models without the option. Agents using `code_mode_tools` keep the legacy behaviour: wrapped tools are reachable through `run_tools_with_javascript`, while todo and repeatable tools remain directly callable. Native search also enables ordered response replay, including encrypted reasoning. For native-only workflows, tell the agent to prefer native tool search over `search_tool`/`add_tool`; those tools remain available for fallback models. @@ -437,7 +488,7 @@ See [`examples/deferred_native_tool_search.yaml`](https://github.com/docker/dock ```yaml agents: root: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: Full-featured developer assistant instruction: You are an expert developer. toolsets: diff --git a/_vendor/github.com/docker/docker-agent/docs/configuration/user-settings/index.md b/_vendor/github.com/docker/docker-agent/docs/configuration/user-settings/index.md index a0a689b9bff7..eb8c328e2a50 100644 --- a/_vendor/github.com/docker/docker-agent/docs/configuration/user-settings/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/configuration/user-settings/index.md @@ -7,8 +7,6 @@ weight: 110 canonical: https://docs.docker.com/ai/docker-agent/configuration/user-settings/ --- -_Full reference for the global settings block in your user config file._ - ## Where Settings Live Docker Agent reads a single user-level config file, independent of any agent YAML: @@ -40,7 +38,9 @@ You rarely need to hand-edit this file. Most fields are managed from the TUI's ` | `expand_thinking` | boolean | `false` | Start new sessions with thinking/tool blocks expanded instead of collapsed. | | `split_diff_view` | boolean | `true` | Render file-edit diffs side-by-side instead of unified. | | `render_images` | boolean | `true` | Render images in the TUI using the Kitty graphics protocol. Applies to both tool-result images and Markdown images in agent responses. Automatically disabled when the terminal does not support Kitty. | -| `show_banner` | boolean | `true` | Show the ASCII-art startup banner on an empty conversation. Applies to both the full TUI and the [lean TUI](../../features/tui/index.md#lean-tui). Managed from the **Appearance** tab of `/settings`. | +| `show_banner` | boolean | `true` | Show the braille wordmark startup banner. In the full TUI it appears on an empty conversation; in the [lean TUI](../../features/tui/index.md#lean-tui) it is printed at the start of the transcript, before any resumed session. Managed from the **Appearance** tab of `/settings` in the full TUI; the lean TUI's `/settings` panel has a *Show startup banner* toggle (labeled "next launch") that is saved for future launches. Unlike other settings marked **next launch**, saving it also adds or removes the banner in the current session, but only while the session's welcome block is still in the transcript: it cannot erase a banner already printed to your terminal scrollback, and after resuming another session with `/sessions` there is no welcome block to update. | +| `fade_scroll_edges` | boolean | `true` | Fade the top and bottom edges of scrollable areas in the full TUI when more content lies beyond them. Managed from the **Fade scroll edges** toggle on the **Appearance** tab of `/settings`. | +| `top_margin` | boolean | `false` | Add a one-row top margin above the full TUI when the terminal is taller than 24 rows. Managed from the **Show top margin** toggle on the **Appearance** tab of `/settings`. | | `theme` | string | `default` | Theme name, loaded from a built-in theme or `~/.cagent/themes/.yaml`. The special value `auto` follows the terminal's light/dark background. See [Theming](../../features/tui/index.md#theming). | | `theme_dark` | string | `default` | Theme applied when `theme: auto` and the terminal background is dark. | | `theme_light` | string | `default-light` | Theme applied when `theme: auto` and the terminal background is light. | @@ -48,11 +48,14 @@ You rarely need to hand-edit this file. Most fields are managed from the TUI's ` | `safety` | string | _unset_ | Default [safety mode](../permissions/index.md#safety-modes) for new sessions: `strict`, `balanced`, `restricted`, or `autonomous` (any other value fails config loading). Wins over the legacy `YOLO` flag. Applied when no explicit `--safety`/`--yolo` flag and no alias safety option was given; wins over the agent YAML's `agents..safety` / `runtime.safety` defaults. Never changes the mode of a resumed session. | | `lean` | boolean | `false` | Make the [lean TUI](../../features/tui/index.md#lean-tui) (simplified, minimal-chrome interface) the default for interactive runs instead of the full TUI. | | `tab_title_max_length` | int | `20` | Maximum display length for tab titles; longer titles are truncated with an ellipsis. | +| `hide_single_tab` | boolean | `false` | Hide the tab bar when only one tab is open (by default, the tab bar is shown even with a single tab). | | `lean_full_file_preview` | boolean | `false` | Show entire streamed file writes in the lean TUI instead of the last 10 file lines. Managed by **Written file preview** in the lean `/settings` panel. | | `restore_tabs` | boolean | `false` | Restore previously open tabs when launching the TUI. | | `sound` | boolean | `false` | Play a notification sound on task success or failure. | | `sound_threshold` | int | `10` | Minimum duration in seconds a task must run before a success sound plays (failures always play). | | `snapshot` | boolean | `false` | Enable automatic shadow-git snapshots at turn boundaries globally. See [Snapshots](../../features/snapshots/index.md). | +| `background_compaction` | boolean | `false` | Generate automatic compaction summaries while the agent continues working. Apply completed summaries between turns, preserving messages added during generation. Unfinished work is cancelled when the stream ends. | +| `background_compaction_threshold` | integer | `70` | Percentage (1–99) of the agent's blocking compaction threshold (`compaction_threshold` or `compaction_threshold_tokens`) at which background compaction starts. Invalid values fall back to 70. | | `cache_stable_prompts` | boolean | `false` | Keep changing trusted context (date, environment info, dynamic prompt files) out of the frozen system prefix and append chronological updates instead, improving prompt-cache hit rates on long sessions. | | `warn_on_cache_miss` | boolean | `false` | Warn when a model call after the first one in a session reports no cached input tokens (a prompt-cache miss). Managed from the **Notifications** tab of `/settings`. | | `busy_send_mode` | string | `steer` | What happens to a message sent while the agent is working: `steer` injects it into the ongoing stream; `queue` holds it until the current turn ends. | @@ -61,6 +64,9 @@ You rarely need to hand-edit this file. Most fields are managed from the TUI's ` | `hooks` | object | _unset_ | Global lifecycle hooks applied to every agent, additive with agent-config and CLI hooks. See [Global (user-level) hooks](../hooks/index.md#global-user-level-hooks). | | `keybindings` | array | _unset_ | Remap TUI keyboard shortcuts. See [Custom Keybindings](../../features/tui/index.md#custom-keybindings) for the full list of actions and syntax. | | `layout` | object | _unset_ | Sidebar position and section visibility. See [Layout Settings](#layout-settings) below. | +| `experimental.mcp_events` | boolean | `false` | Enable experimental MCP Events push subscriptions (proposed SEP-3415) over stdio and Streamable HTTP. | +| `experimental.mcp_skills` | boolean | `false` | Enable experimental MCP Skills discovery and verified loading (`io.modelcontextprotocol/skills`, SEP-2640). | +| `experimental.mcp_tasks` | boolean | `false` | Enable experimental MCP Tasks asynchronous tool execution (`io.modelcontextprotocol/tasks`, SEP-2663) over stdio and Streamable HTTP. | ## Layout Settings @@ -102,11 +108,15 @@ settings: split_diff_view: true render_images: true show_banner: true + fade_scroll_edges: true + top_margin: false hide_tool_results: false sound: true sound_threshold: 10 snapshot: true cache_stable_prompts: true + background_compaction: true + background_compaction_threshold: 70 warn_on_cache_miss: true busy_send_mode: queue interrupt_confirmation: double-tap @@ -138,4 +148,4 @@ User settings are a **low-priority** source: they establish defaults, and anythi - **Aliases sit between CLI flags and user settings.** An [alias](../../features/cli/index.md#docker-agent-alias) (`docker agent alias add ...`) can bundle its own `yolo`, `safety`, `model`, `hide_tool_results`, and `sandbox` defaults; those apply when the corresponding flag was not explicitly passed, the same way user settings do, but are resolved after user settings so an alias's own choices take priority over your global defaults. - **Permissions are merged, not overridden.** Global `settings.permissions` and an agent's own `permissions:` are combined into a single set of `deny` → `allow` → `ask` patterns before evaluation — a global deny always blocks, regardless of what the agent config allows. See [Merging Behavior](../permissions/index.md#merging-behavior). - **Hooks are additive, not overridden.** For a given lifecycle event, hooks from the agent config, `settings.hooks`, `hooks.d/` drop-ins, and `--hook-*` CLI flags **all** run, in that order. Global hooks cannot be suppressed by an individual agent. -- **Everything else is a plain default.** Fields with no CLI or agent-config equivalent (`sound`, `sound_threshold`, `restore_tabs`, `tab_title_max_length`, `split_diff_view`, `render_images`, `show_banner`, `cache_stable_prompts`, `warn_on_cache_miss`, `busy_send_mode`, `keybindings`, `layout`) only ever come from `settings:` (or the `/settings` dialog that writes it) — there is nothing to override them per run. +- **Everything else is a plain default.** Fields with no CLI or agent-config equivalent (`sound`, `sound_threshold`, `restore_tabs`, `tab_title_max_length`, `hide_single_tab`, `split_diff_view`, `render_images`, `show_banner`, `fade_scroll_edges`, `top_margin`, `cache_stable_prompts`, `warn_on_cache_miss`, `busy_send_mode`, `keybindings`, `layout`) only ever come from `settings:` (or the `/settings` dialog that writes it) — there is nothing to override them per run. diff --git a/_vendor/github.com/docker/docker-agent/docs/features/a2a-extensions/tool-approval/v1/index.md b/_vendor/github.com/docker/docker-agent/docs/features/a2a-extensions/tool-approval/v1/index.md new file mode 100644 index 000000000000..be4bf23fce24 --- /dev/null +++ b/_vendor/github.com/docker/docker-agent/docs/features/a2a-extensions/tool-approval/v1/index.md @@ -0,0 +1,183 @@ +--- +title: "A2A tool-approval extension (v1)" +description: "Specification of the tool-approval/v1 A2A extension: how a client approves or rejects a tool call of a task paused in TASK_STATE_INPUT_REQUIRED." +keywords: docker agent, a2a, extension, tool approval, input required +weight: 10 +canonical: https://docs.docker.com/ai/docker-agent/features/a2a-extensions/tool-approval/v1/ +--- + +## Overview + +This page specifies the `tool-approval/v1` [A2A extension](https://a2a-protocol.org/latest/topics/extensions/). +It defines how a client answers a tool call that a Docker Agent A2A server +holds for confirmation. The task waits in the A2A +[`TASK_STATE_INPUT_REQUIRED`](https://a2a-protocol.org/latest/specification/) +state until the client replies. + +For setup and usage, see [Tool approval](../../../a2a/index.md#tool-approval-opt-in). + +The extension URI is: + +```text +https://docker.github.io/docker-agent/features/a2a-extensions/tool-approval/v1 +``` + +The key words MUST, MUST NOT, SHOULD and MAY are to be interpreted as +described in [RFC 2119](https://www.rfc-editor.org/rfc/rfc2119). + +## Declaration + +A server that supports the extension lists it in its agent card under +`capabilities.extensions`, with `required: false`. A Docker Agent server +declares it only when started with `--tool-approval`. + +```json +{ + "capabilities": { + "extensions": [ + { + "uri": "https://docker.github.io/docker-agent/features/a2a-extensions/tool-approval/v1", + "description": "Approve or reject tool calls of tasks paused in TASK_STATE_INPUT_REQUIRED.", + "required": false + } + ] + } +} +``` + +A client activates the extension for a call by listing its URI in the message +`extensions` field or in the `A2A-Extensions` header (allowed by the CORS +policy for browser clients). The server validates +replies the same way whether or not the extension is activated. + +## Approval request + +When a tool call needs confirmation, the server moves the task to +`TASK_STATE_INPUT_REQUIRED`. The status message holds one data part per +pending call, with: + +- `data`: the function call, with `id`, `name` and `args`. +- `metadata.adk_type`: `"function_call"`. +- `metadata.adk_is_long_running`: `true`. +- `metadata[""]`: an object with the fields below. + +| Field | Type | Description | +|---|---|---| +| `prompt` | string | Human-readable question to show the user. | +| `grant` | string | The permission pattern that `approve-in-context` stores, e.g. `shell:cmd=ls*`. | +| `grantLabel` | string | Display label for `grant`, e.g. `allow ls* in this context`. | +| `responseSchema` | object | JSON Schema of the expected `response` object. | +| `rawArguments` | string | The call's arguments as sent by the model, present only when they are not a JSON object (`data.args` is then absent). Some tools repair and run such arguments, so show them before approving. | + +```json +{ + "data": { + "id": "call_123", + "name": "shell", + "args": { + "cmd": "ls" + } + }, + "metadata": { + "adk_type": "function_call", + "adk_is_long_running": true, + "https://docker.github.io/docker-agent/features/a2a-extensions/tool-approval/v1": { + "prompt": "Tool \"shell\" requires approval", + "grant": "shell:cmd=ls*", + "grantLabel": "allow ls* in this context", + "responseSchema": { + "type": "object", + "required": ["decision"], + "properties": { + "decision": { + "type": "string", + "enum": ["approve", "approve-in-context", "reject"] + }, + "reason": { + "type": "string" + } + } + } + } + } +} +``` + +`grant` and `grantLabel` are absent when the call cannot be scoped (a command +tool call with an empty command, or a glob, `:` or `\` in its first word); the enum then +omits `approve-in-context`. Clients SHOULD read the allowed decisions from +`responseSchema` rather than hard-code them. + +## Approval reply + +The client MUST answer with `SendMessage` on the paused task: `taskId` set to +the task's ID, and `contextId` set to its context. The message MUST contain a +data part with: + +- `data.id`: the `id` of the pending call. +- `data.name`: the name of the pending call. +- `data.response`: an object valid against `responseSchema`. +- `metadata.adk_type`: `"function_response"`. + +```json +{ + "taskId": "…", + "contextId": "…", + "extensions": ["https://docker.github.io/docker-agent/features/a2a-extensions/tool-approval/v1"], + "parts": [ + { + "data": { + "id": "call_123", + "name": "shell", + "response": { + "decision": "approve" + } + }, + "metadata": { + "adk_type": "function_response" + } + } + ] +} +``` + +### Decisions + +| `decision` | Effect | +|---|---| +| `approve` | Run this call only. The next matching call asks again. | +| `approve-in-context` | Run this call and allow later calls matching `grant` in the same `contextId`. The grant is stored with the session. Only allowed when `grant` is present. | +| `reject` | Skip the call. The optional `reason` string is passed to the model. | + +## Errors + +The server rejects the following messages with JSON-RPC error `-32602` +(invalid params). The error `data` holds a `reason` string. + +| Message | Example `reason` | +|---|---| +| Reply on a paused task without a `function_response` for the pending call `id` | `expected a function_response for call 'call_123'` | +| Reply with a `decision` outside the enum | `decision 'x' not allowed; expected [approve, approve-in-context, reject]` | +| Reply with a `reason` that is not a string | `reason must be a string` | +| Reply with parts that can't be decoded | `malformed approval reply` | +| Message with a `null` part | `message parts must not be null` | +| New task (no `taskId`) in a `contextId` held by a paused task | `task … is waiting for tool approval in this context; reply with its taskId or cancel it` | + +After a rejected reply, the task stays in `TASK_STATE_INPUT_REQUIRED`, nothing +is added to its history and no push notification is sent. The client MAY +retry. + +## Lifecycle + +- `CancelTask` on a paused task cancels it and drops the pending approval. + It also cancels a tool already running after approval. A cancel that races + the pause ends the task canceled. +- A server MAY expire pending approvals. Docker Agent keeps them in memory + for one hour and drops them at shutdown. A reply to an expired or lost + approval fails the task without starting a new model turn. + +## Versioning + +Changes that break this contract get a new URI (`…/tool-approval/v2`). New +optional metadata fields MAY be added to `v1`. Clients MUST ignore fields +they don't know. diff --git a/_vendor/github.com/docker/docker-agent/docs/features/a2a/index.md b/_vendor/github.com/docker/docker-agent/docs/features/a2a/index.md index 3be53136e9b2..2923e4618b15 100644 --- a/_vendor/github.com/docker/docker-agent/docs/features/a2a/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/features/a2a/index.md @@ -8,8 +8,6 @@ aliases: - /ai/docker-agent/integrations/a2a/ --- -_Expose Docker Agent agents via Google's Agent-to-Agent (A2A) protocol for interoperability with other agent frameworks._ - ## Overview The `docker agent serve a2a` command starts an A2A server that exposes your agents using the [A2A protocol](https://a2a-protocol.org/latest/). This enables communication between Docker Agent and other agent frameworks that support A2A. @@ -50,6 +48,71 @@ $ docker agent serve a2a ./agent.yaml --auth-token "$A2A_TOKEN" \ --cors-origin http://localhost:3000 ``` +## Push notifications + +The agent card advertises `pushNotifications: true`, so clients can follow a +task through a webhook instead of holding a stream open or polling. Register a +webhook with the `CreateTaskPushNotificationConfig` JSON-RPC method, or inline +in `SendMessage` through `configuration.taskPushNotificationConfig`. The +server then POSTs each task status and artifact update to the webhook URL as an +A2A `StreamResponse` JSON body. The config's `token` is sent in the `A2A-Notification-Token` header +and its `authentication` as an `Authorization: Bearer` or `Basic` header. + +Delivery is asynchronous and best effort: a slow webhook never delays the task +or its streaming clients, but a callback can be lost. Clients that must not +miss the outcome should fall back to `GetTask`. + +- Updates reach each webhook in order. Each attempt times out after 10 seconds + and is not retried; a timeout or non-2xx response loses that update. +- Once 64 updates are waiting for a task's webhook, new intermediate updates + are dropped. Final updates (completed, failed, canceled, rejected, + input-required, auth-required) are still queued and evict the oldest + intermediate one, so the queue may grow past 64 when final updates pile up. +- Pending updates live in memory. On shutdown the server waits up to 5 seconds + for them, then drops the rest; they are not replayed after a restart. +- Only `307` and `308` redirects within the registered origin (same scheme, + host and port) are followed, so the POST body is kept. Any other redirect + fails the delivery. +- Failures are logged with the webhook's scheme and host and an error category + or status code only, never its path, query, credentials or response text. + +### Webhook destinations + +By default, a webhook may only reach public addresses. Connections to loopback, +private (RFC 1918, IPv6 ULA), link-local (including cloud metadata endpoints +such as `169.254.169.254`), shared (`100.64.0.0/10`), multicast and unspecified +addresses are refused. The check runs on the resolved address of every +connection, so DNS rebinding and redirects are covered too. For the same +reason, `HTTP_PROXY`, `HTTPS_PROXY` and `NO_PROXY` are ignored for webhooks: +through a proxy, only the proxy's address could be checked. + +`--push-allow-private` lifts both rules: webhooks may reach any address, and +environment proxies apply. Use it only for trusted internal deployments or +local testing. + +```bash +$ docker agent serve a2a ./agent.yaml --push-allow-private +``` + +### Persistence and restarts + +Tasks and webhook registrations are stored in `-a2a/a2a.db`, next +to the session database, and survive a restart. Webhook tokens and credentials +are stored in plaintext, so the directory is private to the user running the +server (mode `0700` on Unix, an owner-only ACL on Windows). Each session +database has its own directory, so servers using different `--session-db` +files never share tasks. A server holds an exclusive lock on that directory +while it runs: a second `serve a2a` with the same `--session-db` fails to +start instead of failing the first server's running tasks. + +A task still submitted or working when the server stops cannot finish. On the +next start it is marked failed, and its webhooks are sent that final status on +the same best-effort terms as any other update. Updates lost before the stop, +including the final one of a task that had already completed, are not +re-sent: read the task with `GetTask`. A task waiting for tool approval +(`TASK_STATE_INPUT_REQUIRED`) is failed too: its paused run is held in memory +and cannot be resumed. Tasks waiting for authentication are left unchanged. + ## Tool safety and migration A2A sessions default to the `restricted` tool safety policy. Precedence is the @@ -68,6 +131,132 @@ database has a newer schema (`ErrNewerDatabase`). Restore an older database, or use a binary that includes the migration. Revert changes without removing the migration catalogue entry. +## Tool approval (opt-in) + +By default an A2A session is non-interactive: a tool call that would otherwise +prompt for confirmation is denied, because no one is present to approve it. Pass +`--tool-approval` to let the connected client approve or reject such calls +out-of-band using the A2A `TASK_STATE_INPUT_REQUIRED` flow. + +```bash +$ docker agent serve a2a ./agent.yaml --safety strict --tool-approval +``` + +When a call needs confirmation, the task pauses in `TASK_STATE_INPUT_REQUIRED` +and its status message carries the pending call as a data part. The reply +contract follows the `tool-approval/v1` extension, declared in the agent card +(`capabilities.extensions`, `required: false`) only when the flag is set: + +```text +https://docker.github.io/docker-agent/features/a2a-extensions/tool-approval/v1 +``` + +The URI resolves to the [extension specification](../a2a-extensions/tool-approval/v1/index.md). + +The function-call part carries the extension's metadata: a human-readable +`prompt`, the permission pattern `approve-in-context` would store (`grant`) +with its display label (`grantLabel`), and a JSON Schema `responseSchema` for +the reply, readable by a UI or a model. A shell call that cannot be scoped to +one command (empty command, or a glob, `:` or `\` in its first word) has no `grant` and no +`approve-in-context` in the enum. When the call's arguments are not a JSON +object, `data.args` is absent and `rawArguments` holds them verbatim, since +some tools repair and run such arguments. + +```json +{ + "data": { + "id": "call_123", + "name": "shell", + "args": { + "cmd": "ls" + } + }, + "metadata": { + "adk_type": "function_call", + "adk_is_long_running": true, + "https://docker.github.io/docker-agent/features/a2a-extensions/tool-approval/v1": { + "prompt": "Tool \"shell\" requires approval", + "grant": "shell:cmd=ls*", + "grantLabel": "allow ls* in this context", + "responseSchema": { + "type": "object", + "required": ["decision"], + "properties": { + "decision": { + "type": "string", + "enum": ["approve", "approve-in-context", "reject"] + }, + "reason": { + "type": "string" + } + } + } + } + } +} +``` + +The client answers with `SendMessage` on the same task (`taskId` is required, +plus `contextId`) and a matching function-response data part. Listing the +extension URI in the message `extensions` (or the `A2A-Extensions` header) +activates it for the call: + +```json +{ + "taskId": "…", + "contextId": "…", + "extensions": ["https://docker.github.io/docker-agent/features/a2a-extensions/tool-approval/v1"], + "parts": [ + { + "data": { + "id": "call_123", + "name": "shell", + "response": { + "decision": "approve" + } + }, + "metadata": { + "adk_type": "function_response" + } + } + ] +} +``` + +`decision` is one of: + +- `approve`: run this call only; the next matching call asks again. +- `approve-in-context`: run it and allow later calls matching `grant` in + this `contextId` (persisted with the session, so it survives a restart). As in + the TUI, a shell command grants its first word (`ls` → `shell:cmd=ls*`), not + every shell command; other tools grant the tool name. Only offered when + `grant` is present. +- `reject`: skip it, with an optional `reason` passed to the model. + +A reply that does not answer the pending call (free text, another call `id`, +a decision outside the enum, a non-string `reason`, or a `null` part) is rejected with JSON-RPC `-32602` and a +`reason` in the error data, e.g. +`decision 'x' not allowed; expected [approve, approve-in-context, reject]`. The task +stays in `TASK_STATE_INPUT_REQUIRED`, nothing is added to its history, and no +push notification is sent, so the client can retry. + +Notes and limits: + +- The switch is narrow: only top-level A2A sessions honour it. Background agents + and `transfer_task` sub-sessions keep denying. +- A paused task holds its conversation: a new task in the same `contextId` is + rejected with `-32602` until the paused task is answered or canceled. +- Pending approvals are held in memory. After one hour, or at server shutdown, + the task moves to `TASK_STATE_FAILED` and registered webhooks are notified; + on A2A `CancelTask` it is canceled, even when the cancel lands while the + task is pausing. A server restart fails tasks left in + `TASK_STATE_INPUT_REQUIRED`. None of these start a new model turn. +- After approval, the run continues under the trace of the request that + started it; the reply request's span links to it. +- Canceling a task also cancels a tool it is running after approval. +- Without the flag the behaviour is unchanged: non-interactive sessions deny, + and the agent card declares no extension. + ## Resuming conversations Invocations with the same A2A context ID resume the stored conversation. Before @@ -94,7 +283,7 @@ policy is preserved or tightened to the server's safety ceiling, never relaxed. ## Current Limitations -- Tool calls are handled internally, not exposed as separate A2A events +- Tool calls are handled internally; only calls awaiting approval are exposed, via the opt-in [tool approval](#tool-approval-opt-in) flow - A2A artifact support not yet integrated - A2A memory features not yet integrated - Multi-agent (sub-agent) scenarios need further work diff --git a/_vendor/github.com/docker/docker-agent/docs/features/acp/index.md b/_vendor/github.com/docker/docker-agent/docs/features/acp/index.md index 5007be77313d..1031c43bf9f2 100644 --- a/_vendor/github.com/docker/docker-agent/docs/features/acp/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/features/acp/index.md @@ -9,8 +9,6 @@ aliases: - /ai/docker-agent/integrations/acp/ --- -_Expose Docker Agent agents via the Agent Client Protocol for integration with ACP-compatible hosts like VS Code, IDEs, and other developer tools._ - ## Overview The `docker agent serve acp` command starts an ACP server that communicates over **stdio** (standard input/output). This makes it ideal for integration with editors, IDEs, and other tools that spawn agent processes — the host sends JSON-RPC messages to Docker Agent's stdin and reads responses from stdout. @@ -24,7 +22,12 @@ ACP is built on the [ACP Go SDK](https://github.com/coder/acp-go-sdk) and provid ## Usage +Without an agent argument, the server uses the `default` built-in agent (or your `default` alias, if configured). + ```bash +# Start ACP server with the default agent +$ docker agent serve acp + # Start ACP server on stdio $ docker agent serve acp ./agent.yaml @@ -79,6 +82,7 @@ The stable ACP v1 surface is covered by wire and behavior tests. `initialize` ad | Configuration | Advertised select options and legacy modes | Session configuration suite | | Message/tool metadata | Persisted message IDs, bounded replay, programmatic tool names | Message-ID/tool-name suites | | Tracing | Request-scoped W3C trace context; no tracing handshake | ACP tracing suite and MCP callback ownership tests | +| Steering | `_session/steering` extension, advertised as `_meta.steering.supported` | Steering suite | Session forking, editor provider configuration, document synchronization, MCP-over-ACP, and next-edit suggestions are not advertised or implemented. Unsupported requests return method-not-found; unsupported notifications have no response. Terminal authentication and experimental environment-variable authentication remain unadvertised. This matrix is not a claim of ACP draft/v2 support or universal model modality support. @@ -106,7 +110,7 @@ Send W3C context in **request/notification `params._meta`**, not at the JSON-RPC Each implemented agent request/notification starts an `acp.` SERVER span, linked to valid incoming context and enclosing its handler. These boundary spans record only the static RPC method, not request content, paths, credential metadata, or raw errors. Invalid/non-string/oversized trace fields are ignored; each accepted field is bounded to 512 bytes and validated by the W3C propagator. A bad tracestate does not invalidate a valid traceparent. Client baggage and arbitrary `_meta` fields are not imported into tracing. -The request context flows into existing runtime/model/tool instrumentation. Outgoing ACP session updates, permission requests, filesystem operations, terminal operations (including detached cleanup), and elicitation carry only `traceparent`/`tracestate` in `params._meta`. Metadata is copied before injection; stale trace fields and baggage are removed. Response metadata is never adopted as the current trace. MCP elicitation and sampling callbacks use the sole owning tool call's trace rather than the connection's setup trace; existing ambiguous-owner restrictions remain in effect. +The request context flows into existing runtime/model/tool instrumentation. Outgoing ACP session updates, permission requests, filesystem operations, terminal operations (including detached cleanup), and elicitation carry only `traceparent`/`tracestate` in `params._meta`. Metadata is copied before injection; stale trace fields and baggage are removed. Response metadata is never adopted as the current trace. MCP elicitation callbacks use the sole owning tool call's trace rather than the connection's setup trace; existing ambiguous-owner restrictions remain in effect. Traces are not stored on sessions: concurrent and later prompts use their own incoming context. Terminal final-close retries use the cleanup caller's context, not a remembered creation trace. Detached background/drain work may outlive the handler span while retaining its trace. This adds request SERVER spans and propagation, not separate ACP CLIENT spans for every outbound call, response metadata, or automatic metadata on unsupported SDK methods. Existing runtime/provider telemetry and its content-capture settings retain their own policy; the boundary-span restriction is not a global telemetry-redaction guarantee. @@ -161,6 +165,34 @@ Cancellation takes precedence, and responses wait until runtime events have full Fatal root-runtime failures return JSON-RPC internal error `-32603` with `data.sessionId`, `data.runtimeCode`, and `data.error`. Budget termination is reported this way as `budget_exceeded`, not confused with an output-token or iteration limit. Diagnostic updates may already have streamed before the error response. Missing prompt/resume/load sessions return `-32002` (resource not found); invalid workspace parameters return `-32602` (invalid params). +## Steering + +A new `session/prompt` cancels the running turn. To add to a running turn without cancelling it, send a `_session/steering` request. This is the same extension that [claude-agent-acp](https://github.com/agentclientprotocol/claude-agent-acp) implements. `initialize` advertises it as `_meta.steering.supported: true`. + +```json +{ + "jsonrpc": "2.0", + "id": 7, + "method": "_session/steering", + "params": { + "sessionId": "…", + "prompt": [{"type": "text", "text": "Use the v2 API instead"}], + "_meta": {"steering": {"idleBehavior": "promptRequired"}} + } +} +``` + +| `outcome` | When | +| --- | --- | +| `injected` | A turn is running. The agent reads the message after the current tool calls finish or when the model stops, and answers it in the same turn. Updates arrive on that turn's `session/prompt`. If the turn finishes before reading it, a following turn answers it, and its updates arrive as `session/update` notifications. | +| `startedNewTurn` | No turn is running. The message starts a turn. Its updates arrive as `session/update` notifications, and no `session/prompt` response is sent for it. | +| `promptRequired` (`reason: "noRunningTurn"`) | No turn is running and the request set `idleBehavior: "promptRequired"`. Nothing happens, so the client can send the content as a `session/prompt`. | + +- A turn that is waiting for permission still accepts the message. The agent reads it when the turn continues. +- If the turn is cancelled, replaced by a new prompt, fails, or stops for any reason other than `end_turn`, the agent discards any steered messages it has not read yet instead of answering them later. +- Slash commands cannot be steered; that returns `-32602`. Send them with `session/prompt`. +- Other errors are reported as `session/prompt` reports them: `-32002` for an unknown session, and `-32602` for an empty `sessionId`, an empty `prompt`, or an unknown `idleBehavior`. + ## Authentication and Logout ACP advertises the agent-managed `host-credentials` method (**Use configured host credentials**) and `agentCapabilities.auth.logout`. No keys are accepted in `authenticate`, `_meta`, or elicitation forms. This is explicit adoption of the agent host's configured credentials, not an interactive login or a check that a provider will accept a token. @@ -433,7 +465,7 @@ Captured file contents are presentation-only metadata, excluded from generic res ## CLI Flags ```bash -docker agent serve acp | [flags] +docker agent serve acp [|] [flags] ``` See the [CLI reference](../cli/index.md#docker-agent-serve-acp) for all flags, defaults, and shared runtime options. diff --git a/_vendor/github.com/docker/docker-agent/docs/features/ag-ui/index.md b/_vendor/github.com/docker/docker-agent/docs/features/ag-ui/index.md new file mode 100644 index 000000000000..a89a2844f0f4 --- /dev/null +++ b/_vendor/github.com/docker/docker-agent/docs/features/ag-ui/index.md @@ -0,0 +1,291 @@ +--- +title: "AG-UI Protocol" +description: "Expose Docker Agent agents to user-facing applications through the AG-UI protocol, with any AG-UI client SDK." +keywords: docker agent, ai agents, features, ag-ui protocol +weight: 65 +canonical: https://docs.docker.com/ai/docker-agent/features/ag-ui/ +--- + +## Overview + +The `docker agent serve ag-ui` command starts an HTTP server that speaks the +server side of the [AG-UI protocol](https://docs.ag-ui.com). An application +sends a `RunAgentInput` and receives the run as a stream of AG-UI events over +Server-Sent Events (SSE): assistant text, reasoning, tool calls and their +results, and the agent of a team that is currently working. + +Any AG-UI client can talk to the agent, whatever its language: the +[AG-UI client SDKs](https://github.com/ag-ui-protocol/ag-ui) exist for +TypeScript, Python, Go and more. You don't write protocol code. + +> [!WARNING] +> **First step of AG-UI support** +> +> This release covers a streaming chat. Human-in-the-loop, frontend tools, +> shared state and attachments are not implemented yet. See +> [Current limitations](#current-limitations). + +## Usage + +```bash +# Start an AG-UI server for an agent +$ docker agent serve ag-ui ./agent.yaml +Listening on 127.0.0.1:8084 +AG-UI endpoint: http://127.0.0.1:8084/ag-ui + +# Pick one agent of a team as the entry point +$ docker agent serve ag-ui ./team.yaml --agent reviewer + +# Use an agent from an OCI registry, on another address +$ docker agent serve ag-ui myorg/agent:tag --listen 127.0.0.1:9090 +``` + +## Flags + +See the [CLI reference](../cli/index.md#docker-agent-serve-ag-ui) for all flags, +defaults, and shared runtime options. + +## Endpoint + +| Method | Path | Description | +| ------ | -------- | -------------------------------------------------------------------- | +| `POST` | `/ag-ui` | Takes a `RunAgentInput` JSON body and answers with `text/event-stream` | + +```bash +$ curl -N http://127.0.0.1:8084/ag-ui \ + -H 'Content-Type: application/json' \ + -d '{ + "threadId": "thread-1", + "runId": "run-1", + "messages": [{"id": "msg-1", "role": "user", "content": "Hello"}], + "tools": [], "context": [], "state": {}, "forwardedProps": {} + }' +``` + +Each event is one SSE frame. Its `data` line is the AG-UI event as JSON: + +```text +id: RUN_STARTED_1764345600000 +data: {"type":"RUN_STARTED","timestamp":1764345600000,"threadId":"thread-1","runId":"run-1"} + +id: TEXT_MESSAGE_START_1764345600120 +data: {"type":"TEXT_MESSAGE_START","timestamp":1764345600120,"messageId":"56738741-aa2b-4dba-a1be-7f0e005043ce","role":"assistant"} + +id: TEXT_MESSAGE_CONTENT_1764345600121 +data: {"type":"TEXT_MESSAGE_CONTENT","timestamp":1764345600121,"messageId":"56738741-aa2b-4dba-a1be-7f0e005043ce","delta":"Hello!"} + +id: TEXT_MESSAGE_END_1764345600300 +data: {"type":"TEXT_MESSAGE_END","timestamp":1764345600300,"messageId":"56738741-aa2b-4dba-a1be-7f0e005043ce"} + +id: RUN_FINISHED_1764345600301 +data: {"type":"RUN_FINISHED","timestamp":1764345600301,"threadId":"thread-1","runId":"run-1"} +``` + +### Use an AG-UI client SDK + +With the TypeScript client (`npm install @ag-ui/client`): + +```ts +import { HttpAgent } from "@ag-ui/client"; + +const agent = new HttpAgent({ + url: "http://127.0.0.1:8084/ag-ui", + threadId: "thread-1", +}); +agent.messages = [{ id: "msg-1", role: "user", content: "Hello" }]; + +await agent.runAgent({}, { + onTextMessageContentEvent: ({ event }) => process.stdout.write(event.delta), +}); +``` + +## Threads and sessions + +Each AG-UI thread is a Docker Agent session. + +- An unknown `threadId` creates a session; a known one resumes it. Sessions are + stored in the session database (`--session-db`), so a thread survives a + server restart. +- The session ID is `ag-ui-` followed by the SHA-256 of the `threadId`, in + hexadecimal. The session ID names files and directories, and two `threadId`s + that differ only by case must not share them on a case-insensitive + filesystem. Events carry the `threadId` the client sent. +- **The server-side session is the source of truth.** AG-UI clients resend the + whole conversation on every run. The server reads only the user messages + that end `messages` and ignores the rest of that history, including system, + assistant and tool messages. +- A user message is identified by its `id`. Among the user messages that end + `messages`, those up to the last one the thread already holds are history; + the ones after it are new. +- The new user messages make the prompt of the run. Several of them are joined + into one prompt, separated by a blank line, so `user_prompt_submit` hooks + check all the text before any of it reaches the model. + The thread remembers the `id` of each of them (session attribute + `ag-ui.batches`), so any of them resent later is history. +- A prompt a hook blocked stays in the thread but never reaches the model: + later runs leave it out of the history they send. +- A run needs something to answer: a request without a new user message is + rejected with `400 Bad Request` (`no new user message for this thread`). The + exception is a thread that still ends on a prompt, because its last run + stored no output (it failed, or a hook blocked the prompt): resending the + same messages submits that prompt again. It goes through the + `user_prompt_submit` hooks again, and the thread keeps both submissions. A + run that failed after storing output (for example after a tool call) is not + retried this way; send a new user message. +- Only one run at a time per thread. A run on a thread that already has a run + in progress is rejected with `409 Conflict`. +- A thread never resumes a session created another way (the TUI, the API + server, A2A), even when its `threadId` is that session's ID. If the session + ID derived from a `threadId` is already taken by such a session, the request + is rejected with `409 Conflict` and that session is left untouched. +- Closing the connection cancels the run. + +Before each resumed run, Docker Agent reapplies the selected agent's +`max_iterations`, `max_consecutive_tool_calls`, `max_old_tool_call_tokens` and +`max_tool_result_tokens`. The safety policy of a thread is preserved or +tightened to the server's policy, never relaxed. + +## Event mapping + +| Docker Agent runtime event | AG-UI event | +| --------------------------------------- | ------------------------------------------------------------- | +| Run started / stopped | `RUN_STARTED` / `RUN_FINISHED` | +| Failed, canceled or cut-short run | `RUN_ERROR` | +| Assistant text | `TEXT_MESSAGE_START` / `TEXT_MESSAGE_CONTENT` / `TEXT_MESSAGE_END` | +| Reasoning | `REASONING_START` / `REASONING_MESSAGE_START` / `REASONING_MESSAGE_CONTENT` / `REASONING_MESSAGE_END` / `REASONING_END` | +| Tool call being streamed by the model | `TOOL_CALL_START` / `TOOL_CALL_ARGS` | +| Tool call dispatched / tool result | `TOOL_CALL_END` / `TOOL_CALL_RESULT` | +| Hand-over to a sub-agent and back | `STEP_STARTED` / `STEP_FINISHED` (`stepName` is the agent name) | +| Token usage, warning, session title, model fallback | `CUSTOM` | + +Notes: + +- Tools run on the server. Tool events show progress; the client is not asked + to execute anything. +- The server ends every message, tool call and step it started before + `RUN_FINISHED` or `RUN_ERROR`. Nothing follows either of them. +- Every tool call has a `TOOL_CALL_RESULT` before `RUN_FINISHED`, so a client + finds no pending call. A call the model started and a provider fallback then + withdrew was never executed: its result is + `(retracted: the call was not executed)`. +- A `toolCallId` names one call within the run. Models whose tool calls are + parsed from text reuse IDs from one turn to the next (`call_0`): a reused ID + gets a suffix (`call_0-2`). +- `RUN_FINISHED` means the run completed normally. A run that was cut short + ends with `RUN_ERROR`, whose `code` is: + - `canceled` for a run canceled on the server. A client that disconnects + cancels its run and receives nothing more. + - the runtime error code when the runtime reported one; + - the reason the run was stopped: `max_iterations`, `budget_exceeded`, + `hook_blocked` or `loop_detected`; + - `length` when the model reached its output token limit: the answer + streamed so far is incomplete; + - `refusal` when the model refused to answer; + - `run_failed` otherwise. +- `CUSTOM` events are named `docker-agent.token_usage`, `docker-agent.warning`, + `docker-agent.session_title`, `docker-agent.model_fallback` and + `docker-agent.error`. Their `value` is the runtime event, in the format of the + [API server](../api-server/index.md). `docker-agent.error` reports an error + the run recovered from; it is sent just before `RUN_FINISHED`. + +## Input validation + +The request is validated before anything is stored or run. An invalid request +gets `400 Bad Request` with a JSON body, `{"error": ""}`, and changes +nothing: the same `threadId` still accepts a valid request. + +| Field | Rule | +| ---------------- | ------------------------------------------------------------------------- | +| `threadId` | Required, at most 256 bytes. Starts with a letter or digit and contains only letters, digits, `.`, `_` and `-` (a UUID qualifies). | +| `runId` | Required, at most 256 bytes. | +| `messages` | Every message needs an `id` of at most 256 bytes and a known `role`. The history must end with at least one user message; those trailing user messages need distinct `id`s and non-empty text content (a string, or a list of `text` parts). The content of earlier messages is not read. | +| `tools` | Must be empty: frontend tools are not supported. | +| `state` | Must be empty (`null`, `{}`): shared state is not supported. | +| `resume` | Must be empty: interrupts are not supported. | +| `context`, `forwardedProps` | Accepted and ignored. | + +`tools`, `state` and `resume` are rejected rather than silently ignored, so a +client finds out immediately that a feature it relies on is missing. + +Other responses: + +| Status | When | +| ------ | --------------------------------------------------------------------------------- | +| `401` | `--auth-token` is set and the bearer token is missing or wrong. | +| `403` | No `--auth-token`, loopback listener, and the `Host` header is not a loopback name. | +| `409` | The thread has a run in progress, or its session ID is taken by another kind of session. | +| `413` | The request body is larger than 8 MiB. | +| `415` | `Content-Type` is not `application/json`. | +| `503` | The server is shutting down. | + +## Shutdown and restart + +When the server is stopped it rejects new runs with `503`, closes the client +connections, cancels the runs in progress and waits up to 10 seconds for them +to stop, including the background agents of finished runs, which are stopped +once their run ends. A run that has not stopped by then (typically a tool that +ignores cancellation) is abandoned: the process exits without it. + +- A client whose run was interrupted sees its stream end without + `RUN_FINISHED` or `RUN_ERROR`. Treat a stream that ends that way as a failed + run. +- Runs are not resumed at startup. The thread keeps what was stored before the + interruption; output an abandoned run produced after that point is lost. +- After a restart the thread accepts a new run. Send a new user message, or + resend the same messages if the interrupted run had stored no output yet + (see [Threads and sessions](#threads-and-sessions)). + +## Authentication and network exposure + +Loopback listeners may run without authentication. Non-loopback listeners +require `--auth-token`. Clients must send `Authorization: Bearer `. + +`--insecure-no-auth` lifts that requirement: anyone who can reach the address +can then start runs, and their tools execute on the server under its +[tool safety](#tool-safety) policy. Use it only on a network you trust. + +Two checks protect a server from web pages the user visits: + +- Requests must be sent with `Content-Type: application/json`. A browser only + sends that header cross-origin after a CORS preflight, which fails unless the + page's origin is allowed. +- A loopback listener without `--auth-token` only accepts a loopback `Host` + (`localhost`, `127.0.0.1`, `[::1]`), which stops DNS-rebinding pages. + +Browser access is off by default. Enable it with `--cors-origin`; it accepts +comma-separated literal origins or `~`-prefixed regular expressions. Allowed +origins may send the `Authorization`, `Content-Type` and `Accept` headers. +Preflight requests are answered without credentials. On a loopback listener +without `--auth-token`, any page served from an allowed origin can start runs. + +```bash +$ docker agent serve ag-ui ./agent.yaml --auth-token "$AG_UI_TOKEN" \ + --cors-origin http://localhost:3000 +``` + +## Tool safety + +AG-UI threads default to the `restricted` tool safety policy. Precedence is the +`--safety` flag, then agent YAML, then runtime YAML. YAML may select `strict`, +`balanced`, or `restricted`; `--safety autonomous` is the only way to opt in to +autonomous tool execution. + +Nobody can approve a tool call over AG-UI yet. A tool call that the policy does +not allow is denied, and the agent is told so. An elicitation request from an +MCP server is declined. + +## Current limitations + +- **No human-in-the-loop.** Tool approval and elicitation through AG-UI + interrupts are not implemented (`resume` is rejected). +- **No frontend tools.** A non-empty `tools` field is rejected. +- **No shared state.** `STATE_SNAPSHOT` and `STATE_DELTA` are never sent, and a + non-empty `state` is rejected. +- **Text only.** Images and other attachments in user messages are rejected. +- **One entry agent per server.** Use `--agent` to choose it; sub-agents are + reached through delegation. + +> [!TIP] +> **See also** +> +> For OpenAI-compatible clients, see [Chat Server](../chat-server/index.md). For agent-to-agent communication, see [A2A](../a2a/index.md). For full control over sessions and runtime events, see [API Server](../api-server/index.md). diff --git a/_vendor/github.com/docker/docker-agent/docs/features/api-server/index.md b/_vendor/github.com/docker/docker-agent/docs/features/api-server/index.md index 963772bc1f0f..50bcc0b8ad6d 100644 --- a/_vendor/github.com/docker/docker-agent/docs/features/api-server/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/features/api-server/index.md @@ -6,8 +6,6 @@ weight: 80 canonical: https://docs.docker.com/ai/docker-agent/features/api-server/ --- -_Expose your agents via an HTTP API for programmatic access, web frontends, and integrations._ - ## Overview The `docker agent serve api` command starts an HTTP server that exposes your agents through a REST-style API with Server-Sent Events (SSE) streaming. Use it to build web UIs, integrate with CI/CD pipelines, or connect agents to other services. @@ -211,7 +209,9 @@ Event types include: - `stream_started` / `stream_stopped` — Agent execution lifecycle - `agent_choice` — Streamed text content (partial responses) - `agent_choice_reasoning` — Streamed reasoning content +- `agent_choice_reasoning_reset` — Discard all reasoning accumulated for the identified `session_id` and `message_id` (for example, after a server fallback). Keep text, other messages, and tool calls; later reasoning deltas append to the now-empty buffer. This is an ordering barrier, never coalesced with deltas - `partial_tool_call` — Streamed tool-call arguments, keyed by `tool_call.id`. The first one also carries `tool_definition` +- `tool_calls_retracted` — Tool calls announced by `partial_tool_call` that will never run, listed in `tool_call_ids`: the model refused, the response was cut off by the output-token limit (`finish_reason: length`) while a tool call was still streaming, or a server fallback handed the turn to another model - `tool_call` — Agent requesting tool execution - `tool_call_output` — Streamed output of a running tool, keyed by `tool_call_id` - `tool_call_confirmation` — Tool call waiting for user approval @@ -219,6 +219,8 @@ Event types include: - `plan_changed` — A shared plan was created, updated, or deleted through the plan toolset. The payload carries the plan's `scope`, `name`, `action`, and `version` — never its content. Shared plans are deliberately process-global: every active stream served by the same process subscribes to the same shared plan notifier and receives the event regardless of which session performed the mutation, and the payload does not identify the mutating session (read the plan's `author` metadata for collaborative attribution). - `error` — Error during execution +Append-only outputs such as CLI `--exec` and ACP thought chunks cannot retract bytes already delivered; their consumers may still show declined reasoning. The mutable TUI, lean TUI, WASM demo and persisted transcript apply the reset. + ## Typical Workflow 1. **List agents** — `GET /api/agents` to discover available agents @@ -338,6 +340,11 @@ $ docker agent run agent.yaml --listen 127.0.0.1:8080 $ docker agent run agent.yaml --listen unix:///tmp/my-run.sock ``` +`fd://N` adopts an inherited listening socket (a Winsock socket handle on +Windows). It closes the supplied descriptor after duplicating it; callers must +not close that descriptor again. The inherited listener retains its bound +address and the same authentication requirements as a directly bound listener. + The run keeps its interactive TUI; the control plane runs alongside it. A follow-up delivered over HTTP is processed exactly as if it had been typed into the TUI: it starts a turn even when the agent is idle, generates the @@ -357,9 +364,9 @@ $ curl -X POST http://127.0.0.1:8080/api/sessions/$SID/followup \ > Each run started with `--listen` writes a discovery record to `/runs/.json` containing its address and initial session id, so a supervising process can find a live run by session id, pid, or address. TUI tabs opened later are separate sessions attached to the same control plane; use `GET /api/sessions?active=true` on that address to enumerate them and read their `streaming` state without loading session history. > [!WARNING] -> **This control plane has a fixed 1 MiB request-body cap and no built-in authentication** +> **This control plane has a fixed 32 MiB request-body cap and no built-in authentication** > -> Unlike the standalone `docker agent serve api` process above, an attached run's `--listen` control plane exposes neither `--max-request-size` nor `--auth-token`: every request is capped at a fixed, non-configurable 1 MiB body (returning HTTP 413 above it — see [Troubleshooting: HTTP 413](../../guides/troubleshooting/index.md#http-413-request-body-too-large)), and there is no bearer token to require. If you need a configurable cap, built-in bearer auth, or a network-reachable listener, run a standalone `docker agent serve api` deployment instead. `--listen` only supports loopback TCP addresses or local sockets; non-loopback TCP listeners are rejected. An authenticating proxy can connect to a local listener. +> Unlike the standalone `docker agent serve api` process above, an attached run's `--listen` control plane exposes neither `--max-request-size` nor `--auth-token`: every request is capped at a fixed, non-configurable 32 MiB body (returning HTTP 413 above it — see [Troubleshooting: HTTP 413](../../guides/troubleshooting/index.md#http-413-request-body-too-large)), and there is no bearer token to require. If you need a configurable cap, built-in bearer auth, or a network-reachable listener, run a standalone `docker agent serve api` deployment instead. `--listen` only supports loopback TCP addresses or local sockets; non-loopback TCP listeners are rejected. An authenticating proxy can connect to a local listener. ## Session event stream and reconnection diff --git a/_vendor/github.com/docker/docker-agent/docs/features/board/index.md b/_vendor/github.com/docker/docker-agent/docs/features/board/index.md index 176966a7e59c..cdb2a9dee86e 100644 --- a/_vendor/github.com/docker/docker-agent/docs/features/board/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/features/board/index.md @@ -76,7 +76,7 @@ board: projects: - name: my-app path: /Users/me/src/my-app - agent: coder # any agent ref; defaults to the built-in agent + agent: default # any agent ref; defaults to the built-in agent columns: - id: dev name: Dev diff --git a/_vendor/github.com/docker/docker-agent/docs/features/chat-server/index.md b/_vendor/github.com/docker/docker-agent/docs/features/chat-server/index.md index ec8746ca61af..c5aa140bed59 100644 --- a/_vendor/github.com/docker/docker-agent/docs/features/chat-server/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/features/chat-server/index.md @@ -6,8 +6,6 @@ weight: 90 canonical: https://docs.docker.com/ai/docker-agent/features/chat-server/ --- -_Expose your agents through an OpenAI-compatible Chat Completions API so any tool that already speaks OpenAI can drive a Docker Agent agent._ - ## Overview The `docker agent serve chat` command starts an HTTP server that exposes one or diff --git a/_vendor/github.com/docker/docker-agent/docs/features/cli/index.md b/_vendor/github.com/docker/docker-agent/docs/features/cli/index.md index 5b885cac9902..ee7e4448aff5 100644 --- a/_vendor/github.com/docker/docker-agent/docs/features/cli/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/features/cli/index.md @@ -8,12 +8,10 @@ aliases: - /ai/docker-agent/reference/cli/ --- -_Complete reference for all Docker Agent command-line commands and flags._ - > [!TIP] > **No config needed** > -> Running `docker agent run` without a config argument uses `docker-agent.yaml`, `docker-agent.yml`, or `docker-agent.hcl` from the current directory when present. Otherwise, it uses a built-in default agent that is perfect for quick experimentation. +> Running `docker agent run` without a config argument uses `docker-agent.yaml`, `docker-agent.yml`, or `docker-agent.hcl` from the current directory when present. Otherwise, it uses the built-in `default` coding agent. Use `docker agent run minimal` for a small general-purpose configuration. ## Commands @@ -30,7 +28,7 @@ $ docker agent run [config] [message...] [flags] | `-a, --agent ` | Run a specific agent from the config | | `--yolo` | Auto-approve tool calls (unless explicitly denied). Legacy alias for `--safety autonomous`. | | `--safety ` | Safety mode for tool approval: `strict` (ask for everything), `balanced` (auto-approve safe calls), `restricted` (auto-approve safe calls, deny the rest — fail-closed for unattended runs), or `autonomous` (approve everything). Wins over `--yolo` when both are given. Without the flag, the mode falls back to alias/user-config defaults, then the agent YAML's `agents..safety` / `runtime.safety`; a resumed session keeps its stored mode unless `--safety`/`--yolo` is passed explicitly. See [Safety Modes](../../configuration/permissions/index.md#safety-modes). | -| `--model ` | Override model(s). Use `provider/model` for all agents, or `agent=provider/model` for specific agents. Comma-separate multiple overrides. Inline overrides inherit each agent's explicit `parallel_tool_calls` setting only from a concrete, provider-qualified configured model. Existing named targets are authoritative on every invocation, including an omitted setting; harness, router, alloy/comma-list, `first_available`, providerless, and unresolved source models do not inherit it. | +| `--model ` | Override model(s). Use `provider/model` for all agents, or `agent=provider/model` for specific agents. Repeat the flag or comma-separate multiple overrides — the comma form only works when every segment is agent-scoped (`root=a,other=b`); a mixed `global,agent=spec` list is not split (one spec may legitimately contain commas, e.g. an alloy/`first_available` list) and should use repeated `--model` flags instead. Inline overrides inherit each agent's explicit `parallel_tool_calls` setting only from a concrete, provider-qualified configured model. Existing named targets are authoritative on every invocation, including an omitted setting; harness, router, alloy/comma-list, `first_available`, providerless, and unresolved source models do not inherit it. | | `--session ` | Resume a previous session. Supports relative refs (`-1` = newest by creation time, `-2` = second-newest, … — creation order, not last-used). An explicit ID that does not exist yet is created with that ID, so a supervisor can own the session ID upfront and reuse it across runs. | | `-s, --session-db ` | Path to the SQLite session database (default: `/session.db`, so `~/.cagent/session.db` unless `--data-dir` is set) | | `--session-read-only` | Open the TUI in read-only mode: conversation history is displayed but no new messages can be sent to the LLM. Cannot be used with `--exec`. | @@ -41,7 +39,7 @@ $ docker agent run [config] [message...] [flags] | `--remote-auth-token ` | Bearer token for `--remote`. Defaults to `DOCKER_AGENT_REMOTE_AUTH_TOKEN`; the flag takes precedence. Prefer the environment variable to keep the token out of command-line arguments. | | `--listen ` | Expose this run's control plane over HTTP so an external process can drive the running TUI (send follow-ups, stream events, read the title). Accepts `host:port` or `unix://`, `npipe://`, `fd://`. Hidden from `docker agent run --help` — it's a stable but advanced/automation-oriented flag rather than a day-to-day one. See the [API Server](../api-server/index.md#listen) guide for the full walkthrough. | | `--session-workingdir-root ` | Confine the `working_dir` of sessions created through the `--listen` control plane to this directory and its descendants (default: no restriction — any clean host directory is accepted, though raw values containing `..` are rejected). Recommended when the control plane is reachable by other users. Hidden from `--help`, like `--listen`. | -| `--lean` | Use a simplified, non-alternate-screen TUI. Unlike the default full-screen TUI, this renders inline in the normal terminal buffer — useful in environments where an alternate screen is unwanted (e.g. inside tmux panes, CI with a tty, or log-friendly pipelines). Like the full TUI, displays an ASCII art banner on startup when the chat is empty (configurable via `show_banner` in [user settings](../../configuration/user-settings/index.md)). | +| `--lean` | Use a simplified, non-alternate-screen TUI. Unlike the default full-screen TUI, this renders inline in the normal terminal buffer — useful in environments where an alternate screen is unwanted (e.g. inside tmux panes, CI with a tty, or log-friendly pipelines). Like the full TUI, displays a braille wordmark banner at the start of the transcript (configurable via `show_banner` in [user settings](../../configuration/user-settings/index.md)). | | `--app-name ` | Override the application name label shown in the TUI (status bar, window title, "/exit" notifications). | | `--sidebar` | Control sidebar visibility. Set to `--sidebar=false` to hide the sidebar and disable the Ctrl+B toggle (default: `true`). | | `--disable-commands ` | Hide and disable specific slash commands in the TUI. Accepts a comma-separated list of command names (leading slash optional, case-insensitive). E.g. `--disable-commands="/cost,/eval,/model"`. | @@ -51,13 +49,13 @@ $ docker agent run [config] [message...] [flags] | `--last` | Print only the final agent answer after all turns finish (requires `--exec`); omit thinking, tool calls/results, and intermediate responses | | `--hide-tool-calls` | Hide tool calls in the output | | `--hide-tool-results` | Hide tool call results in the output | -| `--sandbox` | Run the agent in sandbox mode using `sbx` (see [Sandbox](../../configuration/sandbox/index.md)) | +| `--sandbox` | Run the agent in sandbox mode using the standalone `sbx` CLI (see [Sandbox](../../configuration/sandbox/index.md)) | | `--cloud` | Run in a fresh cloud sandbox without uploading host files/config/credentials; implies `--sandbox`. See [cloud sandbox mode](../../configuration/sandbox/index.md#cloud-sandboxes). | | `--sandbox-kit`, `--kit`, `--kit-arg` | Select an sbx workload and mixins, and pass kit arguments. Supports kits v3 through sbx. | | `--sandbox-ttl` | Cloud sandbox lifetime, default `1h`; stopped on expiry and when the agent exits. | | `--template ` | Template image for the sandbox (default: `docker/docker-agent-sbx-templates:latest`) | | `--no-kit` | Disable the [auto-kit](../../configuration/sandbox/index.md#auto-kit): do not stage skills or prompt files into the sandbox | -| `--agent-picker [refs]` | Show a full-screen interactive picker before launching, letting you browse and select an agent. Accepts an optional comma-separated list of agent references to show (defaults to the built-in `default` and `coder` agents plus any agent configs found in `~/.agents`). Arrow keys navigate; `?` toggles the YAML preview panel; `l` (or mouse-click) toggles the **Lean Mode** checkbox to launch in the lean TUI; `b` (or clicking **[ Open Board ]**) opens the Kanban board (`docker agent board`) instead of running an agent; Enter confirms. Not available in `--exec` or non-TTY modes. | +| `--agent-picker [refs]` | Show a full-screen interactive picker before launching, letting you browse and select an agent. Accepts an optional comma-separated list of agent references to show (defaults to the built-in `default` and `minimal` agents plus any agent configs found in `~/.agents`). Arrow keys navigate; `?` toggles the YAML preview panel; `l` (or mouse-click) toggles the **Lean Mode** checkbox to launch in the lean TUI; `b` (or clicking **[ Open Board ]**) opens the Kanban board (`docker agent board`) instead of running an agent; Enter confirms. Not available in `--exec` or non-TTY modes. | | `-w, --worktree [name]` | Run the agent in a fresh git worktree of the working directory, isolating its changes from your checkout. Optionally name it (`--worktree=my-feature`); otherwise a name is generated. Requires the working directory to be inside a git repository. Every tool (the shell included) runs inside the worktree. Combine with `--working-dir` to branch from another repository, and with `--session` to resume into the same worktree later. Cannot be combined with `--remote` or `--sandbox`. When the session ends, a clean worktree is removed automatically; one with work prompts to keep or remove (never in `--exec`). | | `--worktree-base ` | Branch the `--worktree` from `` (a branch, tag, commit, or remote-tracking ref like `origin/main`) instead of the current `HEAD`. A remote-tracking ref is fetched first so the worktree starts from the latest remote state. Requires `--worktree`; cannot be combined with `--worktree-pr`, `--remote`, or `--sandbox`. | | `--worktree-pr ` | Run the agent in a git worktree checked out on an existing GitHub pull request (PR number, `#123`, or PR URL). Continues the PR's branch so commits push back to it. Requires the [GitHub CLI](https://cli.github.com/) (`gh`). Cannot be combined with `--worktree`, `--remote`, or `--sandbox`. | @@ -84,11 +82,14 @@ $ docker agent run [config] [message...] [flags] $ docker agent run agent.yaml $ docker agent run agent.yaml "Fix the bug in auth.go" $ docker agent run agent.yaml -a developer --yolo -$ docker agent run agent.yaml --model anthropic/claude-sonnet-4-5 -$ docker agent run agent.yaml --model "dev=openai/gpt-4o,reviewer=anthropic/claude-sonnet-4-5" +$ docker agent run agent.yaml --model anthropic/claude-sonnet-5-5 +$ docker agent run agent.yaml --model "dev=openai/gpt-4o,reviewer=anthropic/claude-sonnet-5-5" $ docker agent run agent.yaml --session -1 # resume last session $ docker agent run agent.yaml --session -1 --session-read-only # review last session without sending messages $ docker agent run agent.yaml --prompt-file ./context.md # include file as context +$ docker agent run agent.yaml --model "root=openai/gpt-4o,anthropic/claude-sonnet-5-5" # agent-scoped alloy: commas stay inside the spec +$ docker agent run agent.yaml --model "openai/gpt-4o,anthropic/claude-sonnet-5-5" # global alloy applied to every agent +$ docker agent run agent.yaml --model openai/gpt-4o --model "reviewer=anthropic/claude-sonnet-5-5" # mix global + agent-scoped via repeated flags # Add hooks from the command line $ docker agent run agent.yaml --hook-session-start "./scripts/setup-env.sh" @@ -110,7 +111,7 @@ $ docker agent run --agent-picker=myorg/coder,myorg/researcher > [!TIP] > **Lean, inline TUI** > -> Pass `--lean` to get a lightweight TUI that renders inline in your terminal (no alternate screen). Like the full TUI, it displays an ASCII art banner on startup when the chat is empty (configurable via `show_banner` in [user settings](../../configuration/user-settings/index.md)), and supports the same slash commands and streaming output, making it handy inside tmux, scripts, or any context where a full-screen takeover is unwanted. +> Pass `--lean` to get a lightweight TUI that renders inline in your terminal (no alternate screen). Like the full TUI, it displays a braille wordmark banner at the start of the transcript (configurable via `show_banner` in [user settings](../../configuration/user-settings/index.md)), and supports the same slash commands and streaming output, making it handy inside tmux, scripts, or any context where a full-screen takeover is unwanted. > [!TIP] > **Background animations in tmux** @@ -147,6 +148,22 @@ $ docker agent run agent.yaml --worktree-pr https://github.com/owner/repo/pull/1 With `--worktree-pr`, the PR's head branch is checked out tracking its remote (via the [GitHub CLI](https://cli.github.com/)), so commits made during the run push straight back to the pull request. The worktree is stored under `/worktrees/pr-`. +#### Copy ignored files into worktrees + +Add a `.worktreeinclude` at the source repository root to copy selected **gitignored** files into new `--worktree`, `--worktree-pr`, and [background agent](../../tools/background-agents/index.md) worktrees before setup hooks run: + +```gitignore +.env.local +config/*.local.yaml +!config/private.local.yaml +``` + +Patterns use Git's `.gitignore` syntax, including comments, negations and directory patterns. Git's normal rules for ignored parent directories apply: to exclude a child, include the parent with a pattern such as `cache/*` rather than `cache/`. Only files ignored by Git in both the source and destination checkouts are copied. A file not ignored in the destination is skipped with a warning; add appropriate ignore rules to the destination base or PR if it is needed there. Destination checks retry failed batches up to a fixed limit; if the limit is reached, unverified files are skipped with a warning, even if some would otherwise be eligible. This differs from tools that treat `.worktreeinclude` as a list of paths or also copy non-ignored files. Tracked changes and other untracked files are not copied. Missing `.worktreeinclude` leaves worktree creation unchanged. + +File permissions are preserved except that group or other permissions are removed when source ancestor directories prevent traversal for that class. New parent directories are private (`0700`). Existing destination files are never overwritten; symlinks, special files, `.gitignore`, and `.gitattributes` files are skipped. This prevents copies from changing the destination's ignore rules or staging attributes. Failures and skipped protected files produce bounded warnings without undoing the worktree; repeated protected-file skips are aggregated, and omitted warnings are counted. Cancellation stops copying and removes an incomplete file, leaving the worktree in place. Background-task warnings appear in the task metadata and logs. Files blocked by the source checkout's nearest [`.agentsignore`](../../configuration/agentsignore/index.md) are not copied, even if included here. `.agentsignore` itself is not copied by this mechanism. As always, `.agentsignore` only governs the filesystem toolset, not shell or other independent tools. + +Copied files are independent copies. **Ignored files do not make a worktree dirty**, so an interactive run can remove a clean worktree and its copied files automatically. Changing the destination's ignore rules later can make copied files visible to ordinary `git add`; `git add -f` can stage ignored files even without such a change. Changes to those copies do not propagate back to the source checkout; save anything needed before cleanup. + When the interactive session ends, the worktree is cleaned up based on its state: - **Clean** (no uncommitted changes, untracked files, or new commits): the worktree and its branch are removed automatically. @@ -199,6 +216,8 @@ $ docker agent new --model openai/gpt-5 $ docker agent new --model dmr/ai/gemma3-qat:12B --max-iterations 15 ``` +When `--max-iterations` is omitted (or `0`) and the agent creator uses a DMR model, the session reaches its iteration limit after 20 iterations. In the interactive TUI that pauses for a decision to continue (approving grants 10 more iterations) rather than ending the session; non-interactive runs stop. With other providers no limit is applied. An explicit non-zero value always wins. + ### `docker agent getting-started` Run a short (about 2 minutes), skippable interactive tour inside the chat UI: sending messages, approving tool calls, the command palette (Ctrl+K), slash commands, and how agents are configured. Aliased as `docker agent tour`. Requires an interactive terminal. @@ -305,7 +324,7 @@ $ docker agent serve api || [flags] | -------------------------- | ------------------ | ---------------------------------------------------------------------------------------------------------- | | `-l, --listen ` | `127.0.0.1:8080` | Address to listen on. | | `--auth-token ` | (none) | Require `Authorization: Bearer ` for API requests. Mandatory for non-loopback TCP listeners; optional for loopback and local sockets. The `/health` and `/ready` probes are exempt. | -| `--max-request-size ` | `1048576` (1 MiB) | Maximum request body size. Requests exceeding this limit are rejected with HTTP 413 — see [Troubleshooting: HTTP 413](../../guides/troubleshooting/index.md#http-413-request-body-too-large). | +| `--max-request-size ` | `33554432` (32 MiB) | Maximum request body size. Requests exceeding this limit are rejected with HTTP 413 — see [Troubleshooting: HTTP 413](../../guides/troubleshooting/index.md#http-413-request-body-too-large). | | `--session-workingdir-root ` | (none) | Confine the `working_dir` of sessions created via `POST /api/sessions` to this directory and its descendants (symlinks are resolved before the check). Unrestricted by default — any clean host directory is accepted (raw values containing `..` are rejected), as local single-user daemons rely on. Recommended for multi-user or network-exposed deployments. | | `--stream-coalesce-window ` | `50ms` | Merge consecutive streaming deltas (text, reasoning, tool-call arguments, tool output) that arrive within this window into a single SSE event. The first delta after a quiet spell is sent at once. `0` sends one event per delta. See [Streaming Responses](../api-server/index.md#streaming-responses). | | `-s, --session-db ` | `session.db` | Path to the SQLite session database (relative paths resolve against the working directory). | @@ -346,7 +365,7 @@ $ docker agent serve mcp [flags] | `--insecure-no-auth` | `false` | Permit unauthenticated non-loopback HTTP MCP binding. | | `-l, --listen ` | `127.0.0.1:8081` | Address to listen on (only used with `--http`). | | `--mcp-keepalive ` | `0` (disabled) | Interval between MCP keep-alive pings (e.g. `30s`). Only when serving an agent over stdio — rejected with `--http` (the stateless HTTP transport, MCP `2026-07-28`, has no server-initiated ping) and with `--attach`. | -| `--attach [target]` | (none) | Attach to a running TUI run by pid, address, or session id; given without a value, selects the most recent run. | +| `--attach [target]` | (none) | Attach to a running TUI run by pid, address, or session id; name a session id as `--attach=` to select that tab, including a tab spawned after the run started (a space-separated `--attach ` is also accepted). Given without a value, selects the most recent run. | All [runtime configuration flags](#runtime-configuration-flags) are also accepted. @@ -356,6 +375,8 @@ $ docker agent serve mcp agent.yaml # stdio trans $ docker agent serve mcp agent.yaml --http --listen 127.0.0.1:9090 # streaming HTTP $ docker agent serve mcp agent.yaml --working-dir /path/to/project $ docker agent serve mcp myorg/coder +$ docker agent serve mcp --attach # the most recent TUI run +$ docker agent serve mcp --attach= # one live TUI tab, including a spawned one ``` See [MCP Mode](../mcp-mode/index.md) for detailed setup. @@ -375,24 +396,57 @@ $ docker agent serve a2a [flags] | `--auth-token ` | (none) | Bearer token required for agent-card and invocation requests. | | `--cors-origin ` | (none) | Allowed browser origins, comma-separated; empty disables CORS. | | `--insecure-no-auth` | `false` | Allow an unauthenticated non-loopback listener (unsafe). | +| `--push-allow-private` | `false` | Let push-notification webhooks reach loopback, private and link-local addresses, and route them through `HTTP(S)_PROXY`. See [push notifications](../a2a/index.md#push-notifications). | | `--safety ` | `restricted` | Tool safety policy; `autonomous` is permitted only through this explicit CLI flag. | -| `-s, --session-db ` | `/session.db` | Path to the SQLite session database. | +| `--tool-approval` | `false` | Let clients approve or reject tool calls out-of-band via the A2A input-required flow (`tool-approval/v1` extension). | +| `-s, --session-db ` | `/session.db` | Path to the SQLite session database. A2A tasks and webhook registrations are kept in a private `-a2a/` directory next to it; only one A2A server may use a given path at a time. | All [runtime configuration flags](#runtime-configuration-flags) are also accepted. ```bash # Examples $ docker agent serve a2a agent.yaml +$ docker agent serve a2a agent.yaml --push-allow-private # webhooks on localhost $ docker agent serve a2a agent.yaml --listen 127.0.0.1:9000 $ docker agent serve a2a myorg/agent:tag ``` +### `docker agent serve ag-ui` + +Start an [AG-UI](https://docs.ag-ui.com) protocol server. `POST` a `RunAgentInput` to `/ag-ui` and the run is streamed back as AG-UI events over Server-Sent Events, for any AG-UI client SDK. + +```bash +$ docker agent serve ag-ui [flags] +``` + +| Flag | Default | Description | +| ------------------------- | ----------------------- | --------------------------------------------------------------------------------------- | +| `-a, --agent ` | (team default) | Name of the agent to run. Defaults to the team's first agent if not specified. | +| `-l, --listen ` | `127.0.0.1:8084` | Address to listen on. | +| `--auth-token ` | (none) | Bearer token required for all requests (`Authorization: Bearer `). | +| `--cors-origin ` | (none) | Allowed browser origins, comma-separated; empty disables CORS. | +| `--insecure-no-auth` | `false` | Allow an unauthenticated non-loopback listener (unsafe). | +| `--safety ` | `restricted` | Tool safety policy; `autonomous` is permitted only through this explicit CLI flag. | +| `-s, --session-db ` | `/session.db` | Path to the SQLite session database. Each AG-UI thread is a session in it. | + +All [runtime configuration flags](#runtime-configuration-flags) are also accepted. + +```bash +# Examples +$ docker agent serve ag-ui agent.yaml +$ docker agent serve ag-ui ./team.yaml --agent reviewer +$ docker agent serve ag-ui myorg/agent:tag --listen 127.0.0.1:9090 +$ docker agent serve ag-ui agent.yaml --auth-token "$AG_UI_TOKEN" --cors-origin http://localhost:3000 +``` + +See [AG-UI](../ag-ui/index.md) for the endpoint, the event mapping and the current limitations. + ### `docker agent serve acp` -Start an ACP (Agent Client Protocol) server over stdio. This allows external clients to interact with your agents using the ACP protocol. +Start an ACP (Agent Client Protocol) server over stdio. This allows external clients to interact with your agents using the ACP protocol. If no config is specified, uses the `default` built-in agent (or your `default` alias, if configured). ```bash -$ docker agent serve acp [flags] +$ docker agent serve acp [config] [flags] ``` | Flag | Default | Description | @@ -403,6 +457,7 @@ All [runtime configuration flags](#runtime-configuration-flags) are also accepte ```bash # Examples +$ docker agent serve acp $ docker agent serve acp agent.yaml $ docker agent serve acp ./team.yaml $ docker agent serve acp myorg/agent:tag @@ -427,7 +482,7 @@ $ docker agent serve chat [flags] | `--api-key-env ` | (none) | Read the required API key from this non-empty environment variable. | | `--insecure-no-auth` | `false` | Permit unauthenticated non-loopback binding. | | `--safety ` | `restricted` | Tool safety policy; CLI value overrides agent/runtime configuration. | -| `--max-request-size ` | `1048576` (1 MiB) | Maximum request body size. Requests exceeding this limit are rejected with HTTP 413 — see [Troubleshooting: HTTP 413](../../guides/troubleshooting/index.md#http-413-request-body-too-large). | +| `--max-request-size ` | `33554432` (32 MiB) | Maximum request body size. Requests exceeding this limit are rejected with HTTP 413 — see [Troubleshooting: HTTP 413](../../guides/troubleshooting/index.md#http-413-request-body-too-large). | | `--request-timeout ` | `5m` | Per-request timeout (covers model + tool calls + streaming). | | `--conversations-max ` | `0` | Cache up to N conversations server-side, keyed by `X-Conversation-Id`. `0` disables — clients must resend history. | | `--conversation-ttl ` | `30m` | Idle TTL after which a cached conversation is evicted. | @@ -610,7 +665,7 @@ $ docker agent alias add yolo-coder myorg/coder --yolo $ docker agent alias add careful-coder myorg/coder --safety balanced $ docker agent alias add fast-coder myorg/coder --model openai/gpt-4o-mini $ docker agent alias add safe-coder myorg/coder --sandbox -$ docker agent alias add turbo myorg/coder --yolo --model anthropic/claude-sonnet-4-5 +$ docker agent alias add turbo myorg/coder --yolo --model anthropic/claude-sonnet-5-5 # Use an alias $ docker agent run pirate @@ -634,7 +689,7 @@ $ docker agent alias ls Registered aliases (3): fast-coder → myorg/coder [model=openai/gpt-4o-mini] - turbo → myorg/coder [yolo, model=anthropic/claude-sonnet-4-5] + turbo → myorg/coder [yolo, model=anthropic/claude-sonnet-5-5] yolo-coder → myorg/coder [yolo] Run an alias with: docker agent run @@ -654,7 +709,7 @@ $ docker agent alias list --json "name": "turbo", "path": "myorg/coder", "yolo": true, - "model": "anthropic/claude-sonnet-4-5" + "model": "anthropic/claude-sonnet-5-5" }, { "name": "yolo-coder", @@ -801,7 +856,11 @@ $ docker agent debug oauth login agent.yaml github > > The text output of `debug auth` truncates the token to a short preview, but `--json` includes the complete, unredacted JWT in its `token` field. Never paste `debug auth --json` output into logs, issue trackers, or bug reports — anyone with that token can act as you against Docker. Use the plain-text output (or redact the `token` field yourself) when sharing diagnostic output. -The `Source` field says where the token came from: `docker desktop`, or `minted from the stored access token` when it was obtained by exchanging the access token `docker login` stored. See [Docker authentication](../../guides/secrets/index.md#docker-authentication). +The `Source` field says where the token came from: `docker desktop secrets engine` when it was read from the secrets engine Docker Desktop serves, `docker desktop` when Docker Desktop's backend served it, or `minted from the stored access token` when it was obtained by exchanging the access token `docker login` stored. See [Docker authentication](../../guides/secrets/index.md#docker-authentication). + +`Username` and `Email` come from the secrets engine's session when the engine supplied the token, otherwise from Docker Desktop, and otherwise from the token itself. + +When the secrets engine couldn't be read, `Secrets engine` says why, `Socket` which socket was tried, and `Hint` how to fix it. The JSON output has them under `secrets_engine` as `reason`, `socket` and `hint`, along with the full `error`. A secrets engine that isn't running is only reported when no token was found, since machines without Docker Desktop don't have one. The `config`, `toolsets`, `tool`, `skills`, and `title` subcommands also accept [runtime configuration flags](#runtime-configuration-flags) (`--working-dir`, `--models-gateway`, …); `title` additionally accepts `--model` to override the model used to resolve the config before generating the title. @@ -872,7 +931,7 @@ When `--otel` is enabled, the standard [OTel SDK env vars](https://opentelemetry ## Runtime Configuration Flags -These flags are accepted by every command that loads an agent (`run`, `run --exec`, `new`, `eval`, `serve api`, `serve mcp`, `serve a2a`, `serve acp`, `serve chat`). They are listed once here to avoid repetition in the per-command tables above. +These flags are accepted by every command that loads an agent (`run`, `run --exec`, `new`, `eval`, `serve api`, `serve mcp`, `serve a2a`, `serve ag-ui`, `serve acp`, `serve chat`). They are listed once here to avoid repetition in the per-command tables above. | Flag | Description | | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | diff --git a/_vendor/github.com/docker/docker-agent/docs/features/code-mode/index.md b/_vendor/github.com/docker/docker-agent/docs/features/code-mode/index.md index 218e242d9130..4f6a1c22022e 100644 --- a/_vendor/github.com/docker/docker-agent/docs/features/code-mode/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/features/code-mode/index.md @@ -22,7 +22,7 @@ Set `code_mode_tools: true` on an agent: # examples/code_mode.yaml agents: root: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: Demonstrates the use of Code Mode with tools instruction: Use your tool to help the user with their github requests. code_mode_tools: true @@ -73,7 +73,7 @@ It is not a general-purpose replacement for direct tool calls: for an agent that - **One string result.** The script must return a string; use `console.*` inside the script to print debug information if something doesn't behave as expected — it comes back to the model as `stdout`/`stderr` alongside the result, but is not displayed by the terminal UIs. - **Failures are diagnosable.** If the script throws or returns unexpectedly, the response includes the tool calls it made before failing (name, arguments, and result or error), so the model can see what happened and adjust the script on the next attempt. -- **Not every tool is wrapped.** Tools in the `todo` category and repeatable tools such as `random_int` and `get_datetime` stay directly callable as ordinary tools. Repeatable tools are unavailable inside scripts so successful calls retain their duplicate-loop exemption without exempting failed or unrelated scripts. +- **Not every tool is wrapped.** Tools executed by the runtime itself, such as `transfer_task`, `handoff`, `run_skill`, and the background-agent tools, stay directly callable as ordinary tools because scripts can't invoke them. Tools in the `todo` category and repeatable tools such as `random_int` and `get_datetime` stay directly callable as ordinary tools. Repeatable tools are unavailable inside scripts so successful calls retain their duplicate-loop exemption without exempting failed or unrelated scripts. - **The script runs in an embedded, sandboxed JS engine** ([goja](https://github.com/dop251/goja)), not Node.js or a browser: there is no filesystem, network, or process access beyond the tool functions injected into it. - **Partial startup is supported.** If one toolset fails to initialize (for example, an MCP server that won't connect), Code Mode remains available with the successfully loaded toolsets. The failed toolset is omitted from the JavaScript environment and retried on subsequent turns. A warning is emitted once when the failure first occurs, but not on subsequent turns while the failure persists. When the toolset recovers, its tools silently reappear in the environment. When the failed toolset's cause is retryable (e.g. an MCP server or RAG knowledge base hitting rate limits), its retries are paced by the same [backoff gate](../../tools/mcp/index.md#lifecycle-auto-restart-profiles) used outside code mode, instead of retrying on every turn. @@ -86,4 +86,4 @@ In practice this means enabling `code_mode_tools` collapses the approval granula > [!WARNING] > **Coarser approval granularity** > -> Approving a `run_tools_with_javascript` call approves every tool it might invoke internally, including ones that would otherwise need a separate `ask` or be blocked by a `deny` pattern under [Permissions](../../configuration/permissions/index.md). If an agent's toolset includes anything destructive, consider whether Code Mode's coarser granularity is acceptable for that agent before enabling it. Delegating to a separate, non-Code-Mode agent isn't a way out either: [handoff](../../tools/handoff/index.md) and [transfer_task](../../tools/transfer-task/index.md) are themselves wrapped like any other tool once `code_mode_tools` is on, but they have no code-mode-compatible handler — the model's script gets `tool "handoff" is not available in code mode` if it tries to call them. This only rules out the model *choosing* to delegate from inside the script: a configured `force_handoff` target on the agent still runs deterministically after the agent's turn naturally stops, regardless of Code Mode, since it's applied by the runtime outside the tool-call dispatch path Code Mode replaces. Keep `code_mode_tools` off any agent whose model needs to hand off or transfer to one that holds a destructive toolset. +> Approving a `run_tools_with_javascript` call approves every tool it might invoke internally, including ones that would otherwise need a separate `ask` or be blocked by a `deny` pattern under [Permissions](../../configuration/permissions/index.md). If an agent's toolset includes anything destructive, consider whether Code Mode's coarser granularity is acceptable for that agent before enabling it. [handoff](../../tools/handoff/index.md) and [transfer_task](../../tools/transfer-task/index.md) are not affected: they are executed by the runtime itself and stay directly callable as ordinary tools, so the model can still delegate normally. They just can't be called from inside a script — a script that tries gets `tool "handoff" is not available in code mode`. A configured `force_handoff` target also still runs after the agent's turn naturally stops, regardless of Code Mode. diff --git a/_vendor/github.com/docker/docker-agent/docs/features/evaluation/index.md b/_vendor/github.com/docker/docker-agent/docs/features/evaluation/index.md index e664b7ad7982..9859d7207d50 100644 --- a/_vendor/github.com/docker/docker-agent/docs/features/evaluation/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/features/evaluation/index.md @@ -8,8 +8,6 @@ aliases: - /ai/docker-agent/evals/ --- -_Measure agent quality with automated evaluations — tool call accuracy, response relevance, output size, and more._ - ## Overview The `docker agent eval` command runs your agent against a set of recorded sessions and scores the results. Each eval session captures a user question, the expected tool calls, and criteria the response must satisfy. Docker Agent replays the question, compares the agent's behavior to expectations, and produces a report. @@ -388,31 +386,26 @@ passing: a gate that cannot fail is worse than no gate. ### Provider Credentials -Eval containers are isolated from your host environment. Dedicated model -provider API keys (for example `ANTHROPIC_API_KEY` or `OPENAI_API_KEY`) are -forwarded into eval containers automatically, so most provider setups work -without extra flags. +Eval containers do not automatically receive host environment variables, including +provider API keys, gateway settings, Docker tokens, or credentials referenced by +evaluators and hooks. Pass each required variable explicitly with `-e`: -> [!WARNING] -> **`GITHUB_TOKEN` and `GH_TOKEN` are not forwarded automatically** -> -> GitHub tokens are broad credentials (git, `gh`, CI, packages), not dedicated -> model API keys, so for security reasons Docker Agent does not forward them -> into eval containers — even when they are set in your shell or in -> `~/.config/cagent/.env`. If your agent uses the `github-copilot` provider, -> pass the token explicitly by name: -> -> ```bash -> docker agent eval agent.yaml ./evals -e GITHUB_TOKEN -> ``` -> -> When using a custom env file, both flags are required: -> -> ```bash -> docker agent eval agent.yaml ./evals \ -> --env-from-file /path/to/secrets.env \ -> -e GITHUB_TOKEN -> ``` +```bash +docker agent eval agent.yaml ./evals -e OPENAI_API_KEY +``` + +`-e NAME` resolves the value from the configured environment sources; +`-e NAME=VALUE` supplies a literal value. Loading a custom env file does not +implicitly forward its contents: + +```bash +docker agent eval agent.yaml ./evals \ + --env-from-file /path/to/secrets.env \ + -e GITHUB_TOKEN +``` + +To use a models gateway inside the container, explicitly pass +`DOCKER_AGENT_MODELS_GATEWAY` and any authentication variables it requires. Note that the judge runs on the host, not inside the eval container. If the token is not forwarded, judge validation can succeed while every diff --git a/_vendor/github.com/docker/docker-agent/docs/features/harnesses/index.md b/_vendor/github.com/docker/docker-agent/docs/features/harnesses/index.md index 1dcb5b202e1d..dced70498d55 100644 --- a/_vendor/github.com/docker/docker-agent/docs/features/harnesses/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/features/harnesses/index.md @@ -6,22 +6,10 @@ weight: 50 canonical: https://docs.docker.com/ai/docker-agent/features/harnesses/ --- -_Delegate coding tasks to external AI coding CLIs (Claude Code, Codex, opencode) as sub-agents._ - ## Overview A **harness** agent delegates its work to an external coding CLI — `claude` (Claude Code), `codex` (OpenAI Codex), `opencode`, `pi`, or `cmd` (Command Code) — instead of calling a model API directly. The external CLI drives the coding loop while Docker Agent provides orchestration, hooks, permissions, and distribution. -This pattern gives you the best of both worlds: - -- **External CLI strengths** — deep IDE integration, specialized coding workflows, CLI-native tool access -- **Docker Agent strengths** — multi-agent coordination, hook-based auditing and policy enforcement, permission controls, OCI distribution, and the full agent config schema - -> [!NOTE] -> **When to use harnesses** -> -> Use a harness when you want a Claude Code / Codex / opencode session to act as a sub-agent inside a larger Docker Agent workflow — for example, an orchestrator that plans work and delegates coding tasks to specialized harness agents. - ## Prerequisites The external CLI must be installed and available on `PATH` before starting Docker Agent: @@ -68,17 +56,22 @@ agents: description: Claude Code coding agent harness: type: claude-code - model: claude-sonnet-4-5 # optional: alias (sonnet, opus, haiku) or full model ID + model: claude-sonnet-5-5 # optional: alias (sonnet, opus, haiku) or full model ID effort: high # low | medium | high | xhigh | max ``` - `model` accepts whatever the `claude` CLI accepts for `--model`: an alias like `sonnet`, `opus`, or `haiku`, or a full model ID like - `claude-sonnet-4-5`. Omit it to use Claude Code's own default model. This is + `claude-sonnet-5-5`. Omit it to use Claude Code's own default model. This is **not** a Docker Agent `provider/model` reference — the harness model never goes through Docker Agent's model providers or routing. - `effort` is forwarded as `--effort` and must be one of `low`, `medium`, - `high`, `xhigh`, or `max`. Omit it to use Claude Code's own default. + `high`, `xhigh`, or `max`. Omit it to use Claude Code's own default. In the + TUI, `/effort` and Shift+Tab change it for the + following turns of the session (`command-code` harnesses too). +- Session titles come from the CLI as well, since a harness agent has no + model: Docker Agent runs `claude --print` once on the `haiku` model, with + no tools, MCP servers or saved session, to title a new session. #### Authentication (Claude subscription, no API key) @@ -129,6 +122,29 @@ ready-to-run `claude-code-agent.yaml`. > harness unless the sandbox image is separately provisioned and > authenticated. +#### Questions and plan approval + +When you can answer, Claude Code's own questions reach you as an elicitation +form, like an MCP server's: in the TUI, through the API server's +`elicitation_request` events, or in any client that answers elicitations. + +- **`AskUserQuestion`**: one form per call, with each option's description + under it. You pick one option of a single-choice question and check any of + a multiple-choice one (Space toggles). A free answer replaces + the choices, like Claude Code's "Other". If you decline or dismiss the + form, Claude Code learns that you did not answer. +- **Plan approval** (`ExitPlanMode`): you see the plan and choose to proceed + or keep planning. Optional feedback goes back to Claude Code when you keep + planning. + +Docker Agent serves these prompts to the CLI through +`--permission-prompt-tool`, from an MCP server on loopback that lives for one +turn and requires a per-turn token. Other tools still run without asking. +Non-interactive sessions (`serve mcp`, A2A, background agents) keep the +previous behavior: Claude Code asks in plain text and ends its turn. +`docker agent run --exec` answers no forms, so it declines them and Claude +Code carries on without an answer. + ### Codex ```yaml @@ -239,7 +255,7 @@ agents: harness: type: claude-code effort: medium # low | medium | high | xhigh | max; omit for the Claude Code default - # model: claude-sonnet-4-5 # optional; omit for the Claude Code default + # model: claude-sonnet-5-5 # optional; omit for the Claude Code default ``` ```bash @@ -257,7 +273,7 @@ An orchestrator plans the work and delegates to specialized harness agents one a models: claude: provider: anthropic - model: claude-sonnet-4-5 + model: claude-sonnet-5-5 agents: root: @@ -275,7 +291,7 @@ agents: description: Claude Code specialist for complex refactors harness: type: claude-code - model: claude-sonnet-4-5 + model: claude-sonnet-5-5 effort: xhigh codex-coder: @@ -300,7 +316,7 @@ Combine the `background_agents` toolset with harness sub-agents to dispatch mult models: claude: provider: anthropic - model: claude-sonnet-4-5 + model: claude-sonnet-5-5 agents: root: diff --git a/_vendor/github.com/docker/docker-agent/docs/features/mcp-mode/index.md b/_vendor/github.com/docker/docker-agent/docs/features/mcp-mode/index.md index d251dd4e6d2c..4eb071bcf958 100644 --- a/_vendor/github.com/docker/docker-agent/docs/features/mcp-mode/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/features/mcp-mode/index.md @@ -115,14 +115,14 @@ When you expose a multi-agent configuration via MCP, each agent becomes a separa ```yaml agents: root: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: Main coordinator sub_agents: [designer, engineer] designer: model: openai/gpt-5-mini description: UI/UX design specialist engineer: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: Software engineer ``` diff --git a/_vendor/github.com/docker/docker-agent/docs/features/remote-mcp/index.md b/_vendor/github.com/docker/docker-agent/docs/features/remote-mcp/index.md index 3e8c5925b29e..97c093679a5c 100644 --- a/_vendor/github.com/docker/docker-agent/docs/features/remote-mcp/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/features/remote-mcp/index.md @@ -6,8 +6,6 @@ weight: 120 canonical: https://docs.docker.com/ai/docker-agent/features/remote-mcp/ --- -_Connect Docker Agent to cloud services via remote MCP servers with built-in OAuth authentication._ - ## Overview Docker Agent supports connecting to remote MCP servers over **Streamable HTTP**, **SSE** (Server-Sent Events), and **Unix domain sockets**. Streamable HTTP is the current recommended transport for most hosted MCP servers. Many popular services offer MCP endpoints with OAuth — Docker Agent handles the authentication flow automatically. @@ -42,7 +40,7 @@ The path after `unix://` is the absolute path to the socket file. Configured `he > [!TIP] > **Cancelling the authorization dialog** > -> If you dismiss the OAuth authorization dialog, the request is cancelled cleanly — no repeated prompts appear. The agent will report that authorization was declined. To try again, simply re-enable the server or repeat the request that triggered the flow. +> Dismissing the OAuth authorization dialog cancels the request. To try again, re-enable the server or repeat the request that triggered the flow. ## Configuration @@ -62,6 +60,8 @@ For full configuration details, see the [Tool Config](../../configuration/tools/ Set `allow_private_ips: true` on a remote MCP toolset only when the MCP server or its OAuth registration/token endpoints intentionally resolve to private, loopback, or link-local addresses. The default blocks those OAuth helper requests to reduce SSRF risk. +Set `standalone_sse: true` on a `streamable` remote toolset to open the optional standalone SSE `GET` stream on the MCP endpoint. Some gateways (for example the sbx MCP gateway) send keepalive pings and `notifications/tools/list_changed` over that stream and drop sessions they cannot reach, so without it the session expires silently and the tool list goes stale. It defaults to `false` because a few servers hang when the stream is opened. It has no effect with `transport_type: "sse"`. + When Docker Desktop is running, eligible OAuth discovery, registration, token exchange, refresh, and helper requests use its PAC adapter before environment proxy settings. It does not apply to remote MCP Streamable HTTP/SSE transport. Set `DOCKER_AGENT_DISABLE_DESKTOP_PROXY=1` (or `true`, `yes`, or `on`) to restore standard `HTTP_PROXY`, `HTTPS_PROXY`, `ALL_PROXY`, and `NO_PROXY` routing; `NO_PROXY` does not bypass Desktop PAC selection. Docker Agent does not evaluate PAC files or URLs directly—see [Docker Desktop proxy](../../tools/fetch/index.md#docker-desktop-proxy). > [!NOTE] @@ -90,7 +90,7 @@ When Docker Desktop is running, eligible OAuth discovery, registration, token ex > - **Silent refresh:** when a refresh token is available, Docker Agent silently exchanges it for a new access token and replays the request — no user interaction required. > - **Re-authentication prompt:** when the refresh token is absent or has also expired, the toolset transitions to a "needs re-auth" state and surfaces an OAuth prompt on your next message (exactly like the first-time flow). > -> Either way, the agent never burns 5 reconnect attempts on an auth failure — it fails fast and either refreshes silently or defers to interactive re-auth. If you want to trigger re-auth immediately without waiting for the next message, run `/toolset-restart ` from the TUI. +> To trigger re-auth immediately without waiting for the next message, run `/toolset-restart ` from the TUI. ### OAuth for servers without Dynamic Client Registration @@ -283,7 +283,7 @@ Combine multiple remote MCP servers in a single agent: ```yaml agents: root: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 instruction: | You help manage projects and deployments. toolsets: @@ -307,4 +307,4 @@ agents: > [!NOTE] > **Growing list** > -> This list is updated as more services add MCP support. If a service you use isn't listed, check their documentation — many providers are adding MCP endpoints regularly. +> For services not listed here, check their documentation for an MCP endpoint. diff --git a/_vendor/github.com/docker/docker-agent/docs/features/sessions/index.md b/_vendor/github.com/docker/docker-agent/docs/features/sessions/index.md index b89b69a2bab1..6c6f0519f65e 100644 --- a/_vendor/github.com/docker/docker-agent/docs/features/sessions/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/features/sessions/index.md @@ -14,6 +14,11 @@ Every `docker agent run` creates or resumes a **session**: the record of a conve A session is only persisted to disk once it has content (the first message added), so a run you cancel before sending anything never leaves an empty session behind. +> [!NOTE] +> Reopening a session restores conversation history. To also recover execution +> progress after a crash, Go applications can opt into the +> [Durable Runtime](../../guides/durable-runtime/index.md). + ## Where Sessions Are Stored Sessions live in a SQLite database, `session.db`, under the [data directory](../cli/index.md#global-flags) (`~/.cagent` by default): @@ -108,6 +113,22 @@ settings: restore_tabs: true ``` +An explicit `--session` takes precedence over `restore_tabs`: it opens the requested session rather than the saved tab layout without replacing the saved layout at startup. + +### Terminal program resume + +Terminals that support [OSC 7577](https://www.superlogical.com/rex/docs/build/program-resume) can restore a running standalone `docker-agent run ./agent.yaml` after the terminal application restarts. In Rex, session restore also requires an opt-in trust rule for the host executable and the reported command; see [Rex session restore](https://www.superlogical.com/rex/docs/features/session-restore) and [resume rules](https://www.superlogical.com/rex/docs/customize/resume-rules). Only trust terminal programs when you trust the host application. The terminal decides whether to restore a report. + +Each eligible interactive process maintains an independent, private, versioned instance file under `/resume-instances/.json` and reports `docker-agent run --resume-instance ` (preserving an absolute `--data-dir ` when `--data-dir` or `DOCKER_AGENT_DATA_DIR` was explicitly set). Resuming an instance restores its ordered persisted session tabs in their validated working directories and activates the saved active tab, without reading or overwriting shared `restore_tabs` state or changing ordinary `--session` behavior. + +Reporting and `--resume-instance` are deliberately bounded and fail closed: + +- **Supported runs**: interactive, full-TUI (non-lean) standalone runs targeting a local regular agent file with a persisted active session. Plugin (`docker agent`), sandbox, remote, recorded/fake, read-only, worktree, tour, and non-interactive runs are not reported. Runs with initial prompts, attachments, `--prompt-file`, other CLI flags (beyond `--config-dir`, `--data-dir`, `--session`, `--session-db`, and `--resume-instance`), or `DOCKER_AGENT_MODELS_GATEWAY` / `DOCKER_AGENT_DEFAULT_MODEL` overrides are not reported, and `--resume-instance` rejects extra flags, positional arguments, or those environment overrides. +- **Validation and policy checks**: preflight verifies every tab before starting any runtime, checking the canonical agent file, session ID, working directory and pinned symlink target, saved safety policy, and session permissions fingerprint. Invalid or unreadable `settings.hooks` or `hooks.d` drop-ins prevent reporting and fail closed on resume. Workspaces with a present or uninspectable `.agentsignore` (in the workspace or an ancestor) also prevent reporting and fail closed on resume. Valid changes to the agent file, user settings, hooks, or global permissions between runs are loaded from the instance's saved config directory on resume and are not rejected. +- **Not restored**: unsent composer text, unpersisted tabs, live tool processes, and the original process environment are not restored. Neither OSC 7577 output nor instance state files contain `OSC7577_TOKEN`, credentials, or conversation messages. +- **Lifecycle**: intentional exit (`/exit` on the last tab or confirmed quit) clears the terminal resume record and deletes the instance file. Shutdown or hangup preserves both so the terminal can restore the instance, and a resumed process re-reports once its tabs are restored. `OSC7577_TOKEN` is stripped from the environment before startup spawns any child process (preserved only across a verified self-update `re-exec`), and automatic self-update is skipped for `--resume-instance` invocations. +- **Platform support**: private instance storage is currently supported on Linux and cgo-enabled macOS builds, where ancestor ownership/permissions, private directory/file modes, and ACLs are verified before reading or writing state. Windows and non-cgo macOS builds fail closed because platform ACL verification is not yet implemented there. + ## Session Titles Docker Agent auto-generates a short title for each session from your first message, using a one-shot call to the agent's own model. Point that call at a smaller, cheaper model instead with `title_model` on a model definition: @@ -117,7 +138,7 @@ Docker Agent auto-generates a short title for each session from your first messa models: primary: provider: anthropic - model: claude-sonnet-4-5 + model: claude-sonnet-5-5 # Generate session titles with the cheaper Haiku model instead of Sonnet. title_model: fast fast: @@ -141,7 +162,7 @@ See [`docker agent debug title`](../cli/index.md#docker-agent-debug) for details ## Usage & Cost Tracking -Every tracked model call — the main conversation turns and compaction calls — updates the session's cumulative input/output token counts and cost. Check them at any time with `/cost` in the TUI, or disable tracking per-model with `track_usage: false` if you don't want a model's calls counted (for example, a free local model). Auxiliary one-shot calls the runtime makes on your behalf, such as automatic session-title generation, call the model directly and are not folded into this total. +Every tracked model call — the main conversation turns and compaction calls — updates the session's cumulative input/output token counts and cost. Check them at any time with `/cost` in the TUI, or disable tracking per-model with `track_usage: false` if you don't want a model's calls counted (for example, a free local model). Auxiliary one-shot calls the runtime makes on your behalf, such as automatic session-title generation, call the model directly and are not folded into this total. The exception is `/btw` side questions: their usage and cost are recorded (without storing the question or answer) and count toward the session total and `/cost`. Cost is computed from the [models.dev](https://models.dev/) pricing catalogue by default. For a custom endpoint, a private deployment, or a negotiated enterprise rate the catalogue doesn't know about, declare pricing explicitly with a model's `cost:` block: @@ -160,11 +181,6 @@ models: An all-zero `cost:` table means "priced, free" — distinct from a model with no `cost:` at all, which falls back to the catalogue (and bills $0 for models the catalogue doesn't know). -> [!NOTE] -> **Cost never decreases** -> -> A session's cumulative cost is a running total updated after every *tracked* model call — the same main conversation turns and compaction calls described above. Compacting the conversation (manually with `/compact`, or automatically — see the agent's `session_compaction`/`compaction_threshold` fields in the [Agent Config reference](../../configuration/agents/index.md)) reshapes the message history sent back to the model, but never touches this running total. Auxiliary one-shot calls such as automatic session-title generation are not tracked and are not reflected in this total: `/cost` covers everything the session's tracked calls have spent, not literally every model call the runtime makes on your behalf. - ## Resuming Into a Worktree A session created during a `--worktree` run remembers which worktree it used. Resuming it with `--session` reattaches to the same worktree directory and branch automatically — you don't need to pass `--worktree` again. See [`--worktree`](../cli/index.md#docker-agent-run) in the CLI reference for the full worktree lifecycle. diff --git a/_vendor/github.com/docker/docker-agent/docs/features/skills/index.md b/_vendor/github.com/docker/docker-agent/docs/features/skills/index.md index 530fcbfad81b..2b847caa9adb 100644 --- a/_vendor/github.com/docker/docker-agent/docs/features/skills/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/features/skills/index.md @@ -25,9 +25,6 @@ agents: skills: true ``` -> [!TIP] -> Skills are perfect for encoding team-specific workflows (PR review, deployment, coding standards) that apply across projects. - ## Filtering Skills The `skills` field also accepts a list, letting you restrict the agent to a specific subset of skills instead of exposing every discovered one. List items are classified automatically: @@ -289,6 +286,7 @@ When the agent encounters a task that matches a `context: fork` skill, it uses t - **Isolates the context window** — the sub-agent has its own conversation history, so lengthy tool-call chains don't eat into the parent's token budget - **Folds the result** — only the sub-agent's final answer is returned to the parent as the tool result - **Inherits the parent's model and tools** — the sub-agent can use all tools available to the parent agent (scope this with `allowed_tools` / `toolsets`, see [Scoping a fork skill's tools](#scoping-a-fork-skills-tools)) +- **Inherits the parent's safety policy and permissions** — tool calls inside the fork are gated like normal calls; `run_skill` only launches the sub-session, so it does not add an approval prompt of its own (strict mode still evaluates it like any other call). Skills that bring in toolsets which start background work keep a launch approval step before those toolsets start. > [!TIP] > **When to use context: fork** diff --git a/_vendor/github.com/docker/docker-agent/docs/features/snapshots/index.md b/_vendor/github.com/docker/docker-agent/docs/features/snapshots/index.md index bc624bf89123..a5075fbfb591 100644 --- a/_vendor/github.com/docker/docker-agent/docs/features/snapshots/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/features/snapshots/index.md @@ -6,8 +6,6 @@ weight: 20 canonical: https://docs.docker.com/ai/docker-agent/features/snapshots/ --- -_Shadow-git snapshots capture your workspace at turn boundaries so you can review what an agent changed and undo it without touching your real git history._ - ## Overview When snapshots are enabled, Docker Agent records the state of your working diff --git a/_vendor/github.com/docker/docker-agent/docs/features/tui/index.md b/_vendor/github.com/docker/docker-agent/docs/features/tui/index.md index adb982769f95..2f88dad49cb2 100644 --- a/_vendor/github.com/docker/docker-agent/docs/features/tui/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/features/tui/index.md @@ -13,7 +13,14 @@ _Docker Agent's default interface is a rich, interactive terminal UI with file a ## Launching the TUI -Both the full TUI and the lean TUI display a centered ASCII art Docker Agent banner on startup when the chat is empty. The banner is automatically hidden once the agent starts responding or when a custom welcome message is configured. You can disable the banner entirely from the **Appearance** tab of `/settings`, or by setting `show_banner: false` in your [user settings](../../configuration/user-settings/index.md). +Both the full TUI and the lean TUI display a braille “Docker Agent” title on startup. It uses a violet-to-pink-to-apricot gradient on dark backgrounds and dark grey on light backgrounds, adjusted for contrast against the selected theme’s background. On supported TrueColor terminals, the full TUI draws a twisting stream of dots from the left edge of the chat pane into a cloud that settles into the title from left to right once at launch. Set `DOCKER_AGENT_REDUCE_MOTION=1` to skip the animation; the banner remains static. In the animated banner, the dots also react to the mouse: hovering over the banner pushes nearby dots away, and a left click gives them a stronger burst; they then spring back into the wordmark. Text, dialogs, completions and notifications stay on top of the dots, and mouse input is still routed normally. Terminals without detected TrueColor support, redirected output, and the lean TUI also use the static banner. In lean mode, the terminal's actual background may differ from the selected theme. + +- **Full TUI:** the banner is centered in the empty chat pane. It is not drawn if the pane is narrower than 76 columns or shorter than 6 rows, and it disappears as soon as the conversation has content: when you send a message, when the agent starts responding, or when the agent's `welcome_message` is shown (which replaces the banner as soon as the agent info arrives). +- **Lean TUI:** the banner is printed left-aligned at the start of the transcript, above the resumed session if any, and stays in the scrollback as messages arrive. + +The lean TUI does not change the terminal's background. Choose a theme that matches it: for example, use `--theme default` on a dark terminal or `--theme default-light` on a light terminal. `--theme auto` detects the background at startup when the terminal supports it, falling back to dark when it cannot. A mismatched theme may make text hard to read. + +You can disable the banner entirely from the **Appearance** tab of `/settings`, or by setting `show_banner: false` in your [user settings](../../configuration/user-settings/index.md). ```bash # Launch with a config @@ -51,6 +58,8 @@ $ docker agent run agent.yaml --lean File writes use the tool's display title (for example, **Write**) and preview file contents as tool arguments stream in, with theme-aware syntax highlighting based on the filename. Unknown file types remain plain text. By default, the preview follows the last 10 file lines. Press Ctrl+O to toggle compact (last 10 lines) and complete (full contents) previews for the current session, including already displayed file writes. In `/settings`, change **Written file preview** to **Full** to show the entire incoming file, or persist `settings.lean_full_file_preview: true` in your user config. +The lean TUI sets the terminal window title to `docker agent: ` once the session has a title, and updates it when you resume a session with `/sessions`. Running `/new` resets it to `docker agent`. Control characters are stripped from the title, and the title is not rewritten when it has not changed. + The lean TUI uses a simplified terminal interface with minimal chrome. To make it the default for interactive runs, set `lean` in your user config: ```yaml @@ -63,7 +72,15 @@ Omit `lean` or set it to `false` to keep the full TUI as the default. You can st The lean TUI supports **steering** and **follow-ups** while the agent is running. Press Enter to steer the active turn, or Alt+Enter to queue the message as a separate turn after the current one finishes. Pending messages appear with muted styling at the end of the live stream, labeled `Steering:` or `Follow-up:` so it's clear which turn each one will land on. Press Alt+Up to withdraw every still-pending steer/follow-up (and any locally queued message) back into the editor, concatenated in the order they were sent, so you can edit and resend them; messages the agent has already picked up are left alone. -The lean TUI supports a focused set of slash commands: `/new`, `/sessions`, `/compact`, `/model`, `/effort`, `/copy`, `/clear`, `/settings`, `/help`, `/exit` (alias: `/quit`), plus any agent-defined commands. Type `/model` (or `/model `) to switch the active model inline — the command opens a fuzzy-searchable list of available models. If what you type after `/` doesn't match any command, the autocomplete menu automatically falls back to fuzzy-matching it against available models (by name, provider, or ID) instead of dismissing — selecting a match switches the model just like `/model` would, without needing to type `/model` first; this fallback is unavailable when `/model` itself is disabled via `--disable-commands`. Type `/sessions` (or `/sessions `) to browse and resume past sessions from the current working directory. Type `/copy` to copy the last assistant response to the clipboard. Type `/settings` to open the lean TUI's inline settings panel — see [User Settings](../../configuration/user-settings/index.md) for the fields it exposes. +The lean TUI supports a focused set of slash commands: `/new`, `/sessions`, `/compact`, `/model`, `/effort`, `/btw`, `/copy`, `/clear`, `/settings`, `/help`, `/exit` (alias: `/quit`), plus any agent-defined commands. Type `/model` (or `/model `) to switch the active model inline — the command opens a fuzzy-searchable list of available models. If what you type after `/` doesn't match any command, the autocomplete menu automatically falls back to fuzzy-matching it against available models (by name, provider, or ID) instead of dismissing — selecting a match switches the model just like `/model` would, without needing to type `/model` first; this fallback is unavailable when `/model` itself is disabled via `--disable-commands`. Type `/sessions` (or `/sessions `) to browse and resume past sessions from the current working directory. Type `/copy` to copy the last assistant response to the clipboard. Type `/settings` to open the lean TUI's inline settings panel — see [User Settings](../../configuration/user-settings/index.md) for the fields it exposes. + +MCP elicitations and OAuth prompts appear inline in the lean TUI, in place of the editor, so a tool that asks for input no longer blocks the run with nothing on screen: + +- **Forms** (from MCP servers or the [`user_prompt`](../../tools/user-prompt/index.md) tool) support text, number/integer, boolean, single- and multi-select fields, and masked password fields, plus free-form answers. Single-select fields start on the schema `default` when one is set, instead of always the first option. The full TUI dialog behaves the same way and shares the same validation. In the full TUI, click a code block's copy label to copy its unwrapped code, or press Ctrl+O to copy the whole message as Markdown without your answers. If hidden terminal controls or ambiguous formatting make copying code unsafe, the message's copy labels are hidden. Whole-message copying removes terminal controls. +- **URL prompts:** press y when done, n to decline, o to open the browser, or Esc to cancel. +- **OAuth consent:** press y to authorize, or n/Esc to decline. A notice is shown when authorization completes. + +Concurrent requests are queued and shown oldest first. Ctrl+C cancels the prompt and interrupts the run. Starting a new conversation (`/new`), switching sessions, or reloading a tab cancels any elicitation still waiting from the previous conversation, in both the lean and full TUI, so the tool that raised it is not left waiting. Prefix a message with `!` to run it as a shell command directly, without going through the agent — for example `!git status`. The command runs in your default shell and its output is shown inline in the transcript. Bang commands are disabled in read-only sessions. @@ -85,6 +102,7 @@ Type `/` during a session to see available commands, or press Ctrl+`, or `/btw` alone to type the question in the dialog). The answer streams into a dialog: no tools are used, nothing is saved to the conversation, and compaction, title generation, and the running agent are unaffected. Press ↑/↓ to scroll, c to copy the answer, r to retry after a failure, and Esc to cancel and close. Uses the agent's current model and is billed like any other call. Not available for remote sessions or external coding harnesses (such as Claude Code). In the lean TUI the question is required (`/btw `) and the answer is printed into the transcript when it completes, instead of in a dialog | | `/copy` | Copy the entire conversation to clipboard | | `/copy-last` | Copy only the last assistant message to clipboard | | `/undo` | Restore file changes from the latest snapshot (only when snapshots are enabled) | @@ -93,7 +111,7 @@ Type `/` during a session to see available commands, or press Ctrl+`, or `/effort` alone to pick from the supported levels; reasoning models only). Press Tab after `/effort` and a space to complete a level the current model supports | +| `/effort` | Set the current model's reasoning-effort level (`/effort `, or `/effort` alone to pick from the supported levels; reasoning models and `claude-code` / `command-code` harnesses only). Press Tab after `/effort` and a space to complete a level the current model supports | | `/settings` | Manage appearance, behavior, and notification preferences | | `/yolo` | Toggle automatic tool call approval | | `/title` | Set or regenerate session title | @@ -102,7 +120,7 @@ Type `/` during a session to see available commands, or press Ctrl+` • `` tokens" — Live-sessions rows are silent on the cap, and the sidebar shows a minimal ⚠ capped marker without repeating the model or the figure (the `/context` header is the authoritative source of the model + number). Use the arrow keys to select a row: press Enter on a live session to explicitly compact it, or d on an attached file to drop it | | `/drop` | Remove an attached file from the session context (`/drop `, or `/drop` alone to review and drop from the `/context` dialog). Press Tab after `/drop` and a space to complete an attached file's path | -| `/cost` | Show cost breakdown for this session. Includes a **By Agent** section (alongside **By Model**) showing cumulative cost per agent; unattributed usage and compaction spend appear in their own buckets. | +| `/cost` | Show cost breakdown for this session. Includes a **By Agent** section (alongside **By Model**) showing cumulative cost per agent; unattributed usage and compaction spend appear in their own buckets, and `/btw` side-question spend is itemized under its own group. | | `/eval` | Create an evaluation report | | `/pause` | Pause/resume the runtime loop. While the agent is mid-request, the resize handle shows "Pausing…" until the in-flight request completes; once the loop is blocked the indicator changes to "⏸ Paused". Run `/pause` again to resume. | | `/tools` | Show every toolset (with lifecycle state) and the tools they expose | @@ -177,7 +195,7 @@ The title is rendered in the agent's accent color. Sections appear in this order - **Execution capabilities** — native versus harness execution, tool execution/approval ownership, and support for budgets, native compaction, mid-turn steering and prompt-hook context. Support is not an enabled setting; budget support requires runtime configuration. Harness actions are reported, not approved by Docker Agent. Omitted when the server has not supplied a profile. - **Model / Fallback / Thinking** — the `provider/model`, any fallback models, and the gauge + value thinking line (omitted for models with no selectable thinking, e.g. harness-backed agents). - **Context** — the agent's latest known context usage, e.g. `Context: 12.8K of 128.0K tokens (10%)` (a bare token count when the context limit is unknown; omitted until the agent has run). Sub-agent and background-agent runs are accounted for. When a dedicated `compaction_model` caps the effective limit below the primary model's own window, the token-usage line also shows a short "⚠ capped" marker (see `/context` for the model and figure). -- **Cost** — the agent's cumulative cost across all runs in the session tree. Repeated session snapshots are not double-counted. Omitted until the agent has run. +- **Cost** — the agent's cumulative cost across all runs in the session tree. Omitted until the agent has run. - **Sub-agents (N) / Handoffs (N) / Skills (N)** — compact, inline, comma-separated lists wrapped to the dialog width. - **Limits** — the configured per-agent limits that are set, e.g. `Limits: max-iter 50 · history 40 · max-tool-calls 5`. - **Options** — the enabled option flags, e.g. `Options: add-date · add-environment-info · redact-secrets`. @@ -200,9 +218,9 @@ The thinking state of each model is shown with a gauge + value on the card and a | Disabled (capable) | `thinking ▱▱▱▱▱▱ off` (dimmed) | `▱▱▱▱▱▱` (empty gauge) | | Not reasoning-capable | _(omitted)_ | _(omitted)_ | -The **effort gauge** is a fixed-width six-cell indicator (`▰` filled, `▱` empty) so the badge column stays aligned. It maps the six selectable levels one-to-one onto filled-cell counts — `minimal` → `▰▱▱▱▱▱`, `low` → `▰▰▱▱▱▱`, `medium` → `▰▰▰▱▱▱`, `high` → `▰▰▰▰▱▱`, `xhigh` → `▰▰▰▰▰▱`, `max` → `▰▰▰▰▰▰` — so the cell count alone is lossless, with a low→high color ramp as a secondary cue. A capable-but-disabled model shows a dim empty gauge (`▱▱▱▱▱▱` `off`), adaptive budgets show `auto`, and token budgets keep `◉ `. The same gauge + value renders on the focus card, the Agent Inspector, and the row. +The **effort gauge** is a fixed-width six-cell indicator (`▰` filled, `▱` empty) so the badge column stays aligned. It maps the six selectable levels one-to-one onto filled-cell counts — `minimal` → `▰▱▱▱▱▱`, `low` → `▰▰▱▱▱▱`, `medium` → `▰▰▰▱▱▱`, `high` → `▰▰▰▰▱▱`, `xhigh` → `▰▰▰▰▰▱`, `max` → `▰▰▰▰▰▰` — with a low→high color ramp as a secondary cue. A capable-but-disabled model shows a dim empty gauge (`▱▱▱▱▱▱` `off`), adaptive budgets show `auto`, and token budgets keep `◉ `. The same gauge + value renders on the focus card, the Agent Inspector, and the row. -Harness-backed agents (e.g. `claude-code`) show the harness type as their model and no thinking gauge. Press **Shift+Tab** to cycle the current model's thinking-effort level; a `✻ Thinking: ` toast confirms the change (useful when the sidebar is hidden). +Harness-backed agents (e.g. `claude-code`) show the harness type as their model. `claude-code` and `command-code` harnesses show their `effort` on the gauge, or `auto` while the CLI picks it; other harnesses show no thinking gauge. Press **Shift+Tab** to cycle the current model's thinking-effort level; a `✻ Thinking: ` toast confirms the change (useful when the sidebar is hidden). ### Agent Delegation Feedback @@ -299,7 +317,7 @@ Unsupported or syntactically invalid LaTeX expressions fall back to displaying t The TUI fetches and renders images referenced in agent responses using the Kitty graphics protocol. When an assistant message contains a standard Markdown image reference, the TUI downloads the image in the background and displays it inline at the point of the reference. While the image is loading a placeholder is shown; once loaded, the message re-renders with the image in place. -Only `http://`, `https://`, and `data:image/…;base64,…` URIs are resolved. `file://`, `sandbox://`, and any other URI scheme are rejected as a security measure against prompt-injection attacks that could otherwise read local files. Bare relative paths (e.g. `./output.png`, used for agent-generated images) are read via the local filesystem. Images that fail to load are silently dropped — the surrounding message text is unaffected. Image rendering requires a terminal that supports the Kitty graphics protocol; it is automatically disabled when the terminal does not support it. Support is checked before the TUI starts; an unanswered probe waits up to 300 ms. You can disable rendering and skip this check via `render_images: false` in `~/.config/cagent/config.yaml` or the **Render images** toggle in `/settings`. Disabling and re-enabling images applies immediately when startup confirmed support. If the startup check was skipped, enabling images takes effect on the next launch. +Only `http://`, `https://`, and `data:image/…;base64,…` URIs are resolved. `file://`, `sandbox://`, and any other URI scheme are rejected as a security measure against prompt-injection attacks that could otherwise read local files. Bare relative paths (e.g. `./output.png`, used for agent-generated images) are read via the local filesystem. Images that fail to load are silently dropped — the surrounding message text is unaffected. Image rendering requires a terminal that supports the Kitty graphics protocol; it is automatically disabled when the terminal does not support it. Support is checked before the TUI starts. Terminals without Kitty graphics answer right away; only a terminal that answers nothing at all waits out the 300 ms timeout. You can disable rendering and skip this check via `render_images: false` in `~/.config/cagent/config.yaml` or the **Render images** toggle in `/settings`. Disabling and re-enabling images applies immediately when startup confirmed support. If the startup check was skipped, enabling images takes effect on the next launch. ### Snapshots, `/undo`, and `/snapshots` @@ -454,7 +472,7 @@ The picker's catalog entries come from [models.dev](https://models.dev) and are ## Editable Messages -Edit any previous user message to branch the conversation. Hover a past user message and click **✎ edit** (or select it with the keyboard and press e) to modify it — the agent will re-process from that point, while the original session history is preserved. This is great for exploring alternative approaches without losing your work. +Edit any previous user message to branch the conversation. Hover a past user message and click **✎ edit** (or select it with the keyboard and press e) to modify it — the agent will re-process from that point, while the original session history is preserved. Hovering a user or assistant message also reveals a **⎘ copy** button that copies the message text to the clipboard (c when a message is selected). @@ -462,7 +480,7 @@ Hovering a user or assistant message also reveals a **⎘ copy** button that cop When an agent turn fails (fatal model error, hook block, loop detection, tool-setup failure), the TUI displays the error in the message stream and persists it to the session store. Errors survive a reload and are shown exactly where they occurred, making them visible in shared or remote sessions. -Each error message includes a clickable **↻ retry** button. Clicking it resumes the conversation from the point of failure — without retyping your last message. This lets you recover from transient failures (rate limits, network blips, model API errors) in one click. +Each error message includes a clickable **↻ retry** button. Clicking it resumes the conversation from the point of failure — without retyping your last message. ## Session Management @@ -507,7 +525,7 @@ Customize session titles to make them more meaningful and easier to find. By def | Shift+Tab | Cycle the current model's thinking-effort level (shows a `✻ Thinking: ` toast) | | Ctrl+1 – 9 | Switch directly to agent _N_ in the team list | | Ctrl+T | Open a new tab (additional agent session) | -| Ctrl+W | Close the current tab | +| Ctrl+W | Close the current tab (when multiple tabs are open and focus is outside the editor; customizable via `close_tab`) | | Ctrl+N | Next tab | | Ctrl+P | Previous tab | | Ctrl+B | Toggle the sidebar (full-UI mode only; disabled when --sidebar=false) | @@ -522,7 +540,7 @@ Customize session titles to make them more meaningful and easier to find. By def | Shift+Enter | Insert a newline | | Up/Down | Navigate message history | -Press Ctrl+H to view the complete list of all available keyboard shortcuts. +The status bar shows only the Ctrl+H help hint rather than a list of shortcuts. Press Ctrl+H (or F1) to open the **Help** dialog. While another dialog is open, use F1 to open Help over it: Ctrl+H is passed to that dialog as a text-editing key (for example, it deletes a character in the command palette filter). Help groups shortcuts into sections with those for your current context (for example the focused dialog or the editor) listed first. Type in the search box to filter shortcuts by key or description; press Esc or Enter to close the dialog. The dialog reflects any [custom keybindings](#custom-keybindings) you have configured. ### Custom Keybindings @@ -581,18 +599,9 @@ Run `/settings` to open the settings dialog. Click a category tab, or use T > > This section covers the `/settings` dialog. For the complete list of `settings:` fields (including ones with no dialog UI, like `permissions`, `hooks`, and `keybindings`) and how they interact with CLI flags and aliases, see [User Settings](../../configuration/user-settings/index.md). -The **Appearance** tab selects the theme and customizes the layout. Layout changes apply immediately to the UI behind the dialog. On wide terminals, a schematic preview appears beside the controls without reducing the space available to the settings list: - -- **Sidebar position**: `Right` (default), `Left`, `Top`, or `Bottom`. Left/right keep the full vertical sidebar next to the chat; top/bottom render it as a compact horizontal band above or below the chat (session title, working directory, token usage, plus a one-line summary of the current agent and its model; in multi-agent configurations all team agents are listed by name after the current agent). -- **Sidebar info mode**: `Compact` (default) or `Detailed`. Controls how the Agents panel renders agent rows — see [Agents Panel](#agents-panel) for details. Persisted as `settings.layout.sidebar_info_mode: detailed`; compact is the default and omitted from the config. -- **Section spacing**: `Compact`, `Normal` (default), or `Relaxed`, the number of blank lines between the sidebar sections (1, 2, or 3). -- **Sidebar sections**: toggle the visibility of the **Session path** (the working directory line, including its git branch) and the **Token usage**, **Agents**, **Tools**, **Plans**, and **Todos** sections. All are visible by default except [Plans](#plans-sidebar), which is opt-in. The session title is always shown. - -Appearance also controls split-diff rendering, expanded thinking, whether tool results are hidden by default, and **Show startup banner** — the ASCII-art banner drawn on an empty conversation (persisted as `settings.show_banner: false` when turned off, and honored by the lean TUI too). Select **Theme** to open the theme picker. - -The **Behavior** tab controls busy-message handling, the auto-approve default, tab restoration, automatic snapshots, lean UI, and the maximum tab-title length. Restore-tabs and lean-UI changes take effect on the next launch. Enabling auto-approve requires confirmation. +The **Fade scroll edges** toggle on the Appearance tab controls whether scrollable areas (such as the chat) gently fade out their top and bottom edges when more content lies beyond them. It is on by default; turn it off to render scrollable content at full brightness right up to the edge. -The **Notifications** tab enables completion sounds and sets the minimum task duration before a sound plays. +The **Show top margin** toggle on the Appearance tab adds one blank row above the full TUI when the terminal is taller than 24 rows, giving the content some breathing room. It is off by default and is saved as `top_margin` in your settings. Press Enter to apply and persist, or Escape to cancel and restore the previous layout. The settings are saved globally in `~/.config/cagent/config.yaml`: @@ -600,6 +609,7 @@ Press Enter to apply and persist, or Escape to cancel and # ~/.config/cagent/config.yaml settings: busy_send_mode: queue # steer (default), queue + fade_scroll_edges: true # false to turn off the fade at scrollable edges (default: true) layout: sidebar_position: left # right (default), left, top, bottom sidebar_info_mode: detailed # compact (default, omitted), detailed @@ -636,7 +646,7 @@ settings: theme_light: default-light # optional, theme used on light backgrounds (default: default-light) ``` -At startup the terminal background is queried (OSC 11) to pick the dark or light theme of the pair; non-interactive runs (pipes, CI) fall back to the dark theme. In terminals that report appearance changes (DEC mode 2031 — Ghostty, kitty, contour, …), flipping the OS or terminal appearance while Docker Agent is running switches the theme live. Terminals without that mode re-sync when the window regains focus. +At startup the terminal background is queried (OSC 11) to pick the dark or light theme of the pair; when detection is unavailable, the dark theme is used. In the full TUI, terminals that report appearance changes (DEC mode 2031 — Ghostty, kitty, contour, …) switch the theme live when the OS or terminal appearance changes. Terminals without that mode re-sync when the window regains focus. The lean TUI selects its auto theme at startup and does not update it live. ### Custom Themes @@ -696,7 +706,7 @@ settings: > [!TIP] > **Hot Reload** > -> Custom themes auto-reload when you save changes to the file — no restart needed. This makes it easy to tweak colors in real-time. +> Custom themes reload when you save changes to the file. > [!WARNING] > **Partial overrides** @@ -711,7 +721,7 @@ When an agent calls a tool, Docker Agent shows a confirmation dialog by default. - **Always allow** — Permanently approve this tool/command for the session - **Deny** — Reject the tool call -**Granular permissions:** The permission system supports pattern-based matching. When you “Always allow” a specific tool command, only that exact pattern is auto-approved — other commands from the same tool still require confirmation. This lets you auto-approve safe, read-only operations while maintaining control over destructive ones. +**Granular permissions:** The permission system supports pattern-based matching. When you “Always allow” a specific tool command, only that exact pattern is auto-approved — other commands from the same tool still require confirmation. > [!TIP] > **YOLO mode** @@ -728,4 +738,4 @@ The TUI displays transient notification banners for agent warnings, errors, and | Click | Copies the notification text to the clipboard | | × (close) | Dismisses immediately; the glyph turns red when hovered | -Hint text in the top-left corner of the notification border shows the available actions at a glance. +Notifications normally sit in the bottom-right corner. While you type, the stack moves up just far enough to avoid covering the text in the prompt editor, and returns to its usual position when the input is empty. diff --git a/_vendor/github.com/docker/docker-agent/docs/getting-started/installation/index.md b/_vendor/github.com/docker/docker-agent/docs/getting-started/installation/index.md index 0915b20ea64d..878719e468e1 100644 --- a/_vendor/github.com/docker/docker-agent/docs/getting-started/installation/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/getting-started/installation/index.md @@ -6,8 +6,6 @@ weight: 20 canonical: https://docs.docker.com/ai/docker-agent/getting-started/installation/ --- -_Get Docker Agent running on your system in minutes._ - ## Prerequisites - Access to a model through a provider API key, an account login, [Docker Model Runner](../../providers/dmr/index.md), or a [coding harness](../../features/harnesses/index.md) @@ -91,7 +89,7 @@ For the latest features, or to contribute, build from source: ### Prerequisites -- [Go 1.27](https://go.dev/dl/) or higher +- [Go 1.27.4](https://go.dev/dl/) or higher - [Task](https://taskfile.dev/installation/) (build tool) - [golangci-lint](https://golangci-lint.run/docs/welcome/install/local/) (for linting) diff --git a/_vendor/github.com/docker/docker-agent/docs/getting-started/introduction/index.md b/_vendor/github.com/docker/docker-agent/docs/getting-started/introduction/index.md index 0ade379b873c..aa79184d6f9b 100644 --- a/_vendor/github.com/docker/docker-agent/docs/getting-started/introduction/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/getting-started/introduction/index.md @@ -6,8 +6,6 @@ weight: 10 canonical: https://docs.docker.com/ai/docker-agent/getting-started/introduction/ --- -_Docker Agent is a multi-agent runtime that lets you build, run, and share AI agents with a YAML or HCL config — no glue code required._ - ## What is Docker Agent? Docker Agent is an open-source tool from Docker that orchestrates AI @@ -65,9 +63,6 @@ agents: $ docker agent run agent.yaml ``` -> [!TIP] -> Jump straight to the [Quick Start](../quickstart/index.md) if you want to build your first agent right away. - ## What's next? - [**Installation**](../installation/index.md) — install Docker Agent on macOS, Linux, or Windows. diff --git a/_vendor/github.com/docker/docker-agent/docs/getting-started/quickstart/index.md b/_vendor/github.com/docker/docker-agent/docs/getting-started/quickstart/index.md index ba2e9cc90338..b23094b8761a 100644 --- a/_vendor/github.com/docker/docker-agent/docs/getting-started/quickstart/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/getting-started/quickstart/index.md @@ -8,8 +8,6 @@ aliases: - /ai/docker-agent/tutorial/ --- -_Get up and running with Docker Agent in under 5 minutes. Pick whichever path suits you best._ - ## Option A: Run the Default Agent The fastest way to try Docker Agent — no config file needed: @@ -19,8 +17,6 @@ The fastest way to try Docker Agent — no config file needed: $ docker agent run ``` -This starts a general-purpose assistant with sensible defaults. Just start chatting. - > [!NOTE] > This needs a model: a cloud provider API key, or a local model pulled through Docker Model Runner. [Set Up a Model](../set-up-a-model/index.md) walks through both paths. @@ -60,7 +56,7 @@ Create an `agent.yaml` by hand for full control. Here's a minimal example: ```yaml agents: root: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: A helpful coding assistant instruction: | You are an expert software developer. Help users write @@ -71,13 +67,6 @@ agents: - type: think ``` -This gives your agent: - -- **Claude Sonnet 4.5** as the underlying model -- **Filesystem access** to read and write files -- **Shell access** to run commands -- **Think tool** for step-by-step reasoning - This config needs `ANTHROPIC_API_KEY` set. See [Set Up a Model](../set-up-a-model/index.md) for where to put it, or use a local `dmr/...` model that needs no key. ```bash @@ -120,7 +109,7 @@ Use `docker agent run --exec` for one-shot tasks: $ docker agent run --exec agent.yaml "Create a Dockerfile for a Node.js app" # Pipe input -$ cat error.log | docker agent run --exec agent.yaml "What's wrong in this log?" +$ { printf "What's wrong in this log?\n\n"; cat error.log; } | docker agent run --exec agent.yaml - ``` ## Add More Power @@ -130,7 +119,7 @@ Give your agent persistent memory and web search: ```yaml agents: root: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: Research assistant with memory instruction: | You are a research assistant. Search the web for information, @@ -146,7 +135,7 @@ agents: > [!NOTE] > **Docker MCP Tools** > -> The `ref: docker:duckduckgo` syntax runs the DuckDuckGo MCP server in a Docker container. This is the recommended way to use MCP tools — secure, isolated, and easy to configure. Requires Docker Desktop. +> The `ref: docker:duckduckgo` syntax runs the DuckDuckGo MCP server in a Docker container. Requires Docker Desktop. ## What's Next? diff --git a/_vendor/github.com/docker/docker-agent/docs/getting-started/set-up-a-model/index.md b/_vendor/github.com/docker/docker-agent/docs/getting-started/set-up-a-model/index.md index b6da7264c2e5..330c5ac11b5d 100644 --- a/_vendor/github.com/docker/docker-agent/docs/getting-started/set-up-a-model/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/getting-started/set-up-a-model/index.md @@ -104,13 +104,13 @@ $ docker agent run With no config file, the default agent picks the provider you configured. To name a model explicitly, use `--model` or the `model` field in your config: ```bash -$ docker agent run --model anthropic/claude-sonnet-4-5 +$ docker agent run --model anthropic/claude-sonnet-5-5 ``` ```yaml agents: root: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: A helpful coding assistant instruction: You are an expert software developer. ``` diff --git a/_vendor/github.com/docker/docker-agent/docs/guides/compaction/index.md b/_vendor/github.com/docker/docker-agent/docs/guides/compaction/index.md index 67027ff65c03..5cd5c5839346 100644 --- a/_vendor/github.com/docker/docker-agent/docs/guides/compaction/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/guides/compaction/index.md @@ -21,7 +21,7 @@ By default, every agent proactively compacts its own session once estimated toke ```yaml agents: root: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: A long-running research assistant instruction: You are a helpful assistant. ``` @@ -31,7 +31,8 @@ No configuration is required to get this behavior — it's on by default. Three | Field | Where | Description | | --- | --- | --- | | `session_compaction` | agent | Set to `false` to disable automatic compaction entirely for this agent (both the proactive threshold trigger and the post-overflow auto-recovery). The manual `/compact` command still works. Default: `true`. | -| `compaction_threshold` | agent or model | Fraction of the context window (greater than `0`, at most `1`) at which proactive compaction fires. A value set on the model takes precedence over the agent-level value. Default: `0.9`. | +| `compaction_threshold` | agent or model | Fraction of the context window (greater than `0`, at most `1`) at which proactive compaction fires. Cannot be combined with `compaction_threshold_tokens` on the same agent or model. A threshold set on the model takes precedence over the agent-level value. Default: `0.9`. | +| `compaction_threshold_tokens` | agent or model | Absolute token count (greater than `0`, capped at the model's context window) at which proactive compaction fires. Cannot be combined with `compaction_threshold` on the same agent or model. A threshold set on the model takes precedence over the agent-level value. | | `compaction_model` | agent, model, or provider | Delegate the compaction (summary-generation) call to a different, usually cheaper and faster, model. The agent-level value wins, then the model-level value, then the provider-level default. | Lower the threshold to compact earlier and keep individual requests smaller and cheaper; raise it to keep more verbatim history in context before the first summary happens: @@ -40,7 +41,7 @@ Lower the threshold to compact earlier and keep individual requests smaller and models: primary: provider: anthropic - model: claude-sonnet-4-5 + model: claude-sonnet-5-5 # Compact at 80% of the window instead of the default 90%. compaction_threshold: 0.8 ``` @@ -51,26 +52,36 @@ Compaction itself is a model call — feeding the full conversation to a model a models: primary: provider: anthropic - model: claude-sonnet-4-5 + model: claude-sonnet-5-5 compaction_model: fast fast: provider: anthropic model: claude-haiku-4-5 ``` +> [!NOTE] +> **Unknown context window** +> +> Compaction needs the summary model's context window. Models outside the models.dev catalogue (custom endpoints, local models) have none unless you declare one. If compaction reports that a model "has no known context window", add `context_window` to that model's entry in the `models` section (for example `context_window: 200000`). See [Context Window](../../configuration/models/index.md#context-window). + +> [!NOTE] +> **Declared windows and thresholds** +> +> A model's `context_window` (see [Context Window](../../configuration/models/index.md#context-window)) is the capacity the threshold is a fraction of. Setting it does not add a fixed-token trigger: with `context_window: 128000` and the default `0.9`, compaction fires above 115,200 tokens, and the `compaction_threshold` on the model or agent scales that fraction. + > [!IMPORTANT] > **Context window mismatch** > > If `compaction_model` has a **smaller** context window than the primary model, Docker Agent triggers compaction against the smaller window so the summary call can always ingest the full conversation. Pair the primary model with a compaction model whose window is at least as large to keep the proactive trigger aligned with the primary model's window. > -> The `/context` header and the sidebar's context gauge surface this cap when it applies: the `/context` header shows a second line reading "compaction cap: `` • `` tokens", and the sidebar shows a short "⚠ capped" marker. Live-sessions rows do not carry cap wording; the sidebar marker deliberately doesn't repeat the model name or figure — the `/context` header is the sole authority on why the reported limit is smaller than the primary model's own window. +> The `/context` header and the sidebar's context gauge surface this cap when it applies: the `/context` header shows a second line reading "compaction cap: `` • `` tokens", and the sidebar shows a short "⚠ capped" marker. Disable compaction only when you specifically want a session to keep full, unabridged history and are willing to risk hitting the context limit: ```yaml agents: archivist: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: An assistant that never auto-compacts its sessions. instruction: You keep full conversation history and never lose context. session_compaction: false @@ -85,7 +96,7 @@ You don't have to wait for the automatic threshold. Two TUI commands give you di - **`/compact`** — summarize and compact the current session's history right now, regardless of how full the context window is. Useful before starting a new phase of work that doesn't need the earlier detail. - **`/context`** — open a context-window breakdown: estimated tokens per category (system prompt, tool definitions, prompt files, messages, tool results, compaction summary), a **Live sessions** view listing the current session plus every running sub-agent session with its own context budget, and a per-file inventory of attachments and prompt files. When a compaction has occurred, the dialog also displays the verbatim text of the most recent compaction summary, preserving hard newlines and soft-wrapping long lines to the dialog width. -From `/context`, select any live session with the arrow keys and press Enter to explicitly compact it — including a sub-agent's session, not just the main one. This is the only way cross-agent compaction happens: there's no idle-triggered automatic compaction of sub-agent sessions, so a long-running background agent stays under your control. The request is queued onto the target session's own run loop and applied at the next safe point between model turns, so it never corrupts an in-flight turn. +From `/context`, select any live session with the arrow keys and press Enter to explicitly compact it — including a sub-agent's session, not just the main one. The request runs at the next safe point between model turns. ```bash $ docker agent run agent.yaml @@ -108,7 +119,7 @@ Compaction deals with the whole conversation at once. For sessions dominated by ```yaml agents: root: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: An assistant whose tool results are capped at ~2000 tokens each. instruction: | You are a helpful assistant with shell access. Very large command @@ -146,4 +157,4 @@ Compaction summarizes history, but it never resets what a session has actually c ## Related: deferred tool loading -Compaction and result trimming manage context that's already in the session. If large toolsets are inflating your **starting** context instead — many MCP servers, hundreds of tools — look at [deferred tool loading](../../configuration/tools/index.md#deferred-tool-loading), which registers a toolset's tools lazily instead of eagerly at startup. +Compaction and result trimming manage context that's already in the session. If large toolsets are inflating your **starting** context instead — many MCP servers, hundreds of tools — look at [deferred tool loading](../../configuration/tools/index.md#deferred-tool-loading), which exposes tool definitions to the model only when needed. The underlying toolsets still start normally. diff --git a/_vendor/github.com/docker/docker-agent/docs/guides/durable-runtime-quickstart/index.md b/_vendor/github.com/docker/docker-agent/docs/guides/durable-runtime-quickstart/index.md new file mode 100644 index 000000000000..aaab729edc56 --- /dev/null +++ b/_vendor/github.com/docker/docker-agent/docs/guides/durable-runtime-quickstart/index.md @@ -0,0 +1,254 @@ +--- +title: "Build a Durable Worker" +description: "Run a complete Go example that saves agent progress, suspends on shutdown, and recovers with SQLite." +weight: 42 +canonical: https://docs.docker.com/ai/docker-agent/guides/durable-runtime-quickstart/ +--- + +This example creates a single-agent worker using the +[durable runtime](../durable-runtime/index.md). It can start a conversation, recover recorded +runs, or discard an unfinished run. You control the worker through its +`start`, `recover`, and `discard` commands. + +## Create the Program + +Create an empty project: + +```bash +$ mkdir durable-worker +$ cd durable-worker +$ go mod init example.com/durable-worker +$ go get github.com/docker/docker-agent@main +$ export ANTHROPIC_API_KEY='your-api-key' +``` + +Save this as `main.go`. The example uses a text-only agent to demonstrate +model-step recovery. `run` opens the resources and dispatches to `startRun`, +`recoverRuns`, or `discardRun`. Runtime setup, signal handling, and event +consumption each have their own function. + +```go +package main + +import ( + "context" + "errors" + "fmt" + "log" + "os" + "os/signal" + "syscall" + + "github.com/docker/docker-agent/pkg/agent" + "github.com/docker/docker-agent/pkg/config/latest" + "github.com/docker/docker-agent/pkg/environment" + "github.com/docker/docker-agent/pkg/model/provider/anthropic" + "github.com/docker/docker-agent/pkg/runtime" + "github.com/docker/docker-agent/pkg/session" + "github.com/docker/docker-agent/pkg/session/sqlitestore" + "github.com/docker/docker-agent/pkg/team" +) + +func main() { + if err := run(); err != nil { + log.Fatal(err) + } +} + +func run() error { + if len(os.Args) < 2 { + return errors.New("usage: durable-worker start | recover | discard SESSION_ID") + } + // Keep startup and storage cleanup independent of the shutdown signal. + ctx := context.Background() + store, err := sqlitestore.New(ctx, "./data/sessions.db") + if err != nil { + return err + } + defer store.Close() + + rt, err := newRuntime(ctx, store) + if err != nil { + return err + } + defer rt.Close() + + workCtx, cleanup := suspendOnSignal(ctx) + defer cleanup() + + switch os.Args[1] { + case "start": + return startRun(workCtx, rt, store.(session.RunStore)) + case "recover": + return recoverRuns(workCtx, rt, store.(session.RunStore)) + case "discard": + return discardRun(ctx, rt, os.Args[2:]) + default: + return fmt.Errorf("unknown command %q", os.Args[1]) + } +} + +func newRuntime(ctx context.Context, store session.Store) (*runtime.DurableRuntime, error) { + llm, err := anthropic.NewClient(ctx, &latest.ModelConfig{ + Provider: "anthropic", + Model: "claude-sonnet-5-5", + }, environment.NewOsEnvProvider()) + if err != nil { + return nil, err + } + root := agent.New("root", "You explain technical topics clearly.", agent.WithModel(llm)) + agents := team.New(team.WithAgents(root)) + return runtime.NewDurableRuntime(ctx, agents, + runtime.WithSessionStore(store), + runtime.WithNonInteractive(true), + ) +} + +func suspendOnSignal(parent context.Context) (context.Context, func()) { + // The caller supplies a context independent of shutdown cancellation, + // so the signal handler can suspend work with ErrSuspended. + ctx, stop := context.WithCancelCause(parent) + signals := make(chan os.Signal, 1) + signal.Notify(signals, os.Interrupt, syscall.SIGTERM) + go func() { + select { + case <-signals: + stop(runtime.ErrSuspended) + case <-ctx.Done(): + } + }() + return ctx, func() { + signal.Stop(signals) + stop(nil) + } +} + +func startRun(ctx context.Context, rt *runtime.DurableRuntime, runs session.RunStore) error { + pending, err := runs.ListRuns(ctx) + if err != nil { + return err + } + if len(pending) != 0 { + return errors.New("unfinished runs exist; recover or discard them first") + } + sess := session.New( + session.WithAgentName("root"), + session.WithNonInteractive(true), + session.WithSafetyPolicy(session.SafetyPolicyRestricted), + session.WithUserMessage("Explain how database write-ahead logs help recovery."), + ) + fmt.Println("Session:", sess.ID) + return drain(rt.RunStream(ctx, sess)) +} + +func recoverRuns(ctx context.Context, rt *runtime.DurableRuntime, runs session.RunStore) error { + // Establish exclusive database ownership before recovering runs. + pending, err := runs.ListRuns(ctx) + if err != nil { + return err + } + for _, record := range pending { + if ctx.Err() != nil { + break + } + sess, events, err := rt.ContinueStream(ctx, record.SessionID, + session.WithNonInteractive(true), + session.WithSafetyPolicy(session.SafetyPolicyRestricted), + ) + if err != nil { + return fmt.Errorf("continue %s: %w", record.SessionID, err) + } + fmt.Println("Continuing:", sess.ID) + if err := drain(events); err != nil { + return err + } + } + return nil +} + +func discardRun(ctx context.Context, rt *runtime.DurableRuntime, args []string) error { + if len(args) != 1 { + return errors.New("usage: durable-worker discard SESSION_ID") + } + return rt.DiscardRun(ctx, args[0]) +} + +func drain(events <-chan runtime.Event) error { + var streamErr error + // Keep reading even after an error or shutdown signal. Checkpointing + // and settlement must finish before the runtime and store close. + for event := range events { + switch e := event.(type) { + case *runtime.AgentChoiceEvent: + fmt.Print(e.Content) + case *runtime.ErrorEvent: + log.Print(e.Error) + streamErr = errors.Join(streamErr, errors.New(e.Error)) + } + } + fmt.Println() + return streamErr +} +``` + +The application owns the store and closes it after the runtime. A larger +application also owns the lifetime of its team's toolsets. + +The example deliberately reapplies a restrictive, non-interactive policy on +recovery. Options passed to `ContinueStream` apply **after** restoring the +checkpoint's approval state, so they can change what the continued run may do. +Saved permission grants remain in effect alongside the restricted safety +policy. To replace those grants, pass `session.WithPermissions` with your +chosen permissions to `ContinueStream`. The recorded agent and iteration +limit stay in effect. + +## Run, Suspend, and Recover + +```bash +$ go mod tidy +$ go build -o durable-worker . +$ ./durable-worker start +``` + +While the model is still answering, press **Ctrl+C**. The signal handler cancels +the run with `runtime.ErrSuspended`, then the program drains its stream before +closing resources. Completed runs retain their session history; suspended runs +remain available for recovery. + +Restart in the same directory, with the same database and credentials: + +```bash +$ ./durable-worker recover +``` + +The program lists run records and continues them one at a time with +`ContinueStream`, using each run's recorded input. An interrupted model call is +made again; the replacement answer can differ from the partial one. +After completion, recovery finds no records, but the session history remains. + +To try crash recovery instead, forcibly stop the process while it is answering +(for example, with `kill -KILL PID` from another terminal), then run `recover`. +Unlike graceful suspension, this counts as a crash on continuation. + +To abandon an unfinished run, use the ID printed when it started: + +```bash +$ ./durable-worker discard SESSION_ID +``` + +Discarding removes the run record and returns its stored conversation to the +last checkpoint. The session history and external actions remain. + +## Add Your Own Team + +Replace the code-built team with your existing team loader, or add tools using +the [Go SDK](../go-sdk/index.md). Use the same agent names and compatible +configuration when rebuilding a team for recovery. Supply the agent definitions, +provider credentials, and workspace alongside the recorded progress. + +If you add tools, keep an explicit [approval policy](../../configuration/permissions/index.md). +`runtime.WithNonInteractive(true)` declines runtime elicitation requests, while +`session.WithNonInteractive(true)` selects unattended tool approval. The restricted policy +denies calls that require confirmation. An interactive host must handle +confirmations and elicitations through the normal runtime APIs while continuing +to drain events. diff --git a/_vendor/github.com/docker/docker-agent/docs/guides/durable-runtime-recovery/index.md b/_vendor/github.com/docker/docker-agent/docs/guides/durable-runtime-recovery/index.md new file mode 100644 index 000000000000..81e9fb1345c4 --- /dev/null +++ b/_vendor/github.com/docker/docker-agent/docs/guides/durable-runtime-recovery/index.md @@ -0,0 +1,173 @@ +--- +title: "Recovery and Operations" +description: "Operate durable agent runs safely: stream lifecycle, single-writer recovery, persisted state, and troubleshooting." +weight: 43 +canonical: https://docs.docker.com/ai/docker-agent/guides/durable-runtime-recovery/ +--- + +Your application owns scheduling, shutdown, and deciding which unfinished runs +to continue. The [durable runtime](../durable-runtime/index.md) supplies +checkpointing and continuation. + +## Own the Database Before Recovering + +`store.(session.RunStore).ListRuns(ctx)` lists **all recorded runs**, including +ones that are still executing. Your application must establish exclusive +ownership before recovery, for example by stopping the old worker before +starting its replacement. + +Before calling `ContinueStream` or `DiscardRun`: + +1. Establish that your application is the store's single writer. Stop the old + worker before starting its replacement and reserve the database for recovery. +2. Finish draining the session's old stream before continuing it, including + streams in your own process. +3. Recreate the team, tools, credentials, and working directory the run needs. +4. List the records and decide whether to continue or discard each one. + +> [!WARNING] +> Continuation and discard modify the stored transcript. Calling either while +> the previous run is active can cut the conversation back underneath it. +> Recover a listed run only after confirming its previous writer has stopped. + +Use `ContinueStream` to recover an unfinished recorded run from its checkpoint. +After that run is settled or deliberately discarded, use normal session loading +and `RunStream` to start new work on the conversation. + +A runtime has one current agent shared by unpinned sessions. If you execute +several sessions concurrently on one runtime, pin each fresh session with +`session.WithAgentName`. Continuation restores the recorded pin and agent +selection. + +## Stream and Shutdown Lifecycle + +A durable run waits for its events to be read before recording progress. Always +read a stream until its channel closes, including after an error event or a +shutdown request. Collect errors while continuing to consume events. +The [worker example](../durable-runtime-quickstart/index.md) shows a draining consumer. + +| How the run stops | Run record | +| --- | --- | +| Completes normally | Removed after final completed output reaches the store. Session history remains. | +| Context cancelled with `runtime.ErrSuspended` | Kept; a successfully saved suspension marker exempts the next continuation from counting a crash. | +| Other context cancellation or deadline | Ends the run and removes its record under normal storage conditions. | +| Process dies | Last saved record remains; continuation counts a crash. | +| Required transcript/checkpoint write fails | Stops with an error and retains the last record, if one was successfully created. | +| Final transcript flush fails | Reports an error instead of a clean end and leaves the record recoverable. | + +For graceful shutdown, use `context.WithCancelCause` and cancel with +`runtime.ErrSuspended` **before** closing resources. Keep the run context +independent of a parent that shutdown cancels with ordinary `context.Canceled`: +the first cancellation wins. Then drain the stream, close the runtime, and +close the store. Give your process shutdown grace time to finish those writes; +a forced kill or storage failure can prevent the suspension marker from being +saved. Inspect `Failed to settle run record` warnings: a failed suspension write +is logged, and the next continuation counts a crash if the record remains +unmarked. + +`ContinueStream(ctx, sessionID, opts...)` returns the reloaded session, an event +channel, and an error. Setup/recovery errors are returned directly with no +stream. Execution failures arrive as events once streaming starts. Reapply +host-only options, notably `session.WithNonInteractive`. Options can override +restored safety policy and permissions. The recorded agent selection and run +iteration limit stay in effect. + +## What Survives a Restart + +| State | Behavior | +| --- | --- | +| Conversation and pending answer | Restored to the transcript position represented by the checkpoint. Entries from unfinished work after it are removed. | +| Agent, routing, iteration progress, instruction context | Restored from the checkpoint. | +| Safety mode and ongoing tool approvals | Restored as of the checkpoint; continuation options can change them. | +| Tool-call progress | Restored from the journal; see [Tool Calls and Side Effects](../durable-runtime/index.md#tool-calls-and-side-effects). | +| Root vs. delegated runs | Only root runs are recorded independently. An interrupted delegation is reported to the model as an interrupted tool call. | +| In-memory budgets | Start afresh. Enforce cross-restart spending caps in your application. | +| Model-picker selections and deferred tool activation | Rebuilt agents start with their configured state. | +| Background-agent tasks | Tasks live in the original process. After restart, a status lookup can report a missing task; the model decides what to do next. | +| `Steer` / `FollowUp` queues | In memory until taken up. Input is recoverable once included in a saved checkpoint; queued input taken at turn end is recorded at the next model checkpoint. | +| Host-only session options | Pass these again to `ContinueStream`. | +| Workspace and external services | Retain their external state. Restore access separately. | + +Keep the stored conversation synchronized with the session supplied to the +runtime. The durable start transaction stores the full conversation for a +session with no stored history and the current prompt for an existing +conversation. + +## Retry Limits and Discarding + +Continuation increments the crash count unless the run was marked suspended. +Saving progress resets it. When the count reaches **five** consecutive crashes +without progress, +`ContinueStream` gives up and returns an error. It restores the session to its +last checkpoint and removes the run record, provided those storage operations +succeed. A missing required agent in the rebuilt team also causes the run to +be given up this way. + +For a run you choose not to continue, call: + +```go +if err := rt.DiscardRun(ctx, sessionID); err != nil { + return err +} +``` + +This fragment assumes an existing durable runtime and an inactive recorded +session. Discard restores the session to the checkpoint. External tool effects, +such as file writes or payments, remain. Review uncertain external operations +before starting new work. + +A checkpoint with an unreadable payload or incompatible version is retained by +`ContinueStream`. `DiscardRun` can explicitly remove it; +the store still truncates the transcript to its recorded boundary, but an +unreadable checkpoint cannot restore its session metadata. Back up the database +before attempting continuation or discard of a suspect record. Both operations +first call the store's `ResumeRun`: it truncates entries after the checkpoint, +deletes associated sub-session trees, increments the crash count for an +unmarked run, and clears the suspension marker. These changes commit before +checkpoint decoding, so even a decoding error can follow transcript removal. + +## Storage and Security + +- **Keep the database persistent.** A container needs a persistent writable + volume for the selected database path. Recreating an ephemeral filesystem + loses its runs as well as its conversations. +- **Protect the database like conversation history.** Checkpoints can contain + prompt-derived context, tool arguments and results, and approval state, in + addition to the stored transcript. Restrict directory access and apply your + application's backup, retention, secret-handling, and encryption policies. +- **Back up SQLite consistently.** The store normally uses WAL mode outside + sandboxes. Stop writers for a consistent offline backup or use an appropriate + SQLite backup procedure that includes committed writes in the WAL. +- **Plan upgrades.** Opening the store applies schema migrations, including the + `session_runs` table. Checkpoint payloads are separately versioned and the + runtime rejects versions it cannot read. Back up before upgrades and verify + database and checkpoint compatibility before switching binaries. +- **Watch startup logs.** For some migration failures, `sqlitestore.New` moves + the database and associated WAL/SHM files to a `.bak` path and creates a fresh + database. Newer-schema, filesystem-open, and transient failures are returned + instead. Check the resulting run records and investigate backup/recovery + warnings. + +## Limitations and Troubleshooting + +| Symptom | What to check | +| --- | --- | +| Constructor says the store must record runs | Supply `runtime.WithSessionStore(store)` with a store implementing both `session.Store` and `session.RunStore`. SQLite is the shipped implementation. | +| `ContinueStream` reports no run | Confirm the session ID and database path. Records remain available for interrupted or suspended runs until completion, discard, or exhausted recovery. | +| A continued tool is reported interrupted | The journal has a started call with an uncertain outcome. Inspect the external system before repeating the operation. | +| An external harness agent is refused | Use native-loop agents throughout the team, including handoff targets. | +| A run stops because progress could not be recorded | Check disk space, database permissions/availability, and storage errors. Fix the cause before continuing. A failure before the first record was saved leaves nothing to recover. | +| A run stalls around checkpointing or shutdown | Ensure the host keeps consuming events through channel closure and has not closed the store early. | +| Repeated continuation gives up | Inspect the underlying failure rather than blindly retrying. Five consecutive crashes at the same progress point exhaust recovery. | +| Cost changes after recovery | Repeated model calls can incur new charges. Paid calls remain billed after transcript truncation; subsequent usage updates recompute the stored cost column from recorded items. | + +Streaming deltas are persisted best-effort; checkpoints wait for the final +message write. Treat displayed output as provisional until its step is +recorded: recovery can replace streamed output from an unfinished step. A model +request retried after it began streaming can also leave an earlier attempt's +row in stored history alongside the completed attempt. + +At normal completion, session metadata such as cost and token counts retains +the local runtime's best-effort update behavior; the durable guarantee concerns +the transcript and run checkpoints. Preserve the store's usage metadata when +writing session updates after a run. diff --git a/_vendor/github.com/docker/docker-agent/docs/guides/durable-runtime/index.md b/_vendor/github.com/docker/docker-agent/docs/guides/durable-runtime/index.md new file mode 100644 index 000000000000..66d753540ea6 --- /dev/null +++ b/_vendor/github.com/docker/docker-agent/docs/guides/durable-runtime/index.md @@ -0,0 +1,109 @@ +--- +title: "Durable Runtime" +description: "Keep embedded agent runs recoverable across process restarts with checkpoints and a tool-call journal." +keywords: docker agent, durable runtime, checkpoints, Go SDK, recovery +weight: 41 +canonical: https://docs.docker.com/ai/docker-agent/guides/durable-runtime/ +--- + +The **durable runtime** lets your Go application continue an agent run after +its process crashes or deliberately suspends work. It records the run's progress +alongside its conversation in a session store. On restart, your application +recreates the agent team and asks the runtime to continue the unfinished run, +using the recorded input. + +Use it for embedded workers that must pick up unfinished conversations after a +restart. Use the local runtime for applications that only need to save +conversation history. + +> [!NOTE] +> **Available on main** +> +> The durable runtime is available on `main`. Enable this opt-in **Go SDK** +> API in your application by calling `runtime.NewDurableRuntime`. + +## Sessions, Runs, and Checkpoints + +A **session** holds a conversation. A **run** is the work the runtime performs +on that conversation during one invocation. A durable run adds a **checkpoint**: +the next step to execute, its working state, and the transcript position that +belongs to it. + +| | Local runtime with a session store | Durable runtime | +| --- | --- | --- | +| Constructor | `runtime.NewLocalRuntime` | `runtime.NewDurableRuntime` | +| Conversation storage | Best-effort persistence | Checkpoints wait for completed transcript writes | +| Progress in flight | In memory | Recorded in the store | +| Storage failure | Logs the failure and continues | Stops; retains the last recorded progress when possible | +| Restart | Load conversation history | `ContinueStream` loads the session and continues its recorded run | +| External coding harness | Supported when configured | Refused | + +Use [session history](../../features/sessions/index.md) to reopen a conversation +with the CLI's `--session` option, [workspace snapshots](../../features/snapshots/index.md) +to restore files, and durable checkpoints to recover execution progress in your +Go application. + +## How Checkpoints Work + +A new run records its session and initial input before starting toolsets. +For a session with no stored conversation, that includes its full supplied +history. For an existing stored conversation, it adds the current prompt. Keep +that conversation synchronized with the store before starting a run. + +The runtime and session store then track these steps: + +| Next step | What continuation does | +| --- | --- | +| `starting` | Runs the start hooks for the recorded prompt. | +| `model` | Prepares the turn and asks the model again, replacing any partial streamed answer. | +| `tools` | Processes the recorded answer's tool calls using the tool-call journal. | +| `answered` | Processes the saved answer: stop hooks, structured-output enforcement, handoffs or completion routing, and queued input. | + +After a step finishes, the runtime waits for the persistence observer to store +its completed output, then saves the checkpoint. Tool calls also update a +journal as they progress. On continuation, the store removes transcript entries +after the checkpoint, so the conversation and recorded progress agree. Paid +usage from side requests such as `/btw` is preserved rather than replayed. + +Checkpoints restore the conversation's agent selection and routing, iteration +count and limit, instruction context, approval state, and working state needed +by the next step. Your application recreates the surrounding team and tools. +See [What Survives a Restart](../durable-runtime-recovery/index.md#what-survives-a-restart). + +## Tool Calls and Side Effects + +A tool call can leave its external outcome uncertain: the process might die +after the operation finishes but before its result is recorded. Recovery uses +the recorded call state to decide how to proceed. + +| Recorded state | Recovery behavior | +| --- | --- | +| Not started | Runs the call normally. | +| Started, no recorded result | Retries only if the tool is annotated idempotent, is not a delegation, and receives the same arguments as before. Otherwise records an interrupted-call result for the model to handle. | +| Result recorded | Runs the pending `post_tool_use` hook with the original call and raw result. | +| Finished | Preserves its recorded outcome, including an outcome that stops the run. | + +An **idempotent** tool can safely repeat the same operation with the same +arguments. The journal requires the tool's `Annotations.IdempotentHint`, a +non-delegating tool, and identical arguments to retry a started call. Hooks can +rewrite arguments; changed arguments lead to an interrupted-call result. + +Design side-effecting tools with their own deduplication or reconciliation +where needed. An interrupted result leaves the action's external outcome +uncertain. Inspect the external system before repeating an operation with side +effects. An interrupted sub-agent becomes an interrupted tool call, and the +model can decide whether to delegate again. + +Hooks in a repeated step can run again. Start-hook context is restored once +recorded; a run interrupted before completing its starting step can repeat +those hooks. A continued turn past the model step also fires `turn_start` again +to pair with that stream's `turn_end`. Make hook side effects safe to repeat. + +## Start Here + +1. [Build a Durable Worker](../durable-runtime-quickstart/index.md) — a complete Go program with + SQLite storage, graceful suspension, and startup recovery. +2. [Recovery and Operations](../durable-runtime-recovery/index.md) — lifecycle, ownership, storage, + limitations, and troubleshooting. +3. [Go SDK](../go-sdk/index.md) — team loading, tools, runtime options, and + interactive event handling. diff --git a/_vendor/github.com/docker/docker-agent/docs/guides/go-sdk/index.md b/_vendor/github.com/docker/docker-agent/docs/guides/go-sdk/index.md index 2c6a68719976..c328708596bb 100644 --- a/_vendor/github.com/docker/docker-agent/docs/guides/go-sdk/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/guides/go-sdk/index.md @@ -6,8 +6,6 @@ weight: 40 canonical: https://docs.docker.com/ai/docker-agent/guides/go-sdk/ --- -_Use Docker Agent as a Go library to embed AI agents in your applications._ - ## Overview Docker Agent can be used as a Go library, allowing you to build AI agents directly into your Go applications. This gives you full programmatic control over agent creation, tool integration, and execution. @@ -135,12 +133,30 @@ The CLI uses this helper for both its initial runtime and TUI-spawned runtimes. The HTTP API wires the same manifest budgets into its native runtimes; other serving adapters retain their existing wiring and budget behavior. +## Remote execution + +Remote HTTP/SSE execution lives in `pkg/runtime/remote`: + +```go +client, err := remote.NewClient(serverURL) +if err != nil { + return err +} +rt, err := remote.NewRuntime(client) +``` + +Import `github.com/docker/docker-agent/pkg/runtime/remote` for these constructors. +Shared interfaces and events remain in `pkg/runtime` (`runtime.Runtime`, +`runtime.Event`, and the concrete event types). The remote implementation imports +those types; local execution does not import remote transport. There are no +compatibility re-exports of remote clients or constructors in `pkg/runtime`. + ## Execution Capability Inspection `(*runtime.LocalRuntime).AgentExecutionCapabilities(name)` returns a static native/harness profile without starting tools, constructing drivers or initializing budget counters. Unknown agents return nil. The same optional -profile is available on `runtime.AgentConfigInfo`, `runtime.AgentDetails` in +profile is available on `inspection.AgentConfigInfo`, `runtime.AgentDetails` in `team_info`, and local startup/refresh `runtime.AgentInfoEvent` values. See [Execution capabilities](../../features/api-server/index.md#execution-capabilities) for field meanings and unknown/remote behavior. @@ -275,7 +291,7 @@ For anything beyond that, call `chat.Runtime()` to access the underlying `runtim > still works and falls back to resolving the sole pending request. > > If you implement your own `runtime.Runtime` (rather than embedding -> `runtime.LocalRuntime`/`runtime.RemoteRuntime`), you do need to update your +> `runtime.LocalRuntime`/`remote.Runtime`), you do need to update your > method's signature to match, and also add an `OnElicitationRequest(handler > func(runtime.Event))` method (a no-op is fine if your runtime never raises > elicitations) — both are required interface methods, matching the existing @@ -325,7 +341,7 @@ if err != nil { ts := ragtool.New(mgr, mgr.ToolName(), ragtool.WithIndexingTimeout(ragCfg.GetIndexingTimeout())) ``` -`cmd/wasm/toolsets.go` registers exactly this as the browser's `type: rag` creator, fed by `createSession`'s `documents` option. +With `-tags docker_agent_wasm_rag`, `cmd/wasm/rag.go` registers this as the browser's `type: rag` creator, fed by `createSession`'s `documents` option. RAG is excluded from the default WASM build. ## Loading YAML with Hand-Picked Registries (lean embedding) @@ -360,6 +376,8 @@ team, err := teamloader.Load(ctx, ocisource.New("myorg/agent:v1"), runConfig, - **Agent sources**: `config.NewFileSource` / `config.NewBytesSource` / `config.NewURLSource` live in `pkg/config`; the OCI source lives in `pkg/config/ocisource`; HCL support is a source decorator, `hcl.NewSource(inner)`, in `pkg/config/hcl`. `pkg/config/sources` resolves any reference (files, directories, URLs, OCI, user aliases, built-in agents) at the cost of linking all of them. Sub-agents referencing external agents (`sub_agents: [myorg/reviewer]`) need a `teamloader.WithSourceResolver` that wraps `sources.Resolve` (as `loaderdefaults.Opts()` does) — or your own resolver. - **Optional loader features**: everything the loader used to link unconditionally is now an option, so `pkg/teamloader` adds no module over `pkg/runtime`. Enable what your configs use: `teamloader.WithExpander(js.NewJsExpander)` for `${...}` JavaScript in instructions/commands (the default only resolves `${env.NAME}`; also call `jscommands.Register()` for slash commands), `teamloader.WithCodeMode(codemode.Wrap)` for `code_mode_tools`, `teamloader.WithToon(toon.Wrap)` for the `toon` field, `teamloader.WithDeferredTools(deferred.New)` for `defer`, and `runtime.RegisterHarness(codingharness.Factory)` for `harness:` agents. A config that uses a feature you did not enable fails to load with an error naming the option. - **Strict mode**: `teamloader.WithStrict(features...)` fails the load with a `*config.UnsupportedError` listing **every** provider type, toolset type and optional feature the config relies on that you did not enable, with the config locations that need them. Optional features are `config.FeatureHooks`, `config.FeatureHarness`, `config.FeatureAgentRouting`, `config.FeatureSkills`, `config.FeatureExternalAgents`, `config.FeatureCodeMode`, `config.FeatureToon` and `config.FeatureDeferredTools`; none is enabled unless listed. Agents on the `auto` model are resolved eagerly so the provider they land on is checked too. Without `WithStrict`, unknown toolset types stay load-time warnings and unknown providers fail when their model is built. +- **Template-based hooks**: the `add_context` builtin and `type: model` hooks render Go templates. `text/template` looks methods up by name at run time, so linking it makes the Go linker keep every exported method of every reachable type, which roughly doubles a WASM binary. Build with `-tags docker_agent_no_hook_templates` to drop it; those two hooks then fail with `hooks.ErrHookTemplatesDisabled`. Hosts that load with `WithStrict()` and don't enable `config.FeatureHooks` lose nothing. +- **JavaScript expansion**: `pkg/js` evaluates `${...}` with goja, which exposes Go methods to scripts by reflection and has the same effect on the linker as `text/template`. The toolsets that expand placeholders through it (`mcp`, `fetch`, `api`, `openapi`, `a2a`, `webhook`, `open_url`) link it even when the loader's expander is the default one. Build with `-tags docker_agent_no_js_expansion` to swap the engine out: `${env.NAME}` and bound `${name}` placeholders still resolve, and any other expression is left as text. `code_mode_tools` needs goja regardless, so leave `teamloader.WithCodeMode` out too. `cmd/wasm`'s small profile combines both tags. `config.Requires(cfg)` exposes the same audit for your own checks. `pkg/embeddedchat` accepts all of this through `Config.LoadOpts`. A complete example lives in [examples/golibrary/yamlstrict](https://github.com/docker/docker-agent/tree/main/examples/golibrary/yamlstrict). @@ -370,6 +388,63 @@ team, err := teamloader.Load(ctx, ocisource.New("myorg/agent:v1"), runConfig, > > If you call `teamloader.Load` without `loaderdefaults.Opts()`, JavaScript expansion, code mode, TOON, deferred tools and harness agents are now off until you enable them (see *Optional loader features* above). Code-built teams that use `harness:` agents must call `runtime.RegisterHarness(codingharness.Factory)`; `codingharness.Label` moved into the runtime. +### Optional YAML history and embedded model catalog + +The core packages do not link historical YAML schemas or a model catalog snapshot. +Both capabilities are independent opt-ins; the CLI and the shipped WASM demo enable +both to preserve their existing behavior. + +`config.Load` and `teamloader.Load` accept only the current schema by default +(version omitted or `latest.Version`). To accept historical YAML, import +`pkg/config/legacy` and pass its registrar: + +```go +cfg, err := config.Load(ctx, source, config.WithVersions(legacy.Register)) + +team, err := teamloader.Load(ctx, source, runConfig, + teamloader.WithConfigVersions(legacy.Register), + // ...provider and toolset registries... +) +``` + +This retains the usual strict parsing, validation, flavor patches and migrations. +The selection is per load and inherited by external sub-agents. `loaderdefaults` +already includes it. Without it, old versions fail with an unsupported-version +error; historical syntax hints are only available when history is selected. + +`modelsdev.NewStore` still uses its disk cache and the live models.dev API, but a +cache/network miss returns an empty catalog unless a fallback is supplied. To +include the optional embedded data, import `pkg/modelsdev/embedded`: + +```go +store, err := modelsdev.NewStore(modelsdev.WithFallback(embedded.Snapshot)) + +// Or configure the shared store used by a team and its runtime: +runConfig := &config.RuntimeConfig{ + ModelsDevFallback: embedded.Snapshot, +} + +// Entirely in-memory; no cache or network discovery: +store = modelsdev.NewDatabaseStore(embedded.Snapshot()) +``` + +`runtime.WithModelsDevFallback(embedded.Snapshot)` configures a standalone +runtime's lazy default store. An explicit `runtime.WithModelStore` or the store +carried by its model-switcher configuration takes precedence. A fallback callback +runs only when needed and is not cached as authoritative, so live discovery can +recover after a failed request. Callback results are shared; treat them as read-only +and make callbacks safe for concurrent use across stores. + +For a small offline host, use an empty in-memory store instead and omit the +`embedded` import. No metadata means no reliable catalog pricing or capability +inference; specify model limits and capabilities when required. Removing the +snapshot alone does not disable network discovery in a normal `NewStore`. + +**Go API migration:** `modelsdev.EmbeddedSnapshot()` is now `embedded.Snapshot()`; +`modelsdev.SnapshotDate()` is now `embedded.SnapshotDate()`. Existing applications +loading old YAML must opt in with `legacy.Register`. No build tags or process-wide +registration are needed for either capability. + ### Per-runtime feature configuration Prefer instance options over `runtime.RegisterHarness` and @@ -504,7 +579,9 @@ ctx := mcp.WithOAuthTokenStore(ctx, mcp.NewInMemoryTokenStore()) team, err := teamloader.Load(ctx, source, runConfig, opts...) ``` -The override is read by `mcp.CreateToolSet` / `mcp.Creator`, so it only takes effect for remote MCP toolsets built from that context; a nil store (or no override) falls back to the process-wide default. Passing the same context to multiple `teamloader.Load` calls shares one store across them, matching the process-wide default's behavior for a single session. +`mcp.CreateToolSet` / `mcp.Creator` and `mcp.NewRemoteToolsetFromConfig` read the override from the construction context; a nil store (or no override) falls back to the process-wide default. Passing the same context to multiple `teamloader.Load` calls shares one store across them, matching the process-wide default's behavior for a single session. + +A remote-only registry can require `remote.url`, reject local-only fields, and call `mcp.NewRemoteToolsetFromConfig(ctx, toolset, env)` instead of linking the stdio and catalog constructors. The toolset still connects lazily. ## JavaScript Command Expressions (opt-in) @@ -904,7 +981,6 @@ embedding, context-discovery or compaction capabilities. | Caller | Clone failure behavior | | --- | --- | | Session title | Tries the next configured candidate; exhaustion does not interrupt chat. | -| MCP sampling, with or without tools | Returns the actionable clone error before inference. | | LLM compaction | Reports failure and leaves the session history intact. | | Compaction window resolution | The checked resolver returns zero plus the error; the LLM compaction path reports it. UI gauges remain best-effort. | @@ -938,7 +1014,7 @@ openaiClient, _ := openai.NewClient(ctx, &latest.ModelConfig{ // Anthropic anthropicClient, _ := anthropic.NewClient(ctx, &latest.ModelConfig{ Provider: "anthropic", - Model: "claude-sonnet-4-5", + Model: "claude-sonnet-5-5", }, env) // Google Gemini @@ -965,6 +1041,16 @@ sess := session.New( ) ``` +## Durable Runs + +For embedded workers that must continue unfinished runs after a process restart, +use `runtime.NewDurableRuntime` with a session store that implements +`session.RunStore`. Enable this opt-in Go API in your application. + +See the [Durable Runtime](../durable-runtime/index.md) section for the checkpoint +model, a [complete worker example](../durable-runtime-quickstart/index.md), and +[recovery and operational limits](../durable-runtime-recovery/index.md). + ## Error Handling ```go diff --git a/_vendor/github.com/docker/docker-agent/docs/guides/headless/index.md b/_vendor/github.com/docker/docker-agent/docs/guides/headless/index.md index 1a80c3100e47..7f4c7a685fb3 100644 --- a/_vendor/github.com/docker/docker-agent/docs/guides/headless/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/guides/headless/index.md @@ -34,15 +34,15 @@ Docker Agent has several unrelated mechanisms for getting a large document, file | A file on disk, for one interactive turn | `@path` or `/attach` in the TUI (see [File Attachments](../../features/tui/index.md#file-attachments)), `--attach` at startup (seeds an interactive TUI run just as readily as `--exec`), or `/attach` under `--exec` | Read from the local filesystem and inlined into the message once it clears a local admission check. That never crosses Docker Agent's own inbound HTTP boundary for a local (non-`--remote`) run or for the *first* message of a `--remote` run — but a locally resolved attachment added to a *later* message on a remote run does cross it; see the remote-runtime row below. The admission check itself, and how a rejection is reported, differ by entry point; see the read-time limits below. | | Instructions/context every agent turn should see | `add_prompt_files` in the agent config, or `--prompt-file` on the CLI (see [Prompt Files](../../configuration/agents/index.md#prompt-files)) | Re-read from disk **in full** on every turn and injected as instruction context; local, not an HTTP upload, and not subject to the attachment inlining checks above — memory and the model's context window are the practical ceilings. | | A one-off piece of text for a **local** headless run | stdin, without `--remote` (see [`--exec` Mode Basics](#--exec-mode-basics) above) | The piped text becomes the message directly; it never crosses Docker Agent's own inbound HTTP boundary and has no size cap of its own, though Docker Agent may still send it onward to a model/provider over HTTP. | -| A one-off piece of text driving a **remote** runtime | stdin with `docker agent run --remote ... -` | The CLI serializes that stdin text into a native API run request sent to whichever Docker Agent server the `--remote` address points at — a `serve api` process or another run's [`--listen`](../../features/api-server/index.md#listen) control plane, never `serve chat` — so it's measured against that server's own limit: `serve api`'s configurable `--max-request-size`, or a `--listen` control plane's fixed, non-configurable 1 MiB cap. See the HTTP body limit below. That *initial* request carries only message text: conversion currently drops any attachment resolved locally (`@path`/`/attach`, `--attach`) for the first message before it's sent. A *later* message to the same remote run — sent while the agent is still busy, via the default steer behavior or an explicit follow-up (Alt+Enter) — does forward a locally resolved attachment as part of that native API request, so it counts toward the same limit and can 413 like any other oversized request. Client-side `--prompt-file` values are **not** forwarded to a remote runtime either way; prompt files configured on the agent itself (`add_prompt_files`) still resolve, but on the server's filesystem. | +| A one-off piece of text driving a **remote** runtime | stdin with `docker agent run --remote ... -` | The CLI serializes that stdin text into a native API run request sent to whichever Docker Agent server the `--remote` address points at — a `serve api` process or another run's [`--listen`](../../features/api-server/index.md#listen) control plane, never `serve chat` — so it's measured against that server's own limit: `serve api`'s configurable `--max-request-size`, or a `--listen` control plane's fixed, non-configurable 32 MiB cap. See the HTTP body limit below. That *initial* request carries only message text: conversion currently drops any attachment resolved locally (`@path`/`/attach`, `--attach`) for the first message before it's sent. A *later* message to the same remote run — sent while the agent is still busy, via the default steer behavior or an explicit follow-up (Alt+Enter) — does forward a locally resolved attachment as part of that native API request, so it counts toward the same limit and can 413 like any other oversized request. Client-side `--prompt-file` values are **not** forwarded to a remote runtime either way; prompt files configured on the agent itself (`add_prompt_files`) still resolve, but on the server's filesystem. | | A document collection you'll query repeatedly, or one too large to inline at all | The [`rag` toolset](../../tools/rag/index.md) | Indexed once in the background; each query retrieves only the relevant chunks into context, instead of the whole collection. | | An OpenAI-compatible client driving Docker Agent over HTTP | [Chat Server](../../features/chat-server/index.md) | Accepts OpenAI-style `text` and [`image_url`](../../features/chat-server/index.md#image-inputs) content parts. The whole request travels as a single HTTP body capped by that server's `--max-request-size`; a data URL's bytes count toward it, while a remote `http(s)://` image URL is passed to the provider rather than fetched by the chat server, and works only if that provider/model supports it. | | A native integration driving Docker Agent's own session/control protocol | [API Server](../../features/api-server/index.md) | Supports the documented session, run, and event-streaming flows over a single capped HTTP body; see the note below on the upload contract this does *not* provide. | -| A supervisor process driving an already-running interactive session | An attached run's [`--listen`](../../features/api-server/index.md#listen) control plane | Exposes the same session/follow-up/event-streaming API as the API server, but with a fixed, non-configurable 1 MiB request-body cap and no `--auth-token` — there's no `--max-request-size` or `--auth-token` flag for this surface. Only loopback TCP and local sockets are accepted. An authenticating reverse proxy can connect to that local listener if remote access is needed. | +| A supervisor process driving an already-running interactive session | An attached run's [`--listen`](../../features/api-server/index.md#listen) control plane | Exposes the same session/follow-up/event-streaming API as the API server, but with a fixed, non-configurable 32 MiB request-body cap and no `--auth-token` — there's no `--max-request-size` or `--auth-token` flag for this surface. Only loopback TCP and local sockets are accepted. An authenticating reverse proxy can connect to that local listener if remote access is needed. | Three independent ceilings apply, and hitting one says nothing about the others: -1. **The HTTP body limit** — applies to any request reaching one of Docker Agent's three inbound HTTP surfaces: `docker agent serve api`, `docker agent serve chat`, or an interactive run's [`--listen`](../../features/api-server/index.md#listen) control plane. `docker agent run --remote ... -` builds a native run request from stdin and sends it to whichever of `serve api` or a `--listen` control plane the remote address points at — never `serve chat`, which speaks a different protocol. `serve api` and `serve chat` each enforce their own `--max-request-size` (1 MiB default, configurable) and return `413 Request Entity Too Large` above it; a `--listen` control plane enforces the same 1 MiB default but exposes no `--max-request-size` flag (or `--auth-token`) to change it — it's fixed, and reducing the request is the only remedy. See [Troubleshooting: HTTP 413](../../guides/troubleshooting/index.md#http-413-request-body-too-large) for how to diagnose and resolve it. Local (non-`--remote`) stdin and prompt files never cross this boundary; a locally resolved `@path`/`/attach`/`--attach` attachment doesn't either for a remote run's initial message, but one added to a later steer or follow-up message on that same remote run does — see the remote-runtime row above. +1. **The HTTP body limit** — applies to any request reaching one of Docker Agent's three inbound HTTP surfaces: `docker agent serve api`, `docker agent serve chat`, or an interactive run's [`--listen`](../../features/api-server/index.md#listen) control plane. `docker agent run --remote ... -` builds a native run request from stdin and sends it to whichever of `serve api` or a `--listen` control plane the remote address points at — never `serve chat`, which speaks a different protocol. `serve api` and `serve chat` each enforce their own `--max-request-size` (32 MiB default, configurable) and return `413 Request Entity Too Large` above it; a `--listen` control plane enforces the same 32 MiB default but exposes no `--max-request-size` flag (or `--auth-token`) to change it — it's fixed, and reducing the request is the only remedy. See [Troubleshooting: HTTP 413](../../guides/troubleshooting/index.md#http-413-request-body-too-large) for how to diagnose and resolve it. Local (non-`--remote`) stdin and prompt files never cross this boundary; a locally resolved `@path`/`/attach`/`--attach` attachment doesn't either for a remote run's initial message, but one added to a later steer or follow-up message on that same remote run does — see the remote-runtime row above. 2. **Local read-time limits, which differ by path** — the TUI and non-TUI (CLI/`--exec`) message assembly don't share one text/binary rule. The TUI (both `/attach` and a typed `@path` reference) runs every file reference through one flat size ceiling *before* it looks at the file's type; non-TUI assembly — the CLI's `--attach` flag and `--exec`'s own `/attach` parsing — inlines text up to its own ceiling and hands supported binary files (images, PDFs) to a separate path with a higher cap, so a binary file that's fine for `--attach`/`--exec` can still be too big for the TUI's flatter, lower ceiling. Either way an oversized file is rejected rather than silently truncated or allowed to exhaust memory, but whether you're actually told about it depends on the surface: only the interactive TUI's `/attach` command shows a visible error notification (with a file-picker fallback), while a bare `@path` reference is only checked speculatively as you type — a rejection there is logged at debug level only, and the reference is left as plain text in your message with no on-screen notice. Outside the interactive TUI, neither the CLI's `--attach` flag nor `--exec`'s `/attach` (which reuses the same non-TUI assembly and rejection path as `--attach`, not the TUI's notification flow) prints anything about a rejected attachment in normal run output — the message just falls back to text-only, and the reason is visible only in the debug log when `--debug` is enabled. Prompt files (`add_prompt_files`/`--prompt-file`) have no equivalent guard — they're read in full on every turn regardless of size, so memory and the model's context window are what actually bound them. 3. **Model/provider context and media limits** — even content that clears the first two layers still has to fit the model's token/context window, and binary attachments (images, PDF, audio, video) only work if the model declares support for that media type (see [Attachment Capability Overrides](../../configuration/models/index.md#attachment-capability-overrides)). Exceeding the context window is a separate failure from either limit above — see [Context Window Exceeded](../../guides/troubleshooting/index.md#context-window-exceeded). @@ -97,7 +97,7 @@ Hooks run asynchronously and are never waited on: each is spawned detached from ## Running Unattended in CI -Interactively, the TUI prompts for confirmation before a tool call runs unless it's covered by an `allow` permission pattern. There's no one to answer that prompt in CI, so an unattended `--exec` run needs an explicit policy for what may run without asking — otherwise every tool call the model attempts is rejected outright (there's no stdin to prompt, so `--exec` without one just answers "no" on your behalf; see [`--json`'s auto-reject behavior](#structured-output-for-machines) above). +Under the default policy, read-only tools run without confirmation and other calls prompt for approval unless a permission rule overrides that decision. An interactive `--exec` run can still prompt for tool approval; it does not inherently mean unattended execution. In CI, configure an explicit safety mode and permission rules for the calls that must run without asking. With `--json` or `--last`, pending confirmations are always declined; plain-text exec output redirected to a pipe or file also declines them. See [structured output behavior](#structured-output-for-machines) above. Two different questions come up here, and it's worth keeping them separate: @@ -106,7 +106,7 @@ Two different questions come up here, and it's worth keeping them separate: ### `--sandbox`: the isolation boundary -For an untrusted or autonomous agent — anything acting without a human watching approvals — **`--sandbox` is the isolation boundary to reach for**, not a cleverer allow-list. It runs the entire agent, shell calls included, inside a VM managed by [`sbx`](https://docs.docker.com/ai/sandboxes/): a misbehaving or successfully-prompt-injected agent can't touch anything outside the mounted working directory or reach other host/CI state, regardless of which command it runs. That VM isn't disposable or ephemeral — a sandbox matching the current workspace and mount set is retained and reused across subsequent runs rather than torn down when the session ends (see [How It Works](../../configuration/sandbox/index.md#how-it-works)). See [Sandbox Mode](../../configuration/sandbox/index.md) for the full flag reference, `sbx` requirement, network allowlist, and kit staging behavior. +For an untrusted or autonomous agent — anything acting without a human watching approvals — **`--sandbox` is the isolation boundary to reach for**, not a cleverer allow-list. It runs the entire agent, shell calls included, inside a VM managed by [Docker Sandboxes](https://docs.docker.com/ai/sandboxes/), using the standalone `sbx` CLI. The working directory is mounted read-write; configuration directories and staged kits may also be exposed read-only. Treat every mounted file and configured network destination as accessible to the agent, and mount only what the task needs. That VM isn't disposable or ephemeral — a sandbox matching the current workspace and mount set is retained and reused across subsequent runs rather than torn down when the session ends (see [How local sandbox mode works](../../configuration/sandbox/index.md#how-local-sandbox-mode-works)). See [Sandbox Mode](../../configuration/sandbox/index.md) for the full flag reference, `sbx` requirement, network allowlist, and kit staging behavior. ```bash $ docker agent run --sandbox --exec agent.yaml --json "Fix the failing test" @@ -174,7 +174,7 @@ A bare OCI registry reference (`myorg/coder`) has no local config you control, s # .github/agents/review-agent.yaml agents: root: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: Reviews the changes in a pull request for bugs and security issues instruction: Review the changes in this PR for bugs and security issues. toolsets: diff --git a/_vendor/github.com/docker/docker-agent/docs/guides/secrets/index.md b/_vendor/github.com/docker/docker-agent/docs/guides/secrets/index.md index 7accef7fce3d..2bfac0be1c85 100644 --- a/_vendor/github.com/docker/docker-agent/docs/guides/secrets/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/guides/secrets/index.md @@ -6,8 +6,6 @@ weight: 30 canonical: https://docs.docker.com/ai/docker-agent/guides/secrets/ --- -_How to securely provide API keys and credentials to Docker Agent._ - ## Overview Docker Agent needs API keys to talk to model providers (OpenAI, Anthropic, etc.) and MCP tool servers (GitHub, Slack, etc.). Avoid putting literal secrets in agent configuration fields such as `env`, headers, or URLs. Docker Agent can resolve them at runtime through a chain of secret providers, checked in order (see `pkg/environment/default.go`): @@ -18,7 +16,7 @@ Docker Agent needs API keys to talk to model providers (OpenAI, Anthropic, etc.) | 2 | [Docker Compose secrets](#docker-compose-secrets) | Files in `/run/secrets/` | | 3 | [Docker Agent env file](#docker-agent-env-file) | `~/.config/cagent/.env`, written by `docker agent setup` | | 4 | [ChatGPT login](../../providers/chatgpt/index.md) | `CHATGPT_OAUTH_TOKEN` from the account login created by `docker agent setup` | -| 5 | [Credential helper](#credential-helper) | Custom command declared in `~/.config/cagent/config.yaml` under `credential_helper:` | +| 5 | [Credential helper](#credential-helper) | Custom command declared in `~/.config/cagent/config.yaml` under `credential_helper:`; supplies `DOCKER_TOKEN` only | | 6 | [Docker Desktop](#docker-desktop) | Secrets stored by the Docker Desktop backend (no setup on a Desktop install) | The first provider that has a value wins. You can mix and match — for example, use environment variables for one key and the Docker Agent env file for another. @@ -26,7 +24,7 @@ The first provider that has a value wins. You can mix and match — for example, > [!NOTE] > Older Docker Agent versions could also read secrets from the macOS Keychain and the `pass` password manager. These sources are no longer consulted: migrate any keys stored there to one of the sources above, e.g. by re-running `docker agent setup`. -Whatever provider returns the value, if that value looks like a [1Password secret reference](#1password-references) (it starts with `op://`), Docker Agent resolves it through the `op` CLI before handing it to a model provider or tool. +Whatever provider returns the value, if that value looks like a [1Password secret reference](#1password-references) (it starts with `op://`), Docker Agent resolves it through the `op` CLI before handing it to a model provider or tool. This applies to every variable, API keys included, and needs no credential helper: `ANTHROPIC_API_KEY=op://Personal/Anthropic/api-key` in any source above is enough. When Docker Agent runs an agent with `--sandbox` and a Docker AI gateway is configured, the sandbox proxy authenticates gateway requests itself: it injects your Docker login token into HTTPS requests to the gateway host (docker.com domains only). The token never enters the sandbox — inside it, `DOCKER_TOKEN` is a proxy-managed placeholder. @@ -52,6 +50,26 @@ toolsets: GITHUB_PERSONAL_ACCESS_TOKEN: $GITHUB_PERSONAL_ACCESS_TOKEN ``` +### Docker Agent-only variables + +Other tools read the same variables: Claude Code reads `ANTHROPIC_API_KEY`, Codex reads `OPENAI_API_KEY`. To give Docker Agent its own value, prefix the name with `DOCKER_AGENT_ENV_`. Docker Agent looks up `DOCKER_AGENT_ENV_` before ``, and other tools ignore it: + +```bash +export ANTHROPIC_API_KEY=sk-ant-... # used by other tools +export DOCKER_AGENT_ENV_ANTHROPIC_API_KEY="op://Personal/Anthropic/api-key" # used by Docker Agent +docker agent run agent.yaml +``` + +- The prefix works for every variable Docker Agent resolves through its secret chain: provider API keys, `${VAR}` references in MCP `env`, `DOCKER_TOKEN`, and the OpenAI key used by `/speak`. +- `DOCKER_AGENT_ENV_` wins over `` across all [sources](#overview) and `--env-from-file`: an override in the Docker Agent env file beats a plain shell export. +- An empty override is ignored: `export DOCKER_AGENT_ENV_ANTHROPIC_API_KEY=` falls back to an override in a later source, then to `ANTHROPIC_API_KEY`. +- Docker Agent's own settings (`DOCKER_AGENT_*`) are never overridden this way. +- The value can be a [1Password reference](#1password-references). +- `docker agent doctor` shows which name supplied each credential. + +> [!NOTE] +> With `--sandbox`, the provider API keys that the sandbox proxy injects itself (such as `OPENAI_API_KEY` and `ANTHROPIC_API_KEY`) are not read through Docker Agent, so neither the prefix nor `op://` references apply to them. Other variables are resolved on the host, prefix included, and forwarded under their plain name. + ## Env Files For convenience, you can store secrets in a `.env` file and pass it to Docker Agent with `--env-from-file`: @@ -158,7 +176,17 @@ secrets: ## Credential Helper -Docker Agent can shell out to an external credential helper you define in your user config. This is useful when your organisation already has a secrets daemon you want to reuse (HashiCorp Vault, 1Password CLI, `bitwarden-cli`, etc.). +Docker Agent can shell out to an external credential helper you define in your user config to obtain the **Docker token** (`DOCKER_TOKEN`) used by the [Docker models gateway](../../configuration/models/index.md). This is useful when your organisation already keeps that token in a secrets daemon (HashiCorp Vault, 1Password CLI, `bitwarden-cli`, etc.). + +> [!IMPORTANT] +> **The credential helper does not serve API keys.** It is consulted for `DOCKER_TOKEN` only. To load provider API keys or MCP tokens from 1Password, store an `op://` reference in any other source instead, for example in the [Docker Agent env file](#docker-agent-env-file): +> +> ```bash +> # ~/.config/cagent/.env +> ANTHROPIC_API_KEY=op://Personal/Anthropic/api-key +> ``` +> +> See [1Password References](#1password-references). Declare the helper in `~/.config/cagent/config.yaml`: @@ -166,10 +194,10 @@ Declare the helper in `~/.config/cagent/config.yaml`: # ~/.config/cagent/config.yaml credential_helper: command: op - args: ["read", "op://Personal/docker-agent"] + args: ["read", "op://Personal/Docker/token"] ``` -The command is invoked with the variable name appended as the final argument, and must print the secret value to stdout. +The command is run exactly as configured, with no extra arguments, and must print the token to stdout. ## Docker Desktop @@ -177,7 +205,16 @@ On machines where Docker Desktop is installed, Docker Agent queries Docker Deskt ## Docker Authentication -Routing model traffic through the [Docker models gateway](../../configuration/models/index.md) needs a Docker token. Docker Desktop hands out one that is valid for 15 minutes and cannot be renewed by Docker Agent, so when Desktop has nothing usable to offer — it is signed out, not running, or its own refresh is stuck — Docker Agent exchanges the long-lived access token that `docker login` left in your credential store for a fresh Docker token, the same exchange `docker login` itself performs. Signing in with `docker login` is therefore enough; Docker Desktop is not required. +Routing model traffic through the [Docker models gateway](../../configuration/models/index.md) needs a Docker token. A `DOCKER_TOKEN` you provide yourself — an environment variable, a Compose secret, an env file or a credential helper, as is common in CI — always takes precedence, and none of the sources below are consulted. + +Otherwise, Docker Agent tries these sources in order and uses the first token that is not expired or about to expire: + +1. **The Docker secrets engine**, which Docker Desktop serves on a local socket and which holds the session of the account signed in to Desktop. It is skipped when it is unavailable (Docker Desktop is not installed or not running, or predates the engine), holds no session, or holds a session that is incomplete: an access token that is missing or not a JWT, or no account or expiry. A request waits for the engine for at most five seconds, and never more than half of its own time limit, so the other sources still get a turn. An engine that fails or does not answer is skipped for the next 30 seconds. Production sessions are read unless `DOCKER_AGENT_HUB_LOGIN_URL` points at a Docker Hub staging host, such as `hub-stage.docker.com`; staging sessions are read instead. Docker Agent cannot tell which environment Docker Desktop is signed in to, so set that variable when Desktop is signed in to staging. +2. **Docker Desktop's backend.** +3. **The access token `docker login` stored.** Docker Agent exchanges the long-lived access token in your credential store for a fresh Docker token, the same exchange `docker login` itself performs. Signing in with `docker login` is therefore enough; Docker Desktop is not required. +4. **A refresh of Docker Desktop's session**, as a last resort. + +The tokens Docker Desktop hands out are valid for 15 minutes, and only Desktop can renew them. That is why the exchange exists: it keeps Docker Agent working when Desktop has nothing usable to offer because it is signed out, not running, or its own refresh is stuck. Tokens are looked up again as they near expiry, so a long-running session keeps working. Only Docker access tokens are exchanged — the `dckr_…` secrets `docker login` stores — never an account password, and the exchange goes to Docker Hub over HTTPS. The resulting bearer token is cached in a private file under Docker Agent's cache directory so sibling processes reuse it instead of minting their own, and it stops being used within seconds of a `docker logout` or an account switch. Run `docker agent debug auth` to see which token is in use and where it came from. @@ -201,6 +238,9 @@ References follow the `op:////` format. Make sure the `op` C > > If the value starts with `op://` but the `op` CLI is not installed, or the reference cannot be read (not signed in, wrong path, locked vault), Docker Agent logs a warning and uses an **empty value** — it never forwards the raw `op://` reference to a model provider or tool. Resolved references (and deterministic failures) are cached for the lifetime of the run; transient failures such as a cancelled lookup are not cached, so a later attempt can retry. +> [!TIP] +> Other tools that read the same variables (Claude Code, Codex, provider SDKs) do not understand `op://` values. To keep references out of your shell, put them in the [Docker Agent env file](#docker-agent-env-file), which only Docker Agent reads, or point a model at a dedicated variable with [`token_key`](../../configuration/models/index.md). + ## Choosing a Method | Method | Best for | Setup effort | @@ -209,7 +249,7 @@ References follow the `op:////` format. Make sure the `op` C | Env files | Team projects, multiple keys | Low | | Docker Agent env file | Keys used across all projects, written by `docker agent setup` | Low | | Docker Compose secrets | Containerized deployments, CI/CD | Medium | -| Credential helper | Reusing an existing secrets daemon (Vault, 1Password CLI, ...) | Medium | +| Credential helper | Fetching `DOCKER_TOKEN` from an existing secrets daemon (Vault, 1Password CLI, ...) | Medium | | 1Password references (`op://`) | Teams already using 1Password | Low | You can combine methods. For example, store long-lived provider keys in the Docker Agent env file and pass project-specific MCP tokens via env files. @@ -222,7 +262,7 @@ Secret redaction is enabled by default as a defense in depth. Set `redact_secret - the arguments of every outgoing tool call (before the tool sees them), - every outgoing chat message (before the model provider sees them), and -- every tool's output (before it reaches event consumers, the persisted session file, the `post_tool_use` hook input, or the next LLM call). +- every tool's output, including the text of the inline document attachments it returns (before they reach event consumers, the persisted session file, the `post_tool_use` hook input, or the next LLM call). ```yaml agents: diff --git a/_vendor/github.com/docker/docker-agent/docs/guides/thinking/index.md b/_vendor/github.com/docker/docker-agent/docs/guides/thinking/index.md index bfe2b34d43ed..74e6c42682f9 100644 --- a/_vendor/github.com/docker/docker-agent/docs/guides/thinking/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/guides/thinking/index.md @@ -24,10 +24,10 @@ Docker Agent exposes this through a single `thinking_budget` field on any named | Provider | Format | Values | Default | | ------------------- | ---------- | --------------------------------------------------------------------------------------- | ------------------ | | OpenAI | string | `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max`; `xhigh` on gpt-5.2+, `max` on gpt-5.6+; API-level `none` on GPT-5.x from 5.6 onward and GPT-6 Sol/Luna, `minimal` dropped on gpt-5.6+ | `medium` (API default) | -| Anthropic | int or str | 1024–32768 tokens, or `minimal`–`max`, `adaptive`, `adaptive/`, `none` | off | -| Gemini 2.5 | int | `0` (off), `-1` (dynamic), or token count (max 24576 / 32768) | `-1` (dynamic) | -| Gemini 3 | string | `minimal`, `low`, `medium`, `high` | API default (model-dependent) | -| AWS Bedrock | int or str | 1024–32768 tokens (`minimal`–`max` mapped to tokens); `adaptive`, `adaptive/` for Opus 4.6+ (rejected by older Claude models) | off | +| Anthropic | int or str | Fixed budgets: ≥1024 and less than `max_tokens`; or `minimal`–`max`, `adaptive`, `adaptive/`, `none` | Model-dependent; Claude 5.x defaults to adaptive | +| Gemini 2.5 | int or str | `0` (off), `-1` (dynamic), token count (max 24576 / 32768), or `minimal`–`max` / `adaptive` (mapped to tokens) | `-1` (dynamic) | +| Gemini 3+ | string | `minimal` (Gemini 3), `low`, `medium`, `high`, `xhigh` (`gemini-4-hydrogen` / `gemini-4-neon`), `adaptive`, `adaptive/`, `none` (lowers to `low` with warning) | API default (model-dependent) | +| AWS Bedrock | int or str | Fixed budgets: ≥1024 and less than `max_tokens`; `minimal`–`max` mapped to tokens on older models; adaptive on supported newer Claude models | Model-dependent; Claude 5.x defaults to adaptive | | Docker Model Runner | int or str | token count, `minimal`–`max` (mapped to tokens), `adaptive` (unlimited), `none` | engine default | String values are case-insensitive. The full set of accepted strings is `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max`, `adaptive`, and `adaptive/` — but each provider only honors the subset listed above. Unsupported values either fail at request time (OpenAI) or are mapped/ignored as described per provider below. @@ -71,13 +71,13 @@ Anthropic Claude supports two thinking modes: a **token budget** (older models) ### Token budget (Claude 4 and earlier) -Set an explicit number of thinking tokens (1024–32768). This must be less than `max_tokens`: +Set an explicit number of thinking tokens (at least 1024). This must be less than `max_tokens` and within the model's supported range: ```yaml models: claude-thinker: provider: anthropic - model: claude-sonnet-4-5 + model: claude-sonnet-4-6 thinking_budget: 16384 # tokens reserved for internal reasoning ``` @@ -85,7 +85,7 @@ Docker Agent auto-adjusts `max_tokens` when you set a thinking budget but leave ### Adaptive thinking (Opus 4.6+ and Sonnet 4.6) -Newer Claude models support adaptive thinking, where the model decides how much to think. **Claude Opus 4.6, 4.7, 4.8, and Sonnet 4.6 only support adaptive thinking** — they reject token-based budgets. Use `adaptive`, `adaptive/`, or a bare effort level — on Anthropic, a bare effort level like `high` is shorthand for adaptive thinking at that effort: +Newer Claude models support adaptive thinking, where the model decides how much to think. **Claude Opus 4.6, 4.7, and 4.8 only support adaptive thinking** — they reject token-based budgets. Sonnet 4.6 supports both token budgets and adaptive thinking. Use `adaptive`, `adaptive/`, or a bare effort level — on Anthropic, a bare effort level like `high` is shorthand for adaptive thinking at that effort: ```yaml models: @@ -107,20 +107,20 @@ models: **Adaptive effort levels and per-model support:** -| Level | Opus 4.5 | Sonnet 4.5 / Haiku | Sonnet 4.6 | Opus 4.6 | Opus 4.7 / 4.8 | Fable 5 | Mythos 5 | Mythos preview | -| --------- | :------: | :----------------: | :--------: | :------: | :------------: | :-----: | :------: | :------------: | -| `low` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| `medium` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| `high` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| `xhigh` | — | — | — | — | ✓ | ✓ | ✓ | — | -| `max` | — | — | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| Level | Opus 4.5 | Haiku 4.5 | Sonnet 4.6 | Opus 4.6 | Opus 4.7 / 4.8 | Fable 5 | Mythos 5 | Mythos preview | +| --------- | :------: | :-------: | :--------: | :------: | :------------: | :-----: | :------: | :------------: | +| `low` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| `medium` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| `high` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| `xhigh` | — | — | — | — | ✓ | ✓ | ✓ | — | +| `max` | — | — | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | `minimal` is treated as `low` (bare form only). `high` is the default when `adaptive` is used without an effort level. > [!WARNING] -> **Effort strings require adaptive-capable models** +> **Effort strings are adapted to the model** > -> Every string effort value on Anthropic is sent as adaptive thinking (`output_config.effort`), which only newer Claude models (Opus 4.6+, Sonnet 4.6) accept. For older models like Sonnet 4.5, use an integer token budget instead. Conversely, models that _only_ support adaptive thinking (Opus 4.6, 4.7, 4.8, Sonnet 4.6) automatically have token budgets coerced to `adaptive` (a warning is logged). +> On adaptive-capable Claude models, effort strings use adaptive thinking (`output_config.effort`). For older models such as Haiku 4.5, Docker Agent converts effort strings, including `adaptive/`, into fixed token budgets and logs a warning. Models that only support adaptive thinking have positive token budgets converted to `adaptive` instead. ### Disabling thinking (Claude) @@ -128,6 +128,10 @@ models: thinking_budget: none # or 0 ``` +Models that support disabling thinking honor this setting. Claude models that +require thinking use adaptive thinking with low effort instead. Claude 5.x +models think adaptively by default; see the [per-model rules](../../providers/anthropic/index.md#claude-5x-models). + ### Interleaved thinking Interleaved thinking lets the model reason between tool calls — useful for complex agentic tasks. Docker Agent auto-enables it whenever a thinking budget is configured on a Claude model, so you only need to set it explicitly to turn it off: @@ -136,7 +140,7 @@ Interleaved thinking lets the model reason between tool calls — useful for com models: claude-interleaved: provider: anthropic - model: claude-sonnet-4-5 + model: claude-sonnet-4-6 thinking_budget: 16384 # interleaved_thinking is auto-enabled; disable it explicitly if needed: provider_opts: @@ -181,7 +185,7 @@ See the [Anthropic provider page](../../providers/anthropic/index.md#task-budget ## Google Gemini -Gemini 2.5 and Gemini 3 use different formats. +Gemini 2.5 and Gemini 3+ use different formats. ### Gemini 2.5 (token budget) @@ -203,21 +207,35 @@ models: thinking_budget: 8192 # fixed token budget (max 24576 for Flash, 32768 for Pro) ``` -### Gemini 3 (level-based) +### Gemini 3+ (level-based) ```yaml models: + gemini4-neon: + provider: google + model: gemini-4-neon + thinking_budget: xhigh # low | medium | high | xhigh (Hydrogen and Neon) + + gemini4-carbon: + provider: google + model: gemini-4-carbon + thinking_budget: high # low | medium | high (Carbon and Argon) + + gemini4-adaptive: + provider: google + model: gemini-4-carbon + thinking_budget: adaptive # omits thinkingLevel (model default); adaptive/ selects a tier + gemini3-flash: provider: google model: gemini-3-flash thinking_budget: medium # minimal | low | medium | high - - gemini3-pro: - provider: google - model: gemini-3-pro - thinking_budget: high # low | high (Pro supports fewer levels) ``` +- **Disabling thinking (`none` / `0`):** Gemini 3+ models always think; setting `thinking_budget: none` or `0` logs a warning and sends `low` effort with thoughts hidden. +- **Integer budgets on Gemini 4+:** Gemini 4 models reject `thinkingBudget` tokens; Docker Agent logs a warning and omits the token budget so the model falls back to its default `thinkingLevel`. +- **OpenAI-compatible gateways:** When routing `google/gemini-3*` or `google/gemini-4*` models through an OpenAI-compatible gateway (such as `openrouter` or `vercel`), `thinking_budget` is mapped and clamped to `reasoning_effort` automatically. + ## AWS Bedrock (Claude) Bedrock Claude uses a token budget like Anthropic. String effort levels (`minimal`–`max`) are mapped automatically: @@ -234,14 +252,14 @@ Bedrock Claude uses a token budget like Anthropic. String effort levels (`minima models: bedrock-claude-thinker: provider: amazon-bedrock - model: global.anthropic.claude-sonnet-4-5-20250929-v1:0 + model: global.anthropic.claude-sonnet-4-6 thinking_budget: 8192 # or use an effort level: medium provider_opts: region: us-east-1 bedrock-claude-interleaved: provider: amazon-bedrock - model: global.anthropic.claude-sonnet-4-5-20250929-v1:0 + model: global.anthropic.claude-sonnet-4-6 thinking_budget: high provider_opts: region: us-east-1 @@ -308,7 +326,7 @@ models: thinking_budget: 0 ``` -`none` and `0` clear Docker Agent's thinking configuration — no thinking parameter is sent. Models that always reason (OpenAI o-series, gpt-5 through gpt-5.5, GPT-6 Astra, Gemini 3) then fall back to the API's default behavior and still reason internally; GPT-5.x from 5.6 onward and GPT-6 Sol/Luna send `none` as a real API value that genuinely disables reasoning. +On OpenAI o-series, gpt-5 through gpt-5.5, GPT-6 Astra, and Gemini 3+, `none` and `0` clear the local budget and leave the API's default reasoning behavior in effect. GPT-5.x from 5.6 onward and GPT-6 Sol/Luna instead send `none` as an API value that disables reasoning. Claude models follow the [model-specific rules above](#disabling-thinking-claude). Local models and other OpenAI-compatible backends may reason by default even when `thinking_budget` is cleared. Use @@ -331,14 +349,24 @@ support that field. ## Changing Thinking Level at Runtime -While running in the TUI, press **Shift+Tab** to cycle the thinking effort level for the current model without editing your YAML config, or type `/effort ` to jump straight to a specific level (e.g. `/effort high`). Running `/effort` without an argument opens a picker listing the levels the current model supports: +Adjust reasoning effort in the TUI without editing your YAML: + +| Control | Action | +| --- | --- | +| Shift + Tab | Cycle through supported levels, wrapping back to the first. | +| `/effort` | Open a picker of supported levels. | +| `/effort high` | Set a level directly. | +| `/effort` + Space + Tab | Autocomplete a supported level. | + +The sidebar shows the current effort next to the model name. Available levels +depend on the model; for older Claude models, Docker Agent maps levels to fixed +token budgets. + +**Changes last for the current session only.** The next session uses the effort +configured in your YAML. -- The level steps through the model's supported range (model-specific), wrapping around — for example `none → minimal → low → medium → high → none` on OpenAI gpt-5/o-series, `none → minimal → low → medium → high → xhigh → none` on gpt-5.2+, `none → low → medium → high → xhigh → max → none` on gpt-5.6+ (no `minimal`), `none → low → medium → high → max → none` on Anthropic Opus 4.6 and Sonnet 4.6, and `none → low → medium → high → xhigh → max → none` on Anthropic Opus 4.7+, Fable 5, and Mythos 5. For older Anthropic models (e.g. Sonnet 4.5) that only accept token budgets, effort-string cycling has no effect — use an integer `thinking_budget` in your YAML config instead. -- The current level is shown in the sidebar next to the model name (e.g. `openai/gpt-5 • high`). -- This applies as a session override — it is **not** saved to the config file. The next session starts from the level defined in your YAML. -- For models that don't support reasoning, and for remote runtimes, Shift+Tab is a no-op and an informational message is displayed. -- `/effort` only accepts levels the current model supports; requesting an unsupported level shows the model's supported list. Like Shift+Tab, it is unavailable for non-reasoning models and remote runtimes. -- Press Tab after `/effort` and a space to complete a level from the current model's supported range; it lists the same levels the picker shows (and, like the picker, offers no candidates for non-reasoning models or remote runtimes). +These controls require a reasoning-capable model and are unavailable with remote +runtimes. ## Sharing Thinking Config Across Models diff --git a/_vendor/github.com/docker/docker-agent/docs/guides/tips/index.md b/_vendor/github.com/docker/docker-agent/docs/guides/tips/index.md index f84803d49cbe..4a6c8c88a927 100644 --- a/_vendor/github.com/docker/docker-agent/docs/guides/tips/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/guides/tips/index.md @@ -8,8 +8,6 @@ aliases: - /ai/docker-agent/best-practices/ --- -_Expert guidance for building effective, efficient, and secure agents._ - ## Configuration Tips ### Auto Mode for Quick Start @@ -57,23 +55,28 @@ agents: ### Model Aliases Are Auto-Pinned -Docker Agent automatically resolves model aliases to their latest pinned versions. This ensures reproducible behavior: +Docker Agent resolves named-model aliases to dated IDs when a matching pinned model exists in its model catalog. Inline `provider/model` references and models with a custom `base_url` are left unchanged: ```yaml -# You write: -model: anthropic/claude-sonnet-4-5 +models: + claude: + provider: anthropic + model: claude-haiku-4-5 # resolves to a matching dated ID from the catalog -# docker-agent resolves to: -# anthropic/claude-sonnet-4-5-20250929 (or latest available) +agents: + root: + model: claude ``` -To use a specific version, specify it explicitly in your config. +To guarantee the same version across catalog updates, specify a dated model ID explicitly in your config. ## Performance Tips -### Defer Tools for Faster Startup + -Large MCP toolsets can slow down agent startup. Use `defer` to load tools on-demand: +### Defer Tools to Reduce Prompt Size + +Large MCP toolsets add tool definitions to the model's context. Use `defer` to expose those definitions on demand and reduce prompt size. The MCP servers still start normally: ```yaml agents: @@ -133,7 +136,7 @@ Always set `max_iterations` for agents with powerful tools to prevent infinite l ```yaml agents: developer: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: Development assistant instruction: You are a developer. max_iterations: 30 # Reasonable limit for development tasks @@ -153,7 +156,7 @@ Configure fallback models for resilience against provider outages or rate limits ```yaml agents: root: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: Reliable assistant instruction: You are a helpful assistant. fallback: @@ -213,7 +216,7 @@ For defense in depth, use both permissions and [sandbox mode](../../configuratio ```yaml agents: secure_dev: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: Secure development assistant instruction: You are a secure coding assistant. toolsets: @@ -302,7 +305,7 @@ The root agent uses descriptions to decide which sub-agent to delegate to: ```yaml agents: root: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: Technical lead instruction: Delegate to specialists based on the task. sub_agents: [frontend, backend, devops] @@ -373,7 +376,7 @@ Set your preferred default model in `~/.config/cagent/config.yaml`: ```yaml settings: - default_model: anthropic/claude-sonnet-4-5 + default_model: anthropic/claude-sonnet-5-5 ``` This model is used by the built-in default agent when you run `docker agent run` without a config argument and no project-level `docker-agent.yaml`, `docker-agent.yml`, or `docker-agent.hcl` exists. @@ -429,6 +432,19 @@ settings: If a sound is enough, set `settings: { sound: true }` instead — Docker Agent plays a failure sound when a task errors, and a success sound when a task that ran longer than `sound_threshold` seconds (default 10) completes. +### Keep the machine awake + +Enable **Keep machine awake** in `/settings` in either TUI to prevent idle system sleep while an agent is running. It is disabled by default, and changes apply to the next agent run. The display can still turn off; the inhibitor is released when the run finishes, errors, or is canceled. + +You can also enable it in your user configuration: + +```yaml +settings: + keep_awake: true +``` + +This uses native macOS and Windows power APIs, or systemd-logind over D-Bus on Linux, with no helper executables required. Linux requires a running system bus and logind with permission to inhibit sleep. If acquisition fails, the hook reports the error without stopping the agent. It does not guarantee protection against deliberate sleep, lid closure, or administrator policy. + See the [Hooks documentation](../../configuration/hooks/index.md) for the full list of events, their payloads, and per-hook options (`env`, `working_dir`, `timeout`). ### Inject the Current Session ID with Hooks @@ -491,7 +507,7 @@ With a simple reviewer agent: # reviewer.yaml agents: root: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: PR reviewer instruction: | Review pull requests for code quality, bugs, and security issues. diff --git a/_vendor/github.com/docker/docker-agent/docs/guides/troubleshooting/index.md b/_vendor/github.com/docker/docker-agent/docs/guides/troubleshooting/index.md index a38c4cf9dedd..8891d3fb3afd 100644 --- a/_vendor/github.com/docker/docker-agent/docs/guides/troubleshooting/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/guides/troubleshooting/index.md @@ -8,8 +8,6 @@ aliases: - /ai/docker-agent/community/troubleshooting/ --- -_Common issues and how to resolve them when working with Docker Agent._ - ## Common Errors ### Context Window Exceeded @@ -18,7 +16,7 @@ Error message: `context_length_exceeded` or similar. - Use `/compact` in the TUI to summarize and reduce conversation history - Set `num_history_items` in agent config to limit messages sent to the model -- Switch to a model with larger context (Claude Sonnet 4.5 supports 1M tokens, Gemini up to 2M) +- Switch to a model with larger context (Claude Sonnet 5.5 supports 1M tokens, Gemini up to 2M) - Break large tasks into smaller conversations ### Max Iterations Reached @@ -42,7 +40,7 @@ Configure fallback behavior in your agent config: ```yaml agents: root: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 fallback: models: [openai/gpt-5-mini, openai/gpt-4o-mini] retries: 2 # retries per model for 5xx errors @@ -144,6 +142,19 @@ Model names must match the provider's naming exactly. Common mistakes: - Using a deprecated model name (e.g. `gpt-4` instead of `gpt-5-mini` or `gpt-4o`) - Model references are case-sensitive: `openai/gpt-5-mini` ≠ `openai/GPT-5-mini` +### Conversation ends without a final reply + +A model can end a turn after using tools without returning an answer, or return +only reasoning. This can happen with thinking models such as Claude Fable 5.2. +Docker Agent emits a warning with the model and stop reason; `--exec --json` +includes it as a `warning` event. An empty `stop` does not prove that the task +finished or that the request was rate-limited. + +Check the preceding tool results before sending a follow-up: tools may already +have changed files or created commits. Docker Agent does not automatically retry +these turns. Use `--session ` to continue the session. When reporting +an unexplained stop, include the warning and sanitized `--debug` logs. + ### Network connectivity If the agent hangs or times out, check that you can reach the provider's API endpoint. Firewalls, VPNs, or proxy settings may block requests. Docker Agent does not evaluate PAC files or URLs directly. When Docker Desktop is running, eligible requests use its PAC adapter before environment proxy settings; `NO_PROXY` does not bypass that selection. Set `DOCKER_AGENT_DISABLE_DESKTOP_PROXY=1` (or `true`, `yes`, or `on`) to restore `HTTP_PROXY`, `HTTPS_PROXY`, `ALL_PROXY`, and `NO_PROXY` routing per request; see [Docker Desktop proxy](../../tools/fetch/index.md#docker-desktop-proxy) for scope and SSRF behavior. @@ -182,7 +193,7 @@ MCP tools using stdio transport must complete the initialization handshake befor > [!NOTE] > **Startup tool-listing timeout** > -> At startup, Docker Agent queries each toolset for its tool list. If a toolset does not respond within 10 seconds (e.g. a wedged MCP stdio server that never answers `tools/list`), that toolset is skipped with a warning and the remaining toolsets load normally. The sidebar resolves showing whichever tools did load — no infinite spinner. Enable `--debug` to see the warning message, and use `/toolset-restart ` once the server becomes responsive. +> At startup, Docker Agent queries each toolset for its tool list. If a toolset does not respond within 10 seconds (e.g. a wedged MCP stdio server that never answers `tools/list`), that toolset is skipped with a warning and the remaining toolsets load normally. Enable `--debug` to see the warning message, and use `/toolset-restart ` once the server becomes responsive. If a toolset keeps crashing in a tight loop, tune the [`lifecycle`](../../configuration/tools/index.md#toolset-lifecycle) block on the toolset (e.g. raise `backoff.initial`, lower `max_restarts`, or switch to the `best-effort` profile) so a flaky dependency does not amplify into a restart storm. @@ -255,9 +266,9 @@ The API server stores every conversation as a distinct session in the SQLite dat ### HTTP 413: request body too large -Three kinds of process reject an oversized request body with `413 Request Entity Too Large`: `docker agent serve api`, `docker agent serve chat`, and an interactive run's control plane ([`docker agent run --listen`](../../features/api-server/index.md#listen)). They aren't configured the same way: `serve api` and `serve chat` each expose their own `--max-request-size` flag (1 MiB default). A `--listen` control plane has no such flag — it enforces a fixed, non-configurable 1 MiB limit — and no `--auth-token` either. Work through these layers in order: +Three kinds of process reject an oversized request body with `413 Request Entity Too Large`: `docker agent serve api`, `docker agent serve chat`, and an interactive run's control plane ([`docker agent run --listen`](../../features/api-server/index.md#listen)). They aren't configured the same way: `serve api` and `serve chat` each expose their own `--max-request-size` flag (32 MiB default). A `--listen` control plane has no such flag — it enforces a fixed, non-configurable 32 MiB limit — and no `--auth-token` either. Work through these layers in order: -1. **Identify which server is involved.** `serve api`, `serve chat`, and an attached run's `--listen` control plane are three separate kinds of process. `serve api` and `serve chat` each have their own `--max-request-size` flag and 1 MiB default — check the flags the process that returned the 413 was actually started with. A `--listen` control plane has no `--max-request-size` flag: its 1 MiB cap is fixed. +1. **Identify which server is involved.** `serve api`, `serve chat`, and an attached run's `--listen` control plane are three separate kinds of process. `serve api` and `serve chat` each have their own `--max-request-size` flag and 32 MiB default — check the flags the process that returned the 413 was actually started with. A `--listen` control plane has no `--max-request-size` flag: its 32 MiB cap is fixed. 2. **Measure the serialized request body, not a source file's size.** JSON string escaping and, for any base64-encoded binary content, base64's ~33% expansion both inflate the wire size well past the original file size — a file just under the limit can still push the encoded request over it. 3. **Rule out an intermediary.** If a reverse proxy, gateway, or load balancer sits in front of Docker Agent, it usually enforces its own, independent body-size limit — often with a differently formatted error — and can reject the request before Docker Agent ever sees it. 4. **Confirm who actually returned the error.** A 413 (or a context-length error) can also come from the model provider itself once the request reaches it; that is a separate limit unrelated to `--max-request-size` — see [Context Window Exceeded](#context-window-exceeded) above. @@ -265,18 +276,19 @@ Three kinds of process reject an oversized request body with `413 Request Entity A few things that catch people out: -- `--max-request-size` is set once at process startup and applies to every request that server handles — it isn't per-request or per-client. Only `serve api` and `serve chat` have it; a `--listen` control plane's 1 MiB cap can't be changed. -- `0` or a negative value falls back to the 1 MiB default; it does not mean "no limit". +- `--max-request-size` is set once at process startup and applies to every request that server handles — it isn't per-request or per-client. Only `serve api` and `serve chat` have it; a `--listen` control plane's 32 MiB cap can't be changed. +- `0` or a negative value falls back to the 32 MiB default; it does not mean "no limit". +- `docker agent serve ag-ui` answers 413 too, above a fixed 8 MiB limit: it has no `--max-request-size` flag, and AG-UI clients resend the conversation on every run. Trim the history the client sends; the server only reads the user messages that end it (see [AG-UI](../../features/ag-ui/index.md#threads-and-sessions)). - Retrying the same oversized body against the same server won't succeed — the limit doesn't change between requests. -- On all three, the body-size check runs ahead of request authentication, so an oversized request can come back as 413 even without valid credentials. -- Piping stdin into a **local** run (`docker agent run agent.yaml -`) never crosses Docker Agent's own inbound HTTP boundary — Docker Agent may still send that content onward to a model/provider over HTTP, but no request reaches Docker Agent's own server to be measured against a `--max-request-size` cap. Piping stdin into `docker agent run --remote ... -`, however, does cross that boundary: the CLI serializes that stdin text into a native API run request and sends it to whichever Docker Agent server the `--remote` address points at — a `serve api` process or another run's `--listen` control plane, never `serve chat`, which speaks a different protocol — so it's measured against that server's own limit like any other request (a configurable `--max-request-size` for `serve api`, or the fixed 1 MiB cap for a `--listen` control plane). That initial request carries only message text — conversion currently drops any attachment resolved locally (`@path`, `/attach`, `--attach`) for the first message, so it alone can't be the cause of a 413. But a `--remote` run doesn't stay text-only for its whole lifetime: a locally resolved attachment added to a *later* message while the agent is still busy — via the default steer behavior or an explicit follow-up (Alt+Enter) — is forwarded as part of that native API request, counts toward the same limit, and can trigger 413 just like any other oversized request. +- On `serve api`, `serve chat` and a `--listen` control plane, the body-size check runs ahead of request authentication, so an oversized request can come back as 413 even without valid credentials. `serve ag-ui` checks the token first: there, an oversized request without valid credentials gets 401. +- Piping stdin into a **local** run (`docker agent run agent.yaml -`) never crosses Docker Agent's own inbound HTTP boundary — Docker Agent may still send that content onward to a model/provider over HTTP, but no request reaches Docker Agent's own server to be measured against a `--max-request-size` cap. Piping stdin into `docker agent run --remote ... -`, however, does cross that boundary: the CLI serializes that stdin text into a native API run request and sends it to whichever Docker Agent server the `--remote` address points at — a `serve api` process or another run's `--listen` control plane, never `serve chat`, which speaks a different protocol — so it's measured against that server's own limit like any other request (a configurable `--max-request-size` for `serve api`, or the fixed 32 MiB cap for a `--listen` control plane). That initial request carries only message text — conversion currently drops any attachment resolved locally (`@path`, `/attach`, `--attach`) for the first message, so it alone can't be the cause of a 413. But a `--remote` run doesn't stay text-only for its whole lifetime: a locally resolved attachment added to a *later* message while the agent is still busy — via the default steer behavior or an explicit follow-up (Alt+Enter) — is forwarded as part of that native API request, counts toward the same limit, and can trigger 413 just like any other oversized request. > [!WARNING] > Raising `--max-request-size` increases how much memory an unauthenticated or malicious client can force the server to buffer per request. Pick a value with your deployment's exposure in mind, and pair any non-loopback listener with `--auth-token` (API server) or `--api-key`/`--api-key-env` (chat server). A `--listen` control plane has neither flag — keep its listener on loopback or a local socket (non-loopback TCP is rejected); an authenticating reverse proxy can connect to that local listener. ### Delegated task appears stalled before its first response -A direct `transfer_task` delegation automatically retries once when the child model stream is silent before sending any response payload. It emits the existing warning event, and the retry is immediate and applies once to the complete child run, including later turns and fallback models. Each nested native `transfer_task` starts a new child run with its own fresh retry allowance. The retry does not apply after partial output, to `background_agents`, or when cancellation or a run budget blocks it. +When a configured [stream idle timeout](../../configuration/models/index.md#stream-idle-timeout) expires before the child model sends any response payload, a direct `transfer_task` delegation automatically retries once. The idle timeout is disabled by default. It emits the existing warning event, and the retry is immediate and applies once to the complete child run, including later turns and fallback models. Each nested native `transfer_task` starts a new child run with its own fresh retry allowance. The retry does not apply after partial output, to `background_agents`, or when cancellation or a run budget blocks it. Run with `--debug` and look for `Delegated model stream idle before response; retrying immediately`. If the child still fails, check provider connectivity, fallback configuration, cancellation, and run-budget events; Docker Agent does not retry when the context is canceled or the run budget is exhausted. diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/anthropic/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/anthropic/index.md index 0f77d8206aa6..c4ef4a3ef487 100644 --- a/_vendor/github.com/docker/docker-agent/docs/providers/anthropic/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/providers/anthropic/index.md @@ -125,11 +125,10 @@ make two endpoints interchangeable. | Bedrock runtime | `amazon-bedrock`; **`ConverseStream`** | Regional Bedrock runtime endpoint | AWS SigV4 credentials or Bedrock bearer token | Exact AWS model or inference-profile ID | | OpenAI-compatible aggregators | OpenAI client, Chat Completions for Claude | Alias/custom endpoint (e.g. OpenRouter, Vercel, Azure, OpenCode) | Host-specific key | Host's catalogue ID, not necessarily a Claude API ID | -These are existing adapter paths, not a guarantee of complete Claude 5.x -compatibility. Model-specific request rules, signed history, thinking and fallback -compatibility remain the subject of the planned [core work (#4583)](https://github.com/docker/docker-agent/issues/4583) -and [fallback work (#4584)](https://github.com/docker/docker-agent/issues/4584). -This guide does not mark those changes as implemented. +These are the adapter paths Docker Agent uses. Claude 5.x request rules, signed +history and thinking ([#4583](https://github.com/docker/docker-agent/issues/4583)) +and server-side fallback ([#4584](https://github.com/docker/docker-agent/issues/4584)) +are described in the sections below. - The built-in `opencode` alias is OpenAI-compatible; the [custom OpenCode Messages provider](../opencode-zen/index.md#anthropic-compatible-messages-api) @@ -167,12 +166,14 @@ limited Google access, but the audited Google directory has no dedicated model c | Sonnet 5.5 | `claude-sonnet-5-5` | Documented | Documented | Documented | | Fable 5 | `claude-fable-5` | Documented | Documented | Documented | | Fable 5.1 | `claude-fable-5-1` | Documented | Documented | Documented | +| Fable 5.2 | `claude-fable-5-2` | Documented | Documented | Documented | | Mythos 5 | `claude-mythos-5` | Documented, gated | Limited announcement | **Unsupported** (Mantle only) | | Mythos 5.1 | `claude-mythos-5-1` | Documented, gated | Limited announcement | Documented, gated (not Mantle) | +| Mythos 5.2 | `claude-mythos-5-2` | Documented, gated | Limited announcement | Documented, gated | -The audit found **24 corroborated native model/platform pairs** (9 Claude API + -7 Vertex + 8 Bedrock runtime), **2 limited-access Mythos/Google announcements** and -**1 explicitly unsupported Mythos 5/Converse pair**. This is not 26 implemented +The audit found **29 corroborated native model/platform pairs** (11 Claude API + +8 Vertex + 10 Bedrock runtime), **3 limited-access Mythos/Google announcements** and +**1 explicitly unsupported Mythos 5/Converse pair**. These are not implemented or live-tested successes. All documented rows still require model access for your account and chosen endpoint. An absent Google card proves neither unavailability nor entitlement. @@ -181,7 +182,10 @@ Sources: [Claude model overview](https://platform.claude.com/docs/en/models/over [Claude on Vertex](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), [Google's Claude directory](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/partner-models/claude), [Mythos 5](https://platform.claude.com/docs/en/models/mythos-5/overview), -[Mythos 5.1](https://platform.claude.com/docs/en/models/mythos-5-1/overview) and +[Mythos 5.1](https://platform.claude.com/docs/en/models/mythos-5-1/overview), +[Fable 5.2](https://platform.claude.com/docs/en/models/fable-5-2/overview), +[Mythos 5.2](https://platform.claude.com/docs/en/models/mythos-5-2/overview), +[Google Fable 5.2](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/partner-models/claude/fable-5-2) and [AWS endpoint availability](https://docs.aws.amazon.com/bedrock/latest/userguide/models-endpoint-availability.html). According to [model IDs and versions](https://platform.claude.com/docs/en/about-claude/models/model-ids-and-versions), @@ -205,8 +209,10 @@ For regional profiles, regions and access requirements, follow the linked card. | [Sonnet 5.5](https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-anthropic-claude-sonnet-5-5.html) | `anthropic.claude-sonnet-5-5` | `global.anthropic.claude-sonnet-5-5` | | [Fable 5](https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-anthropic-claude-fable-5.html) | `anthropic.claude-fable-5` | `global.anthropic.claude-fable-5` | | [Fable 5.1](https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-anthropic-claude-fable-5-1.html) | `anthropic.claude-fable-5-1` | `global.anthropic.claude-fable-5-1` | +| [Fable 5.2](https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-anthropic-claude-fable-5-2.html) | `anthropic.claude-fable-5-2` | `global.anthropic.claude-fable-5-2` | | [Mythos 5](https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-anthropic-claude-mythos-5.html) | `anthropic.claude-mythos-5` (Mantle only) | None; no runtime access | | [Mythos 5.1](https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-anthropic-claude-mythos-5-1.html) | `anthropic.claude-mythos-5-1` | `global.anthropic.claude-mythos-5-1` | +| [Mythos 5.2](https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-anthropic-claude-mythos-5-2.html) | `anthropic.claude-mythos-5-2` | `global.anthropic.claude-mythos-5-2` | Do not copy one model's regional prefix set onto another. The bundled models.dev snapshot's prefix coverage differs from these cards in both directions; it is a @@ -255,25 +261,25 @@ Anthropic accepts either an integer token budget or a string effort value. When ### Claude 5.x models -Docker Agent recognizes nine Claude 5.x models by ID: `claude-haiku-5-5`, `claude-opus-5`, `claude-opus-5-5`, `claude-sonnet-5`, `claude-sonnet-5-5`, `claude-fable-5`, `claude-fable-5-1`, `claude-mythos-5` and `claude-mythos-5-1`. Bedrock (`us.anthropic.…`) and Vertex (`…@date`) spellings are recognized too. For these models: +Docker Agent recognizes eleven Claude 5.x models by ID: `claude-haiku-5-5`, `claude-opus-5`, `claude-opus-5-5`, `claude-sonnet-5`, `claude-sonnet-5-5`, `claude-fable-5`, `claude-fable-5-1`, `claude-fable-5-2`, `claude-mythos-5`, `claude-mythos-5-1` and `claude-mythos-5-2`. Bedrock (`us.anthropic.…`) and Vertex (`…@date`) spellings are recognized too. For these models: - Thinking is adaptive by default and accepts every effort level: `low`, `medium`, `high`, `xhigh` and `max`. -- With `thinking_budget` unset, Haiku 5.5, Opus 5.5, Sonnet 5.5 and Fable 5.1 are sent explicit adaptive thinking (summarized display, no effort) so the server can check replayed thinking blocks; the other five keep their API default. +- With `thinking_budget` unset, Haiku 5.5, Opus 5.5, Sonnet 5.5, Fable 5.1/5.2 and Mythos 5.2 are sent explicit adaptive thinking (summarized display, no effort) so the server can check replayed thinking blocks; the other five keep their API default. - An integer token budget becomes adaptive thinking with the model's default effort; `max_tokens` is not raised. - `temperature`, `top_p` and `top_k` are never sent. -- `thinking_budget: none` (or `0`) sends `thinking: disabled` on Haiku 5.5, Opus 5 and Sonnet 5. The other six cannot disable thinking: they get adaptive thinking with `low` effort, and Docker Agent logs a warning at startup. -- Server-side `fallbacks` involving any of these models are rejected at startup until [#4584](https://github.com/docker/docker-agent/issues/4584). +- `thinking_budget: none` (or `0`) sends `thinking: disabled` on Haiku 5.5, Opus 5 and Sonnet 5. The other eight cannot disable thinking: they get adaptive thinking with `low` effort, and Docker Agent logs a warning at startup. +- Server-side `fallbacks` work with these models on the Claude API, except Haiku 5.5, which has none (see [Server-Side Fallbacks](#server-side-fallbacks)). - A request that ends on an assistant message (a response prefill) is rejected before it is sent. Tool-mode structured output therefore fails after the first plain-text answer instead of retrying with a reminder. Other Claude IDs keep the existing name-based rules. -**Token budget** (1024–32768 on models that accept manual extended thinking): +**Token budget** (at least 1024 and less than `max_tokens`, within the supported range of a model that accepts manual extended thinking): ```yaml models: claude-deep: provider: anthropic - model: claude-sonnet-4-5 + model: claude-sonnet-4-6 thinking_budget: 16384 # must be < max_tokens ``` @@ -345,11 +351,78 @@ Object form (forward-compatible with future budget types): See the full schema on the [Model Configuration](../../configuration/models/index.md#task-budget) page. +## Fast Mode + +Set `provider_opts.speed` to `fast` to request Anthropic's [fast mode](https://platform.claude.com/docs/en/build-with-claude/fast-mode), which runs the same model at up to 2.5× higher output tokens per second: + +```yaml +models: + fast-opus: + provider: anthropic + model: claude-opus-5-5 + provider_opts: + speed: fast +``` + +Fast mode is available on supported models such as Claude Opus 5.5 and Claude Fable 5.2, and in research preview on Claude Opus 5 and Claude Opus 4.8. See Anthropic's documentation for the current list. Docker Agent does not maintain a model allowlist: on an unsupported model, or when the separate fast-mode rate limit is exceeded, the API error is returned as-is. It applies to all requests using the configured model, including internal calls such as title generation, compaction, and reranking. + +Setting `fast` routes requests through the Beta Messages API, sends `speed: "fast"`, and attaches the `fast-mode-2026-02-01` beta header. Per Anthropic's documentation, only Opus 5 and Opus 4.8 require the beta header; Docker Agent sends it on every fast-mode request. `standard` and an empty value send nothing, leaving the API's default behavior unchanged, which lets a model override a `fast` default inherited from the provider configuration. Any other value, including a non-string, is rejected when the model is loaded. + +> [!WARNING] +> Fast mode is billed at premium pricing, has its own rate limit, and switching speed invalidates the prompt cache. It is a Claude API feature and is not supported on Amazon Bedrock; availability on Vertex AI and Microsoft Foundry differs, so check Anthropic's documentation before enabling it there. It cannot be combined with the Batch API or Priority Tier. + +Cost estimates use the **actual response speed** (`usage.speed`), not the requested one: a request for `fast` that the API serves as `standard` is priced at standard rates. Anthropic [publishes](https://platform.claude.com/docs/en/build-with-claude/fast-mode#pricing) fast input and output prices at exactly twice standard (for example Claude Fable 5.2 at $16/$80 and Claude Opus 5.5 at $8/$40 per million tokens). It publishes no separate cache prices for fast mode and states that prompt-caching multipliers apply on top, so cache reads and cache writes are doubled as well, matching the fast entries gateways list for Claude Opus. Each catalogue rate, including the rates of any long-context band, is therefore multiplied by 2 for a `fast` response, when the model is served by `provider: anthropic` at the default Anthropic endpoint. Cache writes use the catalogue's single cache-write rate. Any `base_url` or `ANTHROPIC_BASE_URL` override, including proxies, keeps catalogue pricing. The factor is derived from Anthropic's published fast-mode pricing at the time of writing and may drift if Anthropic changes it. + +> [!NOTE] +> Server-side fallback attempts retain standard pricing, because attempts do not report a speed, so a fast response that used fallbacks may be under-estimated. A request routed by a rule-based router is priced by the model that served it, under the rules above. Estimates do not include negotiated discounts. A model's [`cost` override](../../configuration/models/index.md#custom-token-pricing) replaces the entire price table and is never adjusted for fast mode. + +### Global default + +To enable fast mode without editing each agent file, set it in your user configuration (`~/.config/cagent/config.yaml`). A `providers` entry with `provider: anthropic` is a native Anthropic provider, so it needs no `base_url`. Select it with its name: + +```yaml +# ~/.config/cagent/config.yaml +providers: + fast-claude: + provider: anthropic + provider_opts: + speed: fast +``` + +```bash +docker agent run agent.yaml --model fast-claude/claude-opus-5-5 +``` + +Naming the entry `anthropic` instead applies it to every model whose provider is `anthropic`, whether it comes from `--model anthropic/...`, an agent file, or `first_available`. It fills only the options a model leaves unset, so credentials and the endpoint still come from the built-in defaults: + +```yaml +providers: + anthropic: + provider: anthropic # required; an entry without it is ignored with a warning + provider_opts: + speed: fast +``` + +Alternatively, `default_model` in its full form applies fast mode when a model resolves to `auto` (`--model auto` or `model: auto`). The `DOCKER_AGENT_DEFAULT_MODEL` environment variable only accepts `provider/model` and carries no options. + +```yaml +default_model: + provider: anthropic + model: claude-opus-5-5 + provider_opts: + speed: fast +``` + +A model-level `provider_opts.speed: standard` overrides the global value, and an agent file that defines its own `providers.anthropic` replaces the user-config entry entirely. A global entry named `anthropic` covers every Anthropic request, including sub-agents, title generation, and compaction, all at premium pricing. An invalid value fails when the first Anthropic model is created. + +See [`examples/anthropic-fast-mode.yaml`](https://github.com/docker/docker-agent/blob/main/examples/anthropic-fast-mode.yaml) for a complete example. + ## Server-Side Fallbacks -When the primary model refuses a request (stop reason `refusal`), Anthropic -can retry the request with backup models in a single round trip. Set -`fallbacks` in `provider_opts` to a list of model IDs, in priority order: +When the primary model refuses a request (stop reason `refusal`), the Claude +API can retry it on a fallback model in a single round trip. Set `fallbacks` +in `provider_opts` to `default`, to use the fallback Anthropic recommends for +the refusal's category: ```yaml models: @@ -357,25 +430,72 @@ models: provider: anthropic model: claude-opus-4-8 provider_opts: + fallbacks: default +``` + +Or list up to three distinct models, tried in order: + +```yaml fallbacks: - claude-opus-4-7 - claude-sonnet-4-6 ``` -> [!WARNING] -> **Not yet available with Claude 5.x** -> -> A fallback can change the serving model mid-response, which Docker Agent does not handle yet. A `fallbacks` list is rejected at startup when the primary model or any fallback is a Claude 5.x model (Haiku 5.5, Opus 5/5.5, Sonnet 5/5.5, Fable 5/5.1, Mythos 5/5.1). Support is tracked in [#4584](https://github.com/docker/docker-agent/issues/4584). - -Docker Agent automatically attaches the required -`server-side-fallback-2026-06-01` beta header and forwards the option as -`fallbacks: [{"model": "..."}]`. The response's `model` field reports which -model actually served the request. +When a model declines mid-response, the turn continues on the fallback model. +Docker Agent never runs a tool call the declining model made, stores the turn +under the model that served it, and replays it on the next request as the API +requires. The turn's cost adds up each model hop at its own rates, combining +all of that hop's server-tool iterations. The dispatched hop retains its +configured price override when the first marker echoes the requested model, +including an alias; fallback hops use their own catalogue prices. Sticky hops +never inherit the primary's override, including across server-tool iterations. +A declined hop that produced output is billed. Before-output refusals are billed +for `bio`, `frontier_llm`, and `reasoning_extraction`; other named categories and +an explicit JSON-null category are unbilled. This also applies to the final +refusal if the fallback chain is exhausted. Missing or invalid categories, or +markers that cannot be matched to the usage hops in model order, remain billed +conservatively. The top-level usage is not added again. + +Docker Agent sends the `server-side-fallback-2026-07-01` beta header, which +accepts both forms, through the beta Messages API. The response's `model` +field reports which model actually served the request. + +For sticky routing without a handoff marker, Docker Agent uses a different +`message_start.model` provisionally when it matches an explicit fallback target +or a replayed handoff target. This preserves attribution on clean EOF before +final usage. A completed usage event clears the candidate unless a +`fallback_message` confirms fallback routing; an explicit handoff marker takes +precedence over both. Ordinary responses keep the configured model ID, display +name and cost override. A truncated alias that collides with a historical target +can still be attributed to that target; explicit fallback aliases without a +matching history marker have no early attribution. + +Rules checked at startup: + +- A list holds at most three models, each distinct and different from the + primary model. Any other value is a configuration error. +- Server-side fallback is a Claude API feature: `fallbacks` is rejected on + Vertex AI, Bedrock, a gateway, or a base URL (`base_url` or + `ANTHROPIC_BASE_URL`) whose host isn't `api.anthropic.com`. It isn't + available on the Message Batches API either. +- Claude Haiku 5.5 has no server-side fallback: a list is rejected, and + `default` only logs that it has no effect. +- The request must be valid for every listed model, or the API rejects it up + front. A configuration is rejected when a listed fallback (such as a Claude + 5.x model) refuses what the request sends: `temperature` or `top_p` (sent + only with thinking off), `top_k`, or token-budget thinking, including an + effort level that an older model without adaptive thinking turns into a + token budget. Fallback models receive the exact same request as the primary model (thinking configuration, task budget, beta features, ...), so list only -models that accept the same request shape. Not available on Bedrock, Vertex -AI, or the Message Batches API. +models that accept the same request shape. With `default` the server picks +the fallback, so per-model options such as `thinking_display` are checked +against the primary model only. The API makes one exception itself: when a Claude +Sonnet 5.5 request with `between_tools` thinking falls back to Claude Sonnet 5, +that attempt runs with thinking disabled ([fallback list rules](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#naming-your-own-fallback-models)). + +See [Refusals and fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#server-side-fallback). ## Native Compaction @@ -396,9 +516,10 @@ and replaces the whole history with a signed compaction block. This first implementation is synchronous and compacts the whole history: it does not run in the background or preserve a recent tail. Legacy per-call hook extras are not included in the compaction snapshot; they are applied again on the next -normal turn. The block is persisted alongside a readable summary; the -Anthropic provider replays the block on later requests (including after a model -switch), while other providers receive the readable text. +normal turn. The block is persisted alongside a readable summary; Anthropic +models with `native_compaction` set replay the block on later requests +(including after a model switch), while other models, Vertex AI included, +receive the readable text. - The compaction request goes through the same `before_llm_call` hooks and message transforms as a regular model call, so builtins such as @@ -449,7 +570,7 @@ changed since: declared at the end of `tools` with `defer_loading: true` and surfaced by a `tool_addition`; - an effort change becomes a per-message `output_config.effort` on Claude - Opus 5, Fable 5.1 and Mythos 5.1; + Opus 5, Fable 5.1/5.2 and Mythos 5.1/5.2; - per-call system extras (environment information, prompt files and hook reminders) become text-only, turn-scoped system messages. They remain in history verbatim but stop applying at the next user turn. If the prompt ends @@ -475,8 +596,8 @@ Docker Agent attaches the `mid-conversation-tool-changes-2026-07-01`, that actually carry a tool change, a per-message effort or a turn-scoped reminder. -Supported on Claude Opus 4.8, Opus 5, Fable 5, Fable 5.1, Mythos 5 and -Mythos 5.1 (and their server-side fallbacks); Sonnet 5 and older models are +Supported on Claude Opus 4.8, Opus 5, Fable 5/5.1/5.2 and Mythos 5/5.1/5.2 +(and their server-side fallbacks); Sonnet 5 and older models are rejected at configuration time. Fallback models must also support the request's per-message effort features. The option requires the Beta Messages API. ## Thinking Display @@ -496,8 +617,8 @@ models: Valid values: - `summarized`: thinking blocks are returned with summarized thinking text (Docker Agent's default for adaptive/effort-based budgets). -- `display`: thinking blocks are returned for display. Only accepted by pre-4.6 token-thinking models (e.g. Sonnet 4.5, Haiku 4.5); models from the adaptive-thinking generation onward (Opus/Sonnet 4.6+, Sonnet 5, Fable 5) reject it, and Docker Agent fails fast with a configuration error instead of sending a request the API would refuse. -- `updates`: short progress updates between tool calls, with reasoning text omitted. Available on Fable 5/5.1 and Mythos 5.1; automatically enables `thinking-display-updates-2026-08-18`. No explicit budget is required, and an unset effort keeps the model default. Other models (including configured fallbacks) are rejected locally. +- `display`: thinking blocks are returned for display. Only accepted by pre-4.6 token-thinking models (e.g. Haiku 4.5); models from the adaptive-thinking generation onward (Opus/Sonnet 4.6+, Sonnet 5, Fable 5) reject it, and Docker Agent fails fast with a configuration error instead of sending a request the API would refuse. +- `updates`: short progress updates between tool calls, with reasoning text omitted. Available on Fable 5/5.1/5.2 and Mythos 5.1/5.2; automatically enables `thinking-display-updates-2026-08-18`. No explicit budget is required, and an unset effort keeps the model default. Other models (including configured fallbacks) are rejected locally. - `omitted`: thinking blocks are returned with an empty thinking field; the signature is still returned for multi-turn continuity. Useful to reduce time-to-first-text-token when streaming. Note: `thinking_display` applies to both `thinking_budget` with token counts and adaptive/effort-based budgets. For token-count budgets no default is applied (the API already defaults to `summarized`). Full thinking tokens are billed regardless of the `thinking_display` value. @@ -512,14 +633,20 @@ multiple thinking blocks, omitted thinking, redacted thinking and their signatur A hook or user edit invalidates raw replay so stale content cannot override it. When only the rest of the turn changed (for example a sanitized tool name or a redacted tool argument), its recorded thinking is still replayed in its original -place, with the current text and tool calls substituted. When the thinking itself changed, the turn loses it, -with a warning in the logs. If that turn belongs to the tool loop the next -request continues, and thinking is on, the API needs its original signed +place, with the current tool calls substituted. Unchanged text blocks retain their +contents and positions, including around fallback markers. Edited text can replace +a single original text block only when no thinking block follows it. New text can +be inserted before the first tool call (or at the end without tools) only when no +thinking block is at or after that position. Other text edits, including edits +spanning multiple blocks, cannot preserve the recorded thinking safely. When +thinking itself changed or text edits cannot be placed safely, the turn is sent +without thinking, with a warning in the logs. If that turn belongs to the tool +loop the next request continues, and thinking is on, the API needs its original signed thinking: Docker Agent refuses the request with an error instead, and a new user turn starts a fresh loop. On Claude models whose server checks thinking prefixes (Haiku 5.5, Opus 5.5, -Sonnet 5.5 and Fable 5.1), Docker Agent defaults to +Sonnet 5.5, Fable 5.1/5.2 and Mythos 5.2), Docker Agent defaults to `thinking.block_binding.prefix_mismatch_behavior: drop_block`: when earlier history changes, the API drops invalidated thinking instead of rejecting the request. Dropped blocks are reported in logs. Docker Agent does not default to @@ -531,6 +658,8 @@ history strictly anyway, set `provider_opts.thinking_prefix_mismatch: error`, an avoid compaction, handoffs, `num_history_items` and toolsets that start late. You can explicitly select `drop_block` on other supported Claude models too. Both modes attach `thinking-binding-controls-2026-08-01`; neither repairs corrupted signatures. +For the Bedrock Converse policy and observability limits, see the +[Bedrock guide](../bedrock/index.md#claude-5x-models). ## Strict Tool Arguments diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/api-route/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/api-route/index.md index 471983702252..68cf16e8358b 100644 --- a/_vendor/github.com/docker/docker-agent/docs/providers/api-route/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/providers/api-route/index.md @@ -6,8 +6,6 @@ weight: 23 canonical: https://docs.docker.com/ai/docker-agent/providers/api-route/ --- -_Use API Route models with Docker Agent._ - ## Overview [API Route](https://api-route.com) provides access to multiple model families diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/atlascloud/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/atlascloud/index.md index e25907c49d39..896056de06cc 100644 --- a/_vendor/github.com/docker/docker-agent/docs/providers/atlascloud/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/providers/atlascloud/index.md @@ -6,8 +6,6 @@ weight: 25 canonical: https://docs.docker.com/ai/docker-agent/providers/atlascloud/ --- -_Use Atlas Cloud models with Docker Agent._ - ## Overview Atlas Cloud provides access to multiple model families through an OpenAI-compatible API. Docker Agent includes built-in support for Atlas Cloud as an alias provider. @@ -39,8 +37,6 @@ Docker Agent splits only the first slash, so model IDs that include a model fami ### Named Model -For more control over parameters: - ```yaml models: atlas_qwen: diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/baseten/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/baseten/index.md index e72407d6fabf..f62a94b5f25d 100644 --- a/_vendor/github.com/docker/docker-agent/docs/providers/baseten/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/providers/baseten/index.md @@ -6,8 +6,6 @@ weight: 40 canonical: https://docs.docker.com/ai/docker-agent/providers/baseten/ --- -_Use Baseten AI models with Docker Agent._ - ## Overview Baseten provides AI models through an OpenAI-compatible API. Docker Agent includes built-in support for Baseten as an alias provider. @@ -25,25 +23,21 @@ Baseten provides AI models through an OpenAI-compatible API. Docker Agent includ ### Inline Syntax -The simplest way to use Baseten: - ```yaml agents: root: - model: baseten/deepseek-ai/DeepSeek-V4-Pro + model: baseten/deepseek-ai/DeepSeek-V4-Pro-0813 description: Assistant using Baseten instruction: You are a helpful assistant. ``` ### Named Model -For more control over parameters: - ```yaml models: baseten_model: provider: baseten - model: deepseek-ai/DeepSeek-V4-Pro + model: deepseek-ai/DeepSeek-V4-Pro-0813 temperature: 0.7 max_tokens: 8192 @@ -58,12 +52,12 @@ agents: Baseten hosts various open models through its Model APIs. Check the [Baseten documentation](https://docs.baseten.co/) for the current model catalog. -| Model | Description | -| ------------------------------ | ------------------------------ | -| `deepseek-ai/DeepSeek-V4-Pro` | DeepSeek V4 Pro model | -| `moonshotai/Kimi-K2.5` | Moonshot Kimi K2.5 model | -| `openai/gpt-oss-120b` | GPT-OSS 120B model | -| `zai-org/GLM-5` | GLM-5 model | +| Model | Description | +| ------------------------------- | ------------------------- | +| `deepseek-ai/DeepSeek-V4-Pro-0813` | DeepSeek V4 Pro 0813 model | +| `moonshotai/Kimi-K3` | Moonshot Kimi K3 model | +| `openai/gpt-oss-120b` | GPT-OSS 120B model | +| `zai-org/GLM-5.3` | GLM-5.3 model | ## How It Works @@ -78,10 +72,10 @@ Baseten is implemented as a built-in alias in Docker Agent: ```yaml agents: coder: - model: baseten/deepseek-ai/DeepSeek-V4-Pro + model: baseten/deepseek-ai/DeepSeek-V4-Pro-0813 description: Code assistant using DeepSeek instruction: | - You are an expert programmer using DeepSeek V4 Pro. + You are an expert programmer using DeepSeek V4 Pro 0813. Write clean, well-documented code. Follow best practices for the language being used. toolsets: diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/bedrock/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/bedrock/index.md index 6d1e4c249854..60f1d951e396 100644 --- a/_vendor/github.com/docker/docker-agent/docs/providers/bedrock/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/providers/bedrock/index.md @@ -126,7 +126,7 @@ Claude 5.x profile in this audit; do not generate IDs by copying prefixes. ## Thinking Budget (Claude on Bedrock) -Bedrock Claude models support extended thinking — an internal reasoning phase before the model produces its response. Set `thinking_budget` to a token count (1024–32768) or an effort level string that maps automatically: +Bedrock Claude models support extended thinking — an internal reasoning phase before the model produces its response. On models that accept fixed token budgets, set `thinking_budget` to at least 1024 and less than `max_tokens`, or use an effort level string that maps automatically: | Effort level | Token budget | | ------------ | ------------ | @@ -140,7 +140,7 @@ Bedrock Claude models support extended thinking — an internal reasoning phase models: bedrock-claude-thinking: provider: amazon-bedrock - model: global.anthropic.claude-sonnet-5 + model: global.anthropic.claude-sonnet-4-6 thinking_budget: 8192 # tokens, or use an effort string like "medium" max_tokens: 16384 # must be > thinking_budget provider_opts: @@ -163,7 +163,7 @@ models: region: us-east-1 ``` -Docker Agent recognizes these models (including Bedrock-style IDs) and transparently coerces a configured token budget or effort level to adaptive thinking, logging a warning — so `thinking_budget: 32768` on Opus 4.8 won't fail, but `adaptive` or `adaptive/` is the recommended configuration. On older models that still use token-based thinking (e.g. Sonnet 4.5), `adaptive` is forwarded as-is and rejected by Bedrock — use a token count or effort level there instead. +Docker Agent recognizes these models (including Bedrock-style IDs) and transparently coerces a configured token budget or effort level to adaptive thinking, logging a warning — so `thinking_budget: 32768` on Opus 4.8 won't fail, but `adaptive` or `adaptive/` is the recommended configuration. On older models that still use token-based thinking (e.g. Haiku 4.5), `adaptive` is forwarded as-is and rejected by Bedrock — use a token count or effort level there instead. > [!NOTE] > **Temperature and top_p** @@ -172,18 +172,30 @@ Docker Agent recognizes these models (including Bedrock-style IDs) and transpare ### Claude 5.x models -The nine Claude 5.x models listed in the [Anthropic provider guide](../anthropic/index.md#claude-5x-models) follow the same rules on Bedrock, including Bedrock-style IDs such as `us.anthropic.claude-sonnet-5-5-v1:0`: +The eleven Claude 5.x models listed in the [Anthropic provider guide](../anthropic/index.md#claude-5x-models) follow the same rules on Bedrock, including Bedrock-style IDs such as `us.anthropic.claude-sonnet-5-5-v1:0`: - Effort levels and `adaptive` are sent as adaptive thinking. An integer token budget becomes adaptive thinking with the model's default effort. - `temperature`, `top_p` and `top_k` are never sent. -- `thinking_budget: none` sends `thinking: {"type": "disabled"}` on Haiku 5.5, Opus 5 and Sonnet 5. The other six get adaptive thinking with `low` effort and a startup warning. +- `thinking_budget: none` sends `thinking: {"type": "disabled"}` on Haiku 5.5, Opus 5 and Sonnet 5. The other eight get adaptive thinking with `low` effort and a startup warning. - Reasoning blocks are stored and replayed exactly as Bedrock returned them, in order: signed thinking (including signature-only thinking, the default display on these models), redacted thinking and the text and tool calls around them. If a message changed after it was received but its reasoning did not (for example a sanitized tool name or a redacted tool argument), its recorded reasoning is still replayed in its original place, with the current text and tool calls substituted. If the reasoning itself changed, it is sent without it, with a warning in the logs; inside the tool loop the next request continues, with thinking on, the request is refused instead, and a new user turn starts a fresh loop. Sessions saved by older versions keep that flattened replay; older versions ignore the stored blocks. - Mythos 5 is refused at startup: AWS serves it only through Bedrock Mantle, which Docker Agent does not support. Use Mythos 5.1, which is available on Converse, or the Claude API. +For Haiku 5.5, Opus 5.5, Sonnet 5.5, Fable 5.1/5.2 and Mythos 5.2, +Converse uses adaptive thinking with the `thinking-binding-controls-2026-08-01` +beta and `thinking.block_binding.prefix_mismatch_behavior: drop_block` by default. +This lets AWS drop invalidated thinking blocks when compaction, handoffs or other +history edits change their prefix. Set `provider_opts.thinking_prefix_mismatch` +to `error` to reject such requests instead, or `drop_block` to select the default +explicitly. This option is only applied to the listed models while thinking is on; +invalid option values are rejected. Neither behavior repairs corrupted signatures. +Unlike the Claude API integration, the Bedrock client does not report dropped +blocks: Converse stream transformation reporting has not been verified. +See [AWS preserved thinking documentation](https://docs.aws.amazon.com/bedrock/latest/userguide/claude-messages-thinking-block-binding.html). + > [!NOTE] > **Not yet verified live** > -> The `disabled` value follows the Claude Messages contract; it has not yet been verified against live Bedrock Converse. +> The `disabled` value and prefix-binding controls follow the documented Claude Messages contract; they have not yet been verified against live Bedrock Converse. ## Interleaved Thinking (Claude on Bedrock) diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/cerebras/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/cerebras/index.md index bf0dba14c912..84a763650747 100644 --- a/_vendor/github.com/docker/docker-agent/docs/providers/cerebras/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/providers/cerebras/index.md @@ -6,8 +6,6 @@ weight: 50 canonical: https://docs.docker.com/ai/docker-agent/providers/cerebras/ --- -_Use Cerebras models with Docker Agent._ - ## Overview [Cerebras](https://www.cerebras.ai/) serves open-weight models such as GPT-OSS @@ -29,8 +27,6 @@ Cerebras as an alias provider. ### Inline Syntax -The simplest way to use Cerebras: - ```yaml agents: root: @@ -41,8 +37,6 @@ agents: ### Named Model -For more control over parameters: - ```yaml models: cerebras_model: diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/chatgpt/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/chatgpt/index.md index 7394783fcb4f..e24de5744738 100644 --- a/_vendor/github.com/docker/docker-agent/docs/providers/chatgpt/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/providers/chatgpt/index.md @@ -6,8 +6,6 @@ weight: 55 canonical: https://docs.docker.com/ai/docker-agent/providers/chatgpt/ --- -_Use your ChatGPT subscription with Docker Agent by signing in with your OpenAI account. No API key needed._ - ## Overview The `chatgpt` provider authenticates with a ChatGPT account (the same diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/cloudflare-ai-gateway/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/cloudflare-ai-gateway/index.md index 35b0eb5934fb..0697f2b0a725 100644 --- a/_vendor/github.com/docker/docker-agent/docs/providers/cloudflare-ai-gateway/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/providers/cloudflare-ai-gateway/index.md @@ -6,8 +6,6 @@ weight: 60 canonical: https://docs.docker.com/ai/docker-agent/providers/cloudflare-ai-gateway/ --- -_Use Cloudflare AI Gateway models with Docker Agent._ - ## Overview [Cloudflare AI Gateway](https://developers.cloudflare.com/ai-gateway/) is a @@ -54,8 +52,6 @@ agents: ### Named Model -For more control over parameters: - ```yaml models: cloudflare_model: diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/cloudflare-workers-ai/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/cloudflare-workers-ai/index.md index 68477296aee6..4c5b228f32d9 100644 --- a/_vendor/github.com/docker/docker-agent/docs/providers/cloudflare-workers-ai/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/providers/cloudflare-workers-ai/index.md @@ -6,8 +6,6 @@ weight: 70 canonical: https://docs.docker.com/ai/docker-agent/providers/cloudflare-workers-ai/ --- -_Use Cloudflare Workers AI models with Docker Agent._ - ## Overview [Cloudflare Workers AI](https://developers.cloudflare.com/workers-ai/) runs @@ -47,8 +45,6 @@ agents: ### Named Model -For more control over parameters: - ```yaml models: cloudflare_model: diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/cloudgpu/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/cloudgpu/index.md new file mode 100644 index 000000000000..59ed6fec728a --- /dev/null +++ b/_vendor/github.com/docker/docker-agent/docs/providers/cloudgpu/index.md @@ -0,0 +1,110 @@ +--- +title: "CloudGPU" +description: "Use CloudGPU models with Docker Agent." +keywords: docker agent, ai agents, model providers, llm, cloudgpu +weight: 26 +canonical: https://docs.docker.com/ai/docker-agent/providers/cloudgpu/ +--- + +## Overview + +[CloudGPU](https://cloudgpu.app/api/docs) serves DeepSeek, Kimi, GLM and MiniMax +models through an OpenAI-compatible API. Docker Agent includes built-in support +for CloudGPU as an alias provider. Current model IDs are on the live +[model list](https://cloudgpu.app/v1/models). + +## Setup + +1. Create an API key in the [CloudGPU console](https://cloudgpu.app/) +2. Set the environment variable: + + ```bash + export CLOUDGPU_API_KEY=your-api-key + ``` + +## Usage + +### Inline Syntax + +Use a CloudGPU model by prefixing its model ID with `cloudgpu/`: + +```yaml +agents: + root: + model: cloudgpu/deepseek-v4.1-flash + description: Assistant using CloudGPU + instruction: You are a helpful assistant. +``` + +### Named Model + +```yaml +models: + cloudgpu_kimi: + provider: cloudgpu + model: kimi-k3 + temperature: 0.7 + max_tokens: 8192 + +agents: + root: + model: cloudgpu_kimi + description: Assistant using CloudGPU + instruction: You are a helpful assistant. +``` + +When CloudGPU is selected automatically from available credentials, the default +model is `deepseek-v4.1-flash`. + +## Available Models + +Some chat model IDs CloudGPU serves: + +| Model ID | Model | +| --- | --- | +| `deepseek-v4.1-flash` | DeepSeek V4.1 Flash (default) | +| `deepseek-v4-pro` | DeepSeek V4 Pro | +| `kimi-k3` | Kimi K3 | +| `glm-5.2` | GLM 5.2 | +| `minimax-m3` | MiniMax M3 | + +Model IDs are case-sensitive. The live [`/v1/models` endpoint](https://cloudgpu.app/v1/models) +lists current IDs, and the [API docs](https://cloudgpu.app/api/docs) describe +the endpoints. A listing does not guarantee that inference is currently available. + +CloudGPU is absent from the embedded models.dev catalog. Docker Agent does not +import context limits or attachment capabilities from CloudGPU's model list. +Attachment capabilities fall back to text-only, so image and PDF attachments +are dropped, with a warning logged once per model. + +If you have verified that your chosen model accepts a particular attachment +type, set `models..capabilities` to override detection. See +[Attachment Capability Overrides](../../configuration/models/index.md#attachment-capability-overrides) +for all supported flags. + +## How It Works + +CloudGPU is a built-in alias in Docker Agent: + +- **API type:** OpenAI-compatible Chat Completions (`openai_chatcompletions`) +- **Base URL:** `https://cloudgpu.app/v1` +- **Token variable:** `CLOUDGPU_API_KEY` + +Some models CloudGPU serves require a single leading system message, so Docker +Agent coalesces consecutive system messages into one. + +## Example: Code Assistant + +```yaml +agents: + coder: + model: cloudgpu/deepseek-v4.1-flash + description: Code assistant using CloudGPU + instruction: | + You are an expert programmer. + Write clean code and follow language best practices. + toolsets: + - type: filesystem + - type: shell + - type: think +``` diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/custom/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/custom/index.md index ee522a0e6a78..5a100b9f79f3 100644 --- a/_vendor/github.com/docker/docker-agent/docs/providers/custom/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/providers/custom/index.md @@ -6,8 +6,6 @@ weight: 280 canonical: https://docs.docker.com/ai/docker-agent/providers/custom/ --- -_Define reusable provider configurations with shared defaults for any provider type — OpenAI, Anthropic, Google, Bedrock, and more._ - ## Overview The `providers` section in your agent YAML lets you define named provider configurations that models can reference. This is useful for: @@ -166,6 +164,51 @@ agents: > > Models that stream reasoning under `delta.reasoning` (e.g. Qwen3 served via OVHcloud AI Endpoints, OpenRouter, or a self-hosted vLLM / SGLang deployment) are fully supported. Docker Agent reads both the `delta.reasoning_content` and `delta.reasoning` fields from the stream, so thinking blocks are captured and shown in the TUI regardless of which field the server uses. +### Replaying reasoning on later turns + +Captured reasoning is sent back to the model on subsequent requests as a `reasoning_content` field on the assistant message. Servers that understand the field read it back, so the model sees its own earlier reasoning instead of re-deriving it after every tool call. Reasoning that is only useful to the model is not free: replaying it can multiply the size of a long request, so it is limited to turns the session keeps anyway (those with content or a tool call). + +Chat Completions reasoning replay defaults on. Because `reasoning_content` is a +non-standard extension, set `provider_opts.replay_reasoning: false` for a model +or provider whose endpoint rejects or must not receive it. An invalid, +non-boolean value also fails closed and disables replay. + +Set the opt-out on a model, or once on a provider and let its models inherit it. +A model that sets the option itself wins over the provider: + +```yaml +providers: + local_llm: + base_url: http://localhost:8000/v1 + provider_opts: + replay_reasoning: false # opt out every local_llm model + +models: + qwen_default: + provider: local_llm + model: qwen3 # inherits the opt-out + + qwen_replay: + provider: local_llm + model: qwen3 + provider_opts: + replay_reasoning: true # opts this model back in + +agents: + root: + model: qwen_default +``` + +This option is specific to the Chat Completions API and its `reasoning_content` +field. It is not the same as `preserve_reasoning`, which replays the encrypted +reasoning items of first-party OpenAI Responses sessions; neither option +applies to the other API. See [Reasoning state preservation](../openai/index.md#reasoning-state-preservation). + +The field is worth a look if you switch models mid-session or use fallbacks: +Docker Agent stores reasoning from every provider in one place, so a later Chat +Completions model may otherwise receive reasoning captured from another vendor. +Set `replay_reasoning: false` on that destination when this is undesirable. + ### API Router (Requesty, LiteLLM) ```yaml @@ -193,7 +236,7 @@ models: ### Anthropic Team Setup -Agents can use different models backed by the same named provider. Starting from the [Default Inheritance](#default-inheritance) example: +Agents can use different models backed by the same named provider. Keep the `providers` and `models` sections from the [Default Inheritance](#default-inheritance) example and replace its `agents` section with: ```yaml agents: @@ -270,6 +313,10 @@ that automatic model selection (`model: auto`) never picks a custom provider, so reference its models explicitly with `--model /` or `default_model`. +An entry with a native `provider` (such as `provider: anthropic`) needs no +`base_url` and can carry `provider_opts`; see +[Anthropic fast mode](../anthropic/index.md#global-default) for an example. + ## How It Works When you reference a provider: diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/daoxe/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/daoxe/index.md index 5e72e059c40d..90ad502ad324 100644 --- a/_vendor/github.com/docker/docker-agent/docs/providers/daoxe/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/providers/daoxe/index.md @@ -6,8 +6,6 @@ weight: 245 canonical: https://docs.docker.com/ai/docker-agent/providers/daoxe/ --- -_Use DaoXE models with Docker Agent._ - ## Overview [DaoXE](https://daoxe.com) is a multi-model LLM gateway that serves models from diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/deepseek/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/deepseek/index.md index 197af4adb203..e45b653f2f22 100644 --- a/_vendor/github.com/docker/docker-agent/docs/providers/deepseek/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/providers/deepseek/index.md @@ -6,8 +6,6 @@ weight: 80 canonical: https://docs.docker.com/ai/docker-agent/providers/deepseek/ --- -_Use DeepSeek models with Docker Agent._ - ## Overview [DeepSeek](https://www.deepseek.com/) serves its frontier chat and reasoning @@ -28,8 +26,6 @@ alias provider. ### Inline Syntax -The simplest way to use DeepSeek: - ```yaml agents: root: @@ -40,8 +36,6 @@ agents: ### Named Model -For more control over parameters: - ```yaml models: deepseek_model: diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/dmr/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/dmr/index.md index 40b16848c8cf..68c72b5c97f6 100644 --- a/_vendor/github.com/docker/docker-agent/docs/providers/dmr/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/providers/dmr/index.md @@ -6,18 +6,11 @@ weight: 90 canonical: https://docs.docker.com/ai/docker-agent/providers/dmr/ --- -_Run AI models locally with Docker — no API keys, no costs, full data privacy._ - ## Overview Docker Model Runner (DMR) lets you run open-source AI models directly on your machine. Models run in Docker, so there's no API key needed; with a local runner, prompts stay on your computer. -Docker Agent automatically discovers models you have already pulled from DMR. When no model is explicitly configured, auto-selection prefers a locally-installed model (choosing the model specified via the `model:` key in the agent YAML if it is already pulled locally, or otherwise the first available non-embedding model) rather than always defaulting to `ai/qwen3:latest` and triggering a pull prompt. - -> [!TIP] -> **No API key needed** -> -> With a local DMR endpoint, your data stays on your machine. Great for development, sensitive data, or offline use. +Docker Agent automatically discovers models you have already pulled from DMR. When no model is explicitly configured, auto-selection prefers a locally-installed model (choosing the model specified via the `model:` key in the agent YAML if it is already pulled locally, or otherwise the first available non-embedding model). ## Prerequisites @@ -106,7 +99,7 @@ Use only flags your Model Runner backend allows (see `docker model configure --h ## Context size -`max_tokens` controls the **maximum output tokens** per chat completion request. To set the engine's **total context window**, use `provider_opts.context_size`: +`max_tokens` controls the **maximum output tokens** per chat completion request. To set the engine's **total context window**, use `provider_opts.context_size`. This is the only setting that reconfigures the engine; the model-level [`context_window`](../../configuration/models/index.md#context-window) is metadata for docker-agent's accounting and never changes the engine: ```yaml models: @@ -115,25 +108,30 @@ models: model: ai/qwen3 max_tokens: 4096 # max output tokens (per-request) provider_opts: - context_size: 32768 # total context window (sent via _configure) + context_size: 32768 # total context window (sent via _configure) ``` -If `context_size` is omitted, Docker Agent queries the runner's completion +If `provider_opts.context_size` is omitted, Docker Agent queries the runner's completion configuration, then falls back to the packaged model's context window. This read-only discovery is cached briefly and drives context usage and automatic -compaction. An explicit `context_size` always takes precedence; `max_tokens` is +compaction. An explicit `provider_opts.context_size` always takes precedence over discovery, and a model-level `context_window` takes precedence over both; `max_tokens` is **not** used as the context window. Discovery is best-effort. Older or unreachable runners, gateways, and runtime flags that override context allocation may leave the window unknown. In those -cases, set `context_size` explicitly. Arbitrary `raw_runtime_flags` also disable +cases, set `provider_opts.context_size` explicitly. Arbitrary `raw_runtime_flags` also disable automatic context discovery. +A model-level `context_window` also works for DMR models. docker-agent then plans +compaction and context usage against that window and leaves the engine's +allocation untouched. Set `provider_opts.context_size` too, to the same value, +when the engine should be sized to match; the two must agree. + The model picker displays DMR's reported architecture, parameter count, quantization, size, and packaged context window when available. The packaged window can differ from a running model's configured context size. -Docker Agent's auto-compaction scales its summary and keep-tail token budgets proportionally to `context_size`. This ensures compaction works correctly even for small context windows — for example, an 8k-token local model will not have its session history wiped during compaction. +Docker Agent's auto-compaction scales its summary and keep-tail token budgets proportionally to the context window. ## Thinking / reasoning budget @@ -196,6 +194,14 @@ Accepted values: any Go duration string (`"30s"`, `"5m"`, `"1h"`, `"2h30m"`), `" In multi-agent setups where two DMR models can't fit in GPU memory simultaneously, wire the [`unload`](../../configuration/hooks/index.md#available-built-ins) built-in hook into each agent's `on_agent_switch` chain. Every time the active agent transfers control, the runtime POSTs to the engine's `_unload` endpoint to free the previous model's resources before the next one is loaded: ```yaml +models: + qwen3-large: + provider: dmr + model: ai/qwen3 + qwen3-coder: + provider: dmr + model: ai/smollm2 + agents: coder: model: qwen3-large diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/fireworks/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/fireworks/index.md index 264d70f10803..f55d41ad8a93 100644 --- a/_vendor/github.com/docker/docker-agent/docs/providers/fireworks/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/providers/fireworks/index.md @@ -6,8 +6,6 @@ weight: 100 canonical: https://docs.docker.com/ai/docker-agent/providers/fireworks/ --- -_Use Fireworks AI models with Docker Agent._ - ## Overview [Fireworks AI](https://fireworks.ai/) is a fast inference host for open-weight @@ -30,8 +28,6 @@ Use the provider ID `fireworks-ai`. The legacy ID `fireworks` is also accepted. ### Inline Syntax -The simplest way to use Fireworks AI: - ```yaml agents: root: @@ -42,8 +38,6 @@ agents: ### Named Model -For more control over parameters: - ```yaml models: fireworks_model: diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/github-copilot/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/github-copilot/index.md index 0d0ed150d944..be1376bb68e4 100644 --- a/_vendor/github.com/docker/docker-agent/docs/providers/github-copilot/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/providers/github-copilot/index.md @@ -6,8 +6,6 @@ weight: 110 canonical: https://docs.docker.com/ai/docker-agent/providers/github-copilot/ --- -_Use GitHub Copilot's hosted models with Docker Agent through your existing GitHub subscription._ - ## Overview GitHub Copilot exposes an OpenAI-compatible Chat Completions API at diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/google/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/google/index.md index 7981da6e7d30..b71a740d7bbf 100644 --- a/_vendor/github.com/docker/docker-agent/docs/providers/google/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/providers/google/index.md @@ -1,12 +1,12 @@ --- title: "Google Gemini" -description: "Use Gemini 2.5 Flash, Gemini 3.1 Pro, and other Google models with Docker Agent." +description: "Use Gemini 4 (Carbon, Neon, Hydrogen, Argon), Gemini 3, and Gemini 2.5 models with Docker Agent." keywords: docker agent, ai agents, model providers, llm, google gemini weight: 120 canonical: https://docs.docker.com/ai/docker-agent/providers/google/ --- -_Use Gemini 2.5 Flash, Gemini 3.1 Pro, and other Google models with Docker Agent._ +_Use Gemini 4 (Carbon, Neon, Hydrogen, Argon), Gemini 3, and Gemini 2.5 models with Docker Agent._ ## Setup @@ -20,6 +20,8 @@ Docker Agent reads the first credential it finds from these environment variable | `GOOGLE_CLOUD_PROJECT` | GCP project used when `GOOGLE_GENAI_USE_VERTEXAI` is enabled or for Vertex AI Model Garden. | | `GOOGLE_CLOUD_LOCATION` | GCP region for Vertex AI (defaults to the SDK default). | +When the model sets no `base_url`, the Google SDK's endpoint override applies: `GOOGLE_GEMINI_BASE_URL` for the Gemini Developer API or `GOOGLE_VERTEX_BASE_URL` for Vertex AI. An explicit `base_url` takes precedence, even when it equals the default endpoint. + Explicit `provider_opts.project` or `provider_opts.location` selects Vertex AI regardless of the flag. On the Gemini Developer API, a model or [custom provider](../custom/index.md) that sets `token_key` reads its key from that variable instead of `GOOGLE_API_KEY` / `GEMINI_API_KEY`. The Vertex AI backends use Application Default Credentials and ignore `token_key`. @@ -42,7 +44,7 @@ export GOOGLE_CLOUD_LOCATION="us-central1" ```yaml agents: root: - model: google/gemini-3.8-flash + model: google/gemini-4-hydrogen ``` ### Named Model @@ -51,18 +53,22 @@ agents: models: gemini: provider: google - model: gemini-3.8-flash + model: gemini-4-neon temperature: 0.5 ``` ## Available Models -| Model | Best For | -| -------------------------- | ------------------------------- | -| `gemini-3.1-pro-preview` | Most capable Gemini model | -| `gemini-3.8-flash` | Fast, efficient, good balance | -| `gemini-2.5-flash` | Fast inference, cost-effective | -| `gemini-2.5-pro` | Strong reasoning, large context | +| Model | Best For | +| ------------------------- | ---------------------------------------------- | +| `gemini-4-carbon` | Deep-thinking flagship (`low`–`high`) | +| `gemini-4-neon` | Balanced high-speed workhorse (`low`–`xhigh`) | +| `gemini-4-hydrogen` | Fast, cost-effective everyday (`low`–`xhigh`) | +| `gemini-4-argon` | Legacy Gemini 4 frontier (`low`–`high`) | +| `gemini-3.8-flash` | Gemini 3 fast, efficient balance | +| `gemini-3.1-pro-preview` | Gemini 3 Pro preview | +| `gemini-2.5-flash` | Fast inference, cost-effective | +| `gemini-2.5-pro` | Strong reasoning, large context | ## Generated Images @@ -123,7 +129,7 @@ Gemini supports two approaches depending on the model version: > [!WARNING] > **Different thinking formats** > -> Gemini 2.5 uses **token-based** budgets (integers). Gemini 3 uses **level-based** budgets (strings like `low`, `high`). Make sure you use the right format for your model version. +> Gemini 2.5 uses **token-based** budgets (integers). Gemini 3+ uses **level-based** budgets (strings like `low`, `high`, `xhigh`). Make sure you use the right format for your model version. ### Gemini 2.5 (Token-based) @@ -145,21 +151,35 @@ models: thinking_budget: 8192 # fixed token budget ``` -### Gemini 3 (Level-based) +### Gemini 3+ (Level-based) ```yaml models: - gemini-pro: + gemini-neon: + provider: google + model: gemini-4-neon + thinking_budget: xhigh # Hydrogen / Neon: low | medium | high | xhigh + + gemini-carbon: provider: google - model: gemini-3.1-pro-preview - thinking_budget: high # default for Pro: low | high + model: gemini-4-carbon + thinking_budget: high # Carbon / Argon: low | medium | high + + gemini-adaptive: + provider: google + model: gemini-4-carbon + thinking_budget: adaptive # omits thinkingLevel (uses model default); adaptive/ pins a tier gemini-flash: provider: google model: gemini-3.8-flash - thinking_budget: medium # default for Flash: minimal | low | medium | high + thinking_budget: medium # Gemini 3: minimal | low | medium | high ``` +- **Disabling thinking (`none` / `0`):** Gemini 3+ models always think and cannot disable reasoning. Setting `thinking_budget: none` or `0` logs a warning and lowers effort to `low` with thoughts hidden. +- **Token budgets on Gemini 4+:** Gemini 4 models reject integer `thinkingBudget` values; configured integer budgets log a warning and are omitted so the model uses its default `thinkingLevel`. +- **Gemini 2.5 with effort strings / `adaptive`:** String effort levels and `adaptive` / `adaptive/` are mapped to Gemini 2.5 token budgets (`-1` for plain `adaptive`). + ## Built-in Tools (Grounding) Gemini models support built-in tools that let the model access Google Search, Google Maps, @@ -280,7 +300,7 @@ models: The value is forwarded unchanged as the top-level `serviceTier` of every `generateContent` request on the Gemini Developer API, Vertex AI, and the Docker models gateway; the endpoint must support it. It applies to all requests using the configured model, including reranking, title generation, and compaction. Other values are passed through for the API to validate. When omitted or empty, no `serviceTier` is sent, leaving the API's default behavior unchanged. Non-string values are ignored. [Vertex AI Model Garden](#vertex-ai-model-garden) models do not use this option. -Flex requests can sit in Google's queue for up to 15 minutes before the first byte arrives. Docker Agent normally treats a stream that stays silent for 5 minutes as stalled; for `google` models with `service_tier: flex` it waits 15 minutes instead. Other tiers and providers keep the 5 minute limit. Rate-limit (`429`) and overloaded (`503`) responses are retried like any other Gemini request; Docker Agent never upgrades a request to a different tier on your behalf. +Flex requests can sit in Google's queue for up to 15 minutes before the first byte arrives. Docker Agent has no stream idle timeout by default. A short [configured stream idle timeout](../../configuration/models/index.md#stream-idle-timeout) can time out a queued Flex request. Rate-limit (`429`) and overloaded (`503`) responses are retried like any other Gemini request; Docker Agent never upgrades a request to a different tier on your behalf. > [!WARNING] > Docker Agent's cost estimates do not adjust for `service_tier`. They use the catalogue's standard pricing, which overestimates `flex` and underestimates `priority` charges. Set the model's [`cost` override](../../configuration/models/index.md#custom-token-pricing) to the applicable input, output, and cache token rates for your tier. @@ -313,7 +333,7 @@ announcements but no dedicated Google card in the 2026-10-13 audit; this proves neither unavailability nor account entitlement. See [Claude access paths](../anthropic/index.md#claude-access-paths) for model IDs, evidence and policy prerequisites. -Title, sampling and compaction clones keep the selected Model Garden transport. +Title and compaction clones keep the selected Model Garden transport. Claude requests remain on the Anthropic-native Vertex endpoints, with the model in the URL and `anthropic_version: vertex-2023-10-16` in the body. Project, location, regional/global host selection and Google OAuth authentication survive diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/groq/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/groq/index.md index 4c7d3945581c..e9bfe93c79da 100644 --- a/_vendor/github.com/docker/docker-agent/docs/providers/groq/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/providers/groq/index.md @@ -6,8 +6,6 @@ weight: 130 canonical: https://docs.docker.com/ai/docker-agent/providers/groq/ --- -_Use Groq models with Docker Agent._ - ## Overview [Groq](https://groq.com/) serves open-weight models on its LPU inference engine @@ -27,8 +25,6 @@ includes built-in support for Groq as an alias provider. ### Inline Syntax -The simplest way to use Groq: - ```yaml agents: root: @@ -39,8 +35,6 @@ agents: ### Named Model -For more control over parameters: - ```yaml models: groq_model: diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/hopbase/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/hopbase/index.md new file mode 100644 index 000000000000..32563bcab5ee --- /dev/null +++ b/_vendor/github.com/docker/docker-agent/docs/providers/hopbase/index.md @@ -0,0 +1,154 @@ +--- +title: "HopBase" +description: "Use HopBase models with Docker Agent." +keywords: docker agent, ai agents, model providers, llm, hopbase +weight: 135 +canonical: https://docs.docker.com/ai/docker-agent/providers/hopbase/ +--- + +## Overview + +[HopBase](https://hop-base.com) is a hosted AI API gateway. It serves GPT, +Claude, Gemini and Grok models next to DeepSeek, Zhipu GLM, Moonshot Kimi, +Alibaba Qwen and Doubao behind one base URL with an OpenAI-compatible API. +Docker Agent includes HopBase as a built-in provider in its embedded provider +catalog. + +## Setup + +1. Create an API key in the [HopBase console](https://api.hop-base.com/login). +2. Set the environment variable: + + ```bash + export HOPBASE_API_KEY=your-api-key + ``` + +## Usage + +### Inline Syntax + +Prefix a HopBase model ID with `hopbase/`: + +```yaml +agents: + root: + model: hopbase/glm-5.3 + description: Assistant using HopBase + instruction: You are a helpful assistant. +``` + +### Named Model + +```yaml +models: + hopbase_gpt: + provider: hopbase + model: gpt-6.1-sol + max_tokens: 8192 + +agents: + root: + model: hopbase_gpt + description: Assistant using HopBase + instruction: You are a helpful assistant. +``` + +When HopBase is selected automatically from available credentials, the default +model is `glm-5.3`. Model IDs are passed through as supplied. + +## Available Models + +The examples on this page use `glm-5.3`, `gpt-6.1-sol` and `claude-sonnet-5-5`. +The models endpoint returns exactly the model IDs your key can call, so +retrieve the list before choosing another model: + +```bash +curl https://api.hop-base.com/v1/models \ + -H "Authorization: Bearer $HOPBASE_API_KEY" +``` + +Use an ID from the response unchanged as the `model` value. The list can also +contain image, video and speech models, which are not usable for chat. The +[model catalog](https://hop-base.com/models) and the +[HopBase docs](https://hop-base.com/en/docs) describe each model. + +HopBase is absent from Docker Agent's embedded models.dev catalog. Docker Agent +does not import pricing, context limits or attachment capabilities from +HopBase's model list. Attachment detection falls back to text-only, so image +and PDF attachments are dropped, with a warning logged once per model. If you +have verified that your chosen model accepts an attachment type, set +`models..capabilities`; see +[Attachment Capability Overrides](../../configuration/models/index.md#attachment-capability-overrides). +For example, `gpt-6.1-sol` accepts image input and `glm-5.3` does not: + +```yaml +models: + hopbase_vision: + provider: hopbase + model: gpt-6.1-sol + capabilities: + image: true +``` + +## How It Works + +HopBase is an entry in Docker Agent's built-in provider catalog +(`pkg/model/provider/catalog/providers.json`) that uses the existing OpenAI +implementation: + +- **API type:** OpenAI-compatible Chat Completions (`openai_chatcompletions`) +- **Base URL:** `https://api.hop-base.com/v1` +- **Token variable:** `HOPBASE_API_KEY` + +As with other multi-model hosts, Docker Agent combines consecutive system +messages for compatibility with models that require a single leading system +message. + +Claude models are callable through this alias like any other model, for +example `hopbase/claude-sonnet-5-5`. + +## Anthropic Messages Endpoint + +The same host also exposes an Anthropic Messages-compatible endpoint at +`https://api.hop-base.com` (no `/v1`). To send Claude requests in the Messages +format instead of Chat Completions, define a +[named provider](../custom/index.md) that reuses the same key: + +```yaml +providers: + hopbase_messages: + provider: anthropic + base_url: https://api.hop-base.com + token_key: HOPBASE_API_KEY + +models: + hopbase_claude: + provider: hopbase_messages + model: claude-sonnet-5-5 + +agents: + root: + model: hopbase_claude + description: Assistant using Claude through HopBase + instruction: You are a helpful assistant. +``` + +A custom Anthropic `base_url` does not inherit Claude API capability, beta or +price metadata; see +[Claude access paths](../anthropic/index.md#claude-access-paths). + +## Example: Code Assistant + +```yaml +agents: + coder: + model: hopbase/glm-5.3 + description: Code assistant using HopBase + instruction: | + You are an expert programmer. + Write clean code and follow language best practices. + toolsets: + - type: filesystem + - type: shell + - type: think +``` diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/huggingface/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/huggingface/index.md index 8b5860100a71..00e619b2cbf5 100644 --- a/_vendor/github.com/docker/docker-agent/docs/providers/huggingface/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/providers/huggingface/index.md @@ -6,8 +6,6 @@ weight: 140 canonical: https://docs.docker.com/ai/docker-agent/providers/huggingface/ --- -_Use Hugging Face Inference Providers with Docker Agent._ - ## Overview [Hugging Face Inference Providers](https://huggingface.co/docs/inference-providers/index) @@ -28,8 +26,6 @@ includes built-in support for Hugging Face as an alias provider. ### Inline Syntax -The simplest way to use Hugging Face: - ```yaml agents: root: @@ -40,8 +36,6 @@ agents: ### Named Model -For more control over parameters: - ```yaml models: huggingface_model: diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/local/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/local/index.md index 86f2f99cc436..5836441b258c 100644 --- a/_vendor/github.com/docker/docker-agent/docs/providers/local/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/providers/local/index.md @@ -1,7 +1,7 @@ --- -title: "Local Models (Ollama, vLLM, LocalAI, Nativ)" +title: "Local Models (Ollama, vLLM, LocalAI, Nativ, Rapid-MLX)" description: "Run Docker Agent with locally hosted models for privacy, offline use, or cost savings." -keywords: docker agent, ai agents, model providers, llm, local models, ollama, vllm, localai, nativ, offline models +keywords: docker agent, ai agents, model providers, llm, local models, ollama, vllm, localai, nativ, rapid-mlx, offline models linkTitle: "Local Models" weight: 150 canonical: https://docs.docker.com/ai/docker-agent/providers/local/ @@ -10,8 +10,6 @@ aliases: - /ai/docker-agent/providers/ollama/ --- -_Run Docker Agent with locally hosted models for privacy, offline use, or cost savings._ - ## Overview Docker Agent can connect to any OpenAI-compatible local model server. This guide covers the most popular options: @@ -20,6 +18,7 @@ Docker Agent can connect to any OpenAI-compatible local model server. This guide - **vLLM** — High-performance inference server - **LocalAI** — OpenAI-compatible API for various backends - [**Nativ**](../nativ/index.md) — Local MLX models on Apple Silicon +- [**Rapid-MLX**](../rapid-mlx/index.md) — Local MLX model server for Apple Silicon > [!TIP] > **Docker Model Runner** diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/lunaroute/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/lunaroute/index.md new file mode 100644 index 000000000000..f8b3994749f9 --- /dev/null +++ b/_vendor/github.com/docker/docker-agent/docs/providers/lunaroute/index.md @@ -0,0 +1,71 @@ +--- +title: "Lunaroute" +description: "Use Lunaroute models with Docker Agent." +keywords: docker agent, ai agents, model providers, llm, lunaroute +weight: 232 +canonical: https://docs.docker.com/ai/docker-agent/providers/lunaroute/ +--- + +_Use Lunaroute models with Docker Agent._ + +## Setup + +Obtain an API key from [Lunaroute](https://lunaroute.com/). Lunaroute keys are +prefixed with `lr_`. Set the environment variable: + +```bash +export LUNAROUTE_API_KEY=lr_your-api-key +``` + +## Usage + +Use the inline model reference: + +```yaml +agents: + root: + model: lunaroute/glm-5.3 + description: Assistant using Lunaroute + instruction: You are a helpful assistant. +``` + +Or configure a named model: + +```yaml +models: + lunaroute_glm: + provider: lunaroute + model: glm-5.3 + +agents: + root: + model: lunaroute_glm + instruction: You are a helpful assistant. +``` + +When Lunaroute is selected automatically from available credentials, the default +model is `glm-5.3`. Model IDs are passed through as supplied. + +## Model discovery and capabilities + +Run `docker agent models --provider lunaroute` with `LUNAROUTE_API_KEY` set to +query the authenticated `https://gw.lunaroute.com/v1/models` endpoint. The +listing also includes the configured default. Discovery is best-effort: if the +endpoint fails, the default remains available. The gateway's listing may contain +models that are not usable for chat. + +Lunaroute is absent from the embedded models.dev catalog. Discovery imports model +IDs, not pricing, context limits, or capabilities; cost tracking and automatic +capability detection therefore lack catalog metadata. Unknown attachment +capabilities fall back to text-only, so image and PDF attachments are dropped +with a warning. If you have verified a model supports them, set a +[capability override](../../configuration/models/index.md#attachment-capability-overrides). + +## How it works + +Direct requests use OpenAI-compatible Chat Completions at +`https://gw.lunaroute.com/v1` with `LUNAROUTE_API_KEY`. When a Docker Agent +models gateway is configured, the built-in alias routes through that gateway +instead; the gateway must support the Lunaroute provider and model. To use +Lunaroute directly, set `bypass_models_gateway: true` on a named model. See +[Gateway Bypass](../../configuration/models/index.md#gateway-bypass). diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/minimax/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/minimax/index.md index e6eeac606e38..6be13b2c1d9b 100644 --- a/_vendor/github.com/docker/docker-agent/docs/providers/minimax/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/providers/minimax/index.md @@ -6,8 +6,6 @@ weight: 160 canonical: https://docs.docker.com/ai/docker-agent/providers/minimax/ --- -_Use MiniMax AI models with Docker Agent._ - ## Overview MiniMax provides AI models through an OpenAI-compatible API. Docker Agent includes built-in support for MiniMax as an alias provider. @@ -25,8 +23,6 @@ MiniMax provides AI models through an OpenAI-compatible API. Docker Agent includ ### Inline Syntax -The simplest way to use MiniMax: - ```yaml agents: root: @@ -37,8 +33,6 @@ agents: ### Named Model -For more control over parameters: - ```yaml models: minimax_model: diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/mistral/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/mistral/index.md index 7e40916d53c6..cd959c7f383d 100644 --- a/_vendor/github.com/docker/docker-agent/docs/providers/mistral/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/providers/mistral/index.md @@ -6,8 +6,6 @@ weight: 170 canonical: https://docs.docker.com/ai/docker-agent/providers/mistral/ --- -_Use Mistral AI models with Docker Agent._ - ## Overview Mistral AI provides powerful language models through an OpenAI-compatible API. Docker Agent includes built-in support for Mistral as an alias provider. @@ -25,8 +23,6 @@ Mistral AI provides powerful language models through an OpenAI-compatible API. D ### Inline Syntax -The simplest way to use Mistral: - ```yaml agents: root: @@ -37,8 +33,6 @@ agents: ### Named Model -For more control over parameters: - ```yaml models: mistral: diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/moonshot/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/moonshot/index.md index c193d1439ce4..6dc93da22525 100644 --- a/_vendor/github.com/docker/docker-agent/docs/providers/moonshot/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/providers/moonshot/index.md @@ -6,8 +6,6 @@ weight: 180 canonical: https://docs.docker.com/ai/docker-agent/providers/moonshot/ --- -_Use Moonshot AI (Kimi) models with Docker Agent._ - ## Overview [Moonshot AI](https://www.moonshot.ai/) serves its Kimi model family through an @@ -30,8 +28,6 @@ Use the provider ID `moonshotai`. The legacy ID `moonshot` is also accepted. ### Inline Syntax -The simplest way to use Moonshot AI: - ```yaml agents: root: @@ -42,8 +38,6 @@ agents: ### Named Model -For more control over parameters: - ```yaml models: moonshot_model: diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/morse/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/morse/index.md new file mode 100644 index 000000000000..3a7daae0bef0 --- /dev/null +++ b/_vendor/github.com/docker/docker-agent/docs/providers/morse/index.md @@ -0,0 +1,124 @@ +--- +title: "Morse" +description: "Use Morse models with Docker Agent." +keywords: docker agent, ai agents, model providers, llm, morse +weight: 182 +canonical: https://docs.docker.com/ai/docker-agent/providers/morse/ +--- + +## Overview + +[Morse](https://trymorse.ai/inference) is a private inference API for +open-weight models, including DeepSeek, GLM, Qwen, Kimi, Gemma and Llama, +through an OpenAI-compatible API. Every model in its catalog is served with +zero data retention, and some also run in a trusted execution environment +(TEE). Docker Agent includes Morse as a built-in provider in its embedded +provider catalog. + +## Setup + +1. Create an API key in the [Morse console](https://console.trymorse.ai). +2. Add credits to the account in the console before the first call. A valid key + on an unfunded account returns `402 insufficient_balance`. +3. Set the environment variable: + + ```bash + export MORSE_API_KEY=your-api-key + ``` + +## Usage + +### Inline Syntax + +Prefix a Morse model ID with `morse/`: + +```yaml +agents: + root: + model: morse/deepseek/deepseek-v4.1-flash + description: Assistant using Morse + instruction: You are a helpful assistant. +``` + +Morse model IDs contain a slash themselves. Docker Agent splits the inline +reference at the first slash, so everything after `morse/` is passed to Morse +unchanged. + +### Named Model + +```yaml +models: + morse_model: + provider: morse + model: deepseek/deepseek-v4.1-flash + max_tokens: 8192 + +agents: + root: + model: morse_model + description: Assistant using Morse + instruction: You are a helpful assistant. +``` + +When Morse is selected automatically from available credentials, the default +model is `deepseek/deepseek-v4.1-flash`. Model IDs are passed through as +supplied. + +## Available Models + +The model list is public, so no key is needed to read it: + +```bash +curl https://inference.trymorse.ai/v1/models +``` + +Use an ID from the response unchanged as the `model` value, for example +`z-ai/glm-5.3`, `qwen/qwen3-coder` or `moonshotai/kimi-k3.1-pro`. Each entry +lists its `supported_parameters`, and its `input_modalities` when available. The same list is +on the [models page](https://trymorse.ai/inference/models). + +Morse is absent from Docker Agent's embedded models.dev catalog. Docker Agent +does not import pricing, context limits or attachment capabilities from +Morse's model list. Attachment detection falls back to text-only, so image +and PDF attachments are dropped, with a warning logged once per model. If the +model you chose lists `image` in `input_modalities`, set +`models..capabilities`; see +[Attachment Capability Overrides](../../configuration/models/index.md#attachment-capability-overrides): + +```yaml +models: + morse_vision: + provider: morse + model: deepseek/deepseek-v4.1-flash + capabilities: + image: true +``` + +## How It Works + +Morse is an entry in Docker Agent's built-in provider catalog +(`pkg/model/provider/catalog/providers.json`) that uses the existing OpenAI +implementation: + +- **API type:** OpenAI-compatible Chat Completions (`openai_chatcompletions`) +- **Base URL:** `https://inference.trymorse.ai/v1` +- **Token variable:** `MORSE_API_KEY` + +See the [Morse API docs](https://trymorse.ai/inference/docs) for request +options. + +## Example: Code Assistant + +```yaml +agents: + coder: + model: morse/qwen/qwen3-coder + description: Code assistant using Morse + instruction: | + You are an expert programmer. + Write clean code and follow language best practices. + toolsets: + - type: filesystem + - type: shell + - type: think +``` diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/nativ/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/nativ/index.md index 4179528acbfe..b9e8c1d0ae0b 100644 --- a/_vendor/github.com/docker/docker-agent/docs/providers/nativ/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/providers/nativ/index.md @@ -6,8 +6,6 @@ weight: 185 canonical: https://docs.docker.com/ai/docker-agent/providers/nativ/ --- -_Run Docker Agent with local MLX models served by Nativ on Apple Silicon._ - ## Overview [Nativ](https://github.com/Blaizzy/nativ) is a macOS app for downloading and diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/nebius/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/nebius/index.md index deadbaaea4b3..2972c8ffeec2 100644 --- a/_vendor/github.com/docker/docker-agent/docs/providers/nebius/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/providers/nebius/index.md @@ -1,20 +1,18 @@ --- -title: "Nebius" -description: "Use Nebius AI models with Docker Agent." -keywords: docker agent, ai agents, model providers, llm, nebius +title: "Nebius Token Factory" +description: "Use Nebius Token Factory models with Docker Agent." +keywords: docker agent, ai agents, model providers, llm, nebius, token factory weight: 190 canonical: https://docs.docker.com/ai/docker-agent/providers/nebius/ --- -_Use Nebius AI models with Docker Agent._ - ## Overview -Nebius provides AI models through an OpenAI-compatible API. Docker Agent includes built-in support for Nebius as an alias provider. +[Nebius Token Factory](https://tokenfactory.nebius.com/) (formerly Nebius AI Studio) provides hosted AI models through an OpenAI-compatible API. Docker Agent includes built-in support for Token Factory as the `nebius` alias provider. ## Setup -1. Get an API key from [Nebius AI](https://nebius.ai/) +1. Create an API key in the [Nebius Token Factory console](https://tokenfactory.nebius.com/project/api-keys) 2. Set the environment variable: ```bash @@ -25,51 +23,49 @@ Nebius provides AI models through an OpenAI-compatible API. Docker Agent include ### Inline Syntax -The simplest way to use Nebius: - ```yaml agents: root: - model: nebius/deepseek-ai/DeepSeek-V3 - description: Assistant using Nebius + model: nebius/MiniMaxAI/MiniMax-M3.1-Flash + description: Assistant using Nebius Token Factory instruction: You are a helpful assistant. ``` ### Named Model -For more control over parameters: - ```yaml models: nebius_model: provider: nebius - model: deepseek-ai/DeepSeek-V3 + model: openai/gpt-oss-120b temperature: 0.7 max_tokens: 8192 agents: root: model: nebius_model - description: Assistant using Nebius + description: Assistant using Nebius Token Factory instruction: You are a helpful assistant. ``` ## Available Models -Nebius hosts various open models. Check the [Nebius documentation](https://nebius.ai/docs) for the current model catalog. +Token Factory's catalog changes as models launch and retire, so this page does not keep a static model table. With `NEBIUS_API_KEY` set, list the Nebius models Docker Agent knows about: + +```bash +docker agent models --provider nebius +``` + +Add `--all` to list them without a key. Recent additions include `MiniMaxAI/MiniMax-M3.1-Flash`, `deepseek-ai/DeepSeek-V4.1-Flash-1017`, `zai-org/GLM-5.3` and `moonshotai/Kimi-K3`. -| Model | Description | -| ----------------------------------- | ------------------------------- | -| `deepseek-ai/DeepSeek-V3` | DeepSeek V3 model | -| `Qwen/Qwen2.5-72B-Instruct` | Qwen 2.5 72B instruction-tuned | -| `meta-llama/Llama-3.3-70B-Instruct` | Llama 3.3 70B instruction-tuned | +The listing comes from the [models.dev](https://models.dev/providers/nebius/) catalog, which can lag behind Token Factory. The [Token Factory console](https://tokenfactory.nebius.com/) is the authoritative list of models available to your project. Model IDs are case-sensitive; copy the full ID, including the vendor prefix. ## How It Works Nebius is implemented as a built-in alias in Docker Agent: - **API Type:** OpenAI-compatible (`openai_chatcompletions`) -- **Base URL:** `https://api.studio.nebius.com/v1` +- **Base URL:** `https://api.tokenfactory.nebius.com/v1` - **Token Variable:** `NEBIUS_API_KEY` ## Example: Code Assistant @@ -77,10 +73,10 @@ Nebius is implemented as a built-in alias in Docker Agent: ```yaml agents: coder: - model: nebius/deepseek-ai/DeepSeek-V3 - description: Code assistant using DeepSeek + model: nebius/moonshotai/Kimi-K3 + description: Code assistant using Nebius Token Factory instruction: | - You are an expert programmer using DeepSeek V3. + You are an expert programmer. Write clean, well-documented code. Follow best practices for the language being used. toolsets: diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/nvidia/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/nvidia/index.md index 9f026e8b4a1a..b3fda107b575 100644 --- a/_vendor/github.com/docker/docker-agent/docs/providers/nvidia/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/providers/nvidia/index.md @@ -6,8 +6,6 @@ weight: 290 canonical: https://docs.docker.com/ai/docker-agent/providers/nvidia/ --- -_Use NVIDIA NIM models with Docker Agent._ - ## Overview NVIDIA provides access to Nemotron and many other open-weight models through @@ -29,8 +27,6 @@ alias provider. The same alias also works against a self-hosted ### Inline Syntax -The simplest way to use NVIDIA NIM: - ```yaml agents: root: @@ -41,8 +37,6 @@ agents: ### Named Model -For more control over parameters: - ```yaml models: nemotron: diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/obscurify/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/obscurify/index.md new file mode 100644 index 000000000000..68ac77fc751e --- /dev/null +++ b/_vendor/github.com/docker/docker-agent/docs/providers/obscurify/index.md @@ -0,0 +1,116 @@ +--- +title: "Obscurify.ai" +description: "Use Obscurify.ai models with Docker Agent." +keywords: docker agent, ai agents, model providers, llm, obscurify +weight: 25 +canonical: https://docs.docker.com/ai/docker-agent/providers/obscurify/ +--- + +## Overview + +[Obscurify.ai](https://obscurify.ai/?utm_source=docker-agent) is a +privacy-focused provider with an OpenAI-compatible API and 200+ models. +Accounts are a random account number with no email, and prompts and responses +are not stored on its servers. Obscurify.ai is a built-in provider in Docker +Agent's embedded provider catalog. + +The API works on every plan with a positive balance. Frontier models such as +`openai/gpt-5.5` or `anthropic/claude-sonnet-5.5` need a Casual or Pro plan; +see the [model list](https://obscurify.ai/model_cards) for prices. + +## Setup + +1. Create an account at [obscurify.ai](https://obscurify.ai/?utm_source=docker-agent) + and copy your key from the [account page](https://obscurify.ai/account) + ("Show API Key"). +2. Set the environment variable: + + ```bash + export OBSCURIFY_API_KEY=your-api-key + ``` + +## Usage + +### Inline Syntax + +Prefix an Obscurify.ai model ID with `obscurify/`: + +```yaml +agents: + root: + model: obscurify/deepseek/deepseek-v4-flash + description: Assistant using Obscurify.ai + instruction: You are a helpful assistant. +``` + +Only the first slash separates the provider, so the rest of the model ID +(`deepseek/deepseek-v4-flash`) is sent as is. + +### Named Model + +```yaml +models: + obscurify_kimi: + provider: obscurify + model: moonshotai/kimi-k2-0905 + temperature: 0.7 + max_tokens: 8192 + +agents: + root: + model: obscurify_kimi + description: Assistant using Obscurify.ai + instruction: You are a helpful assistant. +``` + +## Available Models + +A few of the chat model IDs: + +| Model ID | Context | +| --- | --- | +| `deepseek/deepseek-v4-flash` | 1,048,576 (default) | +| `z-ai/glm-5.3` | 1,048,576 | +| `moonshotai/kimi-k2-0905` | 262,144 | +| `qwen/qwen3-coder` | 262,000 | +| `meta-llama/llama-3.3-70b-instruct` | 131,072 | + +The public [`/v1/models` endpoint](https://obscurify.ai/v1/models) lists every +current ID with its context length and pricing; no key is needed to read it. + +Obscurify.ai is not in the models.dev catalog, so Docker Agent has no +catalog-derived pricing or context limits for these models. Attachment +capabilities fall back to text-only; image and PDF attachments are dropped, +with a warning logged once per model. If you know your model accepts a given +attachment type, set `models..capabilities` to override detection. See +[Attachment Capability Overrides](../../configuration/models/index.md#attachment-capability-overrides). + +## How It Works + +Obscurify.ai is an entry in Docker Agent's built-in provider catalog +(`pkg/model/provider/catalog/providers.json`) that uses the existing OpenAI +implementation: + +- **API Type:** OpenAI-compatible Chat Completions (`openai_chatcompletions`) +- **Base URL:** `https://obscurify.ai/v1` +- **Token Variable:** `OBSCURIFY_API_KEY` + +Many of its models are open-weight models whose chat templates can reject +several leading system messages, so Docker Agent merges its per-source system +messages into one. + +## Example: Code Assistant + +```yaml +agents: + coder: + model: obscurify/qwen/qwen3-coder + description: Code assistant using Obscurify.ai + instruction: | + You are an expert programmer. + Write clean code and follow language best practices. + toolsets: + - type: filesystem + - type: shell + - type: think +``` diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/openai/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/openai/index.md index ccfb838f661b..11eb22dabd80 100644 --- a/_vendor/github.com/docker/docker-agent/docs/providers/openai/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/providers/openai/index.md @@ -96,7 +96,7 @@ models: native_tool_search: true ``` -Deferred tools are declared with `defer_loading: true` alongside a server-executed `tool_search` tool on Responses API requests. Strictly opt-in: only `openai` models that support deferred tools (gpt-5.4 and later) qualify; the option is ignored elsewhere (`chatgpt`, OpenAI-compatible endpoints including a custom `base_url`, Chat Completions requests) and the legacy behaviour is kept. +Deferred tools are declared with `defer_loading: true` alongside a server-executed `tool_search` tool on Responses API requests. Strictly opt-in: only `openai` models that support deferred tools (gpt-5.4 and later) qualify; the option is ignored elsewhere (`chatgpt`, OpenAI-compatible endpoints including a custom `base_url` or `OPENAI_BASE_URL`, Chat Completions requests) and the legacy behaviour is kept. See [`examples/deferred_native_tool_search.yaml`](https://github.com/docker/docker-agent/blob/main/examples/deferred_native_tool_search.yaml) for a complete example. @@ -176,7 +176,7 @@ models: - Only works with Responses API models: `gpt-4.1+`, `o1`, `o3`, `o4`, `gpt-5` - NOT compatible with the `--models-gateway` flag (automatically falls back to SSE when a gateway is configured) -- Requires `OPENAI_API_KEY` environment variable +- Uses the configured credential source or `token_key`; defaults to `OPENAI_API_KEY` when neither is configured ### Example @@ -218,9 +218,9 @@ generated values. This option does not apply to the Responses API. ## Reasoning State Preservation -Reasoning replay is opt-in, so existing configurations keep their request and -session-storage behavior. Enable it for first-party OpenAI Responses sessions, -including the `chatgpt` provider: +Responses reasoning replay is opt-in, so existing configurations keep their +request and session-storage behavior. Enable it for first-party OpenAI +Responses sessions, including the `chatgpt` provider: ```yaml provider_opts: @@ -247,3 +247,9 @@ WebSocket requests replay the full history without also chaining it through `pre See [OpenAI's reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) and [cache diagnostics guide](https://developers.openai.com/api/docs/guides/prompt-caching/diagnostics). + +`preserve_reasoning` is unrelated to `provider_opts.replay_reasoning`, which +replays plain reasoning text as a `reasoning_content` field on Chat +Completions requests to OpenAI-compatible servers. It does not apply to the +Responses API, and `preserve_reasoning` does not apply to Chat Completions. +See [Replaying reasoning on later turns](../custom/index.md#replaying-reasoning-on-later-turns). diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/opencode-go/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/opencode-go/index.md index 32a3bdbe5c87..82ae5746dfa1 100644 --- a/_vendor/github.com/docker/docker-agent/docs/providers/opencode-go/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/providers/opencode-go/index.md @@ -6,8 +6,6 @@ weight: 210 canonical: https://docs.docker.com/ai/docker-agent/providers/opencode-go/ --- -_Use OpenCode Go models with Docker Agent._ - ## Overview [OpenCode Go](https://opencode.ai/docs/go) is a low-cost subscription service ($5 first month, then $10/month) that provides reliable access to popular open-source coding models. It serves models through both OpenAI-compatible and Anthropic-compatible APIs from globally distributed endpoints. @@ -28,8 +26,6 @@ Docker Agent includes built-in support for OpenCode Go as an alias provider. ### Inline Syntax -The simplest way to use OpenCode Go: - ```yaml agents: root: @@ -40,8 +36,6 @@ agents: ### Named Model -For more control over parameters: - ```yaml models: my_model: diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/opencode-zen/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/opencode-zen/index.md index 30d34098df20..adb016eeea51 100644 --- a/_vendor/github.com/docker/docker-agent/docs/providers/opencode-zen/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/providers/opencode-zen/index.md @@ -6,8 +6,6 @@ weight: 220 canonical: https://docs.docker.com/ai/docker-agent/providers/opencode-zen/ --- -_Use OpenCode Zen models with Docker Agent._ - ## Overview [OpenCode Zen](https://opencode.ai/docs/zen) is a curated gateway of tested and verified AI models provided by the OpenCode team. It offers pay-per-use access to a wide range of models — from GPT and Claude to open-source models — all through a single API key. Several free models are also available. @@ -39,8 +37,6 @@ See [Claude access paths](../anthropic/index.md#claude-access-paths). ### Inline Syntax -The simplest way to use OpenCode Zen with a free model: - ```yaml agents: root: @@ -51,8 +47,6 @@ agents: ### Named Model -For more control over parameters: - ```yaml models: zen_model: @@ -138,7 +132,7 @@ These models use the `/v1/messages` endpoint and require a [custom provider defi | `claude-opus-4-5` | Claude Opus 4.5 model | | `claude-opus-4-1` | Claude Opus 4.1 model | | `claude-sonnet-4-6` | Claude Sonnet 4.6 model | -| `claude-sonnet-4-5` | Claude Sonnet 4.5 model | +| `claude-sonnet-5-5` | Claude Sonnet 5.5 model | | `claude-sonnet-4` | Claude Sonnet 4 model | | `claude-haiku-4-5` | Claude Haiku 4.5 model | | `qwen3.7-max` | Qwen 3.7 Max model | diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/openrouter/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/openrouter/index.md index e55ea4b3c335..6f23464fbd28 100644 --- a/_vendor/github.com/docker/docker-agent/docs/providers/openrouter/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/providers/openrouter/index.md @@ -6,8 +6,6 @@ weight: 230 canonical: https://docs.docker.com/ai/docker-agent/providers/openrouter/ --- -_Use OpenRouter models with Docker Agent._ - ## Overview OpenRouter provides access to models from many providers through an OpenAI-compatible API. Docker Agent includes built-in support for OpenRouter as an alias provider. @@ -25,8 +23,6 @@ OpenRouter provides access to models from many providers through an OpenAI-compa ### Inline Syntax -The simplest way to use OpenRouter: - ```yaml agents: root: @@ -39,8 +35,6 @@ OpenRouter model IDs usually include the upstream provider name, such as `anthro ### Named Model -For more control over parameters: - ```yaml models: openrouter_llama: diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/opper/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/opper/index.md new file mode 100644 index 000000000000..3d7c029f23d2 --- /dev/null +++ b/_vendor/github.com/docker/docker-agent/docs/providers/opper/index.md @@ -0,0 +1,67 @@ +--- +title: "Opper" +description: "Use Opper models with Docker Agent." +keywords: docker agent, ai agents, model providers, llm, opper +weight: 225 +canonical: https://docs.docker.com/ai/docker-agent/providers/opper/ +--- + +## Overview + +[Opper](https://opper.ai) is an EU-hosted AI gateway that serves models from +many providers behind one OpenAI-compatible endpoint, with one API key. +Docker Agent includes built-in support for Opper as an alias provider. + +## Setup + +1. Create an API key at [platform.opper.ai](https://platform.opper.ai). +2. Set the environment variable: + + ```bash + export OPPER_API_KEY=your-api-key + ``` + +## Usage + +### Inline Syntax + +```yaml +agents: + root: + model: opper/claude-sonnet-4-6 + description: Assistant using Opper + instruction: You are a helpful assistant. +``` + +### Named Model + +```yaml +models: + opper_model: + provider: opper + model: claude-sonnet-4-6 + temperature: 0.7 + max_tokens: 8192 + +agents: + root: + model: opper_model + description: Assistant using Opper + instruction: You are a helpful assistant. +``` + +## Available Models + +Opper model IDs come in two forms. A bare pool name such as +`claude-sonnet-4-6` or `gpt-5.4-mini` lets Opper pick a provider for each +request. A `provider/model` ID such as `anthropic/claude-sonnet-4-6` pins one +route. List the model IDs your key can call with: + +```bash +curl https://api.opper.ai/v3/compat/models \ + -H "Authorization: Bearer $OPPER_API_KEY" +``` + +The public catalogue is also available without a key at +`https://api.opper.ai/v3/models`. Docker Agent's default for Opper is +`claude-sonnet-4-6`. diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/orcarouter/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/orcarouter/index.md new file mode 100644 index 000000000000..b091de7ae5f0 --- /dev/null +++ b/_vendor/github.com/docker/docker-agent/docs/providers/orcarouter/index.md @@ -0,0 +1,84 @@ +--- +title: "OrcaRouter" +description: "Use OrcaRouter models with Docker Agent." +keywords: docker agent, ai agents, model providers, llm, orcarouter +weight: 231 +canonical: https://docs.docker.com/ai/docker-agent/providers/orcarouter/ +--- + +## Overview + +[OrcaRouter](https://www.orcarouter.ai) provides access to models from many providers through an OpenAI-compatible API. Docker Agent includes built-in support for OrcaRouter as an alias provider. + +## Setup + +1. Get an API key from [OrcaRouter](https://www.orcarouter.ai) +2. Set the environment variable: + + ```bash + $ export ORCAROUTER_API_KEY=your-api-key + ``` + +## Usage + +### Inline Syntax + +Set the provider and model in the agent definition: + +```yaml +agents: + root: + model: orcarouter/orcarouter/auto + description: Assistant using OrcaRouter + instruction: You are a helpful assistant. +``` + +`orcarouter/auto` is OrcaRouter's adaptive router. You can also reference a model served by the gateway with its upstream provider prefix, such as `orcarouter/anthropic/claude-sonnet-5` or `orcarouter/deepseek/deepseek-v4-pro`. Docker Agent splits only the first slash, so the full upstream model ID is preserved. + +### Named Model + +```yaml +models: + orca_router: + provider: orcarouter + model: orcarouter/auto + temperature: 0.7 + max_tokens: 8192 + +agents: + root: + model: orca_router + description: Assistant using OrcaRouter + instruction: You are a helpful assistant. +``` + +## Pricing and Model Metadata + +Docker Agent fetches OrcaRouter model metadata from [models.dev](https://models.dev/), including pricing per 1M input/output tokens, cache pricing when available, context limits, output limits, and modalities. This powers cost tracking and the model picker in the same way as other first-class providers. + +If models.dev is unavailable, Docker Agent falls back to its embedded catalog snapshot. + +## How It Works + +OrcaRouter is implemented as a built-in alias in Docker Agent: + +- **API Type:** OpenAI-compatible (`openai`) +- **Base URL:** `https://api.orcarouter.ai/v1` +- **Token Variable:** `ORCAROUTER_API_KEY` + +## Example: Code Assistant + +```yaml +agents: + coder: + model: orcarouter/orcarouter/auto + description: Code assistant using OrcaRouter + instruction: | + You are an expert programmer. + Write clean, maintainable code. + Explain trade-offs when helpful. + toolsets: + - type: filesystem + - type: shell + - type: think +``` diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/overview/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/overview/index.md index 2f6e18ea85c9..a6c276e2747e 100644 --- a/_vendor/github.com/docker/docker-agent/docs/providers/overview/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/providers/overview/index.md @@ -13,13 +13,14 @@ _Docker Agent supports multiple AI model providers. Choose the right one for you ## Supported Providers -- [**OpenAI**](../openai/index.md) — GPT-5, GPT-5-mini, GPT-4o. The most widely used AI models. +- [**OpenAI**](../openai/index.md) — GPT-5, GPT-5-mini, GPT-4o. - [**Anthropic**](../anthropic/index.md) — Claude models for coding and analysis. See [Claude access paths](../anthropic/index.md#claude-access-paths) for protocol, host and model-specific limits. -- [**Google Gemini**](../google/index.md) — Gemini 2.5 Flash, Gemini 3 Pro. Fast and cost-effective. +- [**Google Gemini**](../google/index.md) — Gemini 2.5 Flash, Gemini 3 Pro. - [**AWS Bedrock**](../bedrock/index.md) — access Claude, Nova, Llama, and more through AWS infrastructure. - [**Docker Model Runner**](../dmr/index.md) — run models locally with Docker. No API keys, no costs. - [**Local Models**](../local/index.md) — run Ollama, vLLM, or LocalAI locally. No API key required. - [**Nativ**](../nativ/index.md) — run MLX models locally on Apple Silicon through a custom provider. +- [**Rapid-MLX**](../rapid-mlx/index.md) — serve MLX models locally on Apple Silicon through a custom provider. - [**Provider Definitions**](../custom/index.md) — define reusable provider configurations with shared defaults for any provider type. ## Quick Comparison @@ -67,8 +68,18 @@ Use this table to find a built-in provider's config key and authentication metho | Cloudflare AI Gateway | `cloudflare-ai-gateway` | `CLOUDFLARE_API_TOKEN` + `CLOUDFLARE_ACCOUNT_ID` + `CLOUDFLARE_GATEWAY_ID` | | Requesty | `requesty` | `REQUESTY_API_KEY` | | OpenRouter | `openrouter` | `OPENROUTER_API_KEY` | +| Opper | `opper` | `OPPER_API_KEY` | | API Route | `api-route` | `API_ROUTE_API_KEY` | +| Lunaroute | [`lunaroute`](../lunaroute/index.md) | `LUNAROUTE_API_KEY` | +| OrcaRouter | `orcarouter` | `ORCAROUTER_API_KEY` | | Atlas Cloud | [`atlascloud`](../atlascloud/index.md) | `ATLASCLOUD_API_KEY` | +| PopNow | [`popnow`](../popnow/index.md) | `POPNOW_API_KEY` | +| Runcrate | [`runcrate`](../runcrate/index.md) | `RUNCRATE_API_KEY` | +| CloudGPU | [`cloudgpu`](../cloudgpu/index.md) | `CLOUDGPU_API_KEY` | +| Obscurify.ai | [`obscurify`](../obscurify/index.md) | `OBSCURIFY_API_KEY` | +| HopBase | [`hopbase`](../hopbase/index.md) | `HOPBASE_API_KEY` | +| Straitly | [`straitly`](../straitly/index.md) | `STRAITLY_API_KEY` | +| Morse | [`morse`](../morse/index.md) | `MORSE_API_KEY` | | Azure OpenAI | `azure` | `AZURE_API_KEY` + `base_url` (override the key with `token_key`) | | [Ollama](../local/index.md) | `ollama` | None (local; optional `base_url`) | | GitHub Copilot | `github-copilot` | `GITHUB_TOKEN` or `GH_TOKEN` (PAT with `copilot` scope) | @@ -84,11 +95,6 @@ agents: model: mistral/mistral-large-latest ``` -> [!TIP] -> **Multi-provider teams** -> -> Use expensive models for complex reasoning and cheaper/local models for routine tasks. See the example below. - ## Using Multiple Providers Different agents can use different providers in the same configuration: diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/ovhcloud/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/ovhcloud/index.md index f47d36781d3e..7270770ae3cb 100644 --- a/_vendor/github.com/docker/docker-agent/docs/providers/ovhcloud/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/providers/ovhcloud/index.md @@ -6,8 +6,6 @@ weight: 240 canonical: https://docs.docker.com/ai/docker-agent/providers/ovhcloud/ --- -_Use OVHcloud AI Endpoints models with Docker Agent._ - ## Overview [OVHcloud AI Endpoints](https://endpoints.ai.cloud.ovh.net/) serves open-weight diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/popnow/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/popnow/index.md new file mode 100644 index 000000000000..86628d0fb6da --- /dev/null +++ b/_vendor/github.com/docker/docker-agent/docs/providers/popnow/index.md @@ -0,0 +1,98 @@ +--- +title: "PopNow" +description: "Use PopNow models with Docker Agent." +keywords: docker agent, ai agents, model providers, llm, popnow +weight: 25 +canonical: https://docs.docker.com/ai/docker-agent/providers/popnow/ +--- + +_Use PopNow models with Docker Agent._ + +## Overview + +[PopNow](https://popnow.ai/api) provides chat models from several vendors through one OpenAI-compatible API, billed per token in USD. Docker Agent includes built-in support for PopNow as a provider alias. + +## Setup + +1. [Create a PopNow API key](https://popnow.ai/api/console/keys) +2. Set the environment variable: + + ```bash + export POPNOW_API_KEY=your-api-key + ``` + +## Usage + +### Inline Syntax + +Use a PopNow model by prefixing its model ID with `popnow/`: + +```yaml +agents: + root: + model: popnow/deepseek/v4-flash/chat + description: Assistant using PopNow + instruction: You are a helpful assistant. +``` + +Docker Agent splits only the first slash, so the vendor prefix and task suffix in PopNow model IDs are preserved. + +### Named Model + +For more control over parameters: + +```yaml +models: + popnow_deepseek: + provider: popnow + model: deepseek/v4-flash/chat + temperature: 0.7 + max_tokens: 8192 + +agents: + root: + model: popnow_deepseek + description: Assistant using PopNow + instruction: You are a helpful assistant. +``` + +## Available Models + +PopNow model IDs end in a task suffix, and chat models use `/chat`: + +| Model ID | Model | +| --- | --- | +| `deepseek/v4-flash/chat` | DeepSeek V4 Flash | +| `moonshot/kimi-k3/chat` | Kimi K3 | + +Model IDs are case-sensitive. Check the [PopNow model catalog](https://popnow.ai/api/models) for current IDs and availability. Only models with the `chat` task work with Docker Agent. + +PopNow is not in the models.dev catalog, so Docker Agent has no catalog-derived pricing or context limits for these models. Attachment capabilities conservatively fall back to text-only; image and PDF attachments are dropped, with a warning logged once per model. + +If you have verified that your chosen model accepts a particular attachment type, set `models..capabilities` to override detection. See [Attachment Capability Overrides](../../configuration/models/index.md#attachment-capability-overrides) for all supported flags. + +## How It Works + +PopNow is implemented as a built-in alias in Docker Agent: + +- **API Type:** OpenAI-compatible Chat Completions (`openai_chatcompletions`) +- **Base URL:** `https://api.popnow.ai/v1` +- **Token Variable:** `POPNOW_API_KEY` + +Because PopNow serves models from many vendors, some of which reject multiple leading system messages, Docker Agent coalesces its per-source system messages into one. + +## Example: Code Assistant + +```yaml +agents: + coder: + model: popnow/deepseek/v4-flash/chat + description: Code assistant using PopNow + instruction: | + You are an expert programmer. + Write clean code and follow language best practices. + toolsets: + - type: filesystem + - type: shell + - type: think +``` diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/rapid-mlx/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/rapid-mlx/index.md new file mode 100644 index 000000000000..7b9e6666a51b --- /dev/null +++ b/_vendor/github.com/docker/docker-agent/docs/providers/rapid-mlx/index.md @@ -0,0 +1,193 @@ +--- +title: "Rapid-MLX" +description: "Run Docker Agent with local MLX models served by Rapid-MLX on Apple Silicon." +keywords: docker agent, ai agents, model providers, local models, rapid-mlx, mlx, apple silicon +weight: 247 +canonical: https://docs.docker.com/ai/docker-agent/providers/rapid-mlx/ +--- + +_Run Docker Agent with local MLX models served by Rapid-MLX on Apple Silicon._ + +## Overview + +[Rapid-MLX](https://github.com/raullenchai/Rapid-MLX) is an open-source +command-line server for running MLX models locally on Apple Silicon. Docker +Agent connects to its OpenAI-compatible API through a +[provider definition](../custom/index.md). No built-in `rapid-mlx` alias or +additional provider plugin is required. + +Rapid-MLX requires an Apple Silicon Mac. Model downloads require network +access; inference runs locally after the model is downloaded. + +## Setup + +1. Install Rapid-MLX with Homebrew or pip (Python 3.12 or newer): + + ```bash + $ brew install rapid-mlx + # Or use your installed Python 3.12+ executable, for example: + $ python3.13 -m venv ~/.venvs/rapid-mlx + $ ~/.venvs/rapid-mlx/bin/pip install rapid-mlx + $ export PATH="$HOME/.venvs/rapid-mlx/bin:$PATH" + ``` + + If you have no Python 3.12 or newer, run `brew install python@3.12` and + use `python3.12` to create the venv. + +2. Start the server with a model. For a small first download on an 8 GB Mac, + use the `qwen3-1.7b-4bit` text chat alias + ([`mlx-community/Qwen3-1.7B-4bit`](https://huggingface.co/mlx-community/Qwen3-1.7B-4bit)). + + ```bash + $ rapid-mlx serve qwen3-1.7b-4bit --port 8000 + ``` + + The larger `qwen3.5-4b-4bit` alternative requires at least 16 GB of memory. + + Keep the server running while you use Docker Agent. It listens on + `127.0.0.1` by default, and its OpenAI base URL is + `http://127.0.0.1:8000/v1`. Without `--port`, Rapid-MLX picks the first + free port in `8000`–`8009`; an explicit `--port` never falls back. +3. In a separate terminal, check that the server responds: + + ```bash + $ curl http://127.0.0.1:8000/health + $ curl http://127.0.0.1:8000/v1/models + ``` + +If you started the server with an API key, include it as a Bearer token in +requests. See [Authentication](#authentication) below. + +## Configuration + +Save this as `rapid-mlx.yaml`: + +```yaml +providers: + rapid-mlx: + api_type: openai_chatcompletions + base_url: http://127.0.0.1:8000/v1 + provider_opts: + extra_body: + chat_template_kwargs: + enable_thinking: false + +models: + local: + provider: rapid-mlx + model: qwen3-1.7b-4bit + temperature: 0 + max_tokens: 512 + +agents: + root: + model: local + description: Local chat assistant using Rapid-MLX on Apple Silicon + instruction: You are a concise helpful assistant. Answer directly. +``` + +Run a short chat request: + +```bash +$ docker agent run rapid-mlx.yaml --exec "What is the capital of France? Answer with only the city name." +``` + +A copy is available in +[`examples/rapid-mlx.yaml`](https://github.com/docker/docker-agent/blob/main/examples/rapid-mlx.yaml). +If you serve a different model, use the ID reported by `/v1/models` in +`models.local.model`; `default` always resolves to the loaded model. Update +`base_url` if the server uses another port. + +`provider_opts.extra_body.chat_template_kwargs.enable_thinking: false` turns +off reasoning for models that support it, so the output budget goes to the +answer. See [Extra Request Body](../../configuration/models/index.md#extra-request-body) +for other pass-through settings. + +Rapid-MLX also exposes the OpenAI Responses API. To use it, change +`providers.rapid-mlx.api_type` to `openai_responses`; keep the same base URL. +Docker Agent does not forward `provider_opts.extra_body` with Responses +requests, so the thinking override above applies only to Chat Completions. + +## Authentication + +To enable authentication, add `token_key: RAPID_MLX_API_KEY` under +`providers.rapid-mlx`. Stop the setup server with Ctrl+C, then restart it +with the `RAPID_MLX_API_KEY` environment variable. Store the key once in the +macOS Keychain; the first command prompts for it interactively. Load it in +the server terminal to keep it out of shell history and process arguments: + +```bash +$ security add-generic-password -a "$USER" -s rapid-mlx-api-key -w +$ export RAPID_MLX_API_KEY="$(security find-generic-password -a "$USER" -s rapid-mlx-api-key -w)" +$ rapid-mlx serve qwen3-1.7b-4bit --port 8000 +``` + +`serve` runs in the foreground. In a separate terminal, export the same key +for the client commands: + +```bash +$ export RAPID_MLX_API_KEY="$(security find-generic-password -a "$USER" -s rapid-mlx-api-key -w)" +$ docker agent run rapid-mlx.yaml --exec "Hello" +``` + +`token_key` names an environment variable, not a literal token. Omit it when +the server runs without an API key. + +## Tool Calling + +The example is chat-only. Rapid-MLX selects a tool-call parser automatically +for recognized aliases and model families. Other checkpoints may need an +explicit `--tool-call-parser` option. Tool calling is not supported on the +DeepSeek TensorFold lane; tool requests return HTTP 400. See the Rapid-MLX +[tool-calling guide](https://github.com/raullenchai/Rapid-MLX/blob/main/docs/guides/tool-calling.md) +for supported parsers and model limitations. Reliability still depends on the +model, instructions, and tool schemas. The small example model is useful for +testing the connection; choose a larger tool-capable model for agentic coding +work. + +Before adding filesystem or shell tools, test that the model calls the tool +with correct arguments and uses the returned result. Keep tool descriptions and +parameter schemas clear, and retain tool approvals. See +[Tools](../../concepts/tools/index.md) for configuration. + +## Troubleshooting + +- **Connection refused:** Start `rapid-mlx serve` and check which port it + printed. Without `--port`, it may have selected a port other than `8000`. +- **Model not found:** Check `/v1/models` for the loaded model ID, or use + `default`. +- **Unauthorized:** Match the client's `RAPID_MLX_API_KEY` to the value used + when starting the server, or remove `token_key` when authentication is + disabled. +- **No answer before the token limit:** Keep thinking disabled, or increase + `max_tokens` for a model that needs longer responses. +- **Docker Agent runs in a container:** Container-local `127.0.0.1` does not + refer to your Mac. On Docker Desktop, use + `http://host.docker.internal:8000/v1` and start the server with a host + reachable from the container, an API key, and the Docker hostname in the + Host allowlist. Store the key in the macOS Keychain as described in + [Authentication](#authentication). Stop the previous server before restarting: + + ```bash + $ export RAPID_MLX_API_KEY="$(security find-generic-password -a "$USER" -s rapid-mlx-api-key -w)" + $ rapid-mlx serve qwen3-1.7b-4bit --port 8000 --host 0.0.0.0 --trusted-hosts host.docker.internal + ``` + + Using the environment variable keeps the key out of process arguments. + Configure `token_key` as described in [Authentication](#authentication). + Export the same key in a separate client terminal. Host exports are not + automatically visible inside containers; pass the variable explicitly when + running the Docker Agent image: + + ```bash + $ export RAPID_MLX_API_KEY="$(security find-generic-password -a "$USER" -s rapid-mlx-api-key -w)" + $ docker run --rm -e RAPID_MLX_API_KEY -v "$PWD:/work" docker/docker-agent run /work/rapid-mlx.yaml --exec "Hello" + ``` + + Save the container-reachable `base_url` in `rapid-mlx.yaml` before running + this command. `--trusted-hosts` replaces the default + loopback allowlist; add `localhost 127.0.0.1` if you also need local access. + Binding to `0.0.0.0` exposes the server to your LAN. + +For server options and endpoint details, see the Rapid-MLX +[CLI reference](https://github.com/raullenchai/Rapid-MLX/blob/main/docs/reference/cli.md). diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/runcrate/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/runcrate/index.md new file mode 100644 index 000000000000..bb323781cc27 --- /dev/null +++ b/_vendor/github.com/docker/docker-agent/docs/providers/runcrate/index.md @@ -0,0 +1,116 @@ +--- +title: "Runcrate" +description: "Use Runcrate models with Docker Agent." +keywords: docker agent, ai agents, model providers, llm, runcrate +weight: 25 +canonical: https://docs.docker.com/ai/docker-agent/providers/runcrate/ +--- + +## Overview + +[Runcrate](https://www.runcrate.ai/?utm_source=docker-agent&utm_medium=directory&utm_campaign=gpu_pricing) +is a GPU cloud that also serves open models (DeepSeek, GLM, Qwen, gpt-oss and +others) through an OpenAI-compatible API. Docker Agent includes built-in +support for Runcrate as an alias provider. + +Some open models come with a limited free allowance for GitHub accounts at +least 30 days old. Once the allowance is used up, or when free capacity is +busy, requests from a workspace with credit are billed to that credit. See +[Runcrate's free inference terms](https://www.runcrate.ai/inference/free?utm_source=docker-agent&utm_medium=directory&utm_campaign=gpu_pricing) +for the current models, limits and prices. + +## Setup + +1. [Create a Runcrate API key](https://www.runcrate.ai/dashboard/api-keys) +2. Set the environment variable: + + ```bash + export RUNCRATE_API_KEY=your-api-key + ``` + +## Usage + +### Inline Syntax + +Use a Runcrate model by prefixing its model ID with `runcrate/`: + +```yaml +agents: + root: + model: runcrate/deepseek-ai/DeepSeek-V4.1-Flash + description: Assistant using Runcrate + instruction: You are a helpful assistant. +``` + +Docker Agent splits only the first slash, so model IDs that include an +organization prefix are preserved. + +### Named Model + +```yaml +models: + runcrate_glm: + provider: runcrate + model: zai-org/GLM-5.3 + temperature: 0.7 + max_tokens: 8192 + +agents: + root: + model: runcrate_glm + description: Assistant using Runcrate + instruction: You are a helpful assistant. +``` + +## Available Models + +Some chat model IDs Runcrate serves: + +| Model ID | Model | +| --- | --- | +| `deepseek-ai/DeepSeek-V4.1-Flash` | DeepSeek V4.1 Flash (default) | +| `zai-org/GLM-5.3` | GLM-5.3 | +| `Qwen/Qwen3.8-Flash` | Qwen3.8 Flash | +| `openai/gpt-oss-120b` | gpt-oss 120B | + +Model IDs are case-sensitive. The live [`/v1/models` endpoint](https://api.runcrate.ai/v1/models) +lists current IDs; it also lists image, video, speech and embedding models, +which this chat provider does not use. + +Runcrate is not in the models.dev catalog. Docker Agent does not import metadata +from Runcrate's model list, so it has no catalog-derived pricing or context limits +for these models. Attachment capabilities conservatively fall back to text-only; +image and PDF attachments are dropped, with a warning logged once per model. + +If you have verified that your chosen model accepts a particular attachment +type, set `models..capabilities` to override detection. See +[Attachment Capability Overrides](../../configuration/models/index.md#attachment-capability-overrides) +for all supported flags. + +## How It Works + +Runcrate is implemented as a built-in alias in Docker Agent: + +- **API Type:** OpenAI-compatible Chat Completions (`openai_chatcompletions`) +- **Base URL:** `https://api.runcrate.ai/v1` +- **Token Variable:** `RUNCRATE_API_KEY` + +Because Runcrate serves open-weight models whose chat templates can reject +multiple leading system messages, Docker Agent coalesces its per-source system +messages into one. + +## Example: Code Assistant + +```yaml +agents: + coder: + model: runcrate/deepseek-ai/DeepSeek-V4.1-Flash + description: Code assistant using Runcrate + instruction: | + You are an expert programmer. + Write clean code and follow language best practices. + toolsets: + - type: filesystem + - type: shell + - type: think +``` diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/straitly/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/straitly/index.md new file mode 100644 index 000000000000..6d38f22b3453 --- /dev/null +++ b/_vendor/github.com/docker/docker-agent/docs/providers/straitly/index.md @@ -0,0 +1,122 @@ +--- +title: "Straitly" +description: "Use Straitly models with Docker Agent." +keywords: docker agent, ai agents, model providers, llm, straitly +weight: 247 +canonical: https://docs.docker.com/ai/docker-agent/providers/straitly/ +--- + +## Overview + +[Straitly](https://straitly.ai) is an AI gateway. One API key and one base URL +reach more than 150 models, including Claude, GPT, Gemini, Grok and DeepSeek, +through an OpenAI-compatible API. Docker Agent includes Straitly as a built-in +provider in its embedded provider catalog. + +## Setup + +1. Sign up at [straitly.ai](https://straitly.ai/signup), add prepaid credits and + create an API key on the [API keys page](https://straitly.ai/app/keys). +2. Set the environment variable: + + ```bash + export STRAITLY_API_KEY=your-api-key + ``` + +## Usage + +### Inline Syntax + +Prefix a Straitly model ID with `straitly/`: + +```yaml +agents: + root: + model: straitly/deepseek/deepseek-v4-1-flash + description: Assistant using Straitly + instruction: You are a helpful assistant. +``` + +Straitly model IDs usually contain a slash themselves. Docker Agent splits the +inline reference at the first slash, so everything after `straitly/` is passed +to Straitly unchanged. + +### Named Model + +```yaml +models: + straitly_model: + provider: straitly + model: deepseek/deepseek-v4-1-flash + max_tokens: 8192 + +agents: + root: + model: straitly_model + description: Assistant using Straitly + instruction: You are a helpful assistant. +``` + +When Straitly is selected automatically from available credentials, the default +model is `deepseek/deepseek-v4-1-flash`. Model IDs are passed through as +supplied. + +## Available Models + +List the model IDs before choosing another model: + +```bash +curl https://api.straitly.ai/v1/models \ + -H "Authorization: Bearer $STRAITLY_API_KEY" +``` + +Use an ID from the response unchanged as the `model` value. Each entry also +lists its `context_length`, `supported_parameters` and +`architecture.input_modalities`. The same list is on the +[models page](https://straitly.ai/models). + +Straitly is absent from Docker Agent's embedded models.dev catalog. Docker Agent +does not import pricing, context limits or attachment capabilities from +Straitly's model list. Attachment detection falls back to text-only, so image +and PDF attachments are dropped, with a warning logged once per model. If the +model you chose lists `image` in `architecture.input_modalities`, set +`models..capabilities`; see +[Attachment Capability Overrides](../../configuration/models/index.md#attachment-capability-overrides): + +```yaml +models: + straitly_vision: + provider: straitly + model: deepseek/deepseek-v4-1-flash + capabilities: + image: true +``` + +## How It Works + +Straitly is an entry in Docker Agent's built-in provider catalog +(`pkg/model/provider/catalog/providers.json`) that uses the existing OpenAI +implementation: + +- **API type:** OpenAI-compatible Chat Completions (`openai_chatcompletions`) +- **Base URL:** `https://api.straitly.ai/v1` +- **Token variable:** `STRAITLY_API_KEY` + +Claude models are callable through this alias like any other model. Use the ID +exactly as `/v1/models` returns it. + +## Example: Code Assistant + +```yaml +agents: + coder: + model: straitly/deepseek/deepseek-v4-1-flash + description: Code assistant using Straitly + instruction: | + You are an expert programmer. + Write clean code and follow language best practices. + toolsets: + - type: filesystem + - type: shell + - type: think +``` diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/together/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/together/index.md index 4cd5acd3dddf..ac28c4bf9b02 100644 --- a/_vendor/github.com/docker/docker-agent/docs/providers/together/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/providers/together/index.md @@ -6,8 +6,6 @@ weight: 250 canonical: https://docs.docker.com/ai/docker-agent/providers/together/ --- -_Use Together AI models with Docker Agent._ - ## Overview [Together AI](https://www.together.ai/) is one of the largest hosts of open @@ -30,25 +28,21 @@ Use the provider ID `togetherai`. The legacy ID `together` is also accepted. ### Inline Syntax -The simplest way to use Together AI: - ```yaml agents: root: - model: togetherai/meta-llama/Llama-3.3-70B-Instruct-Turbo + model: togetherai/Qwen/Qwen3.7-Plus description: Assistant using Together AI instruction: You are a helpful assistant. ``` ### Named Model -For more control over parameters: - ```yaml models: together_model: provider: togetherai - model: meta-llama/Llama-3.3-70B-Instruct-Turbo + model: Qwen/Qwen3.7-Plus temperature: 0.7 max_tokens: 8192 @@ -67,9 +61,9 @@ current model IDs, context limits, and pricing. | Model | Description | | --- | --- | -| `meta-llama/Llama-3.3-70B-Instruct-Turbo` | Llama 3.3 70B, general-purpose chat and tool calling | -| `Qwen/Qwen3-235B-A22B-Instruct-2507-tput` | Qwen3 235B mixture-of-experts instruct model | -| `deepseek-ai/DeepSeek-V3` | DeepSeek-V3, strong coding and reasoning | +| `Qwen/Qwen3.7-Plus` | Qwen3.7 Plus, general-purpose chat and tool calling | +| `zai-org/GLM-5.3` | GLM-5.3, strong coding and reasoning | +| `deepseek-ai/DeepSeek-V4.1-Flash` | DeepSeek V4.1 Flash, fast coding and reasoning with vision | > Model IDs are case-sensitive and must be passed exactly as the catalogue lists > them. diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/vercel/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/vercel/index.md index 49de22e42c26..d700ea381546 100644 --- a/_vendor/github.com/docker/docker-agent/docs/providers/vercel/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/providers/vercel/index.md @@ -6,8 +6,6 @@ weight: 260 canonical: https://docs.docker.com/ai/docker-agent/providers/vercel/ --- -_Use Vercel AI Gateway models with Docker Agent._ - ## Overview [Vercel AI Gateway](https://vercel.com/docs/ai-gateway) is a single, unified @@ -35,8 +33,6 @@ only (`openai/gpt-5.6-sol`, `-terra`, `-luna`) — there is no unsuffixed ### Inline Syntax -The simplest way to use Vercel AI Gateway: - ```yaml agents: root: @@ -47,8 +43,6 @@ agents: ### Named Model -For more control over parameters: - ```yaml models: vercel_model: diff --git a/_vendor/github.com/docker/docker-agent/docs/providers/xai/index.md b/_vendor/github.com/docker/docker-agent/docs/providers/xai/index.md index 7ba9de38180f..9b74e2a49818 100644 --- a/_vendor/github.com/docker/docker-agent/docs/providers/xai/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/providers/xai/index.md @@ -6,8 +6,6 @@ weight: 270 canonical: https://docs.docker.com/ai/docker-agent/providers/xai/ --- -_Use xAI's Grok models with Docker Agent._ - ## Overview xAI provides the Grok family of models through an OpenAI-compatible API. Docker Agent includes built-in support for xAI as an alias provider. @@ -25,8 +23,6 @@ xAI provides the Grok family of models through an OpenAI-compatible API. Docker ### Inline Syntax -The simplest way to use xAI: - ```yaml agents: root: @@ -37,8 +33,6 @@ agents: ### Named Model -For more control over parameters: - ```yaml models: grok: diff --git a/_vendor/github.com/docker/docker-agent/docs/tools/a2a/index.md b/_vendor/github.com/docker/docker-agent/docs/tools/a2a/index.md index 1b3315565cc2..900d26c691d9 100644 --- a/_vendor/github.com/docker/docker-agent/docs/tools/a2a/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/tools/a2a/index.md @@ -7,8 +7,6 @@ weight: 60 canonical: https://docs.docker.com/ai/docker-agent/tools/a2a/ --- -_Connect to remote agents via the Agent-to-Agent protocol._ - ## Overview The A2A tool connects to a remote agent exposed over the A2A (Agent-to-Agent) protocol. Unlike [`handoff`](../handoff/index.md), which only targets local agents declared in the same config, `a2a` reaches out to an agent running on the network. diff --git a/_vendor/github.com/docker/docker-agent/docs/tools/api/index.md b/_vendor/github.com/docker/docker-agent/docs/tools/api/index.md index 7fd09a30fd79..ebc859c725cb 100644 --- a/_vendor/github.com/docker/docker-agent/docs/tools/api/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/tools/api/index.md @@ -7,8 +7,6 @@ weight: 240 canonical: https://docs.docker.com/ai/docker-agent/tools/api/ --- -_Create custom tools that call HTTP APIs._ - ## Overview The API tool type lets you define custom tools that make HTTP requests to external APIs. This is useful for integrating agents with REST APIs, webhooks, or any HTTP-based service without writing code. @@ -69,9 +67,13 @@ The `api` toolset accepts the following toolset-level fields in addition to the ## HTTP Methods +Only `method: GET` carries the read-only hint. Other methods are classified as `unknown`: absent overriding permissions or hooks, Restricted mode denies them, while Balanced and the legacy/default mode require confirmation. For trusted unattended POST calls, use a narrowly scoped [allow rule](../../configuration/permissions/index.md). Non-GET tools are excluded when the agent or toolset sets `readonly: true`. + +Read-only classification is not a confidentiality guarantee: GET parameters are sent to the endpoint in the URL. Use trusted endpoints and appropriate data-access and egress controls. + ### GET Requests -For GET requests, parameters are interpolated into the URL: +For GET requests, parameters are interpolated into the URL. Declare GET arguments as strings, including numeric query parameters; the GET handler decodes arguments into a string map: ```yaml toolsets: @@ -86,9 +88,9 @@ toolsets: type: string description: Search query limit: - type: integer - description: Maximum results (default 10) - required: ["query"] + type: string + description: Maximum number of results + required: ["query", "limit"] ``` ### POST Requests diff --git a/_vendor/github.com/docker/docker-agent/docs/tools/background-agents/index.md b/_vendor/github.com/docker/docker-agent/docs/tools/background-agents/index.md index 6e8840313c9f..d062b226e253 100644 --- a/_vendor/github.com/docker/docker-agent/docs/tools/background-agents/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/tools/background-agents/index.md @@ -7,8 +7,6 @@ weight: 90 canonical: https://docs.docker.com/ai/docker-agent/tools/background-agents/ --- -_Dispatch work to sub-agents concurrently and collect results asynchronously._ - ## Overview The background agents tool lets an orchestrator dispatch work to sub-agents concurrently and collect results asynchronously. Unlike [transfer_task](../transfer-task/index.md) (which blocks until the sub-agent finishes), background agent tasks run in parallel — the orchestrator can start several tasks, do other work, and check on them later. @@ -30,6 +28,7 @@ The background agents tool lets an orchestrator dispatch work to sub-agents conc | `agent` | string | ✓ | Name of the sub-agent to run. Must be listed under the caller's `sub_agents`. | | `task` | string | ✓ | Clear, concise description of the task the sub-agent should achieve. | | `expected_output` | string | ✗ | Optional description of the result format the caller expects. | +| `worktree` | bool | ✗ | Create an isolated Git checkout and branch for this task. Default `false`. | `run_background_agent` returns a **task ID** string. Tools run by the sub-agent inherit the parent session's permissions. Because background tasks run non-interactively, any tool call that would normally prompt the user for approval will be automatically denied. To allow background agents to run mutating tools, you must explicitly approve them in the parent session (e.g. via YOLO mode or explicit allow rules). @@ -66,7 +65,43 @@ A timeout returns available results and live output without stopping unfinished A stopped task can have `done: false` while its execution is still shutting down. The join waits for execution to exit, not just for the stop request to be acknowledged. Unknown or pruned IDs are reported individually as `status: "not_found"`, leave `all_done` false, and make the result a tool error; other requested tasks are still joined. Completed tasks may be pruned when the task-history limit is reached, so collect their results before dispatching many more tasks. -This is a synchronization tool, not workspace isolation: concurrent coding agents still need separate workspaces to avoid conflicting edits. +## Isolated coding tasks + +Set `worktree: true` to run concurrent coding tasks without sharing a checkout: + +```json +{"agent": "coder", "task": "Implement the backend change and commit it", "worktree": true} +``` + +This works when the calling session is in a Git repository **or an existing Git worktree**. Each task gets a fresh branch from that checkout's current `HEAD`, not the repository's default branch. Uncommitted and untracked files are **not copied**, except for gitignored files selected by the source repository's [`.worktreeinclude`](../../features/cli/index.md#copy-ignored-files-into-worktrees); commit shared starting changes before dispatching tasks. Copied ignored files can be lost when a worktree is removed and do not propagate back to the source. A missing repository or a failed setup is reported as a failed task. + +The child gets fresh toolsets and hooks rooted in its checkout; the parent's tools and process working directory are unchanged. Blocking delegations (`transfer_task` and forked skills) inherit the isolated workspace. Nested background dispatch is rejected: start parallel worktree tasks from the top-level orchestrator. Model clients are reused, and tasks share the parent's run budget and inherit its safety policy and permissions. Configured `worktree_create` hooks run before tools and skills are loaded, so setup-created ignore files and directories take effect. + +`list_background_agents` and `view_background_agent` report the checkout path, branch, and base commit once creation finishes. `wait_background_agents` includes them as `worktree`, `branch`, and `base_commit`, independently of truncated output and whether the task succeeded. + +### Review and merge at the top level + +1. Start all independent tasks with `worktree: true`. Describe files relative to the repository. The child is instructed to translate source-checkout paths to its own checkout; the child is instructed to treat attached files as read-only inputs at their original paths. +2. Have each child commit its changes on its own branch, following the project's signing policy. No commits are made automatically. +3. Wait for all tasks, check each status, and review each branch's diff. +4. Merge branches **one at a time** from the parent checkout, resolve conflicts, and run the combined tests. For example: + + ```sh + git diff HEAD...worktree-agent- + git merge --no-edit worktree-agent- + ``` + +5. After integrating the work, remove the now-unneeded checkout and branch: + + ```sh + git worktree remove /path/reported/by/the/task + git branch -d worktree-agent- + ``` + +Worktrees and branches are **retained**, including after failure, cancellation, and runtime shutdown. Uncommitted changes cannot be merged with `git merge`; inspect and commit them first. Never remove a task's checkout while it or its descendants are still running. Save the reported paths before task history is pruned. + +> [!NOTE] +> Worktrees isolate checkouts, not permissions or arbitrary external side effects. Explicit absolute tool/hook directories, external services, and shared Git configuration remain shared. External harness agents do not yet support `worktree: true`; their drivers currently inherit the process directory. Programmatic agents need a working-directory factory; configuration-loaded native agents supply one automatically. Adding tools after loading invalidates that factory unless the host supplies a replacement. Shared plans, shared todos, and default persistent memory remain shared intentionally. RAG indexes are scoped to the workspace unless an explicit database path selects shared storage. ## Configuration @@ -117,7 +152,7 @@ Background agents work equally well with [harness-backed sub-agents](../../featu ```yaml agents: root: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: Orchestrator that fans out coding tasks instruction: | Dispatch the frontend and backend tasks in parallel, diff --git a/_vendor/github.com/docker/docker-agent/docs/tools/background-jobs/index.md b/_vendor/github.com/docker/docker-agent/docs/tools/background-jobs/index.md index c4f637901bba..191c276d8b91 100644 --- a/_vendor/github.com/docker/docker-agent/docs/tools/background-jobs/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/tools/background-jobs/index.md @@ -7,8 +7,6 @@ weight: 21 canonical: https://docs.docker.com/ai/docker-agent/tools/background-jobs/ --- -_Run and manage long-running shell commands._ - ## Overview The `background_jobs` toolset starts shell commands that should keep running while the agent continues with other work, such as local servers, file watchers, long builds, or test suites. It returns a job ID immediately, captures combined stdout/stderr up to 10 MB per job, and terminates all running jobs when the agent session ends. diff --git a/_vendor/github.com/docker/docker-agent/docs/tools/datetime/index.md b/_vendor/github.com/docker/docker-agent/docs/tools/datetime/index.md index 6e792c792d95..e5f1068a9178 100644 --- a/_vendor/github.com/docker/docker-agent/docs/tools/datetime/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/tools/datetime/index.md @@ -7,8 +7,6 @@ weight: 146 canonical: https://docs.docker.com/ai/docker-agent/tools/datetime/ --- -_Obtain the current date, time, or datetime in a model-chosen format._ - ## Overview The `datetime` toolset exposes one read-only tool, `get_datetime`. It reads the diff --git a/_vendor/github.com/docker/docker-agent/docs/tools/environment/index.md b/_vendor/github.com/docker/docker-agent/docs/tools/environment/index.md index 8709c9d36419..baf8801fa2f2 100644 --- a/_vendor/github.com/docker/docker-agent/docs/tools/environment/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/tools/environment/index.md @@ -7,8 +7,6 @@ weight: 145 canonical: https://docs.docker.com/ai/docker-agent/tools/environment/ --- -_Report the OS and resolved shell so the model can pick the right syntax._ - ## Overview The environment tool exposes a single read-only call — `get_environment_info` — that returns the operating system and the resolved shell that will run shell-tool commands, e.g. `{"os":"Windows","shell":"powershell"}`. diff --git a/_vendor/github.com/docker/docker-agent/docs/tools/fetch/index.md b/_vendor/github.com/docker/docker-agent/docs/tools/fetch/index.md index a6d967f756f7..01fd402e78a7 100644 --- a/_vendor/github.com/docker/docker-agent/docs/tools/fetch/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/tools/fetch/index.md @@ -7,8 +7,6 @@ weight: 50 canonical: https://docs.docker.com/ai/docker-agent/tools/fetch/ --- -_Read content from HTTP/HTTPS URLs._ - ## Overview The fetch tool lets agents retrieve content from one or more HTTP/HTTPS URLs. It is **read-only** — only `GET` requests are supported. The tool respects `robots.txt`, limits response size (1 MB per URL), and can return content as plain text, Markdown (converted from HTML), or raw HTML. diff --git a/_vendor/github.com/docker/docker-agent/docs/tools/file/index.md b/_vendor/github.com/docker/docker-agent/docs/tools/file/index.md index 520bb1f87d47..0a2688f4b93d 100644 --- a/_vendor/github.com/docker/docker-agent/docs/tools/file/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/tools/file/index.md @@ -7,8 +7,6 @@ weight: 9 canonical: https://docs.docker.com/ai/docker-agent/tools/file/ --- -_Read, write, and edit individual files without exposing directory or search operations._ - ## Overview The file toolset is a focused subset of the [filesystem toolset](../filesystem/index.md). It reuses the filesystem implementations and exposes only these tools: @@ -47,5 +45,5 @@ toolsets: - ".env" post_edit: - path: "*.go" - cmd: "gofmt -w ${file}" + cmd: 'gofmt -w "${file}"' ``` diff --git a/_vendor/github.com/docker/docker-agent/docs/tools/filesystem/index.md b/_vendor/github.com/docker/docker-agent/docs/tools/filesystem/index.md index e80aff67c352..59b54a699d6c 100644 --- a/_vendor/github.com/docker/docker-agent/docs/tools/filesystem/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/tools/filesystem/index.md @@ -7,8 +7,6 @@ weight: 10 canonical: https://docs.docker.com/ai/docker-agent/tools/filesystem/ --- -_Read, write, list, search, and navigate files and directories._ - ## Overview The filesystem tool gives agents the ability to explore codebases, read and edit files, create new files, search across files, and navigate directory structures. @@ -57,6 +55,8 @@ The `edit_file` tool applies a sequence of find-and-replace edits to a file in m An empty `oldText` is never a meaningful edit: Go's `strings.Contains(s, "")` is always `true`, and `strings.Replace(s, "", new, 1)` silently inserts at offset 0. Without validation, this would prepend content to the file while still reporting success. The tool now returns an explicit error ("oldText must not be empty") when an edit has an empty `oldText`, and no changes are written to disk. +Each `oldText` must also match exactly once in the content produced by any earlier edits in the same call. Matches are counted at every start offset, so overlapping matches count separately. An `oldText` that is not found, or that matches more than once, is rejected with an error and the file is left unchanged; add surrounding context to make it unique. + When a sequence contains multiple edits and a later one is rejected, the entire operation fails and the file is left untouched — edits are applied in memory and only written once at the end, so partial application is not possible. ## Configuration @@ -119,7 +119,7 @@ restriction visible to the model so it can adjust its plan. ### Post-Edit Hooks -Automatically run formatting, linting, or other commands after the agent edits a file. The command fires once per file after each edit operation (`write_file` and `edit_file`). Use `${file}` as a placeholder for the absolute path of the edited file. +Automatically run formatting, linting, or other commands after the agent edits a file. The command fires once per file after each edit operation (`write_file` and `edit_file`). The command receives the absolute path in the `file` environment variable. With a POSIX shell, use `"${file}"` to preserve spaces and shell metacharacters in the path; use the corresponding environment-variable syntax for other shells. ```yaml toolsets: @@ -127,17 +127,17 @@ toolsets: ignore_vcs: false post_edit: - path: "*.go" - cmd: "gofmt -w ${file}" + cmd: 'gofmt -w "${file}"' - path: "*.ts" - cmd: "prettier --write ${file}" + cmd: 'prettier --write "${file}"' - path: "src/*/*.py" - cmd: "black ${file}" + cmd: 'black "${file}"' ``` | Property | Type | Description | | --- | --- | --- | | `path` | string | Glob pattern matched against the file path. `*.go` matches any `.go` file; `src/*/*.ts` matches `.ts` files inside `src/`. | -| `cmd` | string | Shell command to run. `${file}` expands to the absolute path of the just-edited file. | +| `cmd` | string | Shell command to run. The `file` environment variable contains the absolute path of the just-edited file; quote its expansion using your shell's syntax. | Post-edit commands run with the same working directory as the agent. If a command exits non-zero, the tool reports that the write or edit succeeded but the post-edit command failed. The edit is not rolled back. diff --git a/_vendor/github.com/docker/docker-agent/docs/tools/git/index.md b/_vendor/github.com/docker/docker-agent/docs/tools/git/index.md index 9568b7508dfa..a5402ccce17c 100644 --- a/_vendor/github.com/docker/docker-agent/docs/tools/git/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/tools/git/index.md @@ -7,14 +7,10 @@ weight: 125 canonical: https://docs.docker.com/ai/docker-agent/tools/git/ --- -_Read-only inspection of the working git repository._ - ## Overview The git toolset gives an agent structured, **read-only** access to the working repository — status, history, branches, a commit's changes, and line-level authorship. It is implemented with go-git, so it needs **no `git` binary**. -Compared with running `git` through the `shell` tool, the git toolset returns clean, structured output the model can read reliably, is **safe by construction** (no command can modify the repository), and works even when `shell` is disabled or no `git` binary is installed. - > [!NOTE] > The git toolset is read-only. To stage, commit, or check out, use the [`shell`](../shell/index.md) tool. @@ -93,8 +89,3 @@ On branch master 1 changed file(s) [XY = staged/worktree; M=modified A=added D=deleted R=renamed ?=untracked]: M main.go ``` - -> [!TIP] -> **When to use** -> -> Use the git toolset whenever the agent needs repository context — before editing, to review recent history, or to find who last touched a line — without exposing the writable `shell` surface. diff --git a/_vendor/github.com/docker/docker-agent/docs/tools/handoff/index.md b/_vendor/github.com/docker/docker-agent/docs/tools/handoff/index.md index 4375be03daac..453a61166e97 100644 --- a/_vendor/github.com/docker/docker-agent/docs/tools/handoff/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/tools/handoff/index.md @@ -7,8 +7,6 @@ weight: 70 canonical: https://docs.docker.com/ai/docker-agent/tools/handoff/ --- -_Hand off the active conversation to another local agent defined in the same config._ - ## Overview The `handoff` tool lets an agent transfer control of the **current conversation** to another agent in the **same config file**. Unlike [`transfer_task`](../transfer-task/index.md), which delegates a sub-task and collects the result, `handoff` rewires the session so the receiving agent continues the conversation directly with the user. diff --git a/_vendor/github.com/docker/docker-agent/docs/tools/lsp/index.md b/_vendor/github.com/docker/docker-agent/docs/tools/lsp/index.md index 97adbadeff5b..c0b3b39a551f 100644 --- a/_vendor/github.com/docker/docker-agent/docs/tools/lsp/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/tools/lsp/index.md @@ -7,8 +7,6 @@ weight: 220 canonical: https://docs.docker.com/ai/docker-agent/tools/lsp/ --- -_Connect to Language Server Protocol servers for code intelligence._ - ## Overview The LSP tool connects your agent to any Language Server Protocol (LSP) server, providing comprehensive code intelligence capabilities like go-to-definition, find references, diagnostics, and more. @@ -45,7 +43,7 @@ The LSP toolset provides these tools to the agent: ```yaml agents: developer: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: Code developer with LSP support instruction: You are a software developer. toolsets: @@ -63,7 +61,7 @@ agents: | ------------- | ------ | -------- | ---------------------------------------------------------------------------------------------------------------------------- | | `command` | string | ✓ | LSP server executable command | | `args` | array | ✗ | Command-line arguments for the LSP server | -| `env` | object | ✗ | Environment variables for the LSP process | +| `env` | object | ✗ | Environment variables for the LSP process. When a key is also set in the host environment, the value from `env` wins. | | `file_types` | array | ✗ | File extensions this LSP handles (e.g., `[".go", ".mod"]`) | | `working_dir` | string | ✗ | Working directory for the LSP server process. Relative paths are resolved against the agent's working directory. Defaults to the agent's working directory when omitted. | | `version` | string | ✗ | Package reference for [auto-installing](../../configuration/tools/index.md#auto-installing-tools) the command binary | @@ -136,7 +134,7 @@ You can configure multiple LSP servers for different file types: ```yaml agents: polyglot: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: Multi-language developer instruction: You are a full-stack developer. toolsets: @@ -197,7 +195,7 @@ Available Capabilities: LSP toolsets are managed by the same supervisor as MCP toolsets, so a crashed `gopls` (or any other language server) is reconnected automatically with exponential backoff. Use the [`lifecycle`](../../configuration/tools/index.md#toolset-lifecycle) block to tune the policy per toolset — for example, mark `gopls` as `strict` if your CI flow requires it to be available, or use `/toolset-restart gopls` from the TUI to force a reconnect when the server gets stuck. -**Startup failure behaviour:** missing-binary and bad-config failures fail fast — each turn retries immediately with no artificial delay. A language server that crash-loops (3 crashes within 1 minute, by default) is different: the supervisor stops auto-restarting and reports the loop instead. The next attempt to use the toolset (a turn's start, a tool call, or `/toolset-restart`) surfaces that report rather than relaunching the server, and the backoff gate then paces subsequent attempts (15s, doubling up to 5 minutes) the same way it paces a rate-limited MCP server — so a server that dies right after every restart no longer relaunches at full speed. This applies regardless of `profile`: even a `strict` toolset is retried on the next turn once its window elapses, rather than staying down until an explicit `/toolset-restart`. +**Startup failure behaviour:** missing-binary and bad-config failures fail fast — each turn retries immediately with no artificial delay. A language server that crash-loops (3 crashes within 1 minute, by default) is different: the supervisor stops auto-restarting and reports the loop instead. The next attempt to use the toolset (a turn's start, a tool call, or `/toolset-restart`) surfaces that report rather than relaunching the server, and the backoff gate then paces subsequent attempts (15s, doubling up to 5 minutes) the same way it paces a rate-limited MCP server. This applies regardless of `profile`: even a `strict` toolset is retried on the next turn once its window elapses, rather than staying down until an explicit `/toolset-restart`. ```yaml toolsets: diff --git a/_vendor/github.com/docker/docker-agent/docs/tools/mcp-catalog/index.md b/_vendor/github.com/docker/docker-agent/docs/tools/mcp-catalog/index.md index d395a3ef6de7..09912e61f4ef 100644 --- a/_vendor/github.com/docker/docker-agent/docs/tools/mcp-catalog/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/tools/mcp-catalog/index.md @@ -7,8 +7,6 @@ weight: 120 canonical: https://docs.docker.com/ai/docker-agent/tools/mcp-catalog/ --- -_Let the agent discover and activate remote MCP servers from the Docker MCP Catalog on demand._ - ## Overview The `mcp_catalog` toolset gives an agent access to a curated subset of the [Docker MCP Catalog](https://hub.docker.com/search?q=&type=mcp) — every server in this subset is reachable over the **streamable-http** transport, so Docker Agent can talk to it directly without the MCP gateway or a local subprocess. @@ -84,7 +82,7 @@ Servers that require a caller-provided API key are intentionally excluded from t ```yaml agents: root: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: Agent that can on-demand connect to remote MCP servers from the Docker MCP Catalog. instruction: | You can discover and activate remote MCP servers on demand. diff --git a/_vendor/github.com/docker/docker-agent/docs/tools/mcp/index.md b/_vendor/github.com/docker/docker-agent/docs/tools/mcp/index.md index 408d4696729b..fa67a37eb4e0 100644 --- a/_vendor/github.com/docker/docker-agent/docs/tools/mcp/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/tools/mcp/index.md @@ -9,8 +9,6 @@ aliases: - /ai/docker-agent/integrations/mcp/ --- -_Extend agents with external tools via the Model Context Protocol (MCP)._ - ## Overview The `mcp` toolset connects your agent to any MCP server — a process or remote service that exposes tools, resources, and prompts over the [Model Context Protocol](https://modelcontextprotocol.io/). Three flavours are supported: @@ -68,7 +66,7 @@ toolsets: | `command` | string | Command to execute the MCP server. | | `args` | array | Command arguments. | | `tools` | array | Optional whitelist — only expose these tools. | -| `env` | object | Environment variables (key-value pairs). | +| `env` | object | Environment variables (key-value pairs) for the server process. The process also inherits the host environment; when a key is set in both, the value from `env` wins. | | `working_dir` | string | Working directory for the MCP server process. Relative paths are resolved against the agent's working directory. Defaults to the agent's working directory when omitted. Supports `${env.VAR}` (canonical), plus `~` and shell-style `$VAR`/`${VAR}` expansion ([details](../../configuration/overview/index.md#variable-expansion-in-config-fields)). | | `instruction` | string | Custom instructions injected into the agent's context. | | `version` | string | Package reference for [auto-installing](../../configuration/tools/index.md#auto-installing-tools) the command binary. | @@ -101,6 +99,7 @@ toolsets: | `remote.transport_type` | string | `streamable` or `sse`. | | `remote.headers` | object | HTTP headers sent on every request. Values support `${env.VAR}` and `${headers.NAME}` placeholders, resolved per request. See [Remote MCP Servers](../../features/remote-mcp/index.md#configuration) for details. | | `remote.oauth` | object | Explicit OAuth client credentials for servers that don't support DCR. See [Remote MCP Servers](../../features/remote-mcp/index.md#oauth-for-servers-without-dynamic-client-registration). | +| `remote.standalone_sse` | boolean | Open the streamable-HTTP standalone SSE `GET` stream (default `false`). Enable for gateways that send keepalive pings or `notifications/tools/list_changed` and close sessions they cannot reach, such as the sbx MCP gateway. Ignored for `sse`. | | `allow_private_ips` | boolean | Permit remote MCP OAuth helper requests to dial non-public IP addresses. Use only for trusted internal servers. | For a curated list of public remote MCP endpoints (Linear, GitHub, Vercel, Notion, …) and full OAuth configuration details, see [Remote MCP Servers](../../features/remote-mcp/index.md). @@ -109,7 +108,7 @@ When Docker Desktop is running, eligible MCP OAuth discovery, token, and helper ## MCP Prompts -MCP servers can expose **prompts** — named, parameterized templates that the server provides via the `/prompts` endpoint. Docker Agent discovers these at toolset startup and registers them as **slash commands** in the TUI, so you can invoke them directly from the input box. +MCP servers can expose **prompts** — named, parameterized templates that the server provides via the `prompts/list` and `prompts/get` protocol methods. Docker Agent discovers these at toolset startup and registers them as **slash commands** in the TUI, so you can invoke them directly from the input box. ```text # Type / to see available prompts alongside built-in commands @@ -126,7 +125,7 @@ MCP servers can expose **prompts** — named, parameterized templates that the s - When no argument is needed or all required arguments are supplied, the prompt runs immediately. > [!NOTE] -> MCP prompt discovery requires a YAML-declared `mcp` toolset. Prompts from servers activated through the [Docker MCP Catalog](../../tools/mcp-catalog/index.md) (`ref: docker:`) are not currently surfaced. +> MCP prompt discovery requires a YAML-declared `mcp` toolset. Prompts from servers activated through the [Docker MCP Catalog](../../tools/mcp-catalog/index.md) (`type: mcp_catalog`, activated with `enable_remote_mcp_server`) are not currently surfaced. YAML-declared `type: mcp` entries with `ref: docker:` do participate in prompt discovery. ## Embedded Resources @@ -134,7 +133,7 @@ MCP tool results can include embedded resources — images, PDFs, and text files - **Anthropic** — images become `image` blocks in the `tool_result`; PDFs and other documents become `document` blocks. - **OpenAI** — images are forwarded as `input_image` data URIs; PDFs as `input_file` data URIs in the tool result content. -- **OpenAI Chat Completions** (`api_type: openai_chatcompletions`, the default, and OpenAI-compatible providers) — tool messages only accept text, so images (including image documents) are sent as text in the tool message as their data URI or URL. PDFs and other documents are attached in a follow-up user message labeled "Attached content from tool result:". +- **OpenAI Chat Completions** (`api_type: openai_chatcompletions`, selected automatically for models without Responses API support or set explicitly) — tool messages only accept text, so images (including image documents) are sent as text in the tool message as their data URI or URL. PDFs and other documents are attached in a follow-up user message labeled "Attached content from tool result:". - **Bedrock** and **Gemini** — receive equivalent provider-native representations. No configuration is required. When an MCP server returns an embedded resource alongside its text output, the resource is automatically attached and sent to the model on the next turn. This is useful for MCP servers that generate charts, export PDFs, or return binary data as part of their responses. @@ -221,7 +220,7 @@ mcps: agents: root: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: Full-featured developer assistant instruction: You are an expert developer. toolsets: diff --git a/_vendor/github.com/docker/docker-agent/docs/tools/memory/index.md b/_vendor/github.com/docker/docker-agent/docs/tools/memory/index.md index 1e5671a304ea..5a34fb3dc5e4 100644 --- a/_vendor/github.com/docker/docker-agent/docs/tools/memory/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/tools/memory/index.md @@ -7,8 +7,6 @@ weight: 100 canonical: https://docs.docker.com/ai/docker-agent/tools/memory/ --- -_Persistent key-value storage backed by SQLite for cross-session recall._ - ## Overview The memory tool provides persistent key-value storage backed by SQLite. Data survives across sessions, allowing agents to remember facts, user preferences, project context, and past decisions. Memories can be organized with categories and searched by keyword. @@ -54,6 +52,3 @@ Memories support an optional `category` field for organization and filtering. Co - `fact` — Factual information about the project or user - `project` — Project-specific context - `decision` — Past decisions and their rationale - -> [!TIP] -> Memory is especially useful for long-running assistants that need to recall information across conversations — like coding preferences, project conventions, or context discovered during previous sessions. diff --git a/_vendor/github.com/docker/docker-agent/docs/tools/model-picker/index.md b/_vendor/github.com/docker/docker-agent/docs/tools/model-picker/index.md index 0c0d4613021c..2a5cf170c635 100644 --- a/_vendor/github.com/docker/docker-agent/docs/tools/model-picker/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/tools/model-picker/index.md @@ -7,8 +7,6 @@ weight: 200 canonical: https://docs.docker.com/ai/docker-agent/tools/model-picker/ --- -_Let the agent pick between several models per turn._ - ## Overview The model picker tool gives an agent the ability to dynamically choose which model to use for each turn of the conversation. This is useful when you want the agent to route different types of requests to different models — for example, using a fast, inexpensive model for simple queries and a more capable model for complex reasoning tasks. @@ -20,7 +18,7 @@ toolsets: - type: model_picker models: - openai/gpt-5-mini - - anthropic/claude-sonnet-4-5 + - anthropic/claude-sonnet-5-5 - openai/gpt-5 ``` @@ -42,20 +40,15 @@ agents: model: openai/gpt-5-mini # Default model instruction: | You are a helpful assistant. For simple questions, use gpt-5-mini. - For complex reasoning or coding tasks, switch to claude-sonnet-4-5 or gpt-5. + For complex reasoning or coding tasks, switch to claude-sonnet-5-5 or gpt-5. toolsets: - type: model_picker models: - openai/gpt-5-mini - - anthropic/claude-sonnet-4-5 + - anthropic/claude-sonnet-5-5 - openai/gpt-5 ``` -> [!TIP] -> **Cost optimization** -> -> The model picker tool is particularly useful for cost optimization: let the agent use a cheap model by default and only escalate to expensive models when necessary. - ## Tool Interface The toolset exposes two tools: diff --git a/_vendor/github.com/docker/docker-agent/docs/tools/open-url/index.md b/_vendor/github.com/docker/docker-agent/docs/tools/open-url/index.md index b2a97dd44b36..24122dd7bbfb 100644 --- a/_vendor/github.com/docker/docker-agent/docs/tools/open-url/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/tools/open-url/index.md @@ -7,8 +7,6 @@ weight: 40 canonical: https://docs.docker.com/ai/docker-agent/tools/open-url/ --- -_Open a fixed URL in the user's default browser._ - ## Overview The `open_url` toolset exposes a single, argument-less tool that opens a URL diff --git a/_vendor/github.com/docker/docker-agent/docs/tools/openapi/index.md b/_vendor/github.com/docker/docker-agent/docs/tools/openapi/index.md index c98a703c1b01..75d91f8ed567 100644 --- a/_vendor/github.com/docker/docker-agent/docs/tools/openapi/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/tools/openapi/index.md @@ -7,8 +7,6 @@ weight: 230 canonical: https://docs.docker.com/ai/docker-agent/tools/openapi/ --- -_Automatically generate tools from an OpenAPI specification._ - ## Overview The OpenAPI tool fetches an OpenAPI 3.x specification from a URL and creates one tool per API operation. Each endpoint's parameters, request body, and description are translated into a callable tool that the agent can invoke directly. diff --git a/_vendor/github.com/docker/docker-agent/docs/tools/plan/index.md b/_vendor/github.com/docker/docker-agent/docs/tools/plan/index.md index 53076c4c43ba..fa838283e749 100644 --- a/_vendor/github.com/docker/docker-agent/docs/tools/plan/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/tools/plan/index.md @@ -7,13 +7,11 @@ weight: 150 canonical: https://docs.docker.com/ai/docker-agent/tools/plan/ --- -_Shared persistent scratchpad for multi-agent collaboration._ - ## Overview -The plan tool gives agents a shared, persistent scratchpad of named documents. Any agent in a multi-agent config that loads the `plan` toolset can read and write the same plans, and those plans survive across sessions. This makes it straightforward to wire a planner agent that sketches work and one or more executor agents that consume it without any custom tool wiring. +The plan tool gives agents a shared, persistent scratchpad of named documents. Any agent in a multi-agent config that loads the `plan` toolset can read and write the same plans, and those plans survive across sessions. -Plans are stored as JSON files in the Docker Agent data directory (`~/.cagent/plans/` by default). Agents that share a process serialize on a single mutex, and every write or delete additionally holds an advisory lock on a sentinel file in the plans directory, so writers in *separate* Docker Agent processes are serialized too: concurrent edits can never silently overwrite each other, and a stale revision always fails with a deterministic version conflict. Writes are atomic (temp file + rename), so a reader never observes partial content. +Plans are stored as JSON files in the Docker Agent data directory (`~/.cagent/plans/` by default). Agents that share a process serialize on a single mutex, and every write or delete additionally holds an advisory lock on a sentinel file in the plans directory, so writers in *separate* Docker Agent processes are serialized too: a stale revision fails with a deterministic version conflict when the caller supplies `last_known_revision`. Without that guard, updates are last-writer-wins. Writes are atomic (temp file + rename), so a reader never observes partial content. ## Configuration @@ -93,14 +91,14 @@ Two agents collaborate on a shared plan — the architect drafts it and the buil ```yaml agents: root: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: Coordinator instruction: | Route work between the architect and the builder. handoffs: [architect, builder] architect: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: Drafts high-level plans instruction: | Use list_plans and read_plan to inspect existing plans, then write_plan diff --git a/_vendor/github.com/docker/docker-agent/docs/tools/rag/index.md b/_vendor/github.com/docker/docker-agent/docs/tools/rag/index.md index 6563e75390e4..957dcbd32240 100644 --- a/_vendor/github.com/docker/docker-agent/docs/tools/rag/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/tools/rag/index.md @@ -11,6 +11,12 @@ aliases: _Give your agents access to document knowledge bases with background indexing, multiple retrieval strategies, and hybrid search._ +> Relative document and database paths resolve from the agent's working directory +> (or the configuration directory when no working directory is set). Default +> database files are stored under the data directory, scoped by workspace, so +> isolated worktrees do not mix indexed documents. Explicit absolute database +> paths retain their sharing semantics. + ## Overview The `rag` toolset lets agents search through your documents to find relevant information before responding. Knowledge bases are declared once at the top of the config under `rag:` and then referenced from any agent via `type: rag, ref: `. Docker Agent supports: @@ -60,14 +66,20 @@ loaded with different credentials, gets its own index. Background indexing for a shared knowledge base is not attributed to any session. ```yaml +rag: + my_docs: + docs: [./documents] + strategies: + - type: bm25 + agents: researcher: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 toolsets: - type: rag ref: my_docs # shares one index... writer: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 toolsets: - type: rag ref: my_docs # ...with this reference @@ -201,7 +213,7 @@ chunking: > [!NOTE] > **Language Support** > -> Currently supports Go (`.go`) files. More languages will be added. Falls back to plain text chunking for unsupported file types. +> Supports Go (`.go`) files. Falls back to plain text chunking for unsupported file types. ## Indexing failures, retries and backoff @@ -224,9 +236,7 @@ on the failure: file in the run is successfully indexed** — every attempted file hit one of these retryable statuses — the run treats that as a sustained backend failure rather than a one-off hiccup, and surfaces the error so the gate - arms on the next turn (fixed in - [#4097](https://github.com/docker/docker-agent/issues/4097); previously - only 429 reached the gate). + arms on the next turn. | Failure kind | Behaviour | |---|---| @@ -272,11 +282,8 @@ Starting any toolset — RAG included — is bounded by a 30-second *wait* budge tools, exactly as it would for a wedged MCP server. This budget exists to detect toolsets that never come up; it is not a deadline on indexing itself. -A large knowledge base can legitimately take much longer than 30s to index. -Rather than abort in-flight indexing at the 30s mark — which used to discard -any embeddings not yet committed for the file being processed — the RAG -toolset detaches indexing from the caller's wait budget the same way it -already detaches its file watcher. When the 30s budget expires: +Indexing can continue beyond the 30-second startup wait budget. When that +budget expires: - The current turn proceeds without the RAG tool (the existing "taking too long to start" warning and TUI progress events still apply). @@ -288,10 +295,9 @@ already detaches its file watcher. When the 30s budget expires: the tool is available immediately; if it is still running, that turn also proceeds without the tool. -This is a **visible behavior change**: knowledge bases that used to finish -indexing (and thus offer the tool) on the very first turn, within the old -30-second window, now do so on whichever turn happens to land after indexing -completes. If indexing takes under 30s, nothing changes. +Indexing that finishes within the 30-second wait budget can expose the tool on +the current turn. If indexing outlives that budget, the tool becomes available +on a later turn after indexing completes. `indexing_timeout` bounds indexing itself, independent of the 30s wait budget — it exists only so a hung provider connection cannot pin a knowledge @@ -305,6 +311,7 @@ rag: strategies: - type: chunked-embeddings embedding_model: openai/text-embedding-3-small + vector_dimensions: 1536 ``` - Default: `30m` when omitted. @@ -317,17 +324,6 @@ rag: unaffected by any of this — it still aborts the run and arms the backoff gate exactly as described above. -### Operational impact - -**Before**: a rate-limited knowledge base was re-indexed on every agent turn — -`max_indexing_concurrency × max_embedding_concurrency` concurrent provider calls -could relaunch within milliseconds, easily tripping rate limits for both the -knowledge base and the agent's own model calls. - -**After**: retries are spaced out and jittered so the provider has room to recover -before the next attempt. The agent continues working with any other toolsets that -are not affected. - ### What you will see - Docker Agent logs a single warning when a knowledge base first fails to start. @@ -353,6 +349,8 @@ If you see persistent `429`, `5xx`, or `408` errors in the logs: docs: [./knowledge-base] strategies: - type: chunked-embeddings + embedding_model: openai/text-embedding-3-small + vector_dimensions: 1536 max_indexing_concurrency: 1 max_embedding_concurrency: 1 ``` @@ -387,7 +385,7 @@ Look for log tags: `[RAG Manager]`, `[Chunked-Embeddings Strategy]`, `[BM25 Stra | Field | Type | Default | Description | | ------------------ | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | | `docs` | []string | — | Document paths/directories (shared across strategies) | -| `description` | string | — | Human-readable description of this RAG source | +| `tool.description` | string | — | Description of the search tool shown to the model | | `respect_vcs` | boolean | `true` | Respect `.gitignore` files when indexing documents | | `indexing_timeout` | string | `30m` | Cap on a single indexing run, detached from the 30s toolset-start wait budget; `0s` = unbounded. See [Long indexing runs](#long-indexing-runs) | | `strategies` | []object | — | Array of retrieval strategy configurations | @@ -399,7 +397,7 @@ Look for log tags: `[RAG Manager]`, `[Chunked-Embeddings Strategy]`, `[BM25 Stra | --------------------------- | ------ | ------------------- | ------------------------------------------------------------ | | `embedding_model` | string | — | **Required.** Embedding model reference | | `database` | string | — | Path to local SQLite database | -| `vector_dimensions` | int | — | Embedding dimensions (e.g., 1536 for text-embedding-3-small) | +| `vector_dimensions` | int | — | **Required.** Embedding dimensions (e.g., 1536 for text-embedding-3-small) | | `similarity_metric` | string | `cosine_similarity` | Similarity metric | | `threshold` | float | `0.5` | Minimum similarity score (0–1) | | `limit` | int | `5` | Max results from this strategy | diff --git a/_vendor/github.com/docker/docker-agent/docs/tools/scheduler/index.md b/_vendor/github.com/docker/docker-agent/docs/tools/scheduler/index.md index 16635f7f77f2..2b5c40dc8b23 100644 --- a/_vendor/github.com/docker/docker-agent/docs/tools/scheduler/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/tools/scheduler/index.md @@ -7,8 +7,6 @@ weight: 135 canonical: https://docs.docker.com/ai/docker-agent/tools/scheduler/ --- -_Schedule instructions to run at a time or on a recurring interval._ - ## Overview The scheduler toolset lets an agent make something happen at a chosen time or on a repeating cadence during a session. You give it an instruction and a schedule; when the schedule is due, the instruction is delivered back to the agent, which then carries out the action with its normal tools (`shell`, `api`, `fetch`, and so on). diff --git a/_vendor/github.com/docker/docker-agent/docs/tools/script/index.md b/_vendor/github.com/docker/docker-agent/docs/tools/script/index.md index b4f912705517..5fba0df4de2e 100644 --- a/_vendor/github.com/docker/docker-agent/docs/tools/script/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/tools/script/index.md @@ -7,11 +7,9 @@ weight: 30 canonical: https://docs.docker.com/ai/docker-agent/tools/script/ --- -_Define custom shell scripts as named tools with typed parameters._ - ## Overview -The script tool lets you define custom shell scripts as named tools. Unlike the generic [shell tool](../shell/index.md) where the agent writes the command, script tools execute predefined commands — ideal for exposing safe, well-scoped operations with descriptive names. +The script tool lets you define custom shell scripts as named tools. Unlike the generic [shell tool](../shell/index.md) where the agent writes the command, script tools execute predefined commands. ## Configuration @@ -57,8 +55,3 @@ toolsets: | `shell..required` | array | Required parameter names | | `shell..env` | object | Environment variables for this script | | `shell..working_dir` | string | Working directory for script execution | - -> [!TIP] -> **Script vs. Shell** -> -> Use the [shell tool](../shell/index.md) when the agent needs to run arbitrary commands. Use the script tool when you want to expose specific, predefined operations with clear names and typed parameters — giving the agent less freedom but more safety. diff --git a/_vendor/github.com/docker/docker-agent/docs/tools/session_context/index.md b/_vendor/github.com/docker/docker-agent/docs/tools/session_context/index.md index 9f241bb551db..bf786a15e91a 100644 --- a/_vendor/github.com/docker/docker-agent/docs/tools/session_context/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/tools/session_context/index.md @@ -7,11 +7,9 @@ weight: 210 canonical: https://docs.docker.com/ai/docker-agent/tools/session_context/ --- -_Reference a previous session as context, without manual export/import._ - ## Overview -The `session_context` toolset lets an agent discover earlier sessions and pull one in as context for the current session. It removes the manual workaround of exporting a conversation to HTML and re-attaching it with an `@` mention. +The `session_context` toolset lets an agent discover earlier sessions and pull one in as context for the current session. The tool surface is two read-only tools: diff --git a/_vendor/github.com/docker/docker-agent/docs/tools/shell/index.md b/_vendor/github.com/docker/docker-agent/docs/tools/shell/index.md index bc1958f593f6..cd49431c5b9b 100644 --- a/_vendor/github.com/docker/docker-agent/docs/tools/shell/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/tools/shell/index.md @@ -7,11 +7,9 @@ weight: 20 canonical: https://docs.docker.com/ai/docker-agent/tools/shell/ --- -_Execute arbitrary shell commands in the user's environment._ - ## Overview -The shell tool allows agents to execute arbitrary shell commands synchronously. This is one of the most powerful tools — it lets agents run builds, install dependencies, query APIs, and interact with the system. Each call runs in a fresh, isolated shell session — no state persists between calls. +The shell tool allows agents to execute arbitrary shell commands synchronously. Each call runs in a fresh, isolated shell session — no state persists between calls. Commands have a default 30-second timeout and require user confirmation unless `--yolo` is used. For servers, watchers, and other long-running commands, add the [`background_jobs`](../background-jobs/index.md) toolset alongside `shell`. @@ -126,8 +124,3 @@ The shell toolset exposes one tool: > **Safety** > > The shell tool gives agents full access to the system shell. Always set `max_iterations` on agents that use the shell tool to prevent infinite loops. A value of 20–50 is typical for development agents. Use [Sandbox Mode](../../configuration/sandbox/index.md) for additional isolation. - -> [!NOTE] -> **Tool Confirmation** -> -> By default, Docker Agent asks for user confirmation before executing shell commands. Use `--yolo` to auto-approve all tool calls. diff --git a/_vendor/github.com/docker/docker-agent/docs/tools/tasks/index.md b/_vendor/github.com/docker/docker-agent/docs/tools/tasks/index.md index 9d399f96958b..939b76f94e27 100644 --- a/_vendor/github.com/docker/docker-agent/docs/tools/tasks/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/tools/tasks/index.md @@ -7,8 +7,6 @@ weight: 180 canonical: https://docs.docker.com/ai/docker-agent/tools/tasks/ --- -_Persistent task database with priorities and dependencies, shared across sessions._ - ## Overview The tasks tool provides a persistent task database that survives across agent sessions. Unlike the [Todo tool](../todo/index.md), which maintains an in-memory task list for the current session only, the tasks tool stores tasks in a JSON file on disk so they can be accessed and updated across multiple sessions. Tasks support priorities and dependencies — a task is _blocked_ until every task it depends on is `done`. diff --git a/_vendor/github.com/docker/docker-agent/docs/tools/think/index.md b/_vendor/github.com/docker/docker-agent/docs/tools/think/index.md index 7ed1e0ed0eeb..a84ad61306d1 100644 --- a/_vendor/github.com/docker/docker-agent/docs/tools/think/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/tools/think/index.md @@ -7,13 +7,11 @@ weight: 140 canonical: https://docs.docker.com/ai/docker-agent/tools/think/ --- -_Step-by-step reasoning scratchpad for planning and decision-making._ - ## Overview The think tool is a reasoning scratchpad that lets agents think step-by-step before acting. The agent can write its thoughts without producing visible output to the user — ideal for planning complex tasks, breaking down problems, and reasoning through multi-step solutions. -This lightweight tool changes only its internal scratchpad, not external data. It is most useful for models that lack built-in reasoning or thinking capabilities (e.g., smaller or older models). For models that already support native thinking — such as Claude with extended thinking, OpenAI o-series, or Gemini with a thinking budget — this tool is unnecessary since the model can reason internally. +This lightweight tool changes only its internal scratchpad, not external data. It is most useful for models that lack built-in reasoning or thinking capabilities (e.g., smaller or older models). For models that already support native thinking — such as Claude with extended thinking, OpenAI o-series, or Gemini with a [thinking budget](../../configuration/models/index.md#thinking-budget) — this tool is unnecessary since the model can reason internally. ## Configuration @@ -24,11 +22,6 @@ toolsets: No configuration options. -> [!TIP] -> **When to use** -> -> Use the think tool with models that don't have native reasoning capabilities. If your model already supports a [thinking budget](../../configuration/models/index.md#thinking-budget), you likely don't need this tool. - ## Scope and lifetime Thoughts are isolated by conversation ID, calling agent and think toolset instance. diff --git a/_vendor/github.com/docker/docker-agent/docs/tools/todo/index.md b/_vendor/github.com/docker/docker-agent/docs/tools/todo/index.md index 7f2154379cce..da8c07ed307e 100644 --- a/_vendor/github.com/docker/docker-agent/docs/tools/todo/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/tools/todo/index.md @@ -7,11 +7,9 @@ weight: 170 canonical: https://docs.docker.com/ai/docker-agent/tools/todo/ --- -_Task list management for complex multi-step workflows._ - ## Overview -The todo tool provides task list management. Agents can create, update, list, and track progress on tasks with status tracking (pending, in-progress, completed). Useful for complex multi-step workflows where the agent needs to stay organized and ensure all steps are completed. +The todo tool provides task list management. Agents can create, update, list, and track progress on tasks with status tracking (pending, in-progress, completed). ## Available Tools diff --git a/_vendor/github.com/docker/docker-agent/docs/tools/transfer-task/index.md b/_vendor/github.com/docker/docker-agent/docs/tools/transfer-task/index.md index ef4831bb51e2..59204f22df8f 100644 --- a/_vendor/github.com/docker/docker-agent/docs/tools/transfer-task/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/tools/transfer-task/index.md @@ -7,8 +7,6 @@ weight: 80 canonical: https://docs.docker.com/ai/docker-agent/tools/transfer-task/ --- -_Delegate tasks to sub-agents in multi-agent setups._ - ## Overview The `transfer_task` tool allows an agent to delegate tasks to specialized sub-agents and receive their results. This is the core mechanism for multi-agent orchestration. @@ -32,7 +30,7 @@ agents: sub_agents: [developer, researcher] developer: - model: anthropic/claude-sonnet-4-5 + model: anthropic/claude-sonnet-5-5 description: Expert software developer instruction: Write clean, production-ready code. toolsets: diff --git a/_vendor/github.com/docker/docker-agent/docs/tools/user-prompt/index.md b/_vendor/github.com/docker/docker-agent/docs/tools/user-prompt/index.md index 739892c93750..2d6dc10cd4d2 100644 --- a/_vendor/github.com/docker/docker-agent/docs/tools/user-prompt/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/tools/user-prompt/index.md @@ -7,11 +7,9 @@ weight: 190 canonical: https://docs.docker.com/ai/docker-agent/tools/user-prompt/ --- -_Ask the user questions and collect interactive input during agent execution._ - ## Overview -The user prompt tool allows agents to ask questions and collect input from users during execution. This enables interactive workflows where the agent needs clarification, confirmation, or additional information before proceeding. +The user prompt tool allows agents to ask questions and collect input from users during execution. > [!NOTE] > **When to Use** @@ -163,8 +161,8 @@ Agent: Deploying to staging... How the prompt appears depends on the interface: -- **TUI**: Displays an interactive dialog with appropriate input controls -- **CLI (exec mode)**: Prints the prompt and reads from stdin +- **TUI**: Displays an interactive dialog with appropriate input controls. The lean TUI shows the same form inline in place of the editor +- **CLI (exec mode)**: Automatically declines form prompts; the agent must handle the decline without reading an answer from stdin - **API/MCP**: Returns an elicitation request to the client > [!TIP] @@ -183,4 +181,4 @@ The agent should handle all possible actions: > [!WARNING] > **Context Requirement** > -> The user prompt tool requires an elicitation handler to be configured. It works in the TUI and CLI modes but may not be available in all contexts (e.g., some MCP client configurations). +> The user prompt tool requires an elicitation handler. The full and lean TUIs support interactive form prompts; API/MCP clients must implement elicitation. Exec mode declines form prompts automatically. Interactive OAuth authorization in exec mode is a separate flow, not support for `user_prompt` forms. diff --git a/_vendor/github.com/docker/docker-agent/docs/tools/webhook/index.md b/_vendor/github.com/docker/docker-agent/docs/tools/webhook/index.md index ded710754192..1dcb9df46c47 100644 --- a/_vendor/github.com/docker/docker-agent/docs/tools/webhook/index.md +++ b/_vendor/github.com/docker/docker-agent/docs/tools/webhook/index.md @@ -7,8 +7,6 @@ weight: 145 canonical: https://docs.docker.com/ai/docker-agent/tools/webhook/ --- -_Reliable outbound notifications to Slack, Discord, Telegram, IFTTT, and more._ - ## Overview The webhook toolset delivers a notification to a destination **you configure**. The diff --git a/_vendor/modules.txt b/_vendor/modules.txt index ae9ffcd5905d..05d556b1fbf8 100644 --- a/_vendor/modules.txt +++ b/_vendor/modules.txt @@ -2,7 +2,7 @@ # github.com/moby/moby/v2 v2.0.0-beta.31 # github.com/moby/buildkit v0.35.1 # github.com/docker/buildx v0.39.1 -# github.com/docker/cli v29.10.0+incompatible +# github.com/docker/cli v29.10.1+incompatible # github.com/docker/compose/v5 v5.8.0 # github.com/docker/model-runner v1.1.36 -# github.com/docker/docker-agent v1.152.0 +# github.com/docker/docker-agent v1.168.1 diff --git a/go.mod b/go.mod index 68448b2fcd1d..007f1826adbe 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/docker/docs -go 1.27 +go 1.27.4 // This go.mod file is used by hugo to vendor documentation from upstream // repositories. Use the "require" section to specify the version of the @@ -9,9 +9,9 @@ go 1.27 // Make sure to add an entry in the "tools" section when adding a new repository. require ( github.com/docker/buildx v0.39.1 - github.com/docker/cli v29.10.0+incompatible + github.com/docker/cli v29.10.1+incompatible github.com/docker/compose/v5 v5.8.0 - github.com/docker/docker-agent v1.152.0 + github.com/docker/docker-agent v1.168.1 github.com/docker/model-runner v1.1.36 github.com/moby/buildkit v0.35.1 github.com/moby/moby/api v1.57.0 diff --git a/go.sum b/go.sum index e922b2a58ddf..5b55f776c101 100644 --- a/go.sum +++ b/go.sum @@ -152,6 +152,8 @@ github.com/docker/cli v29.9.3+incompatible h1:SBaMp7ecohadEHMDrUJg22t9I3awqsAVhn github.com/docker/cli v29.9.3+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/cli v29.10.0+incompatible h1:lCL+clBUJnHsmjBCr6TwvfQFkmBidPxi5SkuXCoYxc0= github.com/docker/cli v29.10.0+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v29.10.1+incompatible h1:0wlyVoe0snmKYUUjJuhoR0HiSqRHQonKVcZzT7LwkVM= +github.com/docker/cli v29.10.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/compose/v5 v5.0.0 h1:J2uMCzJ/5xLcoIVVXvMmPe6HBzVQpmJThKa7Qk7Xldc= github.com/docker/compose/v5 v5.0.0/go.mod h1:BurapGv8zmYnsbSmlpCz5EU2Pi3YFV/PjeUnoFpcw64= github.com/docker/compose/v5 v5.0.1 h1:5yCjDJbwUqcuI+6WNFHNWz2/3vyBDsNnfe8LlFjyxEc= @@ -204,6 +206,8 @@ github.com/docker/docker-agent v1.126.0 h1:GjX84SHcvS4Txo7dGjatWhKGFLNpDqKcGAoIs github.com/docker/docker-agent v1.126.0/go.mod h1:K38q6CsnSTHDOrLP46HLGhKwv3i+vjmu33cjmjpkAvg= github.com/docker/docker-agent v1.152.0 h1:inDwSlc963dTjThWXydrbxu4ehz/Yqmh3vd1+8hBhts= github.com/docker/docker-agent v1.152.0/go.mod h1:ZGCPdL/EinADY1IMcLoWXEsAjsDhciRw59ba96xI2FQ= +github.com/docker/docker-agent v1.168.1 h1:vIX97HLL1qPU+bTdt15yOzr1mGNgJ8LwO4juBG3JWwI= +github.com/docker/docker-agent v1.168.1/go.mod h1:XyPjvLj3pkKRBCjhEk/AyvUtkmGjtTcPyVzhRtE7UJI= github.com/docker/docker-credential-helpers v0.9.3 h1:gAm/VtF9wgqJMoxzT3Gj5p4AqIjCBS4wrsOh9yRqcz8= github.com/docker/docker-credential-helpers v0.9.3/go.mod h1:x+4Gbw9aGmChi3qTLZj8Dfn0TD20M/fuWy0E5+WDeCo= github.com/docker/docker-credential-helpers v0.9.5 h1:EFNN8DHvaiK8zVqFA2DT6BjXE0GzfLOZ38ggPTKePkY=