- Home
- Skills
- Agents & Orchestration
- memory loops
memory loops
Implements durable cross-session learning through structured recall, reflection, and lesson compression loops.
Free
Works with the AI Agents you already use
memory loops
Example session with this skill installed
I just finished fixing that intermittent race condition in the Stop hook. Remember this for next time so we don't hit it again.
- Read your context and instructions
- Compiled the memory loops
I have reflected on the task and extracted a new lesson for the Error Library. I deduplicated this against existing entries and confirmed no matching root cause was found.
Memory Reflection: Race Condition in Stop Hook
| Field | Content |
|---|---|
| What Happened | Fixed a race condition where the Stop hook fired before the cleanup signal was fully propagated. |
| Why | The hook lacked an internal await for the is_terminating state, causing execution to proceed on stale thread context. |
| How to Apply | Always verify the is_terminating flag and await the cleanup_signal promise before executing final teardown logic in Stop hooks. |
| Store Action | memory_save initiated. New entry created in error_library. |
Next steps
- Run
recall("Stop hook logic")before the next lifecycle refactor to verify this lesson is injected. - Monitor the
error_libraryfor similar threading issues to see if a broader "Concurrency Pattern" compression is needed. - Review the
loop-ledgerstatus to ensure the memory update converged successfully.
Connects securely to your tools. The creator never sees your data.
About this skill
Every time an agent starts a new session, it effectively undergoes a lobotomy, forgetting the hard-won lessons from the previous task. You end up paying for the same mistakes, re-deriving the same logic, and hitting the same roadblocks. Memory Loops fixes this by implementing a durable, queryable store that turns ephemeral task outcomes into permanent institutional knowledge.
What it does
- Reflexion loops trigger a mandatory recall of relevant lessons before acting and a structured reflection after completion.
- Error library maintenance extracts failure root causes into a deduplicated database to prevent recurring bugs.
- Success pattern extraction documents what worked and why so high-performance outcomes can be replicated deliberately.
- Memory compression merges redundant or overlapping lessons into high-level patterns to keep the context window lean.
- Deduplication enforcement prevents the memory store from becoming noisy by rejecting near-duplicate entries.
How it works
- Recall triggers a search for lessons matching the current task description to inject prior context.
- Act & Reflect executes the task and writes a single lesson detailing what happened, why, and how to apply it next time.
- Audit runs periodic sweeps using the
loop-ledgerbrake to extract distinct patterns from batches of past work. - Compress merges clusters of similar lessons into a single durable pattern, archiving the original fragments.
Frameworks & tools
This skill is optimized for the bantamkit MCP server (memory_recall, memory_save, memory_compact) and integrates with the loop-ledger MCP for execution brakes. It works with any persistent storage including local files, databases, or vector stores.
Why this beats prompting it yourself
Standard prompts often fail to deduplicate, leading to a memory store full of noise that exhausts your context window. This skill provides specific loop shapes and "brake" configurations that ensure the agent stops searching when it reaches diminishing returns and compresses data before it becomes unmanageable.
Use cases
- Preventing the recurrence of specific bug classes in complex hook or lifecycle logic.
- Building a codebase-specific "style guide" based on approved success patterns.
- Triage of legacy postmortems to backfill a searchable root-cause library.
- Managing long-term agent state across multiple distinct projects or repos.
Known limitations
This skill is not for one-off task states or session-level planning. It requires an external storage mechanism or the bantamkit MCP server to persist data across sessions.
How to use
Skills on Agensi run inside your AI agent. Copy the prompt, paste it into your agent, and it connects to Agensi and installs this skill for you. If a payment is needed, your agent shows it to you first.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free forever
No account required to browse
Trust & safety
Security scanned
Verified clean today
- Free to download with an account