The per-agent folder
An agent is a directory whose name is the agent id. Everything the agent needs lives inside it, so an agent is self-contained and copyable.registry.yaml is deliberately tiny: it names the default agent and nothing
else. Whether an agent is selectable at all is its own meta.yaml enabled
flag, not a central list.
The resolution chain
Every file resolves independently, most-specific-first:1
Project layer
<project>/.ziro/agents/<id>/<file>: this repo, this agent.2
User layer
~/.ziro/agents/<id>/<file>: this machine, this agent. This is how you
configure a pip-installed Ziro without editing the package.3
Bundled package
The file shipped inside the
ziro package.4
Built-in defaults
No file anywhere: the loader constructs the config object from its
dataclass defaults.
- Per file, not per folder. Overriding
permissions.yamlin your project layer does not shadow the bundledtool_policy.yaml. Each file is looked up on its own, so you override exactly the concerns you care about. - Whole-file, not key-merge. When a layer supplies a file, that file wins wholesale for that concern. Layers do not deep-merge key by key.
A missing file is normal and safe: it degrades to built-in defaults, it does
not error. The one deliberate exception is
plugin_config.yaml: an agent that
no layer supplies it for surfaces zero plugins. See Plugins.The flavour overlay
A flavour is a top-level container selected once at launch. Beyond scoping which agents and threads you see, it can overlay a policy baseline onto its member agents. The overlay is merged in memory, onto the parsed YAML, before the config object is built. A flavour never writes a policy file to disk. It merges two sources:
So the full order for any one config value is:
engineering flavour uses this to disable web_search and web_fetch for
its coder agent while leaving them on for the read-only product_manager and
architect. That is the segregation rule described in Web tools.
Policy file reference
Several of these gate registration entirely: when
shell_policy.yaml,
websearch_policy.yaml, or webfetch_policy.yaml has enabled: false, the tool
is never registered at all. It is invisible to search_tools and to the subagent
permission view. The absence is the disable switch, so there is no separate
runtime check to bypass.
Real examples
meta.yaml
Identity, on/off state, and the provider/model pin.
permissions.yaml
Precedence runs dangerous_default_deny → deny → ask → allow →
default_action. Note the shipped recipe for shell: it is allow-listed to lift
the dangerous default-deny, then ask-gated so every call still prompts.
fs_policy.yaml
deny_paths is a hard refusal, not a prompt. Any path component matching one of
these globs is refused for read and write, skipped by grep, and hidden from
glob_files. It keeps a prompt-injected agent away from secrets and away from
its own guardrail config.
The three state files
Policy files describe intent and are yours to edit and commit. State files record what happened and are written by Ziro. Do not hand-edit them.API keys, the default model, the LLM provider, Langfuse credentials, and
DATABASE_URL. Written by the setup wizard (ziro setup) and by /settings.
Read as layers, so a project-level .env can override it.The list of known user ids,
last_user, and the last flavour each user chose.
Drives the launch-time user picker and the /user command.Thread metadata: user, agent, flavour, title, timestamps, and any per-thread
LLM or plugin overrides. Checkpoints remain the source of truth for
conversation content. This file is the index over them, and is rebuildable.
<basename>-<hash>): project memory under ~/.ziro/projects/<key>/memory/ and
the per-thread scratchpad under your system temp directory. See
Memory.
Runtime mode
One environment variable decides the whole storage backend:Inspecting and editing
/settings edits the API key, model, Langfuse, and database entries in
~/.ziro/.env, queuing a live rebind only for the section you actually changed.
Next steps
Agent file reference
Every field of every policy file.
Environment variables
Every variable Ziro reads and where it is written.
Providers and models
Pinning a provider and model per agent.