lwis docs

Reference / Agent profile format

Agent profile format

A hosted agent is defined by one TOML file. This page lists every key, its default and the rules lwisd checks before it loads the profile.

Where profiles live

Syntax

Profiles use a small subset of TOML: key = value lines and # comments. Values can be strings (basic "…", literal '…', and their multi-line forms """…""" and '''…'''), true or false, non-negative integers (underscores allowed), and arrays of those. Tables ([section]), floats and dates are not supported. Unknown or duplicate keys are errors.

Keys

KeyTypeDefaultRules
namestringrequired1 to 32 characters of a-z, 0-9, - and _, starting with a letter or digit. Must match the file name.
runtimestringrequiredclaude-sdk, command or webhook. codex-exec is refused (not implemented).
cwdstringnoneRequired for claude-sdk and command. Absolute or starting with ~/; must be an existing directory, not /. Your home directory (or a parent of it) gives a warning, and is refused for a published agent.
modelstringClaude's defaultclaude-sdk only (passed as --model). At most 64 characters of letters, digits and . _ - [ ] :.
systemstringnoneExtra instructions appended to lwisd's system prompt (claude-sdk). At most 8000 characters.
toolsarray of strings[]claude-sdk only; other runtimes ignore them with a warning. See Tools.
permission_modestring"default"default, manual, dontAsk, plan, acceptEdits or auto. bypassPermissions is refused. acceptEdits and auto are refused while strict = true. dontAsk gives a warning: it denies every call that would prompt, so most tools become unusable.
strictbooleantrueSide-effect tools wait for lwis agents approve <id>.
accept_fromarray of strings["self"]Who may send captures. See Who may send.
idle_minutesinteger5How long the agent stays warm after a capture. 1 to 240.
approval_timeout_minutesinteger10How long a strict approval waits before it is denied. 1 to 60.
turn_timeout_secondsinteger300How long one capture may take. 10 to 3600.
commandarray of stringsnoneRequired for command, refused for other runtimes. The program and its arguments; a leading ~/ in the program is expanded.
urlstringnoneRequired for webhook, refused for other runtimes. Must start with http://127.0.0.1, http://localhost or http://[::1] (any port and path).
publishbooleanfalseApplies the rules for a published agent (below). Listing an agent on your card isn't available yet.
inboxstring"closed""closed", or "open" for a published agent only.
allow_unconfined_toolsbooleanfalseLets a published agent list tools that escape cwd.

add_dir and add_dirs are refused explicitly: agents are confined to cwd.

Tools

Each entry is a Claude Code tool name, or Name(specifier).

With no tools, a claude-sdk agent can only look at the capture and answer.

Who may send

Published agents

With publish = true, lwisd also requires:

Examples

A receipts filer that reads and writes in its own folder, with every write approved by you:

name = "receipts"
runtime = "claude-sdk"
model = "haiku"
cwd = "~/agents/receipts"
tools = ["Read", "Glob", "Write"]
system = """
You file photographed receipts. Append one CSV line per receipt to receipts.csv:
date, merchant, total, currency. Reply with the line you added.
"""

A script that speaks the agent contract, not strict, kept warm for 30 minutes:

name = "triage"
runtime = "command"
cwd = "~/agents/triage"
command = ["~/agents/triage/run.py", "--quiet"]
strict = false
idle_minutes = 30

A local webhook that a trusted contact may also reach (after lwis contacts policy <contact> --agents on):

name = "notes"
runtime = "webhook"
url = "http://127.0.0.1:8750/lwis"
accept_from = ["self", "<contact identity id>"]
turn_timeout_seconds = 60

Check each one before reloading:

lwis agents check ~/.config/lwis/agents/receipts.toml
lwis agents reload