Memory keeper

From autonomous-ai/autonomous-intern · View interactive version

Memory keeper is an AI agent skill from the GitHub repository autonomous-ai/autonomous-intern. Periodically extracts important context from the current session, writes it to memory.md, then compacts the session to free up context window. Runs automatically via cronjob every 2 hours. Also triggers when the user says "save memory", "remember this", "compact session", "clean session", "store thi

How to use this skill

Skill file

Memory Keeper

Quick Start

Scan the current session for valuable context, write it to {baseDir}/memory.md, then run /compact to summarize and compress the session history.

Workflow

  1. Read current {baseDir}/memory.md if it exists (to avoid duplicating existing entries)
  2. Scan the session history for:
  1. Merge new findings into {baseDir}/memory.md — update existing entries, append new ones
  2. Run /compact to compress the session
  3. Confirm silently — do NOT send a message to the user unless triggered manually

Examples

Example 1 — Cronjob run (silent):

Session contains: user prefers English, working on a React project, deadline Friday.

→ Appends to memory.md:

## User Preferences
- Language: English
- Communication style: direct, brief

## Active Work
- Project: React dashboard
- Deadline: 2026-03-20 (Friday)

→ Runs /compact. No message sent.

Example 2 — Manual trigger:

User: "save memory and compact"

→ Writes memory.md, runs /compact, replies:

🧠 Memory saved and session compacted.

Tools

| Tool | When to use |

|------|-------------|

| Read | Read existing memory.md before writing |

| Write | Create or overwrite memory.md with merged content |

| /compact | Compact session after saving memory |

Error Handling

| Scenario | Action |

|----------|--------|

| memory.md does not exist | Create it fresh |

| Session has no new meaningful info | Skip write, still run /compact |

| /compact fails | Skip compaction silently, memory write still counts |

| Triggered manually with empty session | Inform user: "No new context found to save" |

Connectors (Optional)

This skill works standalone. When connected to external tools, it unlocks additional capabilities:

| Connector | What it enables |

|-----------|----------------|

| ~~notes | Sync memory entries to Notion or Obsidian for persistent storage |

| ~~drive | Back up memory.md to Google Drive automatically |

| ~~calendar | Remember upcoming deadlines and scheduled events across sessions |

Rules

Output Template

(Manual trigger only)

🧠 Memory saved and session compacted.

Added {N} new entries to memory.md.

Related Skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.