Skip to content

MemorySystem API

Documentation Location

The MemorySystem API documentation has been reorganized. Please refer to the following sections:


Quick Reference

Import

from axon import MemorySystem
from axon.models import MemoryTier, MemoryEntry

Basic Usage

# Initialize
memory = MemorySystem()

# Store memory
entry_id = await memory.store("Important information")

# Search memories
results = await memory.search("information", k=5)

# Get specific memory
entry = await memory.get(entry_id)

# Delete memory
await memory.forget(entry_id)

Configuration

from axon import MemorySystem, MemoryConfig

# Use pre-configured template
config = MemoryConfig.balanced()
memory = MemorySystem(config=config)

# Custom configuration
config = MemoryConfig(
    tiers=["ephemeral", "session", "persistent"],
    # ... other options
)

For detailed API documentation, see: