Commit Graph

2 Commits

Author SHA1 Message Date
Alexander Payne
625806daf5 Fine-tune Timmy's conversational AI with memory layers
## Enhanced System Prompt
- Detailed tool usage guidelines with explicit examples
- Clear DO and DON'T examples for tool selection
- Memory system documentation
- Conversation flow guidelines
- Context awareness instructions

## Memory Layer System (NEW)
Implemented 3-layer memory architecture:

1. WORKING MEMORY (src/timmy/memory_layers.py)
   - Immediate context (last 20 messages)
   - Topic tracking
   - Tool call tracking
   - Fast, ephemeral

2. SHORT-TERM MEMORY (Agno SQLite)
   - Recent conversations (100)
   - Persists across restarts
   - Managed by Agno Agent

3. LONG-TERM MEMORY (src/timmy/memory_layers.py)
   - Facts about user (name, preferences)
   - SQLite storage in data/memory/
   - Auto-extraction from conversations
   - User profile generation

## Memory Manager (NEW)
- Central coordinator for all memory layers
- Context injection into prompts
- Fact extraction and storage
- Session management

## TimmyWithMemory Class (NEW)
- Wrapper around Agno Agent with explicit memory
- Auto-injects user context from LTM
- Tracks exchanges across all layers
- Simple chat() interface

## Agent Configuration
- Increased num_history_runs: 10 -> 20
- Better conversational context retention

## Tests
- All 973 tests pass
- Fixed test expectations for new config
- Fixed module path in test_scary_paths.py

## Files Added/Modified
- src/timmy/prompts.py - Enhanced with memory and tool guidance
- src/timmy/agent.py - Added TimmyWithMemory class
- src/timmy/memory_layers.py - NEW memory system
- src/timmy/conversation.py - NEW conversation manager
- tests/ - Updated for new config
2026-02-25 18:07:44 -05:00
Alexander Payne
ace5bfdf5f feat: Mission Control dashboard with sovereignty audit + scary path tests
Mission Control Dashboard:
- /swarm/mission-control page with real-time system status
- Sovereignty score display with visual progress bar
- Dependency health grid (Ollama, Redis, Lightning, SQLite)
- Recommendations based on dependency status
- Heartbeat monitor with tick counter
- System metrics: uptime, agents, tasks, sats earned

Health Endpoints:
- /health/sovereignty - Full sovereignty audit report
- /health/components - Component status and config

Tests (TDD approach):
- 11 Mission Control tests (all passing)
- 23 scary path tests for production scenarios
- Concurrent load, memory persistence, edge cases

Total: 525 tests passing
2026-02-22 20:48:14 -05:00