HTM User Guides¶
Welcome to the HTM (Hierarchical Temporal Memory) user guide collection. These guides will help you understand and effectively use HTM for building intelligent LLM-based applications with persistent memory.
What is HTM?¶
HTM is an intelligent memory management system for LLM robots that implements a two-tier architecture:
- Working Memory: Token-limited active context for immediate LLM use
- Long-term Memory: Durable PostgreSQL storage for permanent knowledge
HTM enables your robots to recall context from past conversations using RAG (Retrieval-Augmented Generation), creating continuity across sessions and enabling sophisticated multi-robot collaboration.
Guide Categories¶
Getting Started¶
Perfect for developers new to HTM or those building their first application.
- Getting Started Guide - Your first HTM application, basic concepts, and common patterns
Core Operations¶
Learn how to work with HTM's memory system effectively.
- Adding Memories - How to store different types of information in HTM
- Recalling Memories - Search strategies and retrieval techniques
- Working Memory Management - Understanding token limits and eviction
- Long-term Memory - Database operations and maintenance
Advanced Features¶
Dive deeper into HTM's powerful capabilities.
- Multi-Robot Usage - Building hive mind systems with multiple robots
- Search Strategies - Vector, full-text, and hybrid search
- Context Assembly - Creating optimized context for LLMs
Integrations¶
Connect HTM to external tools and services.
- MCP Server - Use HTM with Claude Desktop, Claude Code, and AIA
Learning Path¶
We recommend the following progression:
- Start Here: Getting Started Guide
- Understand HTM's architecture
- Build your first application
-
Learn basic operations
-
Core Skills: Memory Operations
- Adding Memories - Store information effectively
- Recalling Memories - Retrieve what you need
-
Context Assembly - Use memories with LLMs
-
Deep Understanding: Memory Management
- Working Memory - Token management
- Long-term Memory - Database operations
-
Search Strategies - Optimize retrieval
-
Advanced Topics: Multi-Robot Systems
- Multi-Robot Usage - Build collaborative systems
Quick Reference¶
Common Tasks¶
- Initialize HTM: See Getting Started
- Add a memory: See Adding Memories
- Search for memories: See Recalling Memories
- Create LLM context: See Context Assembly
- Monitor memory usage: See Working Memory
- Multi-robot setup: See Multi-Robot Usage
- Use with Claude/AIA: See MCP Server
Memory Types¶
HTM supports six memory types, each optimized for different use cases:
| Type | Purpose | Example |
|---|---|---|
:fact |
Immutable facts | "User's name is Alice" |
:context |
Conversation state | "Discussing database architecture" |
:code |
Code snippets | "Ruby function for parsing dates" |
:preference |
User preferences | "Prefers dark theme" |
:decision |
Design decisions | "Chose PostgreSQL for storage" |
:question |
Unresolved questions | "Should we add caching?" |
Search Strategies¶
| Strategy | Method | Best For |
|---|---|---|
| Vector | Semantic similarity | Conceptual searches, related topics |
| Full-text | Keyword matching | Exact terms, specific phrases |
| Hybrid | Combined approach | Best overall accuracy |
Getting Help¶
- Examples: Check the
examples/directory in the HTM repository - API Reference: See the API documentation
- Tests: Look at
test/directory for usage examples - Issues: Report bugs on GitHub
Documentation Conventions¶
Throughout these guides, you'll see these admonitions:
Tip
Helpful advice and best practices
Warning
Important warnings about potential issues
Note
Additional information and context
Example
Code examples and usage demonstrations
Next Steps¶
Ready to get started? Head over to the Getting Started Guide to build your first HTM application.