Skip to content

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.

Core Operations

Learn how to work with HTM's memory system effectively.

Advanced Features

Dive deeper into HTM's powerful capabilities.

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:

  1. Start Here: Getting Started Guide
  2. Understand HTM's architecture
  3. Build your first application
  4. Learn basic operations

  5. Core Skills: Memory Operations

  6. Adding Memories - Store information effectively
  7. Recalling Memories - Retrieve what you need
  8. Context Assembly - Use memories with LLMs

  9. Deep Understanding: Memory Management

  10. Working Memory - Token management
  11. Long-term Memory - Database operations
  12. Search Strategies - Optimize retrieval

  13. Advanced Topics: Multi-Robot Systems

  14. Multi-Robot Usage - Build collaborative systems

Quick Reference

Common Tasks

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.