Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,16 +104,16 @@ Hook scripts in `src/hooks/` are standalone Node.js scripts (no iii-sdk import).

## Testing

- All tests must pass before PR: `npm test` (699+ tests)
- All tests must pass before PR: `npm test` (950+ tests)
- Mock pattern: `vi.mock("iii-sdk")` with mock `sdk.trigger`, `kv.get/set/list`
- Test files go in `test/` with `.test.ts` extension
- Follow existing patterns in `test/crystallize.test.ts` for function tests

## Current Stats (v0.8.9)
## Current Stats (v0.9.16)

- 44 MCP tools (8 visible by default, `AGENTMEMORY_TOOLS=all` for all)
- 104 REST endpoints
- 51 MCP tools (8 visible by default, `AGENTMEMORY_TOOLS=all` for all)
- 121 REST endpoints
- 6 MCP resources, 3 MCP prompts
- 12 hooks, 4 skills
- 50+ iii functions
- 699 tests
- 950+ tests
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/stat-tools.svg"><img src="assets/tags/stat-tools.svg" alt="51 MCP tools" height="38" /></picture>
<picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/stat-hooks.svg"><img src="assets/tags/stat-hooks.svg" alt="12 auto hooks" height="38" /></picture>
<picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/stat-deps.svg"><img src="assets/tags/stat-deps.svg" alt="0 external DBs" height="38" /></picture>
<picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/stat-tests.svg"><img src="assets/tags/stat-tests.svg" alt="827 tests passing" height="38" /></picture>
<picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/stat-tests.svg"><img src="assets/tags/stat-tests.svg" alt="950+ tests passing" height="38" /></picture>
</p>

<p align="center">
Expand Down Expand Up @@ -777,7 +777,7 @@ npm install @xenova/transformers

> **MCP shim vs full server:** the published `@agentmemory/mcp` package is a thin shim. It exposes the full 51-tool surface **only when it can reach a running agentmemory server** via `AGENTMEMORY_URL` (proxy mode). With no server reachable, the shim falls back to a 7-tool local set (`memory_save`, `memory_recall`, `memory_smart_search`, `memory_sessions`, `memory_export`, `memory_audit`, `memory_governance_delete`). The `AGENTMEMORY_TOOLS=core|all` env var is a *server-side* flag — setting it in the shim's `env` block has no effect. If you see only 7 tools in Cursor / OpenCode / Gemini CLI, start `npx @agentmemory/agentmemory` (or the Docker stack) and set `AGENTMEMORY_URL=http://localhost:3111`.

### 50 Tools
### 51 Tools

<details>
<summary>Core tools (always available)</summary>
Expand All @@ -799,7 +799,7 @@ npm install @xenova/transformers
</details>

<details>
<summary>Extended tools (50 total — set AGENTMEMORY_TOOLS=all)</summary>
<summary>Extended tools (51 total — set AGENTMEMORY_TOOLS=all)</summary>

| Tool | Description |
|------|-------------|
Expand Down Expand Up @@ -1017,7 +1017,7 @@ Full registry: [workers.iii.dev](https://workers.iii.dev). Every worker there co
| Prometheus / Grafana | iii OTEL + health monitor |
| Custom plugin systems | `iii worker add <name>` |

**118 source files · ~21,800 LOC · 800 tests · 123 functions · 34 KV scopes** — all on three primitives. No `agentmemory plugin install`. The plugin system is iii itself.
**118 source files · ~21,800 LOC · 950+ tests · 123 functions · 34 KV scopes** — all on three primitives. No `agentmemory plugin install`. The plugin system is iii itself.

---

Expand Down Expand Up @@ -1128,7 +1128,7 @@ Create `~/.agentmemory/.env`:

<h2 id="api"><picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/section-api.svg"><img src="assets/tags/section-api.svg" alt="API" height="32" /></picture></h2>

107 endpoints on port `3111`. The REST API binds to `127.0.0.1` by default. Protected endpoints require `Authorization: Bearer <secret>` when `AGENTMEMORY_SECRET` is set, and mesh sync endpoints require `AGENTMEMORY_SECRET` on both peers.
121 endpoints on port `3111`. The REST API binds to `127.0.0.1` by default. Protected endpoints require `Authorization: Bearer <secret>` when `AGENTMEMORY_SECRET` is set, and mesh sync endpoints require `AGENTMEMORY_SECRET` on both peers.

<details>
<summary>Key endpoints</summary>
Expand Down Expand Up @@ -1162,7 +1162,7 @@ Full endpoint list: [`src/triggers/api.ts`](src/triggers/api.ts)
```bash
npm run dev # Hot reload
npm run build # Production build
npm test # 800 tests (~1.7s)
npm test # 950+ tests
npm run test:integration # API tests (requires running services)
```

Expand Down
4 changes: 2 additions & 2 deletions assets/tags/light/stat-tests.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions assets/tags/stat-tests.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ async function main() {
`Ready. ${embeddingProvider ? "Triple-stream (BM25+Vector+Graph)" : "BM25+Graph"} search active.`,
);
bootLog(
`REST API: 107 endpoints at http://localhost:${config.restPort}/agentmemory/*`,
`REST API: 121 endpoints at http://localhost:${config.restPort}/agentmemory/*`,
);
bootLog(
`MCP surface (opt-in via \`npx @agentmemory/mcp\`): ${getAllTools().length} tools · 6 resources · 3 prompts`,
Expand Down
17 changes: 17 additions & 0 deletions test/consistency.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,14 @@ function readText(relativePath: string): string {
return readFileSync(join(ROOT, relativePath), "utf-8");
}

function countRestApiEndpoints(): number {
const src = readText("src/triggers/api.ts");
return Array.from(src.matchAll(/api_path:\s*["`]/g)).length;
}

describe("Consistency checks", () => {
const toolCount = getAllTools().length;
const restEndpointCount = countRestApiEndpoints();

it("version.ts matches package.json", () => {
const pkg = JSON.parse(readText("package.json"));
Expand All @@ -42,6 +48,17 @@ describe("Consistency checks", () => {
expect(readme).toMatch(toolResourcePattern);
});

it("documented REST endpoint counts match registered API paths", () => {
const readme = readText("README.md");
const agents = readText("AGENTS.md");
const index = readText("src/index.ts");

expect(restEndpointCount).toBeGreaterThan(0);
expect(readme).toContain(`${restEndpointCount} endpoints on port`);
expect(agents).toContain(`${restEndpointCount} REST endpoints`);
expect(index).toContain(`REST API: ${restEndpointCount} endpoints`);
});

it("all tool names are unique", () => {
const tools = getAllTools();
const names = new Set(tools.map((t) => t.name));
Expand Down