-
|
Hi, I'm trying to understand where the lessons are being injected/used by the agent. It doesn't seem like any of the hooks involve injecting them into the context. Am I getting something wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
|
Hey @rockarxiv — you're right, this is a real gap and good catch. Here's the current state: Lessons today are pull-based, not push-based.
Auto-injection (the SessionStart hook path) does NOT include lessons. If you set
Lessons are not in that list. So even with auto-inject on, lessons never reach the agent context unless the agent itself calls What this means in practice:
Fix on the way: Filing this as a bug — lessons should fold into the I'll link the issue here once it's open. In the meantime, the workaround is to wire a slash command (e.g. Thanks for surfacing this. The current behavior is doing half the job. |
Beta Was this translation helpful? Give feedback.
-
|
Filed as #457 — will close the loop here when it lands. |
Beta Was this translation helpful? Give feedback.
-
|
Shipped in v0.9.18 — https://github.com/rohitg00/agentmemory/releases/tag/v0.9.18 Lessons now auto-inject when AGENTMEMORY_INJECT_CONTEXT=true. Ranked by (project-relevance × confidence), capped at top-10, drops cleanly under token-budget pressure. Upgrade: npm i -g @agentmemory/agentmemory@0.9.18 |
Beta Was this translation helpful? Give feedback.
Hey @rockarxiv — you're right, this is a real gap and good catch.
Here's the current state:
Lessons today are pull-based, not push-based.
memory_lesson_save(MCP tool, also auto-extracted bymem::reflectafter each session).lessonsKV scope with confidence scores + reinforcement.memory_lesson_recall(MCP tool) — which means the agent has to think to call it. There's no "you should consult lessons before acting" affordance, so it rarely happens unprompted.Auto-injection (the SessionStart hook path) does NOT include lessons.
If you set
AGENTMEMORY_INJECT_CONTEXT=true, the session-start hook callsmem::contextand prepends …