axagent experiencelivev0.31.0

$ ax --help

CLI reference

One entry per ax subcommand, grouped by job. Each card has the signature, its key flags, and one real output receipt. Receipts over vibes.

$ mine your history

Query the graph

ax watches every coding-agent session across five harnesses and turns it into a local graph. These commands read it back.

ax ingesthere

Pull skills, transcripts, git history, and insight artifacts into the local graph.

ax ingest [--stages=a,b,c] [--since=N] [--dry-run] [--reset]
--since=N
only the last N days of transcripts/commits
--dry-run
estimate the full backfill and exit (add --json)
--stages=a,b,c
run a custom subset; --derive-only runs the derive stages
$ ax ingest --since=1
claude    parsed 12 sessions, 318 turns
git       6 repos, 41 new commits
signals   derive complete  (friction 4, recovery 9)
ingest: ok
Flags & sub-commands
  • ax ingest here scopes the run to the git repo at $PWD: the Claude stage is restricted to the matching ~/.claude/projects/<slug>/ transcript dir and git history to this repo path.
  • Codex, Pi, OpenCode, and Cursor are skipped by ingest here by default (no cwd filter yet); pass --stages to override.
  • --reset wipes the skill graph before a full re-ingest so it rebuilds clean.
  • --progress=plain|pipeline|json|off controls the live progress renderer; a non-TTY is silent unless forced.

ax sessionsherearoundnearshowcomparemetricschurn

Windowed session queries: by repo, by date, by commit, plus side-by-side and churn views.

ax sessions here|around <date>|near <sha>|show <id>|compare <a> <b>|metrics|churn
--days=N
window size (here defaults 14, around defaults ±3)
--here
scope metrics/churn to the current git repo
--json
machine output with a copy-paste `next:` follow-up envelope
$ ax sessions here --days=7
started_at                source            repo            turns  summary
------------------------------------------------------------------------------
2026-06-12T09:14:02.118Z  claude-code       acme-api          38   add retry/backoff to the uploader
2026-06-11T16:02:51.004Z  codex             acme-api          12   fix flaky integration test
(1 subagent session hidden - pass --include-subagents to show)
Flags & sub-commands
  • ax sessions here lists pwd-repo sessions (default 14d). Subagent sessions are hidden unless --include-subagents.
  • ax sessions around <date> takes a YYYY-MM-DD or ISO8601 date and a ±N-day window (--days, default 3); --project filters by slug or absolute path.
  • ax sessions near <sha> lists sessions overlapping a commit window (predecessor commit ts → this commit ts); falls back to ±3d for orphan commits.
  • ax sessions show <id> renders one session's tool-call + subagent timeline plus a durability Metrics block; --expand=<uuid> (repeatable) or --all drills into subagents, --by-role groups top skills.
  • ax sessions compare <a> <b> [...] lines up 2+ runs on duration/tokens/cost/turns/errors and stars the winner per axis; --turns adds a per-turn appendix.
  • ax sessions metrics lists graph-derived per-session metrics; --group-by=model|repo|source|week folds into rollups, --skill=<name> compares with/without the skill.
  • ax sessions churn summarizes verification churn (edit/landed/repair LOC, failed checks, episodes); --since defaults 30d.

ax recall

Full-text search across turns, commits, and skills, auto-scoped to the current repo.

ax recall <query> [--sources=turn,commit,skill] [--scope=here|all]
--sources=...
record types to search (default turn)
--scope=here|all
current repo (auto-detected) vs everything
--project=? / --skill=?
open an interactive picker
$ ax recall "retry backoff" --sources=turn,commit
turns
2 matches
2026-06-12  claude-code  assistant  acme-api  9b2c1f
  wrapped the upload in an exponential backoff retry loop

commits
1 match
2026-06-12  acme-api  4f1a8d20
  feat(upload): retry with backoff on 5xx

$ see where the money goes

Cost & routing

Receipts on token spend, then a closed loop that routes mechanical subagent work to cheaper models and measures whether it worked.

ax costmodelssessionssplit

Model and cost analytics: per-model rollups, top sessions, main-vs-subagent split.

