From 1551dc3dbcdd716a5a149e1d0a8745f3ff4fbe96 Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Sat, 9 May 2026 18:10:11 +0000 Subject: [PATCH] docs: per-group model and effort overrides in container.json Generated-By: mintlify-agent --- api/configuration.mdx | 23 ++++++++++++++++++++++- concepts/containers.mdx | 16 ++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/api/configuration.mdx b/api/configuration.mdx index 782d8de..ddade25 100644 --- a/api/configuration.mdx +++ b/api/configuration.mdx @@ -4,7 +4,7 @@ description: Environment variables and configuration options for NanoClaw contai tag: "UPDATED" --- -NanoClaw configuration is managed through environment variables, the `.env` file, and the `src/config.ts` module. In v2, some configuration has moved to `container.json` per agent group. +NanoClaw configuration is managed through environment variables, the `.env` file, and the `src/config.ts` module. In v2, some configuration has moved to per-agent-group `container.json` (materialized from the `container_configs` table at spawn time). ## Environment variables @@ -93,6 +93,27 @@ All paths are absolute and resolved from the project root: `~/.config/nanoclaw/mount-allowlist.json` — mount security allowlist (never mounted into containers) +## Per-agent-group container config + +Each agent group has its own entry in the `container_configs` table that controls how its container is spawned. The host materializes this row into `groups//container.json` at spawn time so the container runner can read it. + +Recognized fields include: + +| Field | Type | Purpose | +|-------|------|---------| +| `provider` | string | Agent provider (`claude`, `opencode`, etc.). Defaults to `claude`. | +| `model` | string | Model alias (`sonnet`, `opus`, `haiku`) or full model ID. Passed through to the provider SDK. If omitted, the SDK default is used. | +| `effort` | string | Reasoning effort: `low`, `medium`, `high`, `xhigh`, or `max`. Passed through to the provider SDK. If omitted, the SDK default is used. | +| `assistantName` | string | Display name used in trigger and routing. | +| `maxMessagesPerPrompt` | number | Per-prompt message cap (default `10`). | +| `mcpServers` | object | Additional MCP servers exposed to the agent. | +| `packages` | object | Extra `apt` and `npm` packages to install when building the per-group image. | +| `additionalMounts` | array | Extra host directories to mount (validated against the allowlist). | +| `skills` | array \| `"all"` | Container skills to expose. | +| `imageTag` | string | Override the derived per-group image tag. | + +Per-group `model` and `effort` overrides let different workspaces target different models or reasoning budgets without changing host environment variables. + ## Trigger pattern The default trigger pattern is generated from `ASSISTANT_NAME`: diff --git a/concepts/containers.mdx b/concepts/containers.mdx index c328ee0..5382235 100644 --- a/concepts/containers.mdx +++ b/concepts/containers.mdx @@ -155,6 +155,22 @@ Agent groups can specify custom packages in `container.json`. The host builds a - Built on top of the base `nanoclaw-agent-v2-:latest` image - Cached — only rebuilt when package lists change +## Per-agent-group model and effort + +Each agent group can override the model and reasoning effort used by its provider. These options are stored in `container_configs` and materialized into `container.json` at spawn time: + +```json +{ + "model": "sonnet", + "effort": "high" +} +``` + +- **`model`** — model alias (`sonnet`, `opus`, `haiku`) or full model ID. Passed straight through to the provider SDK. If omitted, the SDK default applies. +- **`effort`** — reasoning effort level (`low`, `medium`, `high`, `xhigh`, `max`). Passed straight through to the provider SDK. If omitted, the SDK default applies. + +Both fields are per-agent-group, so different workspaces can use different models or effort budgets without restarting the host. + ## Timeouts ### Container timeout