Core Concepts
Understanding Nebula’s architecture helps you work more effectively with memories, conversations, and documents.Memories: Universal Information Containers
In Nebula, everything is stored as a memory - a container for related information:- Conversation Memory: Contains all messages in a conversation
- Document Memory: Contains an entire document (potentially split into chunks)
- Simple Memory: Contains a single piece of information
Memories vs Chunks
- Memory: The container with a unique
memory_id - Chunks: Individual pieces within a memory (messages in conversations, sections in documents)
- Chunk ID: Unique identifier for each chunk, used for granular operations
Types of Memories
Document Memories
Contain entire documents, split into chunks internally for processing. You can upload text, pre-chunked text, or a file.Conversation Memories
Contain full conversations. Add messages by callingstore_memory() with the same memory_id.
See Conversations Guide for examples.
Simple Memories
Standalone pieces of information that don’t need chunking.Memory Lifecycle
- Creation:
store_memory()withoutmemory_idcreates new memory - Expansion:
store_memory()withmemory_idadds content to existing memory - Retrieval:
get_memory()returns complete memory with all chunks - Chunk Operations: Use chunk IDs for granular updates/deletes
- Deletion:
delete()removes entire memory and all its chunks
Best Practices
- Build complete units: Use
memory_idto build entire conversations/documents in one container - Use descriptive metadata: Identify memory types and add context
- Choose appropriate collections: Group related memories logically
- Chunk operations when needed: Use chunk IDs only for granular edits
Next Steps
- Memory Operations Guide - Store, retrieve, and delete memories
- Collections Guide - Organize memories into collections