ax cost models|sessions|split [--days=N] [--json]
--days=N
window (default 14)
--model=<name>
filter cost sessions to one model
--limit=N
cap rows for cost sessions (default 20)
$ ax cost models --days=14
model                  sessions     prompt  completion   cost
claude-opus-4               18    412,330      88,120  $42.17
claude-sonnet-4             54    980,114     201,447  $19.05

total: $61.22  (14 days)
Flags & sub-commands
  • ax cost models: per-model rollup of sessions, prompt/completion/cache tokens, and estimated cost USD.
  • ax cost sessions: the most expensive sessions with id, project, model, started_at; --model and --limit narrow it.
  • ax cost split: origin (main vs subagent) × model matrix with cost and share-of-total, plus a totals row.

ax dispatchescompile-routing

Subagent dispatch table sorted by child cost, with a candidates view for cheap-model routing.

ax dispatches [--days=N] [--limit=N] [--candidates]
--candidates
inherit + expensive + routing-class match, with est. savings
--days=N
window (default 14)
--limit=N
rows in the table (default 30)
$ ax dispatches --candidates --days=14
ts                   agent_type    description           suggest   child_cost  est_savings
2026-06-11T14:22:08  general       run the test suite    sonnet         $1.84       $1.55
2026-06-10T09:51:30  general       lint and format       sonnet         $0.92       $0.78

total est savings: $2.33
top classes: run-tests ($1.55), lint-format ($0.78)
Flags & sub-commands
  • ax dispatches: the default table shows ts, agent_type, description, dispatch_model ("inherit" when unset), child_model, child_cost_usd, plus a summary (count, % inherit, total subagent cost).
  • ax dispatches --candidates filters to inherit + expensive (fable/opus) dispatches that match a routing class, suggesting a cheaper model and estimated savings per dispatch.
  • ax dispatches compile-routing is an alias of `ax routing compile` (writes ~/.ax/hooks/routing-table.json from the built-in defaults, preserving origin:user classes).

ax routingtunecompileshow

Routing-table operations: mine your dispatch history for new classes, regenerate, inspect.

ax routing tune|compile|show [--days=N] [--out=PATH]
--dry-run
(tune) print proposals only
--emit-brief
(tune) write an agent-backtest brief for judgment cases
--apply=id,id
(tune) apply specific proposal ids post-brief
$ ax routing tune --dry-run --days=30
id                  pattern              suggest  count  addressable  judgment
run-tests           run * tests          sonnet      11       $14.20  no
lint-format         lint and *           sonnet       6        $5.40  no

2 proposals  addressable spend: $19.60  (30 days)
Flags & sub-commands
  • ax routing tune mines unmatched expensive inherit dispatches (two-token prefix clustering, ≥3 members) and auto-applies non-judgment proposals to the routing table as origin:user.
  • Judgment-flagged classes (review/design/plan/audit/...) are never auto-applied; ship them via --emit-brief → agent backtest → --apply=ids.
  • ax routing compile is a merge-preserving regenerate (defaults refresh, origin:user classes survive; refuses to overwrite a corrupt file).
  • ax routing show prints the effective table with class origins.

ax quota

Live Claude plan usage (5h / 7d windows) from the Anthropic usage endpoint.

ax quota [--json|--statusline|--swiftbar] [--max-age=N] [--fresh]
--statusline
one plain line for the Claude Code statusLine command
--swiftbar
SwiftBar/xbar menubar plugin body
--max-age=N
cache TTL seconds (default 60); --fresh forces a refetch
$ ax quota
window   used   resets in   source
5h        41%   2h 18m      live
7d        63%   3d 04h      live
Flags & sub-commands
  • Reads the Claude Code OAuth token (macOS Keychain "Claude Code-credentials", fallback ~/.claude/.credentials.json); never refreshes it.
  • Responses are cached at ~/.ax/quota-cache.json so statusline/menubar callers can poll freely; fetch failures degrade to the stale cache.
  • --json, --statusline, and --swiftbar are mutually exclusive. Render-only modes never fail loud - they print a quiet "quota n/a" and exit 0.

ax thinking

Extended-thinking and reasoning-effort analytics, per model and source.

ax thinking [--days=N] [--json]
--days=N
window (default 14)
--json
machine output
$ ax thinking --days=14
model                 sessions  think_turns  think%   think_tokens
claude-opus-4               18           94   41.2%        612,400
claude-sonnet-4             54          120   18.7%        201,330
Flags & sub-commands
  • Thinking volume (blocks/tokens) is counted from thinking content blocks at ingest; rows ingested before the fields existed read zero until a re-ingest backfills them.
  • Reasoning-effort distribution spans sources: Codex turn_context effort and Claude settings.json effortLevel stamped on sessions active at ingest time.

ax digest

Your ranked digest board - the ax signal a session-start hook pushes into the agent's context so value arrives without being asked for.

ax digest [--json] [--refresh]
--refresh
recompute the snapshot now instead of waiting for the watcher
--json
print the raw snapshot JSON
$ ax digest
[ax] your board (14d window):
  - repair-loop (927 LOC churned, 1 failed check: test)
      -> ax sessions churn --here
  - routing could save ~$292/wk (61% inherit)
      -> ax dispatches --candidates
  - 6 improve proposals pending
      -> ax improve recommend
Flags & sub-commands
  • A derive-tagged ingest stage writes ~/.ax/digest.json every ingest; the surface-digest hook reads it, dedups against ~/.ax/digest-shown.json (6h window, count cap, resolved-drop), and injects the top 3 at session start.
  • Sources: open improve proposals, routing savings, repair-loop churn, and quota burn (surfaced only above 70%). Compute and surface are split by the snapshot file, so a DB hiccup never blocks session boot.

ax usage

Your ax utilization: total runs, active days, top commands, agent-vs-tty split, and the surface you have never touched.

ax usage [--json] [--days=N]
--days=N
window in days (default 30)
--json
machine output: full UsageRollup JSON
$ ax usage
[ax] usage (30d): 147 runs across 18 active days  (agent 89 / tty 58)
top commands:
  ingest                   42
  sessions                 31
  improve                  19
  cost                     14
  quota                     9
  dispatches                8
  thinking                  7
  recall                    5
3 never used: tui, share, dojo
Flags & sub-commands
  • Usage records are written at every invocation (including failures) to ~/.ax/usage.jsonl and imported into ax_invocation at ingest time. Run ax ingest first to see populated results.
  • The never-used list shows visible top-level commands with zero invocations in the window - a quick way to spot surface you have not explored.

$ review proposals

The experiment loop

ax mines repeated mistakes and proposes small, repo-specific fixes - reviewed one at a time, then measured at +3 / +10 / +30 sessions.

ax improverecommendacceptrejectlistshowlintcheckpointverdictproposeanalyzehousekeepreset

Rank proposals, accept them as task briefs or scaffolds, and track verdicts over time.

ax improve recommend|accept <id>|lint|show <id>|verdict [<id>]
--apply
(recommend) interactive accept loop
--with-agent
(accept) dispatch a subagent to enrich a scaffolded skill
--set <verdict>
(verdict) lock adopted|ignored|regressed|partial|no_longer_needed
$ ax improve recommend --limit=3
  freq  conf    title
     7  high    Add a retry skill for flaky uploads
     4  med     Route test-suite dispatches to sonnet
     3  med     Guard against editing on main

[copied to clipboard]
Flags & sub-commands
  • ax improve recommend ranks open proposals by confidence × recency × frequency and prints paste-ready blocks with <!--ax:id--> provenance markers.
  • ax improve accept <id> emits a .ax/tasks/<id>.md brief by default; --auto-scaffold writes the artifact directly, --with-agent enriches it with a subagent.
  • ax improve lint reconciles grounded agent files (AGENTS.md / CLAUDE.md / skills) against the DB and removes consumed task briefs.
  • ax improve checkpoint computes snapshots at +3/+10/+30 sessions; ax improve verdict locks the final outcome.
  • ax improve propose is the agent write-path (read one proposal as JSON); analyze and housekeep emit briefs and sweep stale loop state.

ax retroemitlistpendingbriefreflectmetaplan

Session retros - structured reflections (tried · worked · failed · next) that feed the loop.

ax retro pending|brief --session=<id>|emit|list|reflect
--since=N
(pending) backlog window in days (default 7)
--from-file=<json>
(emit) ingest an agent's {tried,worked,failed,next} payload
--session=<id>
(brief) write a reviewer brief for one session
$ ax retro pending --since=7
2 session(s) pending retro, since=7d limit=20:
  session:9b2c1f4a  [claude-code]  acme-api  idle=2026-06-12T11:02:14Z
  session:71d0e8aa  [codex]        acme-api  ended_at=2026-06-11T16:40:08Z
Flags & sub-commands
  • The retro loop is pull-based: a watcher surfaces the backlog and the /retro skill drains it. ax does not use a Stop hook.
  • ax retro pending lists sessions with no `reviewed` edge yet (idle or ended); claude-subagent rows are hidden by default.
  • ax retro brief --session=<id> writes .ax/tasks/retro/<key>.md for the retro-reviewer subagent.
  • ax retro reflect walks clustered retro-derived proposals interactively; meta emits a JSON snapshot for a deep retro; plan registers an agent-drafted plan as a proposal.

ax dojo

Training agenda: spends surplus plan quota on a prioritized self-improvement work list.

ax dojo [--budget=N] [--until=HH:MM] [--spar] [--days=N] [--json]
--budget=N
cap the spend envelope at N% of the binding quota window
--until=HH:MM
deadline for this session (default: earliest window reset)
--spar
opt into adversarial spar items (needs >=30% spendable quota)
$ ax dojo
budget    37% of 7d window spendable  ·  until 22:59 (reset)
agenda
  1  lock 2 pending verdicts            (improve)
  2  drain 1 unfilled .ax/tasks brief   (task)
  3  mint proposals - open pool < 3     (recommend)
fed to the ax:dojo skill loop
Flags & sub-commands
  • ax dojo composes a budget envelope from the quota module (binding window remaining minus a 15% reserve, deadline = earliest window reset) and a derived, self-clearing item list.
  • Items: pending verdicts, unfilled .ax/tasks briefs, judgment-flagged routing backtests, proposal minting (when the open pool < 3), churn-hotspot experiments, opt-in spar, and an explore fallback.
  • Each item vanishes once the underlying system records the work (verdict locked, brief consumed, proposal created) - the agenda is stateless between runs.
  • Consumed by the ax:dojo skill loop; drafts land in ~/.ax/dojo/outbox/ and a per-day report in ~/.ax/dojo/reports/.

ax wrappedgeneratepublish

Agent-authored Wrapped recap cards for the dashboard landing.

ax wrapped generate [--force] | ax wrapped publish [--file=PATH]
--force
(generate) overwrite an existing brief
--file=PATH
(publish) read { cards: [...] } JSON from a file instead of stdin
$ ax wrapped publish --file=cards.json
published 6 wrapped cards - the dashboard landing serves them now
Flags & sub-commands
  • ax wrapped generate emits .ax/tasks/wrapped-generate-<date>.md - a brief instructing an agent to mine the graph and write recap cards.
  • ax wrapped publish replaces the wrapped_card set from { cards: [{question, headline, body, sensitivity?}] } JSON.

$ rank your skills

Skills & roles

What skills you actually use, what they cost in corrections, and how they map to roles in your workflow.

ax skillssearchstatsrecentunusedtasteweightedpairsrecoveryclassifytaglintby-roleroles

Skill-graph queries: usage ranking, classification into roles, and co-occurrence.

ax skills weighted|by-role <role>|roles <skill>|classify|tag <skill> <role>|lint
--window=Nd
(weighted) usage window for the ranking
--confidence=N
(tag) 0-1, default 1.0; --rationale="..." annotates
--remove
(tag) delete an existing user-source role edge
$ ax skills weighted --window=30
skill                          role          runs  weight
test-driven-development        verification    61    8.4
systematic-debugging           execution       44    6.1
requesting-code-review         verification    22    3.0
Flags & sub-commands
  • ax skills weighted ranks skills by usage × role-weight; classified skills score higher and it enters doctor mode when many are unclassified.
  • ax skills classify bulk-emits .ax/tasks/classify-*.md briefs for unclassified skills with ≥3 invocations.
  • ax skills tag <skill> <role> writes a plays_role edge (source=user, idempotent); ax skills lint applies filled briefs as source=brief edges.
  • ax skills by-role <role> and ax skills roles <skill> read the role graph back. Provider built-in tools are hidden unless --include-tools.

ax roles

List the known role labels with skill counts.

ax roles [--json]
--json
machine output
$ ax roles
role           skills
framing             8
execution          21
verification       14
(unclassified)     37
Flags & sub-commands
  • Role labels are semantic categories (framing, execution, verification, ...) tagged on skills via plays_role edges; the list includes roles with 0 skills.

ax signals

Cross-session relation signals (e.g. fragility cascades) derived from the graph.

ax signals
$ ax signals
fragility-cascade   3 sessions  acme-api/uploader.ts
correction-loop     2 sessions  flaky integration test
Flags & sub-commands
  • Pairs with `ax sessions metrics` (per-session scalars) - signals surface the cross-session relations behind them.

$ guard the harness

Hooks SDK

Author agent hooks once in typed Effect TS and run them on Claude Code + Codex. Verdicts fail open.

ax hooksconfigaddremoveeditdisableenableinitinstallbacktestsummaryinvocationssessioncases

Scaffold, install, and backtest typed hooks, plus CRUD over provider hook configs.

ax hooks init | install <file> | backtest <file> | cases | config
--providers=claude,codex
(install) fan-out targets
--days=N
(backtest) replay window (default 30)
--scope=global|project|local
(install/add) where the hook lives
$ ax hooks backtest ~/.ax/hooks/enforce-worktree.ts --days=14
enforce-worktree  -  14 days
  replayed   208 tool_call rows
  would block  6   (edits on main)
  allow      202
  warn         0   defects fail OPEN
Flags & sub-commands
  • A hook is one file in ~/.ax/hooks/ default-exporting defineHook({ name, events, matcher, run }); the fire path is `bun <file>.ts` (~70ms, no ax CLI in the hot path).
  • ax hooks init scaffolds the workspace (package.json + starter guard hooks); re-run after the SDK moves since the dep is an absolute path.
  • ax hooks install fans a hook file into provider configs idempotently; Codex requires interactive trust approval before new entries fire.
  • ax hooks backtest replays historical tool_call rows through the hook in-process (state-dependent checks use CURRENT repo state).
  • ax hooks cases runs deterministic feedback-case backtests (enforce-worktree candidate query + pass/fail verdict).

$ publish your profile

Profile & community

Render your local profile and, with explicit consent, publish it to a public gist that joins the community boards.

ax profileshowpublishunpublish

Render, publish, or unpublish your ax profile (stats + rig + taste).

ax profile show [--window=N] | publish [--yes] | unpublish
--window=N
days of history to summarize (default 30)
--no-cost
omit cost figures (sticky across republishes)
--yes
(publish) skip the first-run consent prompt
$ ax profile show --window=30
ax profile - @octocat  (last 30d)

42 sessions  ·  3.1M tokens  ·  ~$61 est
18 active days  ·  6-day streak  ·  harnesses: claude-code, codex
Flags & sub-commands
  • ax profile publish creates a public gist once and PATCHes it in place; the first run shows the exact JSON, asks for consent, then opens a community registration PR.
  • --if-stale=<hours> is the watcher path: a no-op until first consent, then it republishes when stale.
  • ax profile unpublish deletes the gist and local publish state (and resets the sticky --no-cost).

$ run the daemon

Dashboard & integration

Serve the live dashboard, expose the graph to your agent over MCP, or open the terminal UI.

ax servestatusstop

Serve the live web dashboard locally; status/stop manage the running daemon.

ax serve [--port=N] | ax serve status | ax serve stop
--port=N
dashboard port (default 8520)
$ ax serve status
ax daemon: running (pid 48213)
  dashboard  http://127.0.0.1:8520
  studio     http://127.0.0.1:8520/studio
Flags & sub-commands
  • Re-running `ax serve` against a live daemon prints the URLs and exits 0; a foreign listener gets a clean port hint.
  • status/stop resolve the instance via pidfile → /api/version probe → lsof, so they find pre-pidfile daemons too; stop only kills the pid actually LISTENing on the port.

ax mcp

Run a stdio MCP server exposing ax's read-only queries as tools to an agent.

ax mcp
$ ax mcp
ax MCP server ready (stdio) - 17 read-only tools
  recall  sessions_around  session_show  skills_weighted  ...
Flags & sub-commands
  • Exposes 17 read-only tools (recall, sessions_around, session_show, session_metrics, skills_weighted, skills_by_role, skills_roles, roles, improve_recommend, improve_show, improve_list, signal_show, cost_models, cost_split, cost_routability, dispatches, dojo_agenda).
  • Mutating ops and git-resolved queries (sessions here/near) are intentionally not exposed.

ax tui

Open the interactive terminal dashboard (skills browser).

ax tui
$ ax tui
(opens the OpenTUI skills browser)

ax share

Share a session view via the studio share viewer.

ax share <session-id>
$ ax share session:9b2c1f4a
share ready - open in the studio viewer
Flags & sub-commands
  • Builds a shareable view of one session; see the studio share viewer for the rendered output.

ax star

Star the ax repo from the CLI.

ax star
$ ax star
thanks - starred Necmttn/ax

$ install & maintain

Lifecycle

First-run setup, health checks, and keeping the CLI up to date.

ax install

One-shot setup: daemon, watcher, symlink, then runs `ax setup`.

ax install
$ ax install
installed daemon + watcher
symlinked ax -> ~/.local/share/ax
running ax setup ...

ax setup

Install the agent skills and hand first ingest to your agent via an onboarding brief.

ax setup [--agents=claude-code,codex] [--yes]
--agents=...
which harnesses to wire up
--agent-prompt
print just the paste-to-agent onboarding block
$ ax setup --agents=claude-code
installed 3 skills
verified install - hand the onboarding brief to your agent

ax doctor

Check local installation health (daemon, watcher, DB, skills).

ax doctor [--json]
--json
machine output
$ ax doctor
daemon     ok (pid 48213)
watcher    ok
database   ok (127.0.0.1:8521)
skills     3 installed

ax version

Print the installed version and optionally check GitHub releases.

ax version [--check] [--json]
--check
compare against the latest GitHub release
$ ax version
ax 0.29.0

ax update

Update ax from the latest GitHub release.

ax update [--check]
--check
report whether an update is available without installing
$ ax update --check
update available: 0.29.0 -> 0.30.0

ax daemonstatusstartstoprestart

Manage the local launchd services (DB + watcher).

ax daemon status|start|stop|restart
$ ax daemon status
daemon   running (pid 48213)
watcher  running

ax uninstall

Remove the launchd plists and the ax symlink.

ax uninstall [--purge]
--purge
also delete ~/.local/share/ax (binary + data)
$ ax uninstall
removed launchd plists and the ax symlink

$ sync the team rig

Team

Activate the shared .ax/ skills and agents committed to the repo into your local runtime, trust-gated per content hash. Iterate on artifacts privately in .ax.local/ before promoting. Executable hooks require a separate `ax team trust` review before installation.

ax teamsynctrustexperiment

Sync the team's .ax/ rig, trust-review executable hooks, and iterate on artifacts in an isolated overlay before promoting.

ax team sync|trust|experiment <start|list|promote|drop> [--dry-run] [--yes] [--allow-branch]
--dry-run
show what would change without writing anything (sync only)
--yes
approve activation / installation of new or changed artifacts
--allow-branch
bypass the default-branch guard for trust (advanced)
$ ax team sync --yes
[ax team sync]
activated 2:
  + skill:tdd
  + agent:reviewer
1 unchanged
gated (executable hooks - run `ax team trust` to install):
  ~ enforce-worktree

$ ax team trust --yes
[ax team trust] installed 1 executable hook(s)
  + hook:enforce-worktree
Flags & sub-commands
  • ax team sync: scans .ax/skills/, .ax/agents/, and .ax/hooks/ in the current git repo root. Skills and agents are non-executable and safe to copy; hooks in .ax/hooks/ are reported as gated but never activated.
  • ax team trust: reviews + installs executable hooks from .ax/hooks/ using sha256 trust-on-change. Only installs when on the repo's default branch — refuses on feature branches.
  • ax team experiment: isolate→iterate→promote loop. `start` copies or scaffolds an artifact into a gitignored .ax.local/ overlay; `list` shows active experiments; `promote` moves the overlay into committed .ax/ + stages with git add (open a PR after); `drop` discards the overlay. Sync annotates overlay artifacts as (experiment).
  • Content hashes prevent re-activating unchanged artifacts (idempotent). Changed artifacts are re-activated and their trust records updated.
  • Fail-safe: non-TTY without --yes prints a summary and exits without installing anything.
  • v1 limitation: team hooks must be self-contained or import from @ax/hooks-sdk.