Skip to content

Config Reference

DuckAgent uses a small root config and richer profile config.

Path:

~/.duckagent/config.json

Common fields:

FieldTypeDefaultPurpose
active_profilestringdefault when no profile is selectedProfile used by duck when --profile is not provided.
sandboxobject{ "preset": "workspace" }Root-scoped sandbox policy.

Example:

{
"active_profile": "default",
"sandbox": {
"preset": "workspace"
}
}

Path:

~/.duckagent/profiles/<name>/config.json

Common fields:

FieldTypePurpose
providerstringModel provider name.
modelstringActive model id.
base_urlstringProvider base URL for OpenAI-compatible or custom APIs.
api_modestringProvider API mode, such as responses or chat-compatible mode.
context_windownumberOptional context-window override.
webobjectWeb search and extraction providers.
gatewayobjectGateway enablement, service settings, media limits, and channels.
mcpServersobjectMCP server definitions.

Example:

{
"provider": "openai",
"model": "gpt-5",
"base_url": "https://api.openai.com/v1",
"api_mode": "responses",
"context_window": 200000,
"web": {
"search": { "provider": "exa" },
"extract": { "provider": "local" },
"browser_fallback": "auto"
},
"gateway": {
"enabled": true,
"channels": {}
},
"mcpServers": {}
}

Provider and gateway secrets belong in:

~/.duckagent/profiles/<name>/auth.json

MCP OAuth or server-specific auth material belongs in:

~/.duckagent/profiles/<name>/mcp-auth.json

Do not store secrets in config.json.

Most provider credentials are saved in auth.json. A few advanced provider integration knobs can also come from the environment:

VariablePurpose
DUCKAGENT_GEMINI_CLIENT_IDOverride the public Gemini CLI desktop OAuth client id used for Google Gemini CLI OAuth refresh.
DUCKAGENT_GEMINI_CLIENT_SECRETOverride the public Gemini CLI desktop OAuth client secret used for Google Gemini CLI OAuth refresh.

Sandbox config is strict: unsupported fields in fixed-schema objects should fail parsing instead of being silently ignored. This is important for safety because a typo should not look like a working policy.