Agent 配套工具

ax|AI 编码代理会话回顾与经验图谱工具

ax

ax 是一个本地优先的 CLI 工具,把 Claude Code、Codex 等编码代理的历史会话、技能调用与 git 记录汇入本地图谱,用于跨会话检索、成本统计和改进建议。

获取与使用

需要部署

按官方资料自行安装或部署

使用难度待核验
国内可用性待核验

2026-11-09 更新 · 本站尚未实测

项目介绍

Agent 配套工具 · 2026-11-09 更新 · 本站尚未实测

ax 自称是「面向 AI 编码代理的会话复盘闭环(the retro loop for AI coding agents)」,目标是让代理在每次会话后留下可复用的经验。README 描述的问题是:子代理完成任务后消失,试错过程不被记录,下一次会话又要从零摸索。

ax 的解决方式是:读取你本地 harness 产生的会话记录,把会话、轮次、工具调用、计划、技能、提交、文件等归一化写入一个本地图谱(嵌入式 DuckDB 文件加一个 SQLite 附属库),再在其上提供检索、成本核算、摩擦分析与改进提案。按 README 说法,这些数据都在你自己的磁盘上,不需要数据库服务器。

需要说明的是:ax 本身是命令行工具与本地图谱,它提供 ax mcp 只读查询接口和一组 agent skills,但它不是模型,也不是可直接下载的工作流文件。项目处于早期阶段,README 中由创始人本人说明「ax is early」,功能稳定性待核验。

核心能力

点击能力名称查看输入、输出和原文依据。

README 列出并可举例的主要能力包括:

  • 会话全量召回:ax recall "auth bug" 在历史轮次、提交和技能上做全文 BM25 检索。
  • 技能使用统计:ax skills taste 按 30 天窗口给已安装技能打分,判断哪些技能真正被用上。
  • 工具失败分析:ax insights tools 列出失败次数最多的工具及其退出码。
  • 成本核算:ax costs summary、ax costs for --branch 等按模型定价行把 token 换算为估算美元,可按会话、提交、分支查询。
  • 模型路由建议:ax cost split、ax dispatches --candidates、ax routing tune 用于发现把高成本模型用在机械子任务上的浪费。
  • 改进提案闭环:ax retro emit 生成结构化回顾(tried · worked · failed · next),ax improve recommend 产出按置信度排序的提案,接受后写入 .ax/tasks/ 交给代理执行,并在 3/10/30 个会话后给出裁决。
  • 本地仪表盘:ax studio 在 http://127.0.0.1:1738 打开,README 称其按需启动、浏览器关闭后自动退出。
  • 会话分享:ax share <session-id> 将脱敏后的会话发布为 GitHub Gist,并通过托管查看器渲染。

README 还提到 31 个只读图谱视图、hooks 编写与回测、会话健康指标等功能,具体细节应查阅官方文档。

实际应用场景

适用场景

适合已经在本地使用 Claude Code、Codex、Pi、Omp、OpenCode 或 Cursor 之一进行日常开发,并希望回答以下问题的开发者:某次重构花了多少 token;某个分支的成本是多少;哪些技能装了却从没用过;哪些工具反复失败;上次认证问题当时是怎么解决的。

对于只在云端网页中使用对话、不落地本地会话记录的用户,或不愿意让工具读取本地 transcript 与 git 历史的用户,当前形态并不匹配。

安装与接入

README 给出的安装方式是执行安装脚本,然后运行 setup:

curl -fsSL ax.necmttn.com/install | bash
PATH="$HOME/.local/bin:$PATH" ax setup

前置要求:README 写明需要 Bun ≥ 1.3;平台方面写的是「macOS-first」,Linux 可用于 ingest 与 CLI。其他操作系统(包括 Windows)的支持情况资料未说明,待核验。

代理侧集成有两条路径,均来自 README:

npx skills add Necmttn/ax           # agent skills: setup, retro, extract-workflow, dojo, …
claude mcp add ax -- ax mcp         # MCP server: read-only graph queries as tools

README 另提到 Codex 用户可将 ax mcp 加入 ~/.codex/config.toml,但未给出完整配置示例。MCP 的具体工具清单需查阅 docs/cli.md。

注意:README 中的安装脚本来自 ax.necmttn.com 域名,执行前建议自行审阅脚本内容;本项目以源码方式在 GitHub 提供,未提供图形安装包。

使用条件与限制

是否需要部署
需自行准备运行环境,具体要求见正文
是否需要注册
账号和认证要求见正文;未明确说明的项目仍待核验
是否需要 API Key
待核验
费用与额度
费用边界见正文,项目许可不代表模型或托管服务免费
所需权限
待核验
许可证与服务条款
待核验

权限费用与限制

数据与权限:README 的 onboarding 文案声明 ax 完全本地运行,无守护进程、无账号、无云端,ingest 阶段不上传数据、无出站调用。会离开本机的只有需要显式同意的命令:ax profile publish(发布仅含聚合数据的公开 gist)、ax profile widget(提交到 GitHub 个人主页 README)、ax contribute pattern(提交一个 pattern JSON 的 GitHub PR)、以及 ax share(导出脱敏会话为 gist)。这些声明来自项目自述,实际行为建议自行审阅源码核验。

费用:仓库以 AGPL-3.0 发布,但开源不等于所有相关成本为零。ax 自身读取的会话涉及你已付费使用的模型调用;README 提到「commercial license available」,商业授权费用与条件待向官方核验。未在资料中看到任何价格表。

模型依赖:ax 本身不调用模型即完成 ingest 与图谱查询(README 称时间线「no LLM in the loop」),但部分流程(例如 Wrapped 卡片生成)由你的代理按 brief 完成。资料未列出 ax 支持的模型清单;宿主代理可用哪些模型由各自产品决定,待核验。

平台限制:macOS 优先,Linux 部分可用;Windows 与国内网络环境下 curl 安装脚本、GitHub Gist、Discord 等可达性均未说明,待核验。

国内使用情况

网友核验 用户经验分享

与站长实测独立,不代表官方认证或本站已实测。

我要核验
0 位参与者0 份有效分项记录

最近核验:暂无有效核验。参与人数按当前项目有效身份去重;不同核验项分别统计,不合并成用户总结果。仅统计审核通过且未过期的记录。

分项统计、有效期与样本量
核验项目有效人数成功 / 部分 / 失败 / 无法判断成功率最近核验 / 有效期
官方网站访问00 / 0 / 0 / 0样本不足暂无 / 7 天
GitHub 仓库访问00 / 0 / 0 / 0样本不足暂无 / 7 天
安装与运行00 / 0 / 0 / 0样本不足暂无 / 30 天
官方服务国内连接 / MCP 连接00 / 0 / 0 / 0样本不足暂无 / 30 天
国内网络情况00 / 0 / 0 / 0样本不足暂无 / 7 天
国内模型兼容性00 / 0 / 0 / 0样本不足暂无 / 30 天
自定义 API00 / 0 / 0 / 0样本不足暂无 / 30 天
海外服务依赖
00 / 0 / 0 / 0样本不足暂无 / 30 天
海外账号要求
00 / 0 / 0 / 0样本不足暂无 / 30 天
中文界面
00 / 0 / 0 / 0样本不足暂无 / 30 天
客户端兼容性00 / 0 / 0 / 0样本不足暂无 / 30 天
账号及费用信息
00 / 0 / 0 / 0样本不足暂无 / 30 天

成功率 = 成功 ÷(成功 + 部分成功 + 失败);无法判断不计入分母。至少 5 份可判断结果才显示成功率。账号、费用、海外依赖与语言等事实项,成功表示核查结论与资料吻合,具体观察另行统计;不表示免费或没有海外依赖。不同网络、客户端和版本的结果不能直接等同。

最近有效核验

暂无审核通过且未过期的网友核验。欢迎提交真实使用记录。

查看全部有效核验 →

国内实测状态:国内可用性待核验。协议兼容和官方资料说明不等于国内网络可用。

官方网站访问
尚未实测 待核验
GitHub 仓库访问
尚未实测 待核验
官方服务国内连接
尚未实测 待核验
国内网络情况
尚未实测 待核验
国内模型兼容性
尚未实测 待核验
自定义 API
尚未实测 待核验
海外服务依赖
尚未实测 待核验
海外账号要求
尚未实测 待核验
中文界面
尚未实测 待核验
国内最后核验时间
尚未实测

许可与国内使用

仓库代码许可为 AGPL-3.0-only,LICENSE 文件已包含 AGPL-3.0 全文;README 明确写明如需 AGPL 未允许的用途可申请商业许可(docs/COMMERCIAL-LICENSE.md),具体条款待核验。

需区分三类对象:仓库代码(AGPL-3.0)、可选商业模块或授权(条件待核验)、以及会话分享使用的托管查看器 ax.necmttn.com(域名不等于服务部署地域,服务条款与数据处理方式资料未说明)。第三方模型与云服务由各自厂商授权,与本仓库许可无关。

国内使用方面,资料未说明是否有国内镜像、中文界面或国内模型适配,安装脚本与 gist 发布依赖境外网络服务,可用性待核验。

项目资料与来源

官方网站 ↗

GitHub 仓库 ↗

官方文档 ↗

字段依据与待核验事项

access:来源确认 · curl -fsSL ax.necmttn.com/install | bash

project_type:来源确认 · the retro loop for AI coding agents

原始 README(折叠技术参考)
# ax

###### the retro loop for AI coding agents

**Make your agent learn.**
Turn every agent session into a better next run.

[Website](https://ax.necmttn.com) · [Documentation](https://ax.necmttn.com/docs)

---

Every sub-agent you spawn finishes its work and disappears. Whatever it
figured out - which command failed three times before the right one, which
file actually mattered, which approach to skip - dies with it. The next
sub-agent rediscovers it from scratch. Your own next session does too.

`ax` watches every session your harness runs, spots the mistakes it
repeats, and turns them into small, repo-specific fixes you review and
apply - one at a time.

Under the hood, the `/retro` workflow pulls unreviewed sessions from the local
graph when you ask for them. It records a structured retro (*tried · worked ·
failed · next*) and turns repeated friction into proposals you review. Accepted
proposals become experiments with verdicts after 3, 10, and 30 sessions. The
next session reads what worked.

> *What did this sub-agent learn? Which experiments are still open?
> Which skills earned their keep? What did that branch cost in tokens?*
> `ax` answers these by reading what already happened.

![ax · the retro loop for AI coding agents](docs/images/og.png)

## 60 seconds in

```bash
curl -fsSL ax.necmttn.com/install | bash
PATH="$HOME/.local/bin:$PATH" ax setup   # agent skills + first ingest + doctor
```

Or skip the terminal entirely - paste this into Claude Code / Codex and your
agent installs ax, ingests your history, labels your skills, and tells you
which ones to actually use:

<details>
<summary><strong>the setup prompt - give this to your agent</strong></summary>

<!-- MANUAL MIRROR of AGENT_ONBOARDING_WITH_INSTALL in packages/onboarding-prompt/src/index.ts
     (README can't import TS). If you change the prompt, regenerate this block:
     bun -e "import('./packages/onboarding-prompt/src/index.ts').then(m=>process.stdout.write(m.AGENT_ONBOARDING_WITH_INSTALL))"
     Use the relative path, not the `@ax/onboarding-prompt` specifier - the
     latter does not resolve from a git worktree. Drift is now a test failure:
     packages/onboarding-prompt/src/readme-mirror.test.ts -->

```text
Set up ax for me, end to end. ax is a local agent-experience graph over my Claude Code + Codex history - it runs locally and I review every change.

PRIVACY (read first, so you can answer if I ask whether this is safe to run): ax is fully local - no daemon, no server to install or connect to. Ingest reads my transcripts, git history, and tool calls into a local DuckDB cache file on my machine - nothing is uploaded, there is no account, no cloud, and no outbound call at ingest. The only commands that can leave my machine are explicit opt-in, consent-gated surfaces: `ax profile publish` shares an aggregates-only JSON (counts, day streaks, model split, skill/hook names, taste-pattern summaries) to a public gist I control - NEVER transcript content, code, project names, or file paths; `ax profile widget` commits a marker-delimited block to my public GitHub profile README; `ax contribute pattern` opens a GitHub PR containing one reviewed taste-pattern JSON file. `--no-cost` strips the publish dollar figures too, and `ax profile unpublish` deletes the gist. Do NOT run `ax profile publish` or `ax profile widget` or `ax contribute pattern` as part of this setup. If I ask about privacy or data handling, answer from these facts; it's AGPL-3.0, so you can also read the source to confirm.

A note from Neco (ax's founder): ax is early and I'm hungry for feedback - every bug, wrong number, or rough edge you send back makes it sharper for everyone. Please don't hold back; if something's off, help me fix it.

CONTRIBUTE-BACK (do this whenever a trigger below fires; never publish anything without showing it to me first and getting an explicit yes): Triggers - a step fails; a fact you report looks wrong or surprising to me; you spot a clear bug or improvement in ax itself. When one fires: ask me 2-3 sharp questions to pin down what I expected, which command/hook/agent is involved, and how often - enough for a repro. Then draft a GitHub issue for github.com/Necmttn/ax, show me the full draft, and on my yes file it via `gh` (the ax-repo skill). If a session is the evidence, run `ax share --dry-run` first, show me the redacted gist, and only publish with `ax share` on my yes - then link it in the issue.

1. INSTALL - run `curl -fsSL ax.necmttn.com/install | bash` to install the ax CLI. Reference: https://ax.necmttn.com/docs

2. INGEST MY HISTORY - first run `ax ingest --dry-run` and tell me, in plain words, how long a full backfill will take. Then start the ingest in the BACKGROUND so we can keep working: run `ax ingest` as a background job with AX_PROGRESS=plain, and watch its output for progress and completion. Tell me I can watch it fill live in the dashboard - run `ax studio` and open http://127.0.0.1:1738. If it fails or lands zero data after finishing, that's a CONTRIBUTE-BACK trigger. When the ingest finishes, summarize what landed: total sessions, turns, and the top skills/tools I actually use.

3. VERIFY - run `ax doctor`. If anything isn't ok, diagnose and fix it, then re-run until it is. If the cause is a bug in ax itself (not my environment), that's a CONTRIBUTE-BACK trigger.

4. REALITY CHECK - show me the headline facts (sessions, turns, top skills + tools), then ask: does this match how I actually work? Heads-up: verification often hides inside PR commands, hooks, and subagents, so if a number reads lower than my gut says, that's a likely miss. If I disagree with any fact, that's a CONTRIBUTE-BACK trigger - my disagreement is the repro.

5. LABEL what ax can't classify - run `ax skills classify`. It writes one `.ax/tasks/classify-<skill>.md` brief per skill I use but ax can't role-tag. For each brief: read the skill, decide its role(s), and fill the YAML frontmatter at the top (`primary_role:` is required; `secondary`, `confidence`, `rationale` are optional). Run `ax roles` to see labels already in use. Then run `ax skills lint` to apply them. If it says "no unclassified skills", that's fine. Then show `ax skills weighted` and `ax skills config`; tell me which skills you labeled and why, and flag anything ax marked orphan or out-of-scope.

6. BUILD MY PROFILE + AGENT WRAPPED - first run `ax profile show` for a quick text fingerprint (sessions, active days + streak, model split, top skills, installed hooks, workflow arcs, taste patterns) and read it back to me in a few sentences. THEN build my Agent Wrapped deck, because the dashboard's Wrapped tab stays BLANK until you do - ingest does not fill it. Run `ax wrapped generate`; it writes a brief to `.ax/tasks/wrapped-generate-<date>.md`. Follow that brief: mine my graph for the answers and assemble the recap cards as `{ "cards": [{question, headline, body, sensitivity?}] }` JSON, then publish them with `ax wrapped publish --file=<your-cards.json>` (or pipe the JSON on stdin). Now my Wrapped deck is populated - tell me to run `ax studio` and open http://127.0.0.1:1738 to see it. All of this stays LOCAL: `ax profile show` and `ax wrapped publish` write only to my own machine and upload nothing. Do NOT run `ax profile publish` or `ax profile widget` or `ax contribute pattern` as part of this setup.

7. GATHER MY INSIGHTS IN PARALLEL - the three areas below are independent and only READ the local graph, so fan them out instead of running them one by one: dispatch one subagent per area, all at once (cap ~3 concurrent - they read the same local cache). Give each subagent your MOST CAPABLE / strongest-reasoning model - do NOT route these down to a cheap model. This is a one-time setup and the commands can error or return surprising output, so I want an agent that can actually diagnose, retry, and interpret what it sees, not just paste noise back. Brief each one clearly: its area, the exact commands to run, and what to return - the raw output plus a tight read of what stands out (the biggest number, anomalies, anything that looks broken). The areas: (a) SPEND - `ax cost sessions`, `ax cost routability`, `ax dispatches --candidates`; (b) FRICTION - `ax improve recommend`, `ax insights friction`, `ax insights tools`; (c) HISTORY (run inside one of my git repos) - `ax sessions here --days=30`, `ax recall "<a topic worth searching>"`. When all three return, synthesize across them for me: my single biggest cost driver and the largest concrete saving, the top 1-2 fixes worth accepting and why (if I say yes, run `ax improve accept <id>` then `ax improve lint`), and one genuinely useful thing from my history.

8. GIVE ME A NEXT STEP - recommend 1-2 under-used skills you'd reach for based on what you saw, then end with a concrete CTA: the exact command or prompt I should run next, and what outcome it will produce.
```

</details>

Then ask the graph things you couldn't ask before:

```bash
ax recall "auth bug"          # full-text recall across every past session
ax skills taste               # which skills earned their keep
ax costs for --branch main    # what a branch cost in tokens
ax sessions metrics           # graph-derived session health
ax share <session-id>         # publish a session anyone can read
ax studio                     # live dashboard at http://127.0.0.1:1738
```

Requires Bun ≥ 1.3. **No database server** - the graph is an embedded DuckDB
file plus a small SQLite sidecar for the decisions you make, so there is
nothing to install, start, or connect to. macOS-first; Linux works for ingest
and CLI (the one optional launchd agent is the telemetry receiver). Dev
install, schema, queries, benchmarks:
[`docs/development.md`](docs/development.md).

## Every harness, one graph

Six harnesses - Claude Code, Codex, Pi, Omp, OpenCode, and Cursor - plus installed
skills, local git history, and GitHub PRs with their reviews and checks, all
ingested into one local graph: sessions, turns, tool calls, plans, skills,
commits, files, friction, compaction, derived signals. Ingest is a staged
Effect pipeline; unchanged sources are skipped, so re-ingest takes seconds.
Reading keeps it current - a query against a stale graph quietly forks a
catch-up ingest in the background, so nothing has to be running while you are
not using ax. Everything is a file on your own disk - no network round-trip,
no third party, no server.

Signals are normalized across harnesses: "context ran out and got summarized"
is one queryable compaction event whether it came from Claude Code or Codex.
The pipeline in one line: **every event → typed graph → ranked interventions**.

```mermaid
flowchart LR
  cc["~/.claude/projects/<br/>Claude transcripts"]
  cx["~/.codex/sessions/<br/>Codex transcripts"]
  pi["~/.pi/agent/sessions/<br/>Pi transcripts"]
  omp["~/.omp/agent/sessions/<br/>oh-my-pi (omp) transcripts"]
  oc["OpenCode + Cursor<br/>SQLite stores"]
  sk["installed skills<br/>(.claude, .agents, plugins)"]
  g[("local git history")]
  gh["GitHub PRs<br/>reviews + checks"]

  cc --> ingest
  cx --> ingest
  pi --> ingest
  omp --> ingest
  oc --> ingest
  sk --> ingest
  g  --> ingest
  gh --> ingest

  ingest["axctl ingest<br/>(Effect pipelines)"] --> db
  db[("the ax graph<br/>session · turn · tool_call · skill · plan<br/>repository · checkout · commit · file<br/>friction · diagnostic · compaction · insight")]

  db --> cli["axctl CLI<br/>recall · skills · insights · evidence"]
  db --> dash["axctl studio<br/>on-demand dashboard"]
  db --> agent["agent skill + ax mcp<br/>project context · verify · harness"]
```

## Recall every session you ever ran

Full-text BM25 search across turns, commits, and skills - milliseconds, local:

```text
$ ax recall "auth middleware"
4 matches

2026-05-23T15:19  codex      user       acme-app   alright lets commit auth related work for now
2026-05-23T14:51  codex      assistant  acme-app   Added the HealthOS just setup. You can now run from repo root: just health dev …
2026-05-23T14:41  codex      assistant  acme-app   Findings: apple-auth.service.ts accepts extra Apple audiences from ambient env …
2026-05-19T11:08  claude     user       ax         the auth middleware retry loop - we still see exit-code 1 from bun check after …
```

## Know which skills earned their keep

Composite score over the last 30 days, across every installed skill:

```text
$ ax skills taste --limit=8
skill                              scope        score    7d     30d    total
codex:exec_command                 codex-tool  40902.5  1,124  30,500  40,389
codex:write_stdin                  codex-tool   6,957     166   4,932   6,451
codex:rescue                       command        781       0     389     605
codex:update_plan                  codex-tool   766.5      14     338     391
simplify                           user         718.5       5      89     101
codex:wait_agent                   codex-tool     713       3     497     507
codex:spawn_agent                  codex-tool     647       2     439     442
superpowers:systematic-debugging   plugin         26.5      0       6       6

(8 / 288 skills shown)
```

And which tools fail most often, so you know what to skill-up around:

```text
$ ax insights tools --limit=5
name           failure_count   exit_code   last_seen
write_stdin    647             1           2026-05-23T14:34
Edit           483             -           2026-05-23T05:14
Skill          475             -           2026-05-05T13:34
exec_command   421             1           2026-05-22T18:50
Bash           318             1           2026-05-21T22:12
```

31 read-only graph views in `ax insights`; full list in
[`docs/insights-cli-reference.md`](docs/insights-cli-reference.md).

## Put a price on everything

Token cost resolved through model pricing rows - prompt, output, cache
read/write, estimated USD - queryable by session, text, commit, or branch:

```bash
ax costs summary --since=7              # by provider/model, last 7 days
ax costs for --query "live-traces"      # cost of sessions matching turn text
ax costs for --commit 464c80b           # cost of the sessions behind a commit
ax costs for --branch feat/share        # cost of a whole feature branch
```

So "what did that refactor cost" has an answer with a dollar sign on it.

## Route the expensive model where it earns its keep

Your frontier model burns 3-10x cheaper-model rates on mechanical subagent
work unless you route it. ax measures the leak, nudges at dispatch time, and
proves whether the routing worked:

```bash
ax cost split --days=7              # main loop vs subagents, by model
ax dispatches --candidates          # model-less dispatches + est savings
ax routing tune                     # mine YOUR history for new routing classes
ax routing compile                  # regenerate the table (user classes preserved)
ax hooks install ~/.ax/hooks/route-dispatch.ts --providers=claude
```

The `route-dispatch` hook warns when a mechanical dispatch forgets an explicit
model; the `efficient-dispatch` skill (via `npx skills add Necmttn/ax`) teaches
the orchestration pattern; `ax improve recommend` surfaces a proposal when
missed savings accumulate; `ax routing tune` mines new routing classes from
your own dispatch history (judgment work is never auto-routed - vet those via
`--emit-brief`). One source of truth - `~/.ax/hooks/routing-table.json` -
measured end to end. See [docs/design/cost-routing.md](docs/design/cost-routing.md).

## Share a session like a gist

```bash
ax share <session-id>
# → https://ax.necmttn.com/s/<owner>/<gist-id>
```

Exports the full session - subagent transcripts, harness hook fires, per-turn
pricing - sanitizes it, publishes it as a GitHub Gist, and serves it through a
hosted viewer: unified tool-call cards, session timeline, cost rail, and a
per-session poster image for the link unfurl. The data stays in your gist,
under your account; the viewer just renders it.

## Watch your agents work

`ax studio` opens the dashboard over your published snapshot. It is ephemeral
by design: it binds a port only while a browser is attached and exits on its
own afterward, so there is no daemon to start, find, or stop - and nothing left
running when you close the tab:

- **Transcript view** - tool call and result as one card, skill and image
  turns folded, subagent spawns with their metrics.
- **Session timeline** - highlights, segments, and events derived from the
  graph, no LLM in the loop.
- **Session canvas** - a semantic-zoom lineage graph of sessions and the
  subagents they spawned: swimlanes, time-axis zoom up to 2000x, hover detail
  in ~30ms.
- **Live ingest** - trigger a run from the dashboard and watch stages stream;
  refresh mid-run and it resumes where it was.
- **Metrics** - `ax sessions metrics` and `ax signals` surface graph-derived
  session health (fragility cascades, plan churn, tool retries), and
  `ax sessions compare` puts two runs side by side.
- **Harness doctor** - grades how well your setup is actually working;
  every fix you apply moves the score.

## Close the loop: grounded agent files

![tried · worked · failed · next - the retro loop](docs/images/retro-loop.png)

ax recommends changes to your `AGENTS.md` / `CLAUDE.md` / skills - grounded in
evidence from your own sessions - and tracks which lines came from it:

```text
session ends           ax retro emit          # structured note: tried · worked · failed · next
proposals derive       ax improve recommend   # ranked by confidence × recency × frequency
pick one               ax improve accept <id> # writes .ax/tasks/<id>.md - hand to your agent
reconcile              ax improve lint        # marker ↔ DB ↔ task files
verdict at +3/+10/+30  ax improve verdict --set=adopted|ignored|regressed|partial
sessions               # session-count windows, not calendar days
```

Every proposal carries its evidence trail (`ax improve show <id>`). Verdicts
land on session-count windows, so a skill that stopped firing gets caught, not
forgotten.

## Author your own guards

Write a hook once in typed TypeScript, prove it against your own history, run it in Claude Code and Codex.

```bash
ax hooks init                                    # scaffold ~/.ax/hooks (TypeScript, @ax/hooks-sdk)
ax hooks backtest ~/.ax/hooks/my-guard.ts        # replay weeks of real tool calls through it first
ax hooks install ~/.ax/hooks/my-guard.ts --providers=claude,codex
ax hooks latency [--days=7] [--baseline=21]      # regression lens: recent vs baseline p95 per hook event
```

## Your agent can query all of this mid-session

Two integration paths, same graph:

```bash
npx skills add Necmttn/ax           # agent skills: setup, retro, extract-workflow, dojo, …
claude mcp add ax -- ax mcp         # MCP server: read-only graph queries as tools
```

Recommended agent loop: `ax project context --json` before work (stack, recent
friction, verification commands), do the work, `ax project verify --json`
before reporting done. For Codex, add `ax mcp` to `~/.codex/config.toml`. Tool
list and details: [`docs/cli.md`](docs/cli.md#mcp-server-tools).

## Why an experience layer

LLM agents are good at tasks. They're bad at remembering what happened.
Memory tooling today is either a giant rolling context window (expensive,
slow, lossy) or vague vector retrieval (no structure, no grounding in real
events).

`ax` takes a different shape: a **typed graph of evidence** built from the
agent's own logs. Three things fall out of that, and they're the three things
"agent experience" actually means in practice:

1. **Skill triage** - which of your installed skills get used, which never
   fire, which correlate with stuck sessions.
2. **Pre-flight grounding** - `ax project context` hands the next agent
   stack info, recent friction, and verification commands.
3. **Retro signal** - query the graph after a hard session: tool retries,
   plan churn, file edit pairings. Feed it back into the next run.

`AX` (agent experience) is what the agent perceives across sessions, reflects
on at the end of each, and turns into the next experiment. It is to AI coding
agents what retros and post-mortems are to engineering teams - a structured
reflection step that compounds. A longer take:
[`docs/manifesto.md`](docs/manifesto.md).

## Docs

- [`docs/cli.md`](docs/cli.md) - full CLI reference, costs, improve, MCP tools
- [`docs/manifesto.md`](docs/manifesto.md) - the missing layer in the agent stack
- [`docs/language.md`](docs/language.md) - coined vocabulary, the AX glossary
- [`docs/brand.md`](docs/brand.md) - design system + voice rules
- [`docs/development.md`](docs/development.md) - local setup, schema, queries, benchmarks
- [`CONTRIBUTING.md`](CONTRIBUTING.md) - PR conventions, ground rules
- [`CONTEXT.md`](CONTEXT.md) - domain glossary (Repository vs. Checkout vs. …)
- [`docs/adr/`](docs/adr/) - architecture decisions

## Community

Questions, feedback, or want to shape where ax goes next? Join the Discord:
[discord.gg/E4R88Cvr5R](https://discord.gg/E4R88Cvr5R)

## License

If it shapes your agent, you should be able to fork it.

[AGPL-3.0-only](LICENSE) © 2025 Necmettin Karakaya. A
[commercial license](docs/COMMERCIAL-LICENSE.md) is available for use that the
AGPL doesn't permit - reach out via the Discord above.
历史前置条件说明(补充参考)

Bun ≥ 1.3(README 明确);平台 macOS 优先,Linux 部分功能可用,Windows 支持待核验;需本地存在 Claude Code / Codex / Pi / Omp / OpenCode / Cursor 的会话记录及 git 历史;无需数据库服务器;安装需访问 ax.necmttn.com 与 GitHub;商业授权条件与费用待核验;模型/API Key 由宿主代理自行配置,ax 侧资料未列出具体模型支持清单。

项目来源与清单版权许可

https://github.com/Necmttn/ax

整理来源:https://github.com/slavakurilyak/awesome-ai-agents

清单版权与许可:

MIT License

Copyright (c) 2024 Slava Kurilyak

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.