v1.0.0 — Now Available on PyPI

Stellar Memory

Give any AI human-like memory.
An intelligent memory system inspired by celestial structures — 5 orbital zones, emotion-aware, self-learning.

$ pip install stellar-memory
Core Inner Outer Belt Cloud
603
Tests Passing
60
Modules
44
Features
96.8%
Design Match
v1.0.0
Stable Release
5
Orbital Zones

Everything a memory system needs

Designed from first principles to mirror the way human memory actually works — layered, emotional, and self-organizing.

5-Zone Orbit System

Memories are organized across five concentric zones — Core, Inner, Outer, Belt, and Cloud — each with distinct retention behavior, priority, and access speed. Just like the solar system.

Emotion Engine

Attaches emotional valence and intensity to every memory. High-emotion events are retained longer and recalled with higher priority — exactly like human episodic memory.

Metacognition

The system monitors its own memory state — detecting gaps, contradictions, and knowledge boundaries. It knows what it knows, and what it doesn't.

Self-Learning

Continuously refines its own memory organization based on usage patterns. Frequently accessed memories migrate inward; rarely used ones drift to the outer zones or are pruned.

Multimodal Memory

Store and recall not just text, but structured data, code snippets, conversation history, and references to external documents — all within a unified memory graph.

Memory Reasoning

Before responding, the system reasons over its stored memories — connecting relevant facts, detecting temporal relationships, and synthesizing coherent context for the AI.

Simple by design, powerful in practice

Three operations. Infinite memory depth.

1

Store

Feed any memory — conversations, facts, experiences — into the orbital system. The engine classifies zone placement, assigns emotional weight, and generates embeddings automatically.

2

Manage

The system autonomously consolidates, prunes, and reorganizes memories over time. You can also manually promote, archive, or link memories to build knowledge graphs.

3

Recall

Query with natural language or structured filters. The retrieval engine traverses orbital zones, applies emotional and temporal weighting, and returns the most contextually relevant memories.

stellar_memory_demo.py
from stellar_memory import StellarMemory

# Initialize the memory system
memory = StellarMemory()

# Store a conversational memory
memory.store(
  content="User prefers dark mode and concise answers",
  zone="inner",
  emotion={"valence": "positive", "intensity": 0.6},
  tags=["preference", "ui"]
)

# Auto-classify zone from content alone
memory.store_auto(
  "The project deadline is March 15th, 2026"
)
from stellar_memory import StellarMemory

memory = StellarMemory()

# Promote a memory to a higher-priority zone
memory.promote(memory_id="mem_abc123", to_zone="core")

# Link two related memories
memory.link("mem_abc123", "mem_def456", relation="caused_by")

# Run autonomous consolidation
report = memory.consolidate()
print(f"Pruned: {report.pruned}, Merged: {report.merged}")

# Archive old cloud-zone memories
memory.archive_zone("cloud", older_than_days=90)
from stellar_memory import StellarMemory

memory = StellarMemory()

# Natural language recall
results = memory.recall(
  query="What are the user's display preferences?",
  top_k=5,
  zones=["core", "inner"]
)

for mem in results:
  print(f"[{mem.zone}] {mem.content}")
  print(f"  Score: {mem.relevance:.2f} | Emotion: {mem.emotion}")

# Build full context for an LLM prompt
context = memory.build_context(query="user preferences")

The Celestial Zone System

Five concentric orbital zones model memory priority, retention duration, and access frequency — from the blazing core to the distant cloud.

Core

Permanent, highest-priority memories. Identity, critical facts, irreplaceable knowledge. Never pruned.

Zone 1

Inner

Frequently accessed working memories. Recent conversations, active project context, user preferences.

Zone 2

Outer

Moderately accessed episodic memories. Past sessions, historical context, secondary associations.

Zone 3

Belt

Fragmented, rarely accessed memories. Older sessions, peripheral knowledge, low-confidence facts.

Zone 4

Cloud

Distant, archival memories. Rarely recalled, candidate for consolidation or permanent archival.

Zone 5
CORE
Inner
Outer
Belt
Cloud

Up and running in minutes

Install from PyPI, initialize the system, and your AI has persistent, structured memory from the very first interaction.

No external database required — SQLite by default, PostgreSQL in production

Drop-in compatible with OpenAI, Anthropic, LangChain, and any LLM

MCP server mode for Claude Code and Cursor integration

REST API with Docker support for scalable deployment

Full Documentation PyPI Package
quickstart.py
# 1. Install
# pip install stellar-memory

from stellar_memory import StellarMemory
from openai import OpenAI

# 2. Initialize
memory = StellarMemory(
  storage="sqlite:///my_ai.db",
  embedding_model="text-embedding-3-small"
)
client = OpenAI()

def chat_with_memory(user_message: str) -> str:
  # 3. Recall relevant memories
  context = memory.build_context(user_message)

  # 4. Use memories as system context
  response = client.chat.completions.create(
    model="gpt-4o",
    messages=[
      {"role": "system", "content": context},
      {"role": "user",   "content": user_message}
    ]
  )
  answer = response.choices[0].message.content

  # 5. Store the new exchange
  memory.store_auto(f"Q: {user_message}\nA: {answer}")
  return answer

# That's it. Your AI now remembers.
print(chat_with_memory("What did we discuss last week?"))

Works with your existing stack

Drop Stellar Memory into any AI workflow. Native support for the tools you already use.

C
Claude Code
MCP Server
{'>'}_
Cursor
MCP Server
API
REST API
HTTP / JSON
LC chain
LangChain
Python SDK
OAI
OpenAI SDK
Python / JS
Docker deployment
# Pull and run the Stellar Memory REST server
docker pull sangjun0000/stellar-memory:latest

docker run -d \
  -p 8080:8080 \
  -v stellar_data:/data \
  -e OPENAI_API_KEY=your_key \
  sangjun0000/stellar-memory:latest

# Health check
curl http://localhost:8080/health

Simple, transparent pricing

Start free. Scale when you need to.

Free
$0/mo
For personal projects
  • 5,000 memories
  • 1 agent
  • SQLite storage
  • Local MCP server
  • CLI interface
  • Cloud sync
  • Web dashboard
Get Started
Team
$99/mo
For growing teams
  • 500,000 memories
  • 20 agents
  • Everything in Pro
  • CRDT team sync
  • RBAC + audit logs
  • Priority support
  • SSO
Coming Soon
Enterprise
Custom
For organizations
  • Unlimited memories
  • Unlimited agents
  • Everything in Team
  • On-premise deployment
  • Dedicated support
  • SLA guarantee
  • Custom integrations
Contact Us
Copied to clipboard!