settings.json reference

August 12, 2026 · View on GitHub

Grinta loads a single canonical settings.json per installation:

  • pipx / wheel: ~/.grinta/settings.json (override with APP_ROOT)
  • source checkout: repository root settings.json (unless APP_ROOT is set)

Secrets belong in a sibling .env file or your shell environment. Reference them from JSON with "llm_api_key": "${LLM_API_KEY}".

Configuration precedence (highest → lowest)

  1. CLI flags (--model / -m, --project / -p, etc.)
  2. settings.json values for keys the loader recognizes
  3. Environment variables loaded before JSON merge
  4. Code defaults

settings.json overrides environment variables for the same key. Unknown top-level keys are ignored and logged as warnings.

LLM API key exception: when LLM_API_KEY is set in the process environment (including via .env), it always wins over settings.json for runtime authentication. Keep "llm_api_key": "${LLM_API_KEY}" in JSON and store the secret in .env.

Top-level keys

KeyTypeDescription
llm_providerstringProvider id (openai, anthropic, ollama, …)
llm_modelstringModel id, often provider/model
llm_api_keystringUse ${LLM_API_KEY}; literal secrets are discouraged
llm_base_urlstringOptional OpenAI-compatible base URL
llm_context_window_tokensintOptional explicit context window
llm_max_output_tokensintOptional max output tokens
llm_reasoning_effortstringOptional reasoning effort hint
llm_temperaturenumber | nullGlobal sampling temperature; omit or null for provider default
llm_model_temperaturesobjectPer-model temperature overrides (model id → number or null)
mcp_hoststringMCP host override
project_rootstringDefault project directory
max_budget_per_tasknumberPer-task USD spend cap
max_iterationsintMax agent iterations per task
pending_action_timeoutnumberTool observation watchdog (seconds)
save_trajectory_pathstringTrajectory export directory
log_levelstringLogging level
mcp_configobjectMCP server definitions (servers list)
agentobjectPer-agent overrides (see below)
securityobjectRuntime hardening (see below)
cli_tool_iconsboolShow emoji icons beside tool names in the TUI

agent.<AgentName> keys

The default agent name is Orchestrator. Common overrides:

KeyDescription
modeagent, chat, or plan
autonomy_levelconservative, balanced, or full
enable_mcpToggle MCP tools
enable_browsingNative browser tool (default on; requires [browser] extra at runtime). Set false to disable.
enable_vector_memorySemantic recall / vector store (default on; requires [rag] extra at runtime). Set false to disable.
enable_hybrid_retrievalHybrid search with [rag] (default on; same gating as vector memory).
enable_task_tracker_toolStructured plan tracking in Plan mode
enable_lsp_queryLSP tool (lsp); default off — set true when language servers are installed
enable_debuggerInteractive DAP debugger tool; default off — set true when debug adapters are available

Disabled in v1.0: enable_blackboard and enable_swarming — schema only, not wired. Autonomy: USER_GUIDE.md.

See backend/core/config/agent_config.py for the full schema.

security keys

KeyDefaultDescription
windows_shellpowershellOn Windows: powershell (native default since 10 July 2026) or bash (Git Bash) for the agent shell tool
execution_profilestandardstandard, hardened_local, or sandboxed_local
enforce_securitytrueEnable security analyzer enforcement
block_high_riskfalseBlock HIGH-risk actions outright
allow_network_commandsfalseAllow network shell commands in hardened_local / sandboxed_local
allow_package_installsfalseAllow package installs in hardened_local / sandboxed_local
allow_background_processesfalseAllow background processes in hardened_local / sandboxed_local
allow_sensitive_path_accessfalseAllow sensitive workspace paths in hardened_local / sandboxed_local
allow_read_outside_workspacefalseOpt in to read-only paths outside the project
additional_read_roots[]Approved absolute paths when outside reads are enabled
validation_modepermissivepermissive (single-user default) or strict conversation ownership
hardened_local_git_allowliststatus, diff, log, show, branch, rev-parse, ls-filesGit subcommands allowed in hardened_local / sandboxed_local
hardened_local_package_allowlist[]Package installs allowed in hardened_local / sandboxed_local
hardened_local_network_allowlist[]Network command families allowed in hardened_local / sandboxed_local

Set APP_STRICT_CONFIG=true before launch to fail fast on invalid settings.json (default: warn and continue with defaults). Invalid security.execution_profile values are skipped entirely — the previous profile is kept; run grinta doctor to validate raw settings, or /health in-session for a quick profile summary (restart still required to apply changes).

security.execution_profile changes take effect after restart (not hot-reloaded like /mode or /autonomy). Legacy autonomy spelling supervised in settings.json is auto-migrated to conservative on read and at config load.

Read-only paths outside the workspace

By default Grinta only reads files inside the open project workspace (plus Grinta’s own data under ~/.grinta/workspaces/<id>/). To let file-read tools reach sibling directories, shared config, or monorepo packages without allowing writes there:

  1. Set security.allow_read_outside_workspace to true.
  2. Add explicit absolute paths to security.additional_read_roots, for example:
"security": {
  "allow_read_outside_workspace": true,
  "additional_read_roots": [
    "/home/you/monorepo/shared-lib",
    "~/.config/git"
  ]
}

Writes remain workspace-scoped. Shell commands (cat, type, Get-Content, etc.) are not limited by file-read boundaries in the standard execution profile — use hardened_local or run in an isolated environment if you need stronger containment.

mcp_config

MCP is off by default in settings.template.json and in output from grinta init. Starter server definitions (shadcn, GitHub, Rigour) are listed with "enabled": false so you can turn them on from /settings after Node and any required tokens are in place.

KeyDefaultDescription
enabledfalseMaster switch for user-configured MCP servers
serverssee templateList of stdio/SSE server entries (enabled per server)

Enable MCP when you need external tool servers; base install does not require npx or Node.