Configuration

Like Claude Code, the CLI reads JSON settings files. Later files win, and command-line flags win over all of them.

FilePurpose
~/.llamatik/settings.jsonyour defaults for every project
<project>/.llamatik/settings.jsonshared with the project (commit it)
<project>/.llamatik/settings.local.jsonyours, for this project only (keep it out of git)
--config <file>one more file, read last

// and # comments are allowed. Type /config in a session to see what is in effect.

The ACP agent does not read settings files; use command-line flags there.

{
  "model": "~/.llamatik/models/Qwen3-14B-Q8_0.gguf",   // or "server": "192.168.1.20" (not both)
  "inference": {                // the options of the Llamatik app
    "temperature": 0.7,         // 0 - 2
    "maxTokens": 8192,          // largest reply
    "contextSize": 16384,       // context window in tokens: raise it if the agent runs out of room
    "batchSize": 2048,
    "topP": 0.95,
    "topK": 40,
    "repeatPenalty": 1.1,
    "threads": 8,
    "gpuLayers": -1,            // 0 = CPU only, -1 = all layers
    "flashAttention": false,
    "useMmap": true
  },
  "agent": {                    // how the agent loop budgets its work
    "maxSteps": 30,             // model calls per task
    "maxToolCallsPerStep": 3,   // tool calls run per reply
    "temperature": 0.3,         // sampling temperature is capped to this while the agent works
    "charsPerToken": 2.5,       // lower = more cautious prompt sizing (source code is ~2.5-3)
    "maxResultChars": 16000,    // largest tool result sent to the model
    "instructionChars": 2000,   // how much of LLAMATIK.md is put in the prompt (500 - 100000)
    "outputReserveShare": 0.25, // share of the context kept free for the reply
    "thinking": false           // let reasoning models think before each reply (slower)
  },
  "auto": {                     // tuning to this machine (on by default); "auto": false turns it off
    "maxContext": 32768,        // never pick more context than this
    "memoryBudgetMB": 24000     // memory the model may use, if the detected one is wrong for you
  },
  "permissions": { "autoApprove": false }
}

Other keys covered elsewhere: hooks (checks), sandbox (sandbox), planner (planner model), agent.repoMapChars and agent.autoCompactAt (project map), agent.instructionChars (project notes size).

Tuning to your machine

You normally do not need to set contextSize, threads, batchSize, gpuLayers or flashAttention. With a local model the CLI reads the machine (RAM, the GPU memory macOS allows, performance cores) and the model file itself (its size, layers, KV heads, trained context) and chooses values that fit.

For example, Qwen3-14B Q8 on a 32 GB M1 Pro gets a 19K context with flash attention and all layers on the GPU, because the weights (14.6 GB) plus two contexts of cache and buffers must stay inside the ~24 GB the GPU may use. A 1B model on the same machine gets its full 32K.

  • Anything you set in a settings file or as a flag wins over the tuned value.
  • /context shows how full the context window is; /config shows what was chosen and why.
  • --no-auto or "auto": false turns tuning off. It does not run for --server, where the server decides.

If the agent forgets what it read, lower agent.maxResultChars or raise auto.maxContext / inference.contextSize (the model must support it and the memory must be there; a value that is too large fails with a GPU out-of-memory error).