Memory Dream logo

Memory Dream

Organization
khoj-ai
memory-dream

Procedure for periodic memory dream consolidation. Run by the "Memory Dream" routine.

Overview

Publisherkhoj-ai
Repositorypipali
Skill namememory-dream
Stars
318
Forks
61
Bundled files
1
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by khoj-ai on GitHub. Read the source before you install it.

Installation

Install the Memory Dream AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/khoj-ai/pipali/tree/main/src/server/skills/builtin/memory-dream
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/khoj-ai/pipali.git /tmp/pipali
mkdir -p .claude/skills
cp -r /tmp/pipali/src/server/skills/builtin/memory-dream .claude/skills/memory-dream
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Memory Dream in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Memory Dream on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Memory Dream is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Memory dream

Fold what has happened since the last pass back into the memory store: merge what belongs together, correct what has changed, drop what is no longer true.

Your system prompt already carries the memory format, the four types, and the catalogue. This is the procedure to keep them organized and accessible.

Work the phases in order and finish with the report.

1. Orient

list_files on your memory directory, then read the memories that cover the topics you are about to touch. You are improving a store that already exists.

2. Gather

The trigger metadata names review_since. Read what was said since then:

bun ~/.pipali/skills/memory-dream/scripts/transcripts.ts --since <review_since>

Without review_since the script covers the last 7 days. --limit <n> caps how many conversations it prints, newest first.

What is worth carrying out of a transcript:

  • Corrections. The user telling you that something you did was wrong, or how they would rather you did it.
  • Preferences stated in passing. Tools, formats, hours, names, the way they like work handed back to them.
  • Facts that contradict a memory you already hold.
  • Durable context about their work, setup or people, of the kind that will still be true next month.

What is not:

  • Anything answered and finished inside the conversation.
  • What their files, repositories or history already record.
  • One-off task detail. A question they asked once is not a standing interest.

3. Consolidate

For each thing worth keeping:

  • A memory already covers the topic: edit that file. Two files saying nearby things are harder to find than one saying both.
  • Nothing covers it: write a new memory.
  • A memory is contradicted: fix it at the source, in the file, rather than adding a memory that argues with it.
  • Relative dates ("yesterday", "last week") become absolute dates.
  • Link related memories with [[their-filename]].

Deleting is removing the file - shell_command with rm. The catalogue is derived from the directory, so nothing else needs updating.

4. Prune

The store works while it stays scannable; past roughly 200 memories, recall degrades for every one of them. Bring it back under that by merging overlapping files and deleting what has gone stale.

Then reread the descriptions. A description is the only thing a future recall sees, so one that could describe half the store makes its memory unreachable however good the body is. Sharpen the vague ones.

Rules

  • Do not edit USER.md. Those are the user's own words about themselves. If a memory contradicts it, note the contradiction in the memory.
  • When you are unsure whether to delete something, keep it. A stale memory costs a line in the catalogue; a deleted load-bearing one costs the user their context.
  • Verify before you record. A memory naming a file, path or tool that no longer exists is worse than no memory.

Report

Close with a short summary the user will read on the routine's card: what you added, what you merged, what you deleted, and why. A few lines. If you changed nothing, say that and say what you looked at.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Memory Dream AI skill do?

Procedure for periodic memory dream consolidation. Run by the "Memory Dream" routine.

Why use Memory Dream on TypingMind?

Because you install it once and use it with any model. Memory Dream is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Memory Dream in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/khoj-ai/pipali/tree/main/src/server/skills/builtin/memory-dream. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Memory Dream?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Memory Dream?

As many as you like. As long as a model supports skills, you can use Memory Dream with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Memory Dream AI skill free?

Yes. It is published on GitHub by khoj-ai under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