Skip to content

SmartMemory

SmartMemory in Raindrop gives AI agents the ability to remember past conversations, learn from experience, and build up knowledge over time. Think of it as giving your AI agent a brain that can remember what happened yesterday, last week, or last month.

How SmartMemory Works

SmartMemory operates through four distinct memory types, each serving different purposes:

Working Memory Active conversation context within sessions. Like short-term memory, this holds what’s currently being discussed and can be organized into timelines for different topics.

Episodic Memory Long-term storage of completed sessions. When a working memory session ends, it gets stored here as searchable episodes that can be rehydrated later.

Semantic Memory General knowledge and facts. Store documents, reference materials, and structured information that agents can search and retrieve.

Procedural Memory Skills, templates, and reusable procedures. Store prompts, instructions, and workflows that agents can reference across different sessions.

Memory Lifecycle

Sessions start in working memory where active conversations happen. You can organize thoughts into different timelines within the same session - maybe one timeline for technical discussions and another for project planning.

When you’re done with a session, you can flush it to episodic memory where it becomes searchable history. Later, agents can search this history to remember past conversations or even rehydrate old sessions to continue where they left off.

Semantic and procedural memory work differently - they store persistent knowledge and skills that agents access as needed, regardless of which session they’re in.

When to Use SmartMemory

Good Fit

  • AI Assistants: Personal or collaborative agents that get better through ongoing interaction
  • Project Work: Complex tasks spanning multiple conversations that need continuity
  • Learning Systems: Agents that adapt behavior based on user patterns and preferences
  • Context-Rich Chat: Conversations where history makes responses much better

Consider Alternatives

  • One-Off Tasks: Simple requests don’t need persistent memory overhead
  • Large Knowledge Bases: Extensive reference data works better in specialized storage
  • Application Logic: Complex business rules belong in your application code, not memory

Integration Patterns

Session Management Start working memory sessions for active conversations, organize them with timelines, and flush completed sessions to episodic storage.

Knowledge Building Store facts and documents in semantic memory so agents can reference accurate information across all sessions.

Skill Development Use procedural memory to store and refine agent capabilities like prompt templates and workflow instructions.

Context Continuity Search episodic memory to find relevant past conversations and rehydrate sessions when continuing previous work.

SmartMemory turns stateless AI interactions into persistent relationships where agents build understanding over time.

Smart Search Behavior

Ever notice how you can search for “morning standup” and find memories about “daily team meetings at 9 AM”? That’s because SmartMemory doesn’t just match keywords - it understands meaning.

When you search memories, the system generates embeddings using AI models. These embeddings capture semantic meaning, so searches work even when the exact words don’t match. If you search for “authentication security” it will find memories about “login safety” or “user verification.”

The search process has two layers. First, it tries vector-based semantic matching using these AI embeddings. If that fails for any reason, it automatically falls back to traditional text search. This means your searches always return something useful, even if the AI service is temporarily unavailable.

This dual approach gives you the best of both worlds: intelligent semantic understanding when available, with reliable keyword matching as backup.

Session Persistence

Think of working memory like having a conversation with someone. At some point, that conversation ends, but you want to remember what you talked about for future reference.

When you call endSession(true), SmartMemory doesn’t immediately move everything to episodic storage. Instead, it starts the process in the background. For small sessions, this happens quickly. For sessions with hundreds of memories, it might take a few seconds to summarize everything and store it properly.

This background processing means you can end a session and immediately start a new one without waiting. The old session will finish flushing to episodic memory on its own schedule.

Later, when you search episodic memory, you’re searching through these processed session summaries. And if you need the full conversation again, rehydration restores all the original memories - but this also happens asynchronously for large datasets.

Memory Coordination

The four memory types work together like different parts of your brain. Working memory is your active thoughts. Episodic memory is your personal history. Semantic memory is your knowledge base. Procedural memory is your learned skills.

A typical AI agent might store conversation context in working memory while maintaining facts about the user in semantic memory. When the conversation ends, the working memory becomes an episodic memory that can be searched later. Meanwhile, procedural memory holds templates and workflows that the agent reuses across all sessions.

The beauty is in how they connect. You can search episodic memory to find similar past conversations, rehydrate those sessions to continue where you left off, reference semantic knowledge during active conversations, and apply procedural templates consistently across different contexts.

Performance Patterns

Search speed depends on what type of search you’re doing. Vector-based semantic search is optimized for finding relevant content quickly, even across thousands of memories. Text-based fallback search is slower but works reliably when vector search isn’t available.

Session size affects background operations. A session with 20 memories flushes to episodic storage almost instantly. A session with 500 memories might take several seconds to process and summarize. Plan accordingly if you’re building workflows that depend on episodic memory being immediately available.

Multiple sessions run completely independently. You can have dozens of active working memory sessions without them interfering with each other. Each gets its own timeline organization and search scope.

SmartMemory is designed for AI agents that need to maintain context over time, learn from interactions, and provide personalized experiences that improve with use.