nanobot Memory System: Long-Term & Short-Term Context

Redesigned February 12, 2026 for improved reliability

Understand how the nano bot remembers and maintains context across conversations

nanobot Memory Architecture

The nano bot maintains both long-term and short-term memory to provide context continuity across conversations. The nanobot ai memory system was completely redesigned on February 12, 2026, for improved reliability with less code.

Long-Term vs Short-Term

Long-term: Persistent knowledge stored in MEMORY.md
Short-term: Daily conversation logs in memory/YYYY-MM-DD.md

The nanobot uses both memory types to maintain comprehensive context across sessions and time periods.

Markdown-Based Storage

The nano bot stores all memory in Markdown format. Human-readable, version-control friendly, and easy to edit manually. The nanobot ai memory files are accessible to both the agent and developers.

Automatic Context Inclusion

The ContextBuilder automatically includes relevant memory in every nanobot conversation. The nano bot doesn't need explicit commands to access memory—it's always available as context.

Hybrid Semantic Search

When recalling information, the nanobot ai uses hybrid search: 70% vector similarity (semantic meaning) + 30% BM25 keyword matching. Best of both retrieval approaches for the nano bot.

nanobot Long-Term Memory (MEMORY.md)

Long-term memory stores persistent knowledge that the nano bot should always remember. Information in MEMORY.md persists across all sessions and platforms.

📚

File Location

Path: MEMORY.md in workspace
Format: Markdown
Persistence: Permanent

The nanobot MEMORY.md file is the central repository for long-term knowledge. Create this file in your nano bot workspace directory.

🔑

What to Store

Store important, persistent information:

  • User preferences and settings
  • Personal information and context
  • Important facts and decisions
  • Learned patterns and insights
  • Project context and goals

The nanobot ai uses this information in every conversation.

✏️

Memory Updates

The nano bot updates MEMORY.md using file tools. When it learns something important, the nanobot can write to MEMORY.md to add or modify knowledge. Automatic and seamless.

👀

Human Editable

MEMORY.md is plain Markdown. You can manually edit the nanobot memory file with any text editor. The nano bot will see your changes immediately in the next conversation.

# Example MEMORY.md for nanobot ## User Information - Name: Alex - Preferred Programming Language: Python - Favorite Color: Blue - Time Zone: EST ## Project Context - Currently working on: AI automation system - Using nanobot for: Research and development - Deployment target: Cloud (AWS) ## Important Facts - Prefers detailed explanations over brief summaries - Uses Telegram as primary messaging platform - Requires all code to include type hints

nanobot Short-Term Memory (Daily Notes)

Short-term memory captures day-by-day conversation logs. The nano bot creates daily notes automatically, providing searchable recent context.

Daily Note Files

Directory: memory/
Files: YYYY-MM-DD.md (e.g., 2026-02-14.md)
Creation: Automatic

The nanobot ai creates a new daily note file each day. No manual setup required—the nano bot handles it automatically.

What Gets Logged

Daily notes capture recent nanobot activity:

  • Conversation summaries and key points
  • Tasks and action items
  • Temporary context and decisions
  • Information that may become long-term

Organization by Date

The nano bot organizes short-term memory chronologically. Find conversations by date: memory/2026-02-14.md contains all activity from February 14, 2026.

Searchable History

All daily notes are searchable by the nanobot. The nano bot can search through past days to find relevant context when needed. The nanobot ai hybrid search works across all memory files.

Memory Consolidation

Important information from daily notes can be promoted to long-term memory (MEMORY.md). The nanobot may decide to consolidate short-term knowledge into permanent memory for future reference.

nanobot Hybrid Semantic Search System

When recalling information from memory, the nano bot uses hybrid search combining vector similarity and keyword matching. This provides accurate, relevant results for nanobot ai queries.

🔍

70% Vector Search

Method: Semantic similarity via embeddings
Strength: Understands meaning and context
Weight: 70% of final score

The nanobot converts memory into vector embeddings and finds semantically similar content. Captures meaning beyond exact words.

🎯

30% BM25 Keyword

Method: BM25 keyword matching
Strength: Precise term matching
Weight: 30% of final score

The nano bot uses BM25 algorithm for keyword-based retrieval. Ensures exact term matches are found and weighted appropriately.

⚖️

Hybrid Combination

The nanobot ai combines both approaches: semantic understanding (70%) + precise matching (30%). Results are ranked by combined score, giving the nano bot both breadth and precision in memory recall.

⚙️

Configurable Weights

The 70/30 split is configurable. Adjust weights in the nanobot configuration to emphasize semantic search or keyword matching based on your needs. The nano bot is flexible.

How nanobot Memory Works

The nano bot memory system operates automatically throughout conversations. Here's the complete workflow for how nanobot ai manages context and memory.

1️⃣

Automatic Context Inclusion

When the nanobot starts a conversation, the ContextBuilder automatically includes relevant memory in the system prompt. Both MEMORY.md and recent daily notes are included. The nano bot has full context from the start.

2️⃣

Conversation Processing

As you chat with the nanobot ai, it processes messages and may decide important information should be remembered. The nano bot determines what's worth storing based on significance and user instructions.

3️⃣

Daily Note Creation

Each day, the nanobot creates a new daily note file (memory/2026-02-14.md). Conversations and key points are logged automatically. The nano bot maintains organized, date-based history.

4️⃣

Memory Search

When the nanobot ai needs to recall information, it searches memory using hybrid semantic search (70% vector + 30% BM25). Relevant context is retrieved and included in the conversation.

5️⃣

Memory Updates

The nano bot can update memory files using file tools. Writing to MEMORY.md adds long-term knowledge. Updating daily notes logs recent context. The nanobot manages its own memory.

6️⃣

Memory Consolidation

Important information from short-term memory (daily notes) can be promoted to long-term memory (MEMORY.md). The nanobot ai decides what knowledge is permanently valuable.

nanobot Memory System Redesign (February 2026)

On February 12, 2026, the HKUDS team completely redesigned the nano bot memory system. The new implementation is more reliable, uses less code, and performs better.

What Changed

Old: Complex memory management with multiple subsystems
New: Streamlined approach with Markdown files

The nanobot redesign simplified memory architecture while improving reliability. Less code, more robust.

Improvements

The redesigned nanobot ai memory system provides:

  • More Reliable: Fewer edge cases and failure modes
  • Less Code: Simpler implementation, easier to maintain
  • Better Performance: Faster memory operations
  • Clearer Structure: MEMORY.md + daily notes is intuitive

Benefits for Users

The nano bot memory redesign means:

  • More consistent context across conversations
  • Fewer memory-related errors or issues
  • Easier to understand and customize
  • Human-editable memory files (Markdown)

Aligned with Philosophy

The memory redesign exemplifies the nanobot philosophy: achieve more with less. The nano bot proves that simplification improves both usability and reliability.

Configuring nanobot Memory System

Configure the nano bot memory system to customize file locations, permissions, and search settings. The nanobot ai memory is flexible and adaptable.

📁

File Locations

Configure where the nanobot stores memory files:

  • Long-term: Set MEMORY.md path
  • Short-term: Set memory/ directory path
  • Custom: Use any filesystem location

Default paths work for most nano bot users, but customization is available.

🔒

Permissions

Ensure the nanobot ai has filesystem permissions:

  • Read: Access existing memory files
  • Write: Update memory and create daily notes
  • Create: Make new memory files as needed

The nano bot needs write access to function properly.

⚙️

Search Settings

Customize nanobot memory search:

  • Vector weight: Adjust semantic search weight (default 0.7)
  • BM25 weight: Adjust keyword weight (default 0.3)
  • Result limit: How many results to return

Tune the nano bot memory search for your use case.

📖

Configuration Guide

For detailed configuration instructions, see our comprehensive nanobot Configuration Guide. Covers all memory system settings and examples.

Experience nanobot Memory System

Install the nano bot and experience the redesigned memory system yourself. Watch how the nanobot ai maintains context across conversations, remembers important information, and seamlessly integrates memory into every interaction.