Repository navigation
Add persistent memory tool for agent - #679
Conversation
Co-authored-by: Eden Reich <[email protected]>
…ted config Rework the persistent memory tool into the Claude Code memory model: - Store durable facts as individual <slug>.md files (frontmatter name/description/metadata.type) under a global ~/.infer/memory dir, catalogued by a tool-maintained MEMORY.md index that is injected into context each session, replacing the single project-level memory.md. - Operations are read/write/delete; the tool keeps the index in sync and writes atomically, fixing writes the .infer/ protected-path guard would otherwise reject. - Move settings out of config.yaml into a dedicated memory.yaml, seeded in the home directory (create-if-absent) since memory is global. - Enable reminders by default and prune memory-consult when memory is off.
|
@infer /model ollama_cloud/glm-5.2 is it ready for merge? |
|
@claude Is it ready for merge? |
|
Claude finished @edenreich's task in 3m 25s —— View job Merge readiness review - PR #679
Verdict: functionally ready ✅ - two threads to resolve firstThe implementation is solid, CI is fully green, and the test coverage is comprehensive. There's nothing blocking on the code itself. Before clicking merge, I'd just resolve the stale review threads and decide on one bundled default change (details below). CIBoth workflow runs are green - What I verified
1. Your earlier review comments are stale (please resolve)The 8 review comments from 13:31-13:33 all target a previous implementation - their 2. One genuine nit still open: test import alias
"github.com/inference-gateway/cli/config"Your suggestion was to alias it for consistency with Worth a conscious decision (non-blocking)
RecommendationCode and tests are merge-ready. I'd (1) resolve the 8 outdated review threads, (2) optionally apply the import-alias nit, and (3) confirm the reminders-on-by-default change is intended. After that, ship it. 🚀 |
|
@infer /model ollama_cloud/glm-5.2 Can you address the nit-picking from Claude? |
|
I'm cooking...will get back to you soon... Pull Request✅ Infer Result: SuccessThe nit from Claude's review has been addressed and pushed. No further work is needed. Model: Tokens: 159,763 in · 1,295 out · 161,058 total (13 requests) Tool calls: 13 total · 100% success rate Triggered by edenreich · Infer Action |
Co-authored-by: Eden Reich <[email protected]>
## [0.126.0](v0.125.0...v0.126.0) (2026-06-30) ### 🚀 Features * add persistent memory tool for agent ([#679](#679)) ([a487b13](a487b13)) * **agent:** interactive subagent management and unified background-work tracking ([#684](#684)) ([343e083](343e083)) ### 🐛 Bug Fixes * **chat:** bind opt+backspace and ctrl+backspace to delete-word-backward ([#697](#697)) ([173fe83](173fe83)), closes [#689](#689) [#576](#576) * **a2a:** retain completed background tasks in /tasks ([#691](#691)) ([#701](#701)) ([43b8e13](43b8e13)) * **autocomplete:** surface arguments for one-of/all-optional tool schemas ([#698](#698)) ([655b2e4](655b2e4)) ### ♻️ Code Refactoring * add .gitignore by default to the projects dir ([4717deb](4717deb)) * enable memory by default ([86c2158](86c2158)) * make infer config userspace-first ([#682](#682)) ([1e77e42](1e77e42)), closes [#680](#680) * **tui:** single event-loop ingress - one notifier, no self-rescheduling pollers ([#700](#700)) ([2ab8854](2ab8854)) * standardize comment punctuation by replacing em dashes with hyphens ([78f53a8](78f53a8)) ### 📚 Documentation * fix docs/ drift found by the README-to-codebase audit ([#687](#687)) ([413047a](413047a)), closes [#572](#572) [#686](#686) * sync README and reference docs with the codebase ([#685](#685)) ([c328423](c328423)), closes [#572](#572) [#684](#684) [#684](#684) ### 👷 CI/CD * **deps:** update CLAUDE workflow to version 0.14.5 ([eaba2b3](eaba2b3)) ### 🧹 Maintenance * add .infer to .gitignore ([08ef319](08ef319)) * **deps:** bump infer CLI v0.124.0 -> v0.125.0, infer-action v0.19.0 -> v0.19.1 ([#681](#681)) ([e9e7e21](e9e7e21)) * remove agent definitions ([4f7fd7d](4f7fd7d)) * remove unused configuration and shortcut files ([4c611db](4c611db)) * update claude-code to 2.1.191 ([729e81c](729e81c))
|
🎉 This PR is included in version 0.126.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Adds a persistent, cross-session Memory tool for the agent, modeled on the Claude Code memory system.
How it works
~/.infer/memory/holding a tool-maintained indexMEMORY.md(one line per fact) plus individual<slug>.mdfact-files, each with YAML frontmatter (name,description,metadata.type∈user | feedback | project | reference).read(no name → the index; with a name → one fact in full),write(upsert a fact and its index entry),delete(remove a fact and its index entry). The tool keepsMEMORY.mdin sync automatically and writes atomically.MEMORY.mdindex is injected into the agent's context at the start of each session; the agent loads individual facts on demand.Configuration
memory.yaml(notconfig.yaml), alongside the other split-out config files:enabled(defaultfalse),dir(override; defaults to~/.infer/memory),max_chars(cap on the injected index). Env overrides:INFER_MEMORY_ENABLED/INFER_MEMORY_DIR/INFER_MEMORY_MAX_CHARS.infer initseedsmemory.yamlin the home directory (~/.infer/memory.yaml), create-if-absent so re-running init never clobbers an enabled config or blocks init across projects.Reminders
memory-consultreminder nudges the agent to consult and record durable facts, and is automatically pruned at load time when memory is disabled.Notes
.infer/protected-path guard would otherwise reject writes under~/.infer/..infer/.