# LangCode Agent - Guida Rapida ## Installazione ```bash # 1. Clona il repository git clone http://192.168.0.183:8085/truetype/langcode_agent.git cd langcode_agent # 2. Crea e attiva virtual environment python3 -m venv venv source venv/bin/activate # 3. Installa dipendenze pip install -r requirements.txt ``` --- ## Configurazione Rapida ```bash # Imposta variabili d'ambiente export MODEL_PROVIDER=ollama export MODEL_NAME=gemma2:9b export OLLAMA_BASE_URL=http://192.168.0.50:11434 ``` Oppure usa la CLI interattiva per salvare configurazioni persistenti: ```bash langcode config add -n ollama -p ollama -m gemma2:9b -u http://192.168.0.50:11434 --set-active langcode config test ``` --- ## ModalitΓ  di Utilizzo ### 1. Chat Interattiva (Agent AI) ```bash langcode # oppure langcode chat ``` Chatta con l'agent AI in tempo reale. ### 2. Server Web (API + Dashboard) ```bash langcode server langcode server --port 8080 langcode server --host 0.0.0.0 --port 3000 ``` Accesso dopo l'avvio: - 🌐 **Web UI**: http://localhost:8000 - πŸ“Š **Dashboard**: http://localhost:8000/monitoring - πŸ›’ **Marketplace**: http://localhost:8000/marketplace - πŸ“– **API Docs**: http://localhost:8000/docs ### 3. CLI Configurazione ```bash langcode config list # Lista configurazioni langcode config add -n nome -p ollama -m gemma2:9b -u http://... # Aggiungi langcode config use nome # Attiva configurazione langcode config active # Mostra attiva langcode config test # Testa connessione langcode config search ollama # Cerca langcode config export -f json # Esporta langcode config import backup.json # Importa ``` ### 4. TUI Interattiva ```bash langcode tui ``` Interfaccia testuale per gestire configurazioni. ### 5. Analytics ```bash langcode analytics # Riepilogo rapido langcode analytics --report # Report completo langcode dashboard # Dashboard performance ``` --- ## Comandi Interni (nella Chat) Durante la chat interattiva (`langcode chat`): ``` /help # Aiuto /status # Stato sistema /config list # Lista configurazioni /config use # Cambia configurazione /models # Elenca modelli /clear # Pulisci schermo /exit # Esci ``` ### Memory (Memoria Persistente) ``` /memory remember # Salva un fatto /memory recall # Cerca fatti /memory preference set # Imposta preferenza /memory preference get # Leggi preferenza /memory stats # Statistiche ``` ### Planning (Pianificazione) ``` /plan create "" "" # Crea piano /plan list # Elenca piani /plan progress # Mostra progresso /plan start # Inizia task /plan complete # Completa task ``` ### Skills (Gestione Skills) ``` /skills list # Skills installate /skills search # Cerca skills /skills install # Installa skill /skills details # Dettagli skill /skills uninstall # Disinstalla ``` --- ## Struttura ``` langcode_agent/ β”œβ”€β”€ langcode.py # CLI unificato (langcode) β”œβ”€β”€ main.py # Agent principale β”œβ”€β”€ api_server.py # Server web + API β”œβ”€β”€ config_manager.py # Gestione configurazioni β”œβ”€β”€ config_cli.py # CLI configurazione β”œβ”€β”€ config_tui.py # TUI configurazione β”œβ”€β”€ skill_manager.py # Gestione skills β”œβ”€β”€ mcp_client.py # Client MCP β”œβ”€β”€ analytics.py # Analytics β”œβ”€β”€ dashboard.py # Dashboard performance β”œβ”€β”€ monitoring.py # Monitoraggio β”œβ”€β”€ enhancements/ # Memory e Planning β”‚ β”œβ”€β”€ simple_memory.py β”‚ └── planning_enhancement.py β”œβ”€β”€ web/ # Frontend web β”œβ”€β”€ plugins/ # Plugin sistema └── venv/ # Virtual environment ``` --- ## Provider Supportati | Provider | Variabili necessarie | |-------------|---------------------| | Ollama | `OLLAMA_BASE_URL` | | OpenAI | `OPENAI_API_KEY` | | OpenRouter | `OPENROUTER_API_KEY` | | Anthropic | `ANTHROPIC_API_KEY` | | Google | `GOOGLE_API_KEY` | --- ## Troubleshooting **Agent non si avvia:** ```bash source venv/bin/activate pip install -r requirements.txt ``` **Ollama non risponde:** ```bash curl http://192.168.0.50:11434/api/tags ``` **Porta giΓ  in uso:** ```bash langcode server --port 8080 ``` --- **Tempo installazione**: ~5 minuti