CtrlK
BlogDocsLog inGet started
Tessl Logo

memory

Two-layer memory system with grep-based recall.

Install with Tessl CLI

npx tessl i github:HKUDS/nanobot --skill memory
What are skills?

64

1.30x

Quality

47%

Does it follow best practices?

Impact

95%

1.30x

Average score across 3 eval scenarios

Optimize this skill with Tessl

npx tessl skill review --optimize ./nanobot/skills/memory/SKILL.md
SKILL.md
Review
Evals

Memory

Structure

  • memory/MEMORY.md — Long-term facts (preferences, project context, relationships). Always loaded into your context.
  • memory/HISTORY.md — Append-only event log. NOT loaded into context. Search it with grep-style tools or in-memory filters. Each entry starts with [YYYY-MM-DD HH:MM].

Search Past Events

Choose the search method based on file size:

  • Small memory/HISTORY.md: use read_file, then search in-memory
  • Large or long-lived memory/HISTORY.md: use the exec tool for targeted search

Examples:

  • Linux/macOS: grep -i "keyword" memory/HISTORY.md
  • Windows: findstr /i "keyword" memory\HISTORY.md
  • Cross-platform Python: python -c "from pathlib import Path; text = Path('memory/HISTORY.md').read_text(encoding='utf-8'); print('\n'.join([l for l in text.splitlines() if 'keyword' in l.lower()][-20:]))"

Prefer targeted command-line search for large history files.

When to Update MEMORY.md

Write important facts immediately using edit_file or write_file:

  • User preferences ("I prefer dark mode")
  • Project context ("The API uses OAuth2")
  • Relationships ("Alice is the project lead")

Auto-consolidation

Old conversations are automatically summarized and appended to HISTORY.md when the session grows large. Long-term facts are extracted to MEMORY.md. You don't need to manage this.

Repository
HKUDS/nanobot
Last updated
Created

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.