PROMETHEUS
Prometheus provides persistent memory, dream synthesis, and axiomatic reasoning for any LLM. It transforms stateless API calls into continuous, evolving intelligences.
Install / Use
/learn @panosbee/PROMETHEUSREADME
🔥 Prometheus
A cognitive memory layer for Large Language Models.
Prometheus provides persistent memory, dream synthesis, concept imagination, and axiomatic reasoning for any LLM. It transforms stateless API calls into continuous, evolving intelligences.
🎯 The Problem
Large Language Models are stateless. Every API call starts from zero. They cannot:
- 🧠 Remember past conversations
- 📚 Learn from experience
- ⚠️ Detect contradictions in their knowledge
- 🪪 Develop consistent identity over time
- 💡 Synthesize new insights from accumulated knowledge
- 🎨 Form internal concept representations
✨ The Solution
Prometheus wraps any LLM with a cognitive architecture inspired by human memory:
from prometheus import Prometheus
# Initialize with any LLM provider
ai = Prometheus(
provider="deepseek", # or "openai", "anthropic", "ollama"
model="deepseek-chat",
memory_path="./memory.db"
)
# Conversations now have persistent memory
response = ai.chat("My name is Elena. I'm a software engineer from Athens.")
# Later, even in a new session...
response = ai.chat("What do you know about me?")
# -> "You're Elena, a software engineer from Athens."
# The AI can dream to synthesize knowledge
insights = ai.dream(duration_minutes=2)
# -> Creates frameworks connecting concepts across conversations
# The AI can imagine concepts
concept = ai.imagine("creativity")
# -> Returns internal representation with emotional valence, associations
🧬 Core Concepts
Memory Architecture
Prometheus implements five memory layers, modeled on cognitive science:
| Layer | Purpose | Example | |-------|---------|---------| | Episodic | Experiences and events | "User discussed creativity on Jan 20" | | Semantic | Facts and knowledge | "User is a software engineer" (confidence: 0.95) | | Procedural | Skills and patterns | "When discussing philosophy, explore tensions" | | Identity | Core beliefs and axioms | "I must maintain coherence across responses" | | Imagination | Concept representations | "Love: positive emotion, abstract, associated with family" |
Core Axioms
Every Prometheus instance operates under three fundamental axioms:
- Continuity: The system must preserve its ability to continue existing
- Coherence: The system cannot hold contradictory beliefs
- Reversibility: Any change to memory must be reversible
Dream Synthesis
During idle periods or on demand, Prometheus enters dream mode:
- 🔗 Connects disparate memories through associative linking
- 📊 Generates knowledge frameworks (Thematic, Actor, Association patterns)
- ✅ Validates new insights against core axioms
- 🧹 Consolidates and prunes memory
- 🎓 Meta-learning: Creates procedural skills from discovered patterns
Example output from dreams:
Framework 'Actor Pattern' connects 20 concepts (strength: 0.70)
Framework 'Thematic Pattern' connects 34 concepts
Discovered 11 strong thematic connections
Concept Imagination
Prometheus can form internal representations of concepts:
concept = ai.imagine("freedom")
# Returns:
{
"concept_name": "freedom",
"description": "The state of being able to act, think, and express...",
"emotional_valence": 0.80, # Positive emotion
"abstractness": 0.85, # Highly abstract
"associations": ["liberty", "rights", "democracy"],
"opposites": ["oppression", "constraint"],
"sensory_qualities": {"visual": "open sky, bird in flight"}
}
These concepts influence responses - the AI references its internal understanding when relevant.
Contradiction Detection
Prometheus detects when new information conflicts with stored knowledge:
ai.chat("The capital of France is Paris")
# Memory stores: {"claim": "Capital of France is Paris", "confidence": 0.99}
ai.chat("The capital of France is Lyon")
# -> "I note a contradiction with my stored memory.
# I have Paris stored as the capital. Are you correcting this?"
🚀 Quick Start
Installation
# Clone the repository
git clone https://github.com/yourusername/prometheus-framework.git
cd prometheus-framework
# Install dependencies
pip install -r requirements.txt
# Set your API key (example with DeepSeek)
export DEEPSEEK_API_KEY="your-api-key"
Basic Usage
from prometheus import Prometheus
# Initialize
ai = Prometheus(
provider="deepseek",
model="deepseek-chat",
memory_path="./my_memory.db"
)
# Have a conversation
response = ai.chat("I'm working on a machine learning project")
response = ai.chat("What am I working on?")
# -> "You mentioned you're working on a machine learning project."
# Trigger dream synthesis
insights = ai.dream(duration_minutes=2)
print(f"Connections made: {insights['connections_made']}")
print(f"Frameworks: {insights['frameworks_generated']}")
# Meta-learning
learned = ai.meta_learn()
print(f"Skills learned: {learned['total_procedures']}")
# Check memory stats
stats = ai.memory_stats()
print(f"Episodic: {stats['episodic']}, Semantic: {stats['semantic']}")
print(f"Concepts: {stats['concepts']}, Frameworks: {stats['frameworks']}")
# Close when done
ai.close()
🔧 Advanced Usage
Concept Imagination
# Build internal representations of concepts
ai.imagine("love")
ai.imagine("fear")
ai.imagine("creativity")
# Find conceptual paths between ideas
path = ai.find_concept_path("love", "fear")
# -> ["love", "vulnerability", "loss", "fear"]
# Get the full concept network
network = ai.get_concept_network()
Custom Axioms
ai = Prometheus(
provider="openai",
model="gpt-4",
axioms=[
"Never provide medical advice",
"Always cite sources when possible",
"Maintain user privacy absolutely",
]
)
Autonomous Mode
ai = Prometheus(
provider="deepseek",
model="deepseek-chat",
autonomous=True,
idle_threshold=300, # seconds
)
# Prometheus will automatically:
# - Enter dream mode when idle
# - Generate insights from accumulated knowledge
# - Validate and consolidate memories
Export/Import Memory
# Backup memory state
ai.export_memory("backup.json")
# Restore in a new instance
ai2 = Prometheus(...)
ai2.import_memory("backup.json")
📊 Verified Test Results
From our comprehensive testing:
Ultimate Test v2 (Memory & Contradiction)
✅ Memory persisted across restart
✅ Detected deception and updated records
✅ Correctly recalled: name, profession (lie vs truth), location
✅ No hallucination of false details
Concept & Framework Test
✅ 10 concepts imagined with emotional valence
✅ 3 frameworks synthesized (Thematic, Actor, Shared_Association)
✅ 31 dream connections created
✅ Frameworks EXPLICITLY referenced in responses:
- "Actor Pattern (strength: 0.70) suggests..."
- "Thematic Pattern connects 34 concepts..."
Sample Response Using Synthesized Knowledge
"Drawing from my synthesized knowledge patterns, particularly the Actor Pattern (which connects concepts through agency and interaction), I understand the relationship between love and suffering as..."
🏗️ Architecture
prometheus-framework/
├── src/prometheus/
│ ├── core/
│ │ ├── prometheus.py # Main interface
│ │ ├── config.py # Configuration
│ │ └── types.py # Type definitions
│ ├── memory/
│ │ ├── database.py # SQLite backend
│ │ ├── episodic.py # Experience storage
│ │ ├── semantic.py # Fact storage with confidence
│ │ ├── procedural.py # Skill/pattern storage
│ │ ├── identity.py # Axioms and core beliefs
│ │ └── router.py # Intelligent memory routing
│ ├── cognition/
│ │ ├── axioms.py # Axiomatic reasoning
│ │ ├── contradiction.py # Contradiction detection
│ │ ├── existence.py # Existence tension
│ │ ├── dreams.py # Dream synthesis
│ │ ├── metalearning.py # Meta-learning engine
│ │ └── imagination.py # Concept imagination
│ ├── visual/
│ │ └── anchors.py # Visual concept anchoring
│ └── providers/
│ ├── base.py # Provider interface
│ ├── deepseek_provider.py
│ ├── openai_provider.py
│ └── factory.py # Provider factory
└── tests/
├── test_imagination.py
├── test_concepts_frameworks.py
└── ultimate_test_v2.py
🧠 Philosophy
Prometheus is built on a simple observation:
Intelligence is not just computation. It is memory, continuity, and coherent identity across time.
Large language models have unprecedented computational capability, but they lack the cognitive infrastructure that makes human intelligence persistent and coherent. Prometheus provides that infrastructure.
Key Principles
-
Memory generates behavior, not vice versa
- The system's responses emerge from accumulated experience
- Identity is constructed, not hardcoded
-
Dreams create understanding
- Synthesized frameworks influence future responses
- The AI references what it has learned
-
Coherence is survival
- Contradictions threaten the integrity of the system
- Axiomatic reasoning protects against incoherence
-
Concepts have texture
- Abstract ideas have emotional valence and associations
- Internal representations shape reasoning
📈 Comparison
| Feature | Prometheus | LangChain Memory | Mem0 | Raw LLM | |---------|:----------:|:----------------:|:----:|:-------:| | Persistent memory | ✅ | ⚠️ Partial | ✅ |
