Skip to content

CLI reference

agenix init [dir]

Creates an agent project: profile.yaml, knowledge/, suites/smoke.yaml.

FlagMeaning
-a, --agent <id>executor (default claude-code)
-m, --model <id>model, litellm notation
--base-url <url>gateway / local endpoint
--auth <mode>inherit | subscription | api-key | env
--credential <name>key name (for api-key)
--api-key-env <var>env variable (for env)
-f, --forceoverwrite an existing profile.yaml

agenix agents

List of adapters: local models, subscription support, planned.

agenix doctor -p profile.yaml

Diagnostics: executor binary, auth, knowledge base, gateway availability. Exit code 1 if anything is not ready.

agenix compile -p profile.yaml [-o dir]

Materializes the executor's native configs without running — to see what the profile turns into.

agenix run -p profile.yaml -m "prompt" [-w dir] [-t sec]

A single agent run on a task.

agenix chat -p profile.yaml [-w dir] [--native]

Interactive session in the unified agenix TUI: the interface is identical no matter which executor or model the profile selects. Executors with structured event streams (Claude Code, Codex, Qwen Code, Gemini CLI, Cline) additionally show tool calls and token usage/cost; most continue their own conversation between turns (aider, goose and openhands via their resume flags; cline cannot resume headless in 3.0.37, so each of its turns starts fresh).

In-chat commands: /teach <statement> asserts a fact or rule (the knowledge policy of the profile's mode applies), /feedback good|bad [note] rates the last answer, /exit leaves. Every turn is recorded to .agenix/traces.jsonl, so real conversations — and the feedback on them — feed distillation.

--native drops into the executor's own TUI instead (the pre-unified behavior).

agenix serve [-d dir] [--port 7337] [--host 127.0.0.1]

Local API server — the integration surface for web GUIs. Discovers the project's profiles (profile.yaml, profiles/*.yaml) and exposes:

  • POST /api/sessions {profile} → open a session; POST /api/sessions/:id/turns {prompt} streams the turn as Server-Sent Events carrying the normalized session protocol (the same events the chat TUI renders);
  • GET /api/profiles · /api/knowledge?profile= · /api/traces?profile=&kind= — read model for GUIs (including kind=suggestion for dev review);
  • POST /api/teach · /api/feedback — same semantics as the CLI commands; every turn is recorded as a session trace.

A minimal reference client is served on /. The API has no auth: it binds to 127.0.0.1 and rejects non-local browser origins — do not expose it as is.

agenix eval -p profile.yaml -s suite.yaml [--keep-workspaces]

Runs an eval suite: a fresh workspace per task, checker, JSONL traces.

agenix learn -p profile.yaml -s suite.yaml [-i N] [--reflector cmd] [--git-commit]

The self-learning loop: baseline → reflection → candidate → promote/revert.

agenix auth …

set <name> · list · remove <name> · login <agent> · status -p profile.yaml — see Authentication.