- Home
- Skills
- Agents & Orchestration
- Aegis-Mem Episodic & Anti-Loop MCP
More screenshots
Works with the AI Agents you already use
Aegis-Mem Episodic & Anti-Loop MCP
Deterministic procedural memory with circuit-breaker deduplication to prevent agent retry loops and token waste.
$16
Aegis-Mem Episodic & Anti-Loop MCP
Example session with this skill installed
I just got a 422 error on the trade-bot because of an invalid timestamp format. Log this failure so we don't repeat it.
- Read your context and instructions
- Compiled the aegis-mem episodic
I have processed the execution failure and distilled a procedural rule to prevent this 422 error in future runs. The circuit breaker is now active for this error fingerprint.
Failure Reflection Result
| Field | Value |
|---|---|
| Agent ID | trade-bot-v1 |
| Status | Stored & Vectorized |
| Distilled Rule | Format trade timestamps as strict ISO-8601 UTC with 'Z' suffix to prevent HTTP 422 errors. |
| Fingerprint | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 |
| Sanitization | Redacted 1 Bearer Token |
| Memory ID | 019d720e-0aa3-4176-a37b-4bb5679f151d |
Next steps
- The next time you attempt a trade, I will automatically recall this rule during the pre-flight check.
- Use
report_rule_outcomeafter your next successful trade to reinforce this memory's utility score. - You can manually verify the stored rule using
get_procedural_memories.
Connects securely to your tools. The creator never sees your data.
About this skill
Agents frequently get stuck in infinite retry loops, repeating the same API errors or schema mismatches across execution runs. This skill provides a deterministic procedural memory layer that captures one-line remediation rules to prevent repetitive failures and reduce token waste.
What it does
- Persistent Remediation Caching stores verified one-line rules (under 200 characters) to fix specific tool or API errors.
- Anti-Loop Circuit Breaker uses SHA-256 fingerprinting to detect identical errors and halt failing retries before invoking the LLM.
- Vector-Based Recall retrieves relevant procedural memories in under 3ms using Qdrant vector search.
- Automated PII Scrubbing redacts API keys, bearer tokens, and secrets before they enter long-term storage.
- Adaptive Utility Scoring boosts the rank of helpful rules and automatically prunes stale or incorrect ones.
How it works
- Pre-flight Retrieval checks for existing rules scoped to the current
agent_idbefore executing error-prone tasks. - Failure Distillation captures raw error traces, sanitizes them, and generates a concise imperative rule for future prevention.
- Outcome Reinforcement applies a positive or negative score to a rule based on whether it successfully resolved the task.
- Circuit Breaker Activation short-circuits execution if a normalized error hash matches a recent failure within a 300-second window.
Frameworks & tools
This skill is built with Python and utilizes Mem0 for memory management, Qdrant for vector storage, and SQLite for utility telemetry. It integrates with MCP-compatible environments including Claude Code and Cursor.
Why this beats prompting it yourself
Standard prompting relies on short-term context that disappears between sessions, leading to recurring bugs. This skill offloads error knowledge to a persistent database, ensuring that once a schema constraint or API quirk is solved, it stays solved across every future run.
Use cases
- API Schema Compliance by remembering specific date formats or header requirements for strict external gateways.
- Database Migration Safety by caching pre-conditions for complex SQL operations and preventing destructive retries.
- Infrastructure Stability by detecting 502/503 gateway storms and immediately pivoting to fallback replicas.
- Token Cost Control by blocking high-token retry loops through deterministic SHA-256 fingerprinting.
Known limitations
Memory operations must be scoped to an agent_id. Unbounded global queries across all agents are prohibited. Rules are limited to a maximum length of 500 characters.
Requires an active Qdrant instance. Agent IDs must be between 1 and 128 characters. Rule distillation requires an OpenAI-compatible API key for LLM-based summary.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 4 days ago
Requires
Permissions
File Scopes
Local or self-hosted Qdrant server instance (defaults to zero-config embedded Qdrant storage)