91 Commits

Author SHA1 Message Date
Rohit Ghumare 7af05ecf78 chore: bump version to 0.8.1 v0.8.1 2026-04-09 19:10:52 +01:00
Rohit Ghumare be24ef72ed fix: viewer not found when installed via npx (#109)
Build script now copies src/viewer/index.html to dist/viewer/.
Also added more candidate paths for index.html resolution so
the viewer works from dist/ (npx), src/ (tsx dev), and repo root.
2026-04-09 19:09:37 +01:00
Rohit Ghumare 122efdeb44 docs: add all major agents to README, prioritized by popularity
Add OpenClaw (345K stars), Codex CLI (62K), Cline (59K), Aider (42K),
Goose (33K), Kilo Code (1.5M users) to both Quick Start table and
Supported Agents section. Ordered by GitHub stars/user count.
2026-04-09 13:48:20 +01:00
Rohit Ghumare e88de77f98 Merge pull request #107 from rohitg00/feat/hermes-integration
feat: Hermes Agent memory provider plugin
2026-04-09 13:43:58 +01:00
Rohit Ghumare 9173b090f4 fix: address review findings on Hermes plugin
- SSRF prevention: validate URL scheme (http/https only) before urlopen
- on_pre_compress: inject fetched context into messages list (was no-op)
- Remove unused self._secret; _api reads from env directly
2026-04-09 13:43:34 +01:00
Rohit Ghumare 112e6f4bc0 feat: add Hermes Agent memory provider plugin
Two integration paths:
1. MCP server (zero code) - add to ~/.hermes/config.yaml
2. Memory provider plugin (deeper) - hooks into Hermes agent loop

Plugin implements the full MemoryProvider ABC:
- prefetch() injects relevant memories before each LLM call
- sync_turn() captures conversation turns in background (non-blocking)
- on_session_end() marks sessions for summarization
- on_pre_compress() re-injects context before compaction
- on_memory_write() mirrors MEMORY.md writes
- system_prompt_block() injects project profile
- 3 tools: memory_recall, memory_save, memory_search

Uses only stdlib (urllib, json, threading). No new dependencies.
2026-04-09 13:33:10 +01:00
Rohit Ghumare 699549ddea Merge pull request #106 from rohitg00/docs/readme-polish
docs: README polish — badges, cost table, architecture diagram
2026-04-09 13:08:29 +01:00
Rohit Ghumare 6fd22d3b1d fix: remove emdashes and AI-sloppy phrasing from README 2026-04-09 13:08:05 +01:00
Rohit Ghumare e602f6e58a docs: README polish — badges, cost table, flow diagram, methodology note
- Add npm version, CI status, license, and stars badges
- Add stats table below intro (95.2% R@5, 92% fewer tokens, 43 tools, 12 hooks, 0 deps)
- Add cost comparison table ($500/yr extraction-based vs $10/yr agentmemory vs $0 local)
- Add memory flow diagram (observe → compress → index → inject)
- Add methodology transparency note on benchmark section
- Update nav links (add Benchmarks, shorten labels)
2026-04-09 13:05:55 +01:00
Rohit Ghumare 15250b3bed docs: move Quick Start to top of README, right after intro 2026-04-09 11:26:40 +01:00
Rohit Ghumare 8a32a4b50a docs: gstack-style Quick Start — paste one block, agent does the rest
Replace numbered steps with a single copy-pasteable instruction block
for Claude Code. The agent reads it and handles: engine startup, plugin
install, hook registration, and verification.

Other agents consolidated into a clean table (Cursor, Gemini CLI,
OpenCode, Claude Desktop, SkillKit, REST API) with inline config.
2026-04-09 11:22:16 +01:00
Rohit Ghumare 798700f2a3 chore: bump version to 0.8.0 v0.8.0 2026-04-09 09:07:57 +01:00
Rohit Ghumare 6894843a92 docs: add MiniMax provider, ANTHROPIC_BASE_URL, search project filter
- LLM Providers table: add MiniMax, note ANTHROPIC_BASE_URL support
- Env vars: add MINIMAX_API_KEY, MINIMAX_MODEL, ANTHROPIC_BASE_URL
- Search endpoint: note optional project/cwd filters
- Fallback chain example: include minimax
2026-04-09 09:06:56 +01:00
Rohit Ghumare cdb06bb5a5 Merge pull request #103 from Garygaoxiang/feat/minimax-provider-and-anthropic-base-url
feat: add MiniMax provider and fix ANTHROPIC_BASE_URL not passed to SDK
2026-04-09 09:04:39 +01:00
Rohit Ghumare 7d644491d1 Merge pull request #105 from Getty/feat/search-project-filter
feat(search): add optional project/cwd filter to mem::search and /agentmemory/search
2026-04-09 09:04:37 +01:00
Rohit Ghumare 6614d0c9d7 Merge pull request #102 from rohitg00/feat/dx-improvements
feat: DX improvements — dark mode, status command, memory previews
2026-04-09 08:58:54 +01:00
Rohit Ghumare 4c1184b185 fix: address review findings on DX improvements
- README: add `text` language tag to fenced code blocks (MD040)
- cli.ts: sessions endpoint returns {sessions: [...]}, not a raw array
- viewer: token budget from URL param instead of hardcoded 2000
- viewer: applyTheme takes persist param, auto-detection doesn't save to
  localStorage (prevents OS preference from being overridden on first load)
2026-04-09 08:53:40 +01:00
Torsten Raudssus d145b0e3ab perf(search): load observations in parallel after session filter
Address CodeRabbit nitpick on #105: split the result-building loop into
two phases. First filter sequentially (benefits from the per-call
session cache), then batch the kv.get(observations) calls through
Promise.all instead of awaiting them one at a time.
2026-04-09 05:17:32 +02:00
Torsten Raudssus 26fea3a675 fix(search): validate inputs and avoid logging raw paths
Address CodeRabbit review on #105:

- mem::search now validates query (non-empty string), limit
  (positive integer, capped at MAX_LIMIT=100), project and cwd
  (must be strings if provided). Throws on invalid input instead
  of silently coercing.
- Renamed local 'limit' to 'effectiveLimit' to avoid shadowing.
- ctx.logger no longer emits raw cwd/project (host paths) — logs
  only hasProjectFilter/hasCwdFilter booleans.
- api::search whitelists request body fields, returns 400 on
  malformed input, and constructs an explicit payload for
  sdk.trigger instead of forwarding req.body.
2026-04-09 05:01:56 +02:00
Torsten Raudssus a732ad1e23 feat(search): add optional project/cwd filter to mem::search and /agentmemory/search
Closes #104

The /agentmemory/search HTTP endpoint and the underlying mem::search
function previously accepted only { query, limit }, returning hits
across all projects on the host. Sessions are already created with
{ project, cwd } via session::start, so this just exposes that scope
on search.

- mem::search now accepts optional project and cwd. When set, results
  are filtered by looking up each hit's owning Session.
- To keep the post-filter from starving the result set, the index
  fetch is over-fetched (max(limit*10, 100)) when filtering, then
  trimmed to limit after filter.
- Session lookups are cached per call.
- api::search forwards the new params; fully backward compatible.
2026-04-09 04:29:46 +02:00
翔 高 ab0901f25d feat: add MiniMax provider and fix ANTHROPIC_BASE_URL not passed to SDK
- Add `MinimaxProvider` (`src/providers/minimax.ts`) that calls MiniMax's
  Anthropic-compatible API via raw `fetch` instead of the Anthropic SDK.
  The SDK auto-injects `x-stainless-*` headers that MiniMax rejects with 403;
  using `fetch` directly avoids this entirely.

- Fix `AnthropicProvider` constructor to accept an optional `baseURL` and
  forward it to `new Anthropic({ apiKey, baseURL })`.  Previously the provider
  always connected to `api.anthropic.com` even when `ANTHROPIC_BASE_URL` was
  set in `.env`, because `getMergedEnv()` returns a plain JS object that the
  Anthropic SDK never sees.

- `detectProvider()` in `config.ts`:
  - Checks `MINIMAX_API_KEY` first and returns `provider: "minimax"`.
  - Propagates `ANTHROPIC_BASE_URL` as `baseURL` in the Anthropic config.

- Update `ProviderConfig` in `types.ts` to include optional `baseURL` field.
- Update `ProviderType` union to include `"minimax"`.
- Update `VALID_PROVIDERS` set in `config.ts` to include `"minimax"`.
2026-04-09 09:11:03 +08:00
Rohit Ghumare 75a2d35ed6 feat: DX improvements — dark mode, status command, memory previews, token savings
Viewer:
- Dark mode toggle (persists to localStorage, respects prefers-color-scheme)
- Fix hardcoded canvas colors for dark theme (grid, labels, tooltips)
- Memory search shows 2-line content preview with search term highlighting
- Concept tags shown inline on memory cards (max 4)
- Token Savings stat card on dashboard (estimates savings vs full context)

CLI:
- New `agentmemory status` command — shows connection, health, sessions,
  graph stats, viewer URL without opening browser

README:
- SkillKit universal install: `npx skillkit install agentmemory` (32+ agents)
- "First Steps After Install" section with worked Session 1 → Session 2 example
- Shows actual compressed observation format and context injection
- "How to verify" checklist
2026-04-09 00:18:27 +01:00
Rohit Ghumare 8c1890e64e revert: keep original banner.png, remove banner.svg 2026-04-08 17:57:50 +01:00
Rohit Ghumare 0e4a57570e assets: add SVG logo, icon, and banner
- logo.svg: full logo mark with memory tiers + retrieval spark
- icon.svg: compact 64x64 app icon variant
- banner.svg: README banner with tagline, stats, supported agents
- README: switch from banner.png to banner.svg

Design: 4 memory tiers (cold→hot) with orange accent (#FF6B35),
retrieval lines converging to a spark node, fading dots for decay.
2026-04-08 13:13:17 +01:00
Rohit Ghumare 29cbaa7624 chore: bump version to 0.7.9 v0.7.9 2026-04-08 10:52:30 +01:00
Rohit Ghumare e6366e5c03 fix: skills path ./skills/ instead of ../skills/ (#94)
Claude Code resolves skill paths relative to the plugin root (the
directory containing .claude-plugin/), not relative to plugin.json.
2026-04-08 10:51:56 +01:00
Rohit Ghumare 4ce4003a10 docs: lead with outcomes, not architecture
Rewrite README opening to focus on what the user gets ("your agent
remembers everything, no more re-explaining") instead of internal
architecture ("triple-stream retrieval, 4-tier consolidation").
2026-04-08 10:35:31 +01:00
Rohit Ghumare 185a784ba7 Merge pull request #101 from Tanmay-008/ui/graph-viewer
Thanks @Tanmay-008! Nice UI improvements to the graph viewer.
2026-04-08 10:29:51 +01:00
Rohit Ghumare 805620aca1 chore: bump version to 0.7.8 v0.7.8 2026-04-08 10:28:11 +01:00
Rohit Ghumare 740c7b90a1 fix: plugin hooks and skills validation errors (#100)
- hooks.json: wrap each hook in { hooks: [{ type, command }] } format
  (Claude Code expects nested hooks array, not flat type/command)
- plugin.json: change skills from explicit file paths to directory
  reference ["../skills/"] matching working plugin convention
2026-04-08 10:27:25 +01:00
Rohit Ghumare 61d0c43798 docs: update agent references — Gemini CLI, OpenCode, Cursor over Windsurf
Replace Windsurf with Gemini CLI and OpenCode in Quick Start, Supported
Agents, and MCP sections. Add concrete setup commands for each agent.
2026-04-08 10:25:07 +01:00
Rohit Ghumare 57b0eeebfa docs: update README with LongMemEval results and fix inconsistencies
- Lead with 95.2% R@5 on LongMemEval-S (ICLR 2025) instead of old 64% internal number
- Add LongMemEval benchmark table to README benchmarks section
- Fix Quick Start: reorder to start→connect→verify, add MCP configs for
  Cursor/Windsurf/Claude Desktop/REST API (not just Claude Code plugin)
- Fix version in health example (0.7.4 → 0.7.7)
- Fix test count (627 → 646)
- Fix source file count (113 → 118)
- Fix LOC count (~20,000 → ~21,800)
- Fix function count (89 → 123 mem:: functions)
- Fix MCP tools table header (38 → 43)
- Fix MCP tools reference in chooser table (41 → 43)
- Cross-reference LongMemEval from QUALITY.md
2026-04-08 10:24:24 +01:00
Rohit Ghumare 565c2388a2 bench: add LongMemEval-S benchmark (95.2% R@5 hybrid, 86.2% BM25) (#91)
Run agentmemory on LongMemEval-S (ICLR 2025, 500 questions) using the
same dataset and metric (recall_any@5) as MemPalace for direct comparison.

Results:
- BM25+Vector hybrid: 95.2% R@5, 98.6% R@10, 87.9% NDCG@10
- BM25-only: 86.2% R@5, 94.6% R@10, 73.0% NDCG@10
- MemPalace raw vector: 96.6% R@5 (1.4pp gap, same embedding model)

Clearly labels these as retrieval recall, not end-to-end QA accuracy.
2026-04-08 10:17:28 +01:00
tanmaishi 3652276448 ui(viewer): update graph interface with grid, zoom, and glow effects 2026-04-08 13:36:42 +05:30
Rohit Ghumare 8704131745 chore: bump version to 0.7.7 v0.7.7 2026-04-07 19:56:12 +01:00
Rohit Ghumare fbded55b29 fix: plugin.json validation errors (#94)
- author: change from string to object {name, url}
- hooks: remove field (auto-loaded by convention from hooks/hooks.json)
- skills: change from directory string to explicit file path array
v0.7.6
2026-04-07 19:54:13 +01:00
Rohit Ghumare b81682da8b chore: bump version to 0.7.6 2026-04-07 19:43:17 +01:00
Rohit Ghumare 69bb787629 feat: cross-encoder reranking, working memory, skill extraction (#93)
* feat: cross-encoder reranking, working memory, skill extraction (#90, #58, #57)

- reranker.ts: opt-in cross-encoder rerank after hybrid search via
  RERANK_ENABLED=true, uses @xenova/transformers MiniLM-L-6-v2,
  graceful fallback when unavailable
- working-memory.ts: core memory (pinned facts always in context) +
  auto-paging of archival memories by importance/recency/access score,
  5 new functions (core-add, core-remove, core-list, working-context,
  auto-page)
- skill-extract.ts: auto-generate reusable procedural skills from
  completed sessions via LLM, with reinforcement on re-extraction,
  skill-match for querying relevant skills (3 new functions)
- ProceduralMemory type extended with expectedOutcome, tags, concepts,
  sourceObservationIds
- 19 new tests, 646 total passing

Closes #90, closes #58, closes #57

* fix: add 0.8.0 to supported import versions, bump plugin.json

* fix: address CodeRabbit review — audit, fingerprint, guards, archive

- skill-extract: reject non-completed sessions, fingerprint full
  procedure (title+trigger+steps) not just title, audit reinforcement
- working-memory: add recordAudit for core-add/core-remove/auto-page,
  auto-page now archives to KV.memories instead of deleting
- reranker: cache pipelineUnavailable to avoid repeated import retries
- hybrid-search: rerank over larger pool (max(limit,20)) then slice
- types: add skill_extract/core_add/core_remove/auto_page to AuditEntry

* fix: address remaining CodeRabbit review findings

- Parse RERANK_ENABLED with === "true" instead of truthy coercion
- Remove unused project param from mem::skill-list
- Remove unused sessionId/project/query params from mem::working-context
- Use generateId("mem") for archived core entries to avoid ID collision

* fix: address CodeRabbit round-2 findings

- Make skill reinforcement idempotent (skip if sessionId already present)
- Parallelize summary + observations fetch in skill-extract
- Use continue instead of break for oversized unpinned core entries
- Buffer access-counter writes with Promise.allSettled (non-blocking)
- Decouple rerank window (fixed 20) from retrieval depth
2026-04-07 19:42:07 +01:00
Tanmay Shirbhayye 57bf5f136c fix: update graph viewer env variable instruction (#97)
* fix: update graph viewer env variable instruction

* Delete pnpm-lock.yaml

---------

Co-authored-by: tanmaishi <tanmays@>
2026-04-07 18:44:50 +01:00
Rohit Ghumare ea2eddce83 chore: bump version to 0.7.5 v0.7.5 2026-04-07 16:27:50 +01:00
Rohit Ghumare 9d607c1c37 fix: resolve 6 installation bugs breaking fresh setup (#95)
- Update zod from ^3.23.0 to ^4.0.0 (claude-agent-sdk peer dep conflict)
- Mount iii-config.yaml in docker-compose.yml (missing /app/config.yaml)
- Change host binding from 127.0.0.1 to 0.0.0.0 for Docker compatibility
- Switch npm start from index.mjs to cli.mjs (auto-starts iii-engine)
- Fix CLI health check to detect engine via any HTTP response, not just worker route
- Handle EADDRINUSE on viewer port gracefully instead of crashing
- Fix README step numbering and version in health example
2026-04-07 16:25:28 +01:00
Rohit Ghumare 1fa0dcefab chore: bump version to 0.7.4 v0.7.4 2026-04-06 16:18:04 +01:00
Rohit Ghumare 9c27eff610 feat: implement reflect — auto-synthesize insights from memory clusters (#89)
Adds mem::reflect: traverses knowledge graph, groups related memories
by concept clusters, synthesizes higher-order insights via LLM.

New files:
- src/prompts/reflect.ts — LLM prompt for insight synthesis
- src/functions/reflect.ts — 4 functions: reflect, insight-list,
  insight-search, insight-decay-sweep
- test/reflect.test.ts — 13 tests

New type: Insight (confidence-scored, fingerprint-deduped, decayable)
New KV scope: mem:insights
New MCP tools: memory_reflect, memory_insight_list (in ESSENTIAL set)
New REST: POST /reflect, GET /insights, POST /insights/search
Hooks into consolidation pipeline as "reflect" tier after semantic

Review fixes applied:
- Fixed project filter no-op (was discarding filter result)
- Fixed BFS depth tracking (standard level-count pattern)
- Added attribute-order constraint to LLM prompt
- Whitelisted fields in api::insight-search (no raw body passthrough)
- Fixed Jaccard fallback to compare document-id sets not concept strings

43 MCP tools, 103 REST endpoints, 627 tests passing
2026-04-06 16:08:34 +01:00
Rohit Ghumare 034869b42c chore: bump version to 0.7.3 v0.7.3 2026-04-06 15:38:10 +01:00
Rohit Ghumare b597e639bd feat: viewer Actions + Crystals tabs (#88)
Actions tab:
- List view with status badges, priority, tags
- Status filter dropdown (pending/active/done/blocked/cancelled)
- Search across title, description, tags
- Frontier actions highlighted with lightning bolt
- Parallel fetch of actions + frontier data

Crystals tab:
- Card layout with narrative, key outcomes, lessons
- Files affected and source action IDs
- Reuses dashboard crystals data to avoid duplicate fetch
- Search across narrative, outcomes, lessons

Review fixes applied:
- Declared frontier: [] in state init
- Sort on copy (items.slice().sort) not in-place
- Escaped tags with .map(esc)
- Guarded c.keyOutcomes/c.lessons/c.narrative with || [] in search
- Reuse dashboard crystals to avoid duplicate API call

614 tests passing
2026-04-06 13:28:07 +01:00
Rohit Ghumare 5510e94e39 fix: simplify review — temporal-graph name, test precision, stale counts
- Fix README: temporal-graph → temporal-graph-extract + temporal-query
- Fix test precision: toBeCloseTo(0.55, 1) → precision 2 (±0.005)
- Fix stale test counts: 581 → 614 across README and AGENTS.md
- Add obsidian export error-path test (errors undefined on success)

614 tests passing
2026-04-06 13:17:48 +01:00
Rohit Ghumare 1717083bff docs: complete function table — 89 functions organized by category
Fixes #92

Replaced flat 57-row table with categorized table covering all 89
mem:: functions. Organized into 22 categories: Core Memory, Search,
Memory Evolution, Knowledge Graph, Actions, Leases, Routines, Signals,
Checkpoints, Mesh, Sentinels, Sketches, Crystals, Lessons, Facets,
Diagnostics, Flow, Branch, Team, Governance, Snapshots, Export.
2026-04-06 12:41:50 +01:00
Rohit Ghumare 45eb99d656 fix: CrystallizableAction type, npm package size, add lesson + obsidian tests
Fixes #84: Change CrystallizableAction to Action in crystallize.ts:157
Fixes #85: Add "files" field to package.json (40MB → 11.6MB)
Fixes #86: Add 22 tests for all 5 lesson functions
Fixes #87: Add 10 tests for obsidian-export

613 tests passing (was 581)
2026-04-06 12:20:20 +01:00
Rohit Ghumare 031eff7322 chore: bump version to 0.7.2 across all files v0.7.2 2026-04-05 11:32:15 +01:00
Rohit Ghumare e26320e3aa feat: auto-install iii-engine, clack CLI, viewer lessons tab, README update
CLI (src/cli.ts):
- Auto-install iii-engine via curl | sh with interactive clack/prompts
- Edge cases: Windows (manual install note), curl missing, PATH fallback
- Error shows all install methods: curl | sh, cargo install, Docker
- Spinner feedback for install, engine start, readiness check

Viewer (src/viewer/index.html):
- Version v0.5.0 → v0.7.0
- Added Lessons tab with search, confidence gauges, source badges
- Added Lessons + Crystals stat cards to dashboard
- Dashboard fetches lessons and crystals data

README:
- Quick start is now single command: npx @agentmemory/agentmemory
- Prerequisites: iii-engine via curl | sh (not npm)
- Updated all stale counts and version references

AGENTS.md: test count 573 → 581

581 tests passing, all builds clean
2026-04-05 11:28:49 +01:00