You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE] docs: add a runnable example for persistent memory #1935
Domain: memory. Persistent memory is advertised in the README feature list and is on by default, but no example shows it. docs/memory.md lists the memory.yaml keys only, and says nothing about what the Memory tool calls look like (operation: read|write|delete, name, description, type, content, optional project - see internal/tools/Memory.yaml), where fact-files and the MEMORY.md index land on disk, how the index is injected into the next session, or how the git backend (backend.type: git, sync.on_start, sync.on_finish) behaves. A user cannot see a fact written in one session and recalled in the next without trying it on a real model.
Acceptance Criteria
Add examples/memory/ with a Taskfile.yml and scenarios.yaml where the tokenless mock model calls Memory with operation: write in one infer headless run, using a demo HOME and memory.dir pointed into the example directory
A second task runs a new infer headless session and shows the MEMORY.md index in the prompt context (infer debug agent system_prompt) and a Memoryoperation: read call returning the fact
A task shows operation: delete removing the fact and its index entry, and INFER_MEMORY_ENABLED=false removing the index and the memory-consult and memory-hygiene reminders
examples/memory/README.md shows the on-disk layout (global vs per-project facts) and a short backend.type: git snippet with the exact command to run it
docs/examples.md lists the new example and docs/memory.md links to it
Everything is verified: clean tree (nothing ahead), draft PR open on the right branch. Closing out the todos and wrapping up:
All work is complete and verified. Final state: clean tree on fix/issue-1935, amended commit 9e95667f pushed, draft PR #1938 open, board item moved to QA, and my memory index repaired (single, capped fact entry with the new runner gotcha).
Summary
Resolves issue #1935. I added a runnable persistent-memory example and linked it from the docs, validating every task end-to-end offline on the tokenless mock model.
examples/memory/Taskfile.yml - write, store, recall, reminders, delete, disabled, chat, an end-to-end all, plus build/home/clean. Every session runs against a demo HOME with INFER_MEMORY_DIR (memory.dir) pointed into the example, and INFER_MEMORY_BACKEND_TYPE=local pinned inline so an exported CI-agent memory config cannot shadow the example's behavior.
examples/memory/scenarios.yaml - mock scenarios for Memorywrite, read, and delete plus a say hello prompt for the reminder demos.
examples/memory/reminders.yaml - demo entry (merge: true) lowering the memory-hygiene nudge to once_after: 1 so a short scripted session can show it firing.
examples/memory/README.md - what-to-expect sections with real captured output, the on-disk global vs per-project layout, and a backend.type: git snippet with the exact command.
docs/examples.md / docs/memory.md - the example listed and linked.
Validation on the runner
task -d examples/memory all passes the whole story: the write session lands demo-build-commands.md plus its MEMORY.md entry (indexed: true), a fresh session shows the injected PERSISTENT MEMORY INDEX in infer debug agent system_prompt and reads the fact back, both memory-consult and memory-hygiene system-reminder events fire, delete empties the index, and INFER_MEMORY_ENABLED=false removes the index section and prunes both reminders.
One hermeticity trap surfaced and was fixed: the runner exports INFER_MEMORY_BACKEND_TYPE=git with a repo, which silently git-initialized the demo store and left a stray ..memory.sync.lock that had slipped into the first commit - the example pins the local backend and task clean removes the lock; the commit was amended before push.
Also repaired a duplicate entry in my persistent memory index for the example-validation fact and recorded the INFER_MEMORY_BACKEND export gotcha there.
Risk to note: the chat task is interactive and follows the established hooks/skills pattern, so it was not exercised head-to-head here; everything else ran green on this runner.
Activity
edenreich commentedon Nov 22, 2026
@infer can you work on this?
inference-gateway-maintainer commentedon Nov 22, 2026
Model:
ollama_cloud/glm-5.3-flash· Action:v0.59.12· CLI:v0.266.0· Gateway:v0.68.0· View JobTodos
Pull Request
#1938
✅ Infer Result: Success
Everything is verified: clean tree (nothing ahead), draft PR open on the right branch. Closing out the todos and wrapping up:
All work is complete and verified. Final state: clean tree on
fix/issue-1935, amended commit9e95667fpushed, draft PR #1938 open, board item moved to QA, and my memory index repaired (single, capped fact entry with the new runner gotcha).Summary
Resolves issue #1935. I added a runnable persistent-memory example and linked it from the docs, validating every task end-to-end offline on the tokenless mock model.
Draft PR: https://github.inference-gateway/cli/pull/1938 (branch
fix/issue-1935, board item set to In progress then QA)What changed
examples/memory/Taskfile.yml-write,store,recall,reminders,delete,disabled,chat, an end-to-endall, plusbuild/home/clean. Every session runs against a demoHOMEwithINFER_MEMORY_DIR(memory.dir) pointed into the example, andINFER_MEMORY_BACKEND_TYPE=localpinned inline so an exported CI-agent memory config cannot shadow the example's behavior.examples/memory/scenarios.yaml- mock scenarios forMemorywrite,read, anddeleteplus asay helloprompt for the reminder demos.examples/memory/reminders.yaml- demo entry (merge: true) lowering thememory-hygienenudge toonce_after: 1so a short scripted session can show it firing.examples/memory/README.md- what-to-expect sections with real captured output, the on-disk global vs per-project layout, and abackend.type: gitsnippet with the exact command.docs/examples.md/docs/memory.md- the example listed and linked.Validation on the runner
task -d examples/memory allpasses the whole story: the write session landsdemo-build-commands.mdplus itsMEMORY.mdentry (indexed: true), a fresh session shows the injectedPERSISTENT MEMORY INDEXininfer debug agent system_promptand reads the fact back, bothmemory-consultandmemory-hygienesystem-reminder events fire,deleteempties the index, andINFER_MEMORY_ENABLED=falseremoves the index section and prunes both reminders.INFER_MEMORY_BACKEND_TYPE=gitwith a repo, which silently git-initialized the demo store and left a stray..memory.sync.lockthat had slipped into the first commit - the example pins the local backend andtask cleanremoves the lock; the commit was amended before push.task precommit:runpasses (mod tidy, mocks, fmt, imports, golangci-lint 0 issues, markdownlint).INFER_MEMORY_BACKENDexport gotcha there.Risk to note: the
chattask is interactive and follows the established hooks/skills pattern, so it was not exercised head-to-head here; everything else ran green on this runner.Model:
ollama_cloud/glm-5.3-flash· Action:v0.59.12· CLI:v0.266.0· Gateway:v0.68.0· Exit Code:0· Duration: 10m 46sTokens: 10,252,914 in · 77,480 out · 10,330,394 total (85 requests)
Tool calls: 110 total · 100% success rate
Traces
Stats
Triggered by edenreich · Infer Action · OSS
inference-gateway-releaser commentedon Nov 22, 2026
🎉 This issue has been resolved in version 0.266.2 🎉
The release is available on:
Your semantic-release bot 📦🚀