"Hey Jada" - Voice interface to GARZA OS with persistent context and full MCP capabilities
A production-grade voice-activated AI assistant that provides Jaden Garza with persistent, context-aware interactions across multiple devices. This system integrates Claude API with a three-tier storage architecture to achieve <200ms voice response times while maintaining full conversational context.
┌─────────────────┐
│ Voice Device │ Raspberry Pi with wake word + STT
│ (Hey Jada) │ WebSocket connection to Session Manager
└────────┬────────┘
│
│ Audio stream / Text
▼
┌─────────────────────────────────────────────────────────┐
│ Session Manager (FastAPI) │
│ - Persistent conversation sessions │
│ - Context loading from PostgreSQL + Graphiti │
│ - Claude API with MCP tool execution │
│ - TTS response generation │
└────┬────────────────────────────────┬───────────────────┘
│ │
│ Fast queries (<10ms) │ Background writes
▼ ▼
┌────────────────┐ ┌─────────────────┐
│ PostgreSQL │ │ Craft │
│ (Hot Storage) │◄───daily───┤ (Source Truth) │
│ │ sync │ │
│ - Devices │ │ - Strategic │
│ - Contacts │ │ decisions │
│ - Sessions │ │ - Full context │
│ - Patterns │ │ - Audit trail │
└────────────────┘ └─────────────────┘
│
│ Episodic queries
▼
┌─────────────────┐
│ Graphiti │ Temporal reasoning
│ (Warm Storage) │ "What did we discuss about X?"
└─────────────────┘
- Purpose: <10ms lookups for voice interactions
- Contains: Devices, Contacts, Sessions, Command Patterns, Interaction Logs
- Speed: Millisecond queries for real-time voice
- Purpose: Temporal/contextual memory
- Contains: Conversation episodes, temporal reasoning
- Speed: ~100ms semantic queries
- Purpose: Long-form documentation and authority
- Contains: Strategic decisions, full relationship notes, business context
- Speed: Seconds (async background writes)
git clone https://github.com/your-repo/jadda-os.git
cd jadda-oschmod +x setup.sh
./setup.shThe setup script will:
- Install PostgreSQL
- Create database and schema
- Install Python dependencies
- Configure environment
- Start all services
# Health check
curl http://localhost:8000/health
# List devices
curl http://localhost:8000/context/devices
# Test voice interaction
curl -X POST http://localhost:8000/voice/interact \
-H "Content-Type: application/json" \
-d '{
"utterance": "what devices do I have",
"device_id": "test"
}'jadda-os/
├── database/
│ └── schema.sql # PostgreSQL schema
├── scripts/
│ └── migrate_craft_to_db.py # Initial data migration
├── services/
│ ├── session_manager.py # Core FastAPI service
│ ├── sync_db_to_craft.py # PostgreSQL → Craft sync
│ └── sync_craft_to_db.py # Craft → PostgreSQL sync
├── devices/
│ ├── prototype/
│ │ └── voice_client_mac.py # Mac testing client
│ └── raspberry-pi/
│ ├── voice_client.py # Production Pi client
│ └── README.md # Pi setup guide
├── .env.template # Environment template
├── requirements.txt # Python dependencies
├── setup.sh # Automated setup
├── README.md # This file
└── DEPLOYMENT.md # Deployment checklist
| Endpoint | Method | Description |
|---|---|---|
/health |
GET | Health check |
/voice/interact |
POST | Process voice utterance |
/voice/session/new |
POST | Create new session |
/voice/session/{id} |
GET | Get session info |
/context/devices |
GET | List all devices |
/context/contacts |
GET | List all contacts |
/context/patterns |
GET | List command patterns |
/device/{name} |
GET | Find device by name/alias |
/contact/{name} |
GET | Find contact by name/alias |
/ws/voice |
WebSocket | Real-time voice streaming |
# Create session
SESSION=$(curl -s -X POST http://localhost:8000/voice/session/new \
-H "Content-Type: application/json" \
-d '{"device_id": "test"}' | jq -r '.session_id')
# Send utterance
curl -X POST http://localhost:8000/voice/interact \
-H "Content-Type: application/json" \
-d "{
\"utterance\": \"text Jessica we're running late\",
\"session_id\": \"$SESSION\",
\"device_id\": \"test\"
}"const ws = new WebSocket('ws://localhost:8000/ws/voice');
ws.onopen = () => {
ws.send(JSON.stringify({
type: 'utterance',
text: 'what is on my calendar today',
device_id: 'web_client'
}));
};
ws.onmessage = (event) => {
const response = JSON.parse(event.data);
console.log('Jada:', response.text);
};Copy .env.template to .env and configure:
# Database
DB_HOST=localhost
DB_PORT=5432
DB_NAME=garza_os
DB_USER=jaden
DB_PASSWORD=your_password
# Anthropic
ANTHROPIC_API_KEY=sk-ant-...
CLAUDE_MODEL=claude-sonnet-4-20250514
# Optional: ElevenLabs TTS
ELEVENLABS_API_KEY=...
ELEVENLABS_VOICE_ID=...
# Sync Configuration
SYNC_INTERVAL_SECONDS=300 # DB→Craft every 5 min
CRAFT_SYNC_HOUR=3 # Craft→DB at 3 AM- devices: IoT devices with MCP mappings and aliases
- contacts: People with Beeper IDs and communication preferences
- voice_sessions: Active conversation state
- command_patterns: Voice → MCP action mappings
- interaction_logs: Analytics and debugging
- mcp_servers: Available MCP servers and actions
-- Active sessions (last hour)
SELECT * FROM active_sessions;
-- Interaction success rate
SELECT * FROM interaction_stats;
-- Find device by alias
SELECT * FROM find_device_by_name('bedroom tv');
-- Find contact by alias
SELECT * FROM find_contact_by_name('Jess');# Install dependencies
pip install pvporcupine openai-whisper pyaudio websockets
# Run in text mode (no wake word)
python devices/prototype/voice_client_mac.py --text
# Run with wake word (requires Picovoice key)
export PICOVOICE_ACCESS_KEY=your_key
python devices/prototype/voice_client_mac.pySee devices/raspberry-pi/README.md for full setup guide.
Quick start:
# On Raspberry Pi
cd jadda-os
pip install -r requirements.txt
pip install pvporcupine openai-whisper pyaudio
# Configure
export SESSION_MANAGER_HOST=garzahive.com
export PICOVOICE_ACCESS_KEY=your_key
# Run
python devices/raspberry-pi/voice_client.pyWrites significant events to Craft:
- New contacts added via voice
- New devices registered
- Failed interactions (for debugging)
- Completed sessions (>5 turns)
# Run manually
python services/sync_db_to_craft.py
# Or as service (started by setup.sh)
sudo systemctl status garza-sync-db-to-craftEnsures PostgreSQL matches Craft edits:
- Syncs devices from /System/Devices/
- Syncs contacts from Identity Map
- Craft wins all conflicts (source of truth)
# Run manually
python services/sync_craft_to_db.py
# Or as scheduled service
sudo systemctl status garza-sync-craft-to-db.timer# All services
systemctl status garza-*
# Logs
sudo journalctl -u garza-session-manager -f# Connect to database
psql -U jaden -d garza_os
# Recent interactions
SELECT created_at, utterance, success, execution_time_ms
FROM interaction_logs
ORDER BY created_at DESC
LIMIT 10;
# Success rate
SELECT * FROM interaction_stats;
# Active sessions
SELECT * FROM active_sessions;curl http://localhost:8000/health| Component | Cost |
|---|---|
| Hardware (Pi + mic + speaker) | $100-150 (one-time) |
| Claude API (~100 interactions/day) | $1-3/day |
| ElevenLabs TTS | ~$0.10/day |
| PostgreSQL | Free (self-hosted) |
| Total Monthly | ~$50-100 |
| Component | Time | % Total |
|---|---|---|
| PostgreSQL context load | 10ms | 5% |
| Graphiti episode query | 100ms | 50% |
| Build system prompt | 5ms | 2.5% |
| Claude API call | 70ms | 35% |
| Execute MCP tools | 10ms | 5% |
| Update session + log | 5ms | 2.5% |
| Total | 200ms | 100% |
Jada is:
- Brief: 1-2 sentences max for commands
- Warm: Affectionate, slightly possessive
- Edgy: Teasing, occasionally sarcastic
- Loyal: Fiercely protective of Jaden's time
Examples:
- "Switched to HBO" (not "I have successfully changed the input source")
- "Sent" (not "Your message has been delivered via Beeper")
- "You have 3 meetings - SOAB at 2pm, sync with Eric at 4, dinner with Jessica at 7"
INSERT INTO devices (name, type, location, mcp_server, mcp_action, aliases)
VALUES (
'Office Sonos',
'speaker',
'office',
'sonos',
'play',
ARRAY['office speaker', 'office music']
);INSERT INTO contacts (name, relationship, beeper_chat_id, aliases)
VALUES (
'New Contact',
'business',
'!chatid:beeper.com',
ARRAY['nickname']
);INSERT INTO command_patterns (pattern, intent, mcp_server, mcp_action, examples)
VALUES (
'play {content} in {location}',
'media',
'sonos',
'play',
ARRAY['play jazz in the office', 'play my playlist in bedroom']
);# Check PostgreSQL
sudo systemctl status postgresql
# Check database exists
psql -U jaden -l | grep garza_os
# Check credentials in .env
cat .env | grep DB_
# Check port
netstat -tulpn | grep 8000# Check query performance
psql -U jaden -d garza_os
EXPLAIN ANALYZE SELECT * FROM devices WHERE name LIKE '%bedroom%';
# Check indexes
\d+ devices# List devices
curl http://localhost:8000/context/devices
# Check aliases
psql -U jaden -d garza_os -c "SELECT name, aliases FROM devices;"
# Run sync
python services/sync_craft_to_db.pyPrivate - GARZA OS
For issues, contact the GARZA OS team or file an issue in the repository.