Skip to main content

Full schema

# ── Runtime ─────────────────────────────────────────────────────────────────────────────

[runtime]
mode = "local"   # "local" | "managed"

# ── Start ─────────────────────────────────────────────────────────────────────

[start]
cmd = "python agent.py"   # required — the command nanny run executes

# ── Limits ────────────────────────────────────────────────────────────────────

[limits]
steps   = 100        # Maximum agent steps (tool calls). 0 = unlimited.
cost    = 1000       # Maximum cost units. 0 = unlimited.
timeout = 30000      # Wall-clock timeout in milliseconds. 0 = unlimited.

# Named limit sets — inherit from [limits], override only declared fields.
[limits.researcher]
steps   = 200
cost    = 5000
timeout = 120000

[limits.quick]
timeout = 5000

# ── Tools ─────────────────────────────────────────────────────────────────────

[tools]
allowed = ["http_get", "read_file"]   # Allowlist. Empty = all tools allowed.

# Per-tool config.
[tools.http_get]
max_calls     = 20
cost_per_call = 10

[tools.write_file]
max_calls     = 5
cost_per_call = 50

# ── Observability ─────────────────────────────────────────────────────────────

[observability]
log      = "stdout"          # "stdout" | "file"
log_file = "nanny.log"       # Required when log = "file"

# ── Managed (Cloud) ───────────────────────────────────────────────────────────

[managed]
endpoint = "https://api.nanny.run"
org_id   = "org_xxxxxxxxxxxx"
api_key  = "nanny_live_xxxxxxxxxxxx"

[runtime]

FieldTypeDefaultDescription
modestring"local""local" enforces limits locally, without external services. "managed" additionally forwards execution data to Nanny Cloud.

[start]

Required for nanny run. Declares the command to execute when nanny run is invoked with no inline command argument.
FieldTypeDescription
cmdstringThe command string to run. Parsed with shell quoting rules — paths with spaces are supported. Arguments passed after -- on the CLI are appended.
[start]
cmd = "python agent.py"
nanny run                        # runs: python agent.py
nanny run --limits=researcher    # runs with [limits.researcher] active

[limits]

FieldTypeDefaultDescription
stepsinteger100Maximum steps. 0 = unlimited.
costinteger1000Maximum cost units. 0 = unlimited.
timeoutinteger30000Timeout in milliseconds. 0 = unlimited.

Named limit sets

Any table nested under [limits] is a named set:
[limits.researcher]
steps = 200
Named sets inherit all unset fields from [limits]. Activate with --limits=researcher.

[tools]

FieldTypeDefaultDescription
allowedstring array[]Tool allowlist. Empty array means all tools are allowed.

Per-tool config

[tools.<name>]
max_calls     = 20    # Maximum calls for this tool per execution.
cost_per_call = 10    # Cost units charged per call.

[observability]

FieldTypeDefaultDescription
logstring"stdout""stdout" writes events to stdout. "file" appends to log_file.
log_filepathRequired when log = "file". Relative to working directory.

[managed]

Required when [runtime] mode = "managed". Connects Nanny to Nanny Cloud for durable audit logs and team dashboards. All three fields are required.
FieldTypeDescription
endpointstringCloud API endpoint (https://api.nanny.run).
org_idstringYour organisation ID from the Nanny Cloud dashboard.
api_keystringYour API key. Never commit this to version control. Use an environment variable or secrets manager.