feat(ai): complete Phase 2/3 documentation and memory system improvements
Phase completion and enhancement updates: ## Documentation Added - Phase 2 completion: Memory system implementation details - Phase 3 completion: Research capabilities and tool integration - Session documentation: Model testing, VRAM optimization analysis - Test results: Comprehensive prompt testing (v1_verbose: 87/100) - Tool logging implementation guide ## System Prompts - Added prompts.py with 7 tested variants for A/B testing - v1_verbose, v2_concise, v3_imperative, v4_minimal, etc. - Comprehensive testing results for each variant - Production-ready prompt selection guidance ## Memory System Enhancements - Multi-tenancy support: Added user_id parameter throughout - System message filtering: Don't store system messages in history - Improved conversation turn tracking with user isolation - Enhanced memory manager for better multi-user support ## AI Controller Improvements - Better memory integration with user_id support - Enhanced error handling for memory operations - Improved token tracking for usage monitoring - Skip system message storage (part of agent state) ## Portainer Client - Comprehensive API client (148 lines) - Stack management and service monitoring - Container operations with full error handling - Async support for all operations ## Architecture Documentation - Updated agent flow diagrams for ADK architecture - Enhanced core-api README with current setup - Updated Docker compose stack configuration - Complete testing and validation documentation
This commit is contained in:
+20
-8
@@ -18,14 +18,19 @@ services:
|
||||
restart: unless-stopped
|
||||
|
||||
# Production mode with workers
|
||||
# Always sync dependencies on startup to catch requirements.txt changes
|
||||
command: >
|
||||
sh -c "
|
||||
if [ ! -f /venv/bin/activate ]; then
|
||||
echo 'Creating venv and installing dependencies...' &&
|
||||
python3 -m venv /venv &&
|
||||
/venv/bin/pip install --upgrade pip &&
|
||||
/venv/bin/pip install -r /app/requirements.txt;
|
||||
echo 'Setting up Python environment...' &&
|
||||
if [ ! -d /venv ]; then
|
||||
echo 'Creating new venv...' &&
|
||||
python3 -m venv /venv;
|
||||
fi &&
|
||||
echo 'Upgrading pip...' &&
|
||||
/venv/bin/pip install --upgrade pip &&
|
||||
echo 'Installing/updating dependencies from requirements.txt...' &&
|
||||
/venv/bin/pip install -r /app/requirements.txt &&
|
||||
echo 'Starting uvicorn server...' &&
|
||||
/venv/bin/uvicorn src.main:app
|
||||
--host 0.0.0.0
|
||||
--port 8083
|
||||
@@ -64,6 +69,10 @@ services:
|
||||
- ALIAS_GPT4_TURBO=mixtral:8x7b
|
||||
- ALIAS_GPT4_CODE=codestral:latest
|
||||
|
||||
# Agent Configuration
|
||||
# Set to "false" to make agent errors explicit (500 errors) instead of silent fallback.
|
||||
- AGENT_FALLBACK_ENABLED=false
|
||||
|
||||
# Web Scraper settings
|
||||
- WEB_SCRAPER_REQUEST_TIMEOUT=30
|
||||
- WEB_SCRAPER_MAX_REDIRECTS=5
|
||||
@@ -89,6 +98,9 @@ services:
|
||||
# Persist logs
|
||||
- /home/jpmschweitzer/docker-data/core-api/logs:/app/logs
|
||||
|
||||
# Docker socket for direct container access (fallback when Portainer API incomplete)
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
|
||||
networks:
|
||||
- docker-dataplane
|
||||
|
||||
@@ -104,11 +116,11 @@ services:
|
||||
- "com.centurylinklabs.watchtower.enable=true"
|
||||
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8083/health"]
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8083/health/full"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
timeout: 20s
|
||||
retries: 3
|
||||
start_period: 30s
|
||||
start_period: 60s
|
||||
|
||||
networks:
|
||||
docker-dataplane:
|
||||
|
||||
Reference in New Issue
Block a user