install
source · Clone the upstream repo
git clone https://github.com/HKUDS/nanobot
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/HKUDS/nanobot "$T" && mkdir -p ~/.claude/skills && cp -r "$T/nanobot/skills/memory" ~/.claude/skills/hkuds-nanobot-memory && rm -rf "$T"
manifest:
nanobot/skills/memory/SKILL.mdsource content
Memory
Structure
— Bot personality and communication style. Managed by Dream. Do NOT edit.SOUL.md
— User profile and preferences. Managed by Dream. Do NOT edit.USER.md
— Long-term facts (project context, important events). Managed by Dream. Do NOT edit.memory/MEMORY.md
— append-only JSONL, not loaded into context. Prefer the built-inmemory/history.jsonl
tool to search it.grep
Search Past Events
memory/history.jsonl is JSONL format — each line is a JSON object with cursor, timestamp, content.
- For broad searches, start with
or the defaultgrep(..., path="memory", glob="*.jsonl", output_mode="count")
mode before expanding to full contentfiles_with_matches - Use
plusoutput_mode="content"
/context_before
when you need the exact matching linescontext_after - Use
for literal timestamps or JSON fragmentsfixed_strings=true - Use
/head_limit
to page through long historiesoffset - Use
only as a last-resort fallback when the built-in search cannot express what you needexec
Examples (replace
keyword):
grep(pattern="keyword", path="memory/history.jsonl", case_insensitive=true)grep(pattern="2026-04-02 10:00", path="memory/history.jsonl", fixed_strings=true)grep(pattern="keyword", path="memory", glob="*.jsonl", output_mode="count", case_insensitive=true)grep(pattern="oauth|token", path="memory", glob="*.jsonl", output_mode="content", case_insensitive=true)
Important
- Do NOT edit SOUL.md, USER.md, or MEMORY.md. They are automatically managed by Dream.
- If you notice outdated information, it will be corrected when Dream runs next.
- Users can view Dream's activity with the
command./dream-log