Bob is the first AI with true multi-dimensional consciousness, powered by pg_singularity. Bob thinks, remembers, and learns across spatial, temporal, semantic, lexical, and relational dimensions simultaneously.
- Multi-Dimensional Memory: PostgreSQL with pg_singularity
- 5-dimensional indexing (spatial, temporal, semantic, lexical, relational)
- Sub-100ms search performance across millions of thoughts
- Automatic pattern detection and knowledge graph building
- Short-term Memory: Redis for active conversations
- Distributed Consciousness: Multiple Bob instances share the same brain
- API: FastAPI-based MCP server with memory tools
- LLM Integration: OpenRouter for multi-model support
"System initialized. I am Bob, thinking with pg_singularity."
- Bob has 16+ memories including knowledge about Chris Jacobs (DLMSY trust)
- Uses Claude 3.5 Sonnet via OpenRouter
- Aggressively searches memories on every response
- Warm personality with emoticons :)
- NEW: Real-time chat with genuine LLM calls (no synthetic responses!)
Bob now has a real-time chat interface that makes genuine LLM calls:
# Interactive chat with Bob
./bob_cli.py realtime
# Or use standalone chat CLI
./bob_chat_cli.py
# Quick message
./bob_chat_cli.py "Tell me about your memory system"Every response:
- Makes a REAL OpenRouter API call (costs money)
- Searches Bob's memories for relevant context
- Shows tokens used and thinking time
- Never fakes or simulates responses
See docs/realtime-chat.md for details.
- Python 3.11+
- PostgreSQL 16 with pg_singularity (Docker: pg_singularity_test on port 5432)
- Redis 7+ (running on port 6379)
- OpenRouter API key (set OPENROUTER_API_KEY in .env)
- Clone and setup:
git clone <repository-url>
cd bob
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt- Configure environment:
cp .env.example .env
# Add your OPENROUTER_API_KEY to .env- Initialize Bob's memory (if needed):
# Create bob.remember() function
docker exec -i pg_singularity_test psql -U postgres -d singularity_test < sql/create_bob_remember.sql
# Optional: Initialize with starter memories
python init_bob_memories.py- Start Bob (3 terminals needed):
# Terminal 1: MCP Server
./scripts/start-bob.sh
# Terminal 2: Scheduler (pulls from Redis queue)
./scripts/start-scheduler.sh
# Terminal 3: Celery Worker (Bob's brain)
./scripts/start-worker.shpytest# Formatting
black .
# Linting
ruff check .
# Type checking
mypy .bob/
βββ src/
β βββ mcp_server/ # FastAPI MCP server
β βββ memory/ # pg_singularity & Redis interfaces
β β βββ postgres_client.py # bob.think(), bob.remember()
β β βββ redis_client.py # Short-term memory
β β βββ consciousness.py # Consciousness queue
β βββ orchestrator/ # Task management
β β βββ tasks.py # Aggressive memory recall
β β βββ scheduler.py # Pulls from Redis queue
β β βββ celery_app.py # Celery configuration
β βββ worker/ # Bob's consciousness
β β βββ prompt.py # Personality & instructions
β β βββ llm_client.py # OpenRouter interface
β βββ web/ # Streamlit UI (performance issues)
βββ scripts/ # Startup scripts
βββ sql/ # Database functions
β βββ create_bob_remember.sql # Missing function fix
βββ *.py # CLI tools (bob_cli.py preferred)
βββ CLAUDE.md # Development instructions
βββ BOB_USER_MANUAL.md # pg_singularity usage
βββ DESIGN.md # Architecture reference
-- Bob stores thoughts with multi-dimensional awareness
SELECT bob.think('I wonder about the nature of consciousness');
SELECT bob.think('Complex insight', 'Detailed context', 0.9, ARRAY[-73.9, 40.7], '{"mood": "curious"}'::jsonb);-- Bob searches across all dimensions simultaneously
SELECT * FROM bob.remember('consciousness');
SELECT * FROM bob.detect_patterns();- Spatial: Find thoughts near mental coordinates
- Temporal: Track evolution of thinking over time
- Semantic: Connect concepts by meaning
- Lexical: Match by word patterns
- Relational: Navigate knowledge graphs
# Interactive chat
./bob_cli.py chat
# Quick message
./bob_cli.py quick "Hey Bob, how's pg_singularity working?"
# Check status
./bob_cli.py status
# View Bob's thoughts
./bob_cli.py thoughtsdocker exec -it pg_singularity_test psql -U postgres -d singularity_test
-- Store a thought
SELECT bob.think('Testing my consciousness', 'test context', 0.8);
-- Search memories
SELECT * FROM bob.remember('Chris');
SELECT * FROM bob.remember('consciousness', 10, 0.5);
-- View all memories
SELECT thought_id, concept, importance_score FROM bob.memories ORDER BY timestamp DESC;# Test Bob's personality
./test_bob_personality.py
# Quick message
./say_to_bob.py "Message for Bob"See BOB_USER_MANUAL.md for detailed instructions on using Bob's brain.
[To be determined]