Configuration¶
Agentic reads settings from three places:
agentic.jsonholds machine-wide settings. Trust and approvals live next to it instate.json..agenticrc.tomlfiles hold per-directory settings.- CLI flags hold per-run settings.
For a scalar setting, the most specific value wins. List settings add up across all three (see Precedence). Run agentic config to see the merged result for the current directory and which file set each value, or agentic config --format toml to export it.
AGENTIC_HOME (data directory) is a plain environment variable, as it has to be known before any config file can be found.
agentic.json¶
Stored at $AGENTIC_HOME/agentic.json. Edit it with any text editor; agentic only reads it.
| Key | Type | Description | CLI flag |
|---|---|---|---|
registry |
scalar | Registry prefix for base image pulls. See Registry proxy. | --registry |
docker_context |
scalar | Machine-wide default Docker context. See Precedence. | --docker-context |
log_retention_days |
scalar | Days to keep log dirs. Default: 3. |
- |
state.json¶
Agentic records what it learns at $AGENTIC_HOME/state.json, apart from your settings. Delete an entry to revoke it, or the whole file to reset all trust and approvals.
| Key | Description |
|---|---|
trusted_dirs |
Directories you trusted, by prompt or --trust-dir, stored as real paths |
setting_approvals |
Your setting approvals per .agenticrc.toml |
last_update_check |
When agentic last checked for a new release |
last_tool_version_check |
When agentic last checked each tool for an update |
.agenticrc.toml¶
A .agenticrc.toml applies to its directory and all subdirectories. agentic walks up from $PWD and collects every file it finds. The walk stops at a file with root = true, or at the filesystem root. See Merge semantics for how the files combine.
# .agenticrc.toml
root = true
[build]
bases = ["java"]
apt_packages = ["make", "gcc", "ripgrep"]
[build.versions]
java = "17"
node = "22"
[run]
mounts = ["maven:$CONTAINER_HOME/.m2"]
env = ["NODE_OPTIONS=--max-old-space-size=4096"]
pids_limit = "2048"
Editor validation¶
Add a #:schema comment on the first line to get validation and autocomplete from taplo-based editors, such as VS Code's "Even Better TOML" extension or Neovim's taplo server:
#:schema https://raw.githubusercontent.com/dylanvgils/agentic-cli/main/agenticrc.schema.json
Top-level keys¶
| Key | Type | Description | Default |
|---|---|---|---|
root |
bool | Stop the upward directory walk at this file | - |
namespace |
string | Image namespace: lowercase letters and digits, separated by ., _ or -. Images are named <namespace>-<tool>. See Per-project image set. |
agentic |
docker_context |
string | Docker context to use for this project | - |
[build]¶
Applied by agentic build. See Images for what each does.
| Key | Type | Description | CLI flag |
|---|---|---|---|
bases |
list | Extra runtime layers (e.g. ["java", "dotnet"]) |
--base / --base-exact |
apt_packages |
list | Extra Debian packages | --apt / --apt-exact |
aqua_packages |
list | CLI tools from the aqua registry, as <owner>/<name>@<version>. See updating. |
- |
versions |
table | [build.versions] pins for node, java, dotnet, go or docker |
--<layer> |
custom_installs |
list of tables | Tools installed with shell commands. See below. | - |
[[build.custom_installs]]¶
Shell commands that install a tool. See Extra packages and tools.
| Key | Type | Description |
|---|---|---|
name |
string | Identifier, must match ^[a-zA-Z0-9._-]+$ and be unique across all merged files. Shown in the generated RUN and in agentic config. |
run |
list | Shell commands, each its own RUN layer, run as root as-is. |
[run]¶
Applied by agentic run.
| Key | Type | Description | CLI flag | Default |
|---|---|---|---|---|
mounts |
list | Bind mounts or named volumes, with the same syntax as --volume |
--volume |
- |
env |
list | KEY=VALUE, or bare KEY to forward the host value. See Environment variables. |
--env |
- |
ports |
list | "PORT" or "HOST:GUEST" to forward from 127.0.0.1. See Forwarding ports. |
--port |
- |
runtime |
string | "docker", or "microsandbox" to run in a microVM |
--runtime |
"docker" |
pids_limit |
string | PID limit (ignored by microsandbox) | --pids-limit |
1024 |
cpus |
string | CPU limit, of the container or the VM | --cpus |
4 |
memory |
string | Memory limit (e.g. "8g"), of the container or the VM |
--memory |
4g |
check_updates |
bool | Check for a newer tool version on run. See Versions and updates. | - | true |
Mount paths support placeholders. Limits in files must be positive, as docker reads zero or below as no limit; only the flags can lift them.
[run.args]¶
Extra args passed to a tool on every run, keyed by tool name. They go before the args you give after the tool name. A run with -- (a command) leaves them out.
[run.args]
claude = ["--verbose"]
[run.instructions]¶
Controls the environment instructions each run writes into the tool's global instructions file.
| Key | Type | Description | Default |
|---|---|---|---|
enabled |
bool | Write the block | true |
custom |
string | Text appended after the generated sections | - |
[run.instructions]
custom = """
Always run `go test ./...` before considering a task finished.
"""
[run.proxy]¶
| Key | Type | Description | CLI flag | Default |
|---|---|---|---|---|
enabled |
bool | Route egress through the allowlist proxy | --proxy / --no-proxy |
false |
mode |
string | "enforce" blocks hosts not on the allowlist, "monitor" only logs them. "monitor" turns the proxy on unless enabled = false. |
--proxy-monitor |
"enforce" |
backend |
string | What enforces the allowlist on microsandbox: "native" msb rules or "agentic" agentic-proxy. See With microsandbox. |
--proxy-backend |
"native" |
allowed_hosts |
list | Hosts added to the tool's baseline. Exact ("api.github.com"), or ./*. prefix for a domain and its subdomains (".github.com"). |
- | - |
integrations |
list | Tools that ignore the proxy env vars, routed through the proxy with their own config. "maven" or "gradle". See Tools that ignore proxy env vars. |
--proxy-integration |
- |
[[run.proxy.allowed_paths]]¶
| Key | Type | Description |
|---|---|---|
host |
string | Required. Exact hostname or IP, no wildcards, port or path. |
paths |
list | Required. Path patterns starting with /. |
See Path rules for the pattern syntax and what's refused.
[[run.proxy.credentials]]¶
| Key | Type | Description |
|---|---|---|
preset |
string | anthropic, openai or github. Can't be combined with hosts or header. |
hosts |
list | Exact hostnames or IPs, no wildcards. Required without preset. A host may appear in only one entry. |
header |
string | Header the tool sends the placeholder in, e.g. "Authorization". Required without preset. Hop-by-hop, Host and Content-Length are refused. |
host |
string | ghe.com tenant, e.g. "acme.ghe.com", only with preset = "github" and once per config. |
env |
list | Tool env vars set to the placeholder. Required without preset; replaces a preset's own list. A name may appear in only one entry. |
secret |
string | Required. Host file with the secret: an absolute path, or one starting with ~/$HOME. One line, at most 64 KiB. Or store:<name> for a stored secret. |
| Preset | Hosts and header | Env |
|---|---|---|
anthropic |
api.anthropic.com: X-Api-Key |
ANTHROPIC_API_KEY |
openai |
api.openai.com: Authorization |
OPENAI_API_KEY |
github |
api.github.com, github.com, api.githubcopilot.com, api.{individual,business,enterprise}.githubcopilot.com: Authorization |
GITHUB_TOKEN, GH_TOKEN |
github with host |
<host>, api.<host>, copilot-api.<host>: Authorization |
GITHUB_TOKEN, GH_TOKEN, plus GH_HOST=<host> |
See Credential injection for usage.
[run.dind]¶
| Key | Type | Description | CLI flag | Default |
|---|---|---|---|---|
enabled |
bool | Start a Docker daemon: a sidecar (needs --base docker) or in the VM. |
--dind / --no-dind |
false |
pids_limit |
string | Sidecar PID limit (Docker runtime only) | --dind-pids-limit |
tool's value |
cpus |
string | Sidecar CPU limit (Docker runtime only) | --dind-cpus |
tool's value |
memory |
string | Sidecar memory limit (e.g. "8g", Docker runtime only) |
--dind-memory |
tool's value |
[[marketplaces]]¶
Git plugin repos to share with tools. See Marketplaces.
| Key | Type | Description | Default |
|---|---|---|---|
name |
string | Local name, must match ^[a-zA-Z0-9._-]+$. Used as the mount path ~/marketplaces/<name>. |
- |
url |
string | https://, ssh:// or user@host:path. Local paths and other transports are refused, so it can't expose a host path. |
- |
tools |
list | Tools to mount it into (claude, copilot) |
every supporting tool |
[[marketplaces]]
name = "acme-plugins"
url = "git@github.com:acme/plugin-marketplace.git"
[[marketplaces]]
name = "claude-only-thing"
url = "git@github.com:acme/claude-extras.git"
tools = ["claude"]
Setting approval¶
The agent can edit .agenticrc.toml, so a changed key below needs your approval before a command uses it. Non-interactive commands fail until approved, and a file symlinked to another project's asks again.
The prompt shows each changed key, what it controls and what was added (+) or removed (-), a screen at a time.
| Keys | Asked by |
|---|---|
root, namespace, docker_context |
run, build and update; any command if docker_context is set |
build.* |
agentic build, agentic update, the update agentic run offers |
marketplaces, run.* (except limits, check_updates, instructions, proxy.integrations) |
agentic run |
Merge semantics¶
The file closest to the filesystem root is the outermost. The file in $PWD is the innermost.
- List keys (
bases,apt_packages,aqua_packages,custom_installs,mounts,env,ports,argsper tool,proxy.allowed_hosts,proxy.allowed_paths,proxy.credentials,proxy.integrations,marketplaces) add up, outermost first. - Scalar keys take the innermost value. Booleans count as scalars, so
enabled = falsein an inner file overrides an outertrue. versionsis resolved per key, so a child can pinjavaand still inheritnode. An empty value counts as unset.instructions.customadds up like a list, joined by blank lines.
Example, with root = true keeping configs above ~/projects out:
# ~/projects/.agenticrc.toml (outermost)
root = true
[build]
apt_packages = ["make"]
[run]
cpus = "4"
# ~/projects/my-project/.agenticrc.toml (innermost)
[build]
apt_packages = ["gcc"]
[run]
cpus = "8"
Result: apt_packages = ["make", "gcc"] and cpus = "8".
To share or back up the merged result, export it as one standalone file. It holds only the keys your files set, with root = true so parent files don't merge in again:
agentic config --format toml > agenticrc-backup.toml
Precedence¶
For a scalar, the flag wins, then the innermost file, then the default. Exceptions:
| Setting | Resolution order |
|---|---|
versions |
--<layer> (e.g. --java 17), then [build.versions] per key, then the bundled default |
[run.dind] limits |
--dind-* flag, then [run.dind], then the tool's resolved value |
docker_context |
--docker-context, then the innermost file, then agentic.json, then the Docker CLI's own choice (including DOCKER_CONTEXT) |
List settings combine instead:
| Setting | How it combines |
|---|---|
bases, apt_packages |
Files (outermost first), then --base/--apt. Duplicates removed. |
aqua_packages |
Files (outermost first). Duplicates removed. |
mounts |
Files and --volume combined |
ports |
--port, then files. A --port replaces a file's port with the same host port; otherwise a host port can only appear once. |
env |
Files, then --env. The last value for a key wins. Some names are reserved. |
args |
Files, then the args after the tool name |
--base-exact and --apt-exact replace the list instead of adding to it. They ignore config files and, during agentic update, the list the image was built with. --base-exact= or --apt-exact= (empty) means none at all. Each can't be combined with its non-exact flag.
Mount variable expansion¶
Mount strings (mounts, --volume) expand these placeholders at runtime. The ${VAR} form works too.
| Placeholder | Side of : |
Expands to |
|---|---|---|
~, $HOME |
host (left) | Your home directory |
$TOOL_HOME |
host (left) | Agentic data directory (e.g. ~/.agentic) |
$PWD |
host (left) | Current directory, mounted as /workspace |
$CONTAINER_HOME |
container (right) | Container home (e.g. /home/claude) |
Single-quote them so your shell doesn't expand them first:
agentic run --volume '$TOOL_HOME/custom:$CONTAINER_HOME/.custom:rw' claude