titans_memory 0.1.0

Titans Memory: Neural-inspired memory system for AIngle AI agents
Documentation

Titans Memory

Neural-inspired memory system for AIngle AI agents.

Architecture

Titans Memory implements a dual-memory architecture inspired by cognitive neuroscience and modern AI memory systems:

┌─────────────────────────────────────────────────────────────┐
│                    Titans Memory System                      │
├─────────────────────────────────────────────────────────────┤
│                                                              │
│  ┌──────────────────┐     ┌──────────────────────────────┐ │
│  │  Short-Term      │     │  Long-Term Memory (LTM)      │ │
│  │  Memory (STM)    │     │                              │ │
│  │                  │     │  ┌────────────────────────┐  │ │
│  │  • Fast access   │ ──► │  │   Knowledge Graph      │  │ │
│  │  • Attention     │     │  │                        │  │ │
│  │  • Decay         │     │  │  Entities ──Links──►   │  │ │
│  │  • Bounded       │     │  │                        │  │ │
│  └──────────────────┘     │  └────────────────────────┘  │ │
│                           │                              │ │
│  ┌──────────────────┐     │  ┌────────────────────────┐  │ │
│  │  Consolidation   │     │  │   Semantic Index       │  │ │
│  │                  │     │  │                        │  │ │
│  │  • Importance    │     │  │  Embeddings + Search   │  │ │
│  │  • Similarity    │     │  │                        │  │ │
│  │  • Compression   │     │  └────────────────────────┘  │ │
│  └──────────────────┘     └──────────────────────────────┘ │
│                                                              │
└─────────────────────────────────────────────────────────────┘

Usage

use titans_memory::{TitansMemory, MemoryConfig, MemoryEntry};

// Create memory system
let mut memory = TitansMemory::new(MemoryConfig::default());

// Store in short-term memory
let entry = MemoryEntry::new("sensor_data", json!({"temp": 23.5}));
memory.remember(entry)?;

// Query with semantic search
let results = memory.recall("temperature readings")?;

// Important memories consolidate to long-term
memory.consolidate()?;

Features

  • Short-Term Memory (STM): Fast, volatile storage with attention-based weighting
  • Long-Term Memory (LTM): Persistent knowledge graph with semantic indexing
  • Consolidation: Automatic transfer of important memories from STM to LTM
  • Semantic Search: Query memories by meaning, not just keywords
  • IoT Optimized: Configurable memory limits for embedded devices