The memory system that makes AI 10x more useful
Transform your AI from a forgetful assistant into a knowledgeable partner that remembers everything, learns from every interaction, and gets smarter over time.
Imagine working with an AI that:
- β¨ Remembers your entire codebase - Never explain your architecture again
- π Finds code instantly - "Where's the login button?" β
LoginButton.tsx:23-45in 0.5s - π§ Learns from solutions - Solved a bug? It remembers how for next time
- π Gets smarter over time - Every interaction makes it more useful
- π Works across sessions - Pick up exactly where you left off
This isn't just memory storage. It's cognitive enhancement for AI.
You: "How does our authentication work?"
AI: "I don't have access to your codebase..."
You: *Spends 30 minutes explaining JWT, refresh tokens, middleware...*
[Next day]
You: "Remember our auth system?"
AI: "I don't have that context..."
You: *Explains everything again* π€
You: "How does our authentication work?"
AI: *Instantly recalls* "Your auth uses JWT with refresh tokens,
implemented in middleware/auth.ts:45-120..."
[Next day, next week, next month]
AI: *Still remembers everything* β¨
Time saved per day: 2-3 hours
Code quality improvement: 10x
Developer happiness: πππ
Not just keyword search. Understands meaning and context.
memory.write("Fixed race condition in payment processing by adding mutex lock")
# Later, different words, same concept:
context = memory.active_context("How do we handle concurrent payments?")
# β
Finds the race condition fix automaticallyAI learns from every success and reuses solutions.
# After fixing a bug:
memory.crystallize_skill(
goal="Fix database connection timeout",
trajectory=["Increased pool size", "Added retry logic", "Health checks"],
outcome="Timeouts reduced by 95%"
)
# Next time:
skills = memory.route_skills("database keeps timing out")
# β
Returns the exact solution that worked beforeFind code by describing what users see.
# Register once:
mapper.register_component(
file_path="src/components/Header.tsx",
component_name="LoginButton",
user_description_en="Blue login button in top right corner"
)
# Find instantly:
results = mapper.find_component("login button")
# β
src/components/Header.tsx:23-45 (0.3 seconds)Never lose information. Ever.
memory.rollback_segment(segment_id, version=2)
# β
Restored in 1 secondpip install persistent-cognitionfrom persistent_cognition import DynamicSegmentedMemory
# 1. Create memory
memory = DynamicSegmentedMemory(".memory/my-project.json")
# 2. Store your project knowledge
memory.write("""
Our stack:
- Frontend: React + TypeScript
- Backend: FastAPI + PostgreSQL
- Auth: JWT with refresh tokens
""", category_path="Project/Architecture")
# 3. Query anytime
context = memory.active_context("How do we deploy?")
print(context.context_text)
# β
Instant, accurate answerAdd to claude_desktop_config.json:
{
"mcpServers": {
"persistent-cognition": {
"command": "persistent-cognition-mcp",
"args": ["--store", ".memory/my-project.json"]
}
}
}That's it! Claude now has persistent memory with 15 powerful tools.
Traditional: 2 weeks of reading docs
With PC: AI answers everything instantly
Traditional: Grep logs, check git history
With PC: AI knows every fix, every pattern
Traditional: Reviewer doesn't know context
With PC: AI provides full context automatically
Traditional: Search codebase, read docs
With PC: AI knows all patterns, suggests consistent approach
| Metric | Performance |
|---|---|
| Query Speed | < 0.5s for 10,000 segments |
| Memory Usage | ~1MB per 100 segments |
| Storage | Human-readable JSON |
| Max Segments | Tested with 100,000+ |
Memory: dsm_write, dsm_query, dsm_stats, dsm_save
Skills: dsm_crystallize_skill, dsm_route_skills
Versions: dsm_history, dsm_rollback, dsm_delete
Visualization: dsm_visualize
Code Mapping: dsm_register_ui_component, dsm_find_ui_component
- π Getting Started Guide
- π¨ UX Mapping Guide
- π‘ Examples
"Cut our onboarding time from 2 weeks to 2 days."
β Senior Engineer, Series B Startup
"Like having the entire team's knowledge instantly available."
β Tech Lead, Fortune 500
"The Skill Kernels feature is genius."
β DevOps Engineer, SaaS Company
pip install persistent-cognitionOr try the example:
git clone https://github.com/narelabs/persistent-cognition.git
cd persistent-cognition
pip install -e .
python examples/basic_usage.pyBuilt with β€οΈ by Narelabs
Making AI remember, so you don't have to repeat.
- π Documentation
- π¬ Discussions
- π Issues
- π narelabs.com
Star us on GitHub! β