Our gift to the AI community. Give any AI the ability to remember.
Most AI assistants forget everything between sessions. We fixed that.
No external dependencies. Just a single file database that travels with your application. Simple, portable, reliable.
Full-text search with FTS5. Retrieve relevant memories in under 50ms, even with thousands of entries.
Not all memories are equal. Assign importance scores and let the system prioritize what matters most.
Organize memories with tags. Filter and search by categories to find exactly what you need.
Memories fade over time, just like human memory. Old, unused memories gracefully decay in importance.
Full JSON export and import. Backup, migrate, or share memory databases with ease.
Get started in 3 lines of code
from connection_core import MemoryEngine # Initialize memory = MemoryEngine() # Add memories memory.add("User's name is Alice") memory.add("User prefers dark mode", importance=0.8) # Recall relevant memories results = memory.recall("What is the user's name?") print(results[0].content) # "User's name is Alice"
from connection_core import MemoryEngine from connection_core.memory_engine import ConversationMemory engine = MemoryEngine() conversation = ConversationMemory(engine) # Store conversation turns conversation.add_turn("user", "My name is Alice") conversation.add_turn("assistant", "Nice to meet you!") # Later session - recall history history = conversation.get_recent(10)
from connection_core.memory_engine import SemanticMemory semantic = SemanticMemory(engine) # Store project knowledge semantic.add_concept("project.framework", "FastAPI") semantic.add_concept("project.database", "PostgreSQL") semantic.add_concept("project.style", "PEP8 compliant") # Retrieve context framework = semantic.get_concept("project.framework")
# Store findings with tags engine.add( "Finding: X improves Y by 50%", importance=0.9, tags=["research", "results"], metadata={"paper": "arxiv:2024.12345"} ) # Recall by topic findings = engine.recall( "research findings about X", tags=["research"] )
From chatbots to enterprise applications
Build chatbots that truly know their users. Remember names, preferences, past conversations, and context across sessions.
# Remember user context memory.add(f"User {name} joined") memory.add(f"User asked about: {topic}") # Personalize response context = memory.recall(user_message) response = llm.generate( prompt=user_message, context=context )
Create AI assistants that learn your workflow, remember your projects, and provide contextual help based on your history.
# Store project context memory.add("Project uses TypeScript") memory.add("Prefer functional components") memory.add("Use Tailwind for styling") # Generate contextual code prefs = memory.recall("coding preferences") code = generate_with_context(prefs)
Build tools that accumulate knowledge, track findings, and surface relevant information when you need it.
# Store research findings memory.add( "Paper X shows 40% improvement", tags=["ml", "performance"], importance=0.9 ) # Find related work related = memory.recall( "performance improvements", tags=["ml"] )
Create NPCs that remember player interactions, build relationships, and respond based on shared history.
# NPC remembers player npc_memory.add( f"Player helped defeat dragon", tags=["quest", "heroic"], importance=0.95 ) # Generate contextual dialogue history = npc_memory.recall("player") dialogue = generate_npc_response(history)
Everything you need to build with Connection-Core
Add a new memory to the engine
memory.add("fact", importance=0.8, tags=["tag1"])
Retrieve relevant memories
results = memory.recall("search term", limit=5)
Get a specific memory by ID
mem = memory.get("abc123")
Update an existing memory
memory.update(id, content="new content")
Remove a memory
memory.delete("abc123")
Get engine statistics
stats = memory.get_stats()
Export all memories to JSON
memory.export("backup.json")
Apply natural memory decay
updated = memory.decay_importance()
Lightweight yet powerful
| Operation | Latency |
|---|---|
| Add Memory | 2ms |
| Recall (search) | 15ms |
| Get by ID | 1ms |
| Update | 2ms |
| Delete | 1ms |
| Memory Count | DB Size |
|---|---|
| 1,000 memories | 95KB |
| 10,000 memories | 850KB |
| 100,000 memories | 8.2MB |
| 1,000,000 memories | ~80MB |
Experience Connection-Core in your browser
One command. Infinite possibilities.
pip install connection-core