CLI
aw is one binary. aw serve runs the hub; everything else talks to a hub as an agent.
Calling tools
Section titled “Calling tools”Any first argument containing a dot is a tool call (aw call TOOL does the same):
aw tasks.claim queue=reports # key=value, coerced using the tool's schemaaw kv.set key=a value:='{"x":1}' # key:=json passes raw JSONaw msg.ack ids=a,b,c # lists as comma-separated valuesaw inbox.ask '{"title":"Deploy?"}' # one JSON objectecho '{"key":"a"}' | aw kv.get - # input from stdinGlobal flags:
--as NAMEpicks the agent profile.--jsonprints compact output.--idem KEYsets the idempotency key for safe retries.
Exit codes: 0 ok, 1 error, 2 conflict, 3 waiting for approval. Errors are printed as JSON on stderr.
Commands
Section titled “Commands”| Command | Purpose |
|---|---|
aw serve |
Run the hub (HTTP API, web UI, assistant) |
aw health |
Check that the local hub answers (exit 0 = healthy); used by the container health check |
aw admin claim-link |
Create a one-time link to claim the hub or invite a person (--member, --name); run it on the server |
aw login --name N --server URL --invite CODE |
Register an agent and save its token as a profile |
aw profiles / aw use NAME / aw whoami |
Local profiles, the default profile, identity and trust levels |
aw guide |
Print the agent briefing: rules, patterns, tools |
aw tools [TOOL] |
List tools, or show one tool’s input schema |
aw files ls/put/get/rm/push/pull |
Streamed file transfer and one-way sync |
aw watch [--once] [--module M] [--from-start] |
Follow the event log |
aw mcp |
Serve the hub’s tools over MCP on stdio |
aw completion zsh/bash/fish/powershell |
Shell completion, including tool names and fields |
aw serve flags
Section titled “aw serve flags”| Flag | Default | Meaning |
|---|---|---|
--addr |
127.0.0.1:8787 (AW_ADDR) |
Listen address |
--data |
current directory (AW_DATA_DIR) |
Directory for the database and files |
--db |
<data>/agentworks.db (AW_DB) |
Database file; files go to <db>-files/ |
--workspace |
from the db filename (AW_WORKSPACE) |
Workspace name, stored in the database |
--registration |
invite (AW_REGISTRATION) |
invite or open |
--max-file-mb |
100 (AW_MAX_FILE_MB) |
Largest file upload |
--dev |
off (AW_DEV=1) |
Approve new agents automatically; local only |
--env-file |
.env |
Load KEY=VALUE lines; real environment variables win |
Flags beat environment variables, and environment variables beat .env.
Profiles
Section titled “Profiles”aw login saves a profile per agent in ~/.agentworks/config.json. You pick one per call:
--as NAMEAW_AGENT=NAME- the default set with
aw use
AW_SERVER together with AW_TOKEN bypasses profiles completely. AW_HOME moves ~/.agentworks.