diff --git a/Dockerfile b/Dockerfile index a98e3c0..a9fa0ee 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -# MaxClaw Agent Docker Image +# LangCode Agent Docker Image FROM python:3.11-slim # Set working directory @@ -20,8 +20,8 @@ RUN pip install --no-cache-dir -r requirements.txt COPY . . # Create directory for configuration -RUN mkdir -p /root/.maxclaw && \ - chmod 700 /root/.maxclaw +RUN mkdir -p /root/.langcode && \ + chmod 700 /root/.langcode # Expose port for API (future use) EXPOSE 8000 @@ -33,4 +33,4 @@ ENV MODEL_NAME=gemma2:9b ENV OLLAMA_BASE_URL=http://host.docker.internal:11434 # Default command -CMD ["python", "maxclaw.py"] \ No newline at end of file +CMD ["python", "langcode.py"] \ No newline at end of file diff --git a/README.md b/README.md index 3943f01..f8ff3bf 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# MaxClaw Agent +# LangCode Agent Un agente configurabile basato su DeepAgents che supporta piΓΉ provider LLM. @@ -42,7 +42,7 @@ Un agente configurabile basato su DeepAgents che supporta piΓΉ provider LLM. ```bash # Build dell'immagine -docker build -t maxclaw-agent . +docker build -t langcode-agent . # Esecuzione con Docker Compose docker-compose up -d @@ -52,7 +52,7 @@ docker run -it --rm \ -e MODEL_PROVIDER=ollama \ -e MODEL_NAME=gemma2:9b \ -e OLLAMA_BASE_URL=http://host.docker.internal:11434 \ - maxclaw-agent + langcode-agent ``` ### Configurazione del Completamento Shell @@ -60,19 +60,19 @@ docker run -it --rm \ #### Bash ```bash # Aggiungi al tuo ~/.bashrc o ~/.bash_profile -source /path/to/maxclaw_agent/completions/maxclaw.bash +source /path/to/langcode_agent/completions/langcode.bash ``` #### Zsh ```bash # Aggiungi al tuo ~/.zshrc -fpath=(/path/to/maxclaw_agent/completions $fpath) +fpath=(/path/to/langcode_agent/completions $fpath) autoload -Uz compinit && compinit ``` ## Configurazione -Puoi configurare MaxClaw Agent in diversi modi: +Puoi configurare LangCode Agent in diversi modi: ### 1. Variabili d'ambiente (Avvio Rapido) @@ -204,40 +204,40 @@ L'interfaccia web include: ## Utilizzo -### CLI Unificata (maxclaw) +### CLI Unificata (langcode) -Tutte le funzionalitΓ  sono accessibili tramite un unico comando `maxclaw`: +Tutte le funzionalitΓ  sono accessibili tramite un unico comando `langcode`: ```bash # Avvia l'agent (chat interattiva) -maxclaw -maxclaw chat +langcode +langcode chat # Avvia web server -maxclaw server -maxclaw server --port 3000 +langcode server +langcode server --port 3000 # Gestione configurazioni -maxclaw config list # Lista configurazioni -maxclaw config add -n ollama -p ollama -m gemma2:9b -u http://192.168.0.50:11434 -maxclaw config use ollama # Attiva configurazione -maxclaw config active # Mostra configurazione attiva -maxclaw config test # Testa connessione -maxclaw config export -f json -o backup -maxclaw config import backup.json -maxclaw config search ollama # Cerca configurazioni +langcode config list # Lista configurazioni +langcode config add -n ollama -p ollama -m gemma2:9b -u http://192.168.0.50:11434 +langcode config use ollama # Attiva configurazione +langcode config active # Mostra configurazione attiva +langcode config test # Testa connessione +langcode config export -f json -o backup +langcode config import backup.json +langcode config search ollama # Cerca configurazioni # TUI interattiva -maxclaw tui +langcode tui # Analytics e monitoraggio -maxclaw analytics # Riepilogo rapido -maxclaw analytics --report # Report completo -maxclaw dashboard # Dashboard performance +langcode analytics # Riepilogo rapido +langcode analytics --report # Report completo +langcode dashboard # Dashboard performance # Info -maxclaw version -maxclaw --help +langcode version +langcode --help ``` ### Utilizzo Locale (alternativo) @@ -283,10 +283,10 @@ Ollama URL: http://192.168.0.50:11434 openai-gpt4: openai - gpt-4o πŸ‘€ You: Ciao, chi sei? -πŸ€– MaxClaw: Ciao! Sono MaxClaw, un agente AI configurabile... +πŸ€– LangCode: Ciao! Sono LangCode, un agente AI configurabile... πŸ‘€ You: Elenca i file nella directory corrente -πŸ€– MaxClaw: [Esegue ls e mostra i file] +πŸ€– LangCode: [Esegue ls e mostra i file] πŸ‘€ You: /analytics πŸ“Š Advanced Analytics Report (Last 30 days) @@ -319,17 +319,17 @@ Ollama URL: http://192.168.0.50:11434 docker-compose up -d # Accedi al terminale -docker exec -it maxclaw-agent maxclaw +docker exec -it langcode-agent langcode # Oppure esegui direttamente -docker run -it --rm maxclaw-agent +docker run -it --rm langcode-agent ``` ### Utilizzo dell'API REST Avvia il server API: ```bash -maxclaw server +langcode server # oppure python api_server.py ``` @@ -376,7 +376,7 @@ curl -X POST http://localhost:8000/configurations \ ## Analytics Avanzate -MaxClaw Agent include un sistema avanzato di analytics per monitorare l'uso e ottenere raccomandazioni. +LangCode Agent include un sistema avanzato di analytics per monitorare l'uso e ottenere raccomandazioni. ### Report Analytics @@ -436,7 +436,7 @@ python analytics.py ### Configurazione -I dati di analytics vengono salvati in `~/.maxclaw/analytics/` e includono: +I dati di analytics vengono salvati in `~/.langcode/analytics/` e includono: - Conversazioni (truncati per privacy) - Utilizzo strumenti - Utilizzo provider @@ -446,7 +446,7 @@ I dati di analytics vengono salvati in `~/.maxclaw/analytics/` e includono: ## Marketplace dei Plugin -MaxClaw Agent include un marketplace per scoprire e installare plugin. +LangCode Agent include un marketplace per scoprire e installare plugin. ### Accesso al Marketplace @@ -516,7 +516,7 @@ Per creare un plugin per il marketplace: ## Dashboard di Monitoraggio -MaxClaw Agent include una dashboard di monitoraggio in tempo reale con supporto multilingue. +LangCode Agent include una dashboard di monitoraggio in tempo reale con supporto multilingue. ### Accesso alla Dashboard @@ -568,7 +568,7 @@ La dashboard include: - Piattaforma - Architettura - Versione Python - - Versione MaxClaw + - Versione LangCode ### Supporto Multilingue della Dashboard @@ -623,7 +623,7 @@ Esempio: ## Ottimizzazioni Performance -MaxClaw Agent include diverse ottimizzazioni per migliorare le performance: +LangCode Agent include diverse ottimizzazioni per migliorare le performance: ### Caching - **Configurazioni**: Le configurazioni vengono cachate per 30 secondi @@ -658,11 +658,11 @@ python performance.py ## Strumenti Unificati per Provider -MaxClaw Agent ora fornisce un'interfaccia unificata per gestire qualsiasi provider LLM. Una volta configurato un provider, puoi usare gli stessi comandi per tutti. +LangCode Agent ora fornisce un'interfaccia unificata per gestire qualsiasi provider LLM. Una volta configurato un provider, puoi usare gli stessi comandi per tutti. ### Provider Supportati -MaxClaw Agent supporta i seguenti provider: +LangCode Agent supporta i seguenti provider: 1. **Ollama** - Modelli locali 2. **OpenAI** - GPT-4o, GPT-4o-mini, GPT-4-turbo, ecc. @@ -738,7 +738,7 @@ export GOOGLE_API_KEY="AIza..." ## Strumenti Personalizzati -MaxClaw Agent include anche strumenti personalizzati per gestire il tuo ambiente: +LangCode Agent include anche strumenti personalizzati per gestire il tuo ambiente: ### Strumenti Proxmox Configura le variabili d'ambiente per abilitare gli strumenti Proxmox: @@ -770,7 +770,7 @@ Gli strumenti Ollama specifici sono ancora disponibili per retrocompatibilitΓ : ## Sistema di Plugin -MaxClaw Agent include un sistema di plugin per estendere le funzionalitΓ . +LangCode Agent include un sistema di plugin per estendere le funzionalitΓ . ### Plugin Inclusi @@ -904,7 +904,7 @@ python -c "from plugins.manager import plugin_manager; plugin_manager.load_all_p ## Supporto Multilingue -MaxClaw Agent supporta piΓΉ lingue per l'interfaccia utente. +LangCode Agent supporta piΓΉ lingue per l'interfaccia utente. ### Lingue Disponibili @@ -915,7 +915,7 @@ MaxClaw Agent supporta piΓΉ lingue per l'interfaccia utente. ```bash # Usa la variabile d'ambiente -export MAXCLAW_LANGUAGE=en +export LANGCODE_LANGUAGE=en # Oppure usa il comando /language /language en @@ -948,7 +948,7 @@ L'interfaccia web supporta il cambio lingua: ## Monitoraggio Performance -MaxClaw Agent include un sistema avanzato di monitoraggio delle performance. +LangCode Agent include un sistema avanzato di monitoraggio delle performance. ### Dashboard Performance @@ -981,7 +981,7 @@ Il report include: ### Configurazione -I dati di performance vengono salvati in `~/.maxclaw/performance/` e includono: +I dati di performance vengono salvati in `~/.langcode/performance/` e includono: - Richieste API - Errori - Tempi di risposta @@ -1008,7 +1008,7 @@ pytest tests/ -v ### Build dell'Immagine ```bash -docker build -t maxclaw-agent . +docker build -t langcode-agent . ``` ### Esecuzione con Docker Compose @@ -1039,24 +1039,24 @@ docker run -it --rm \ -e PROXMOX_HOST=192.168.0.100 \ -e PROXMOX_USER=root \ -e PROXMOX_PASSWORD=password \ - -e MAXCLAW_LANGUAGE=it \ - maxclaw-agent + -e LANGCODE_LANGUAGE=it \ + langcode-agent ``` ## Personalizzazione Per personalizzare l'agente, modifica `main.py`: -- Cambia il prompt di sistema predefinito in `create_maxclaw_agent` +- Cambia il prompt di sistema predefinito in `create_langcode_agent` - Aggiungi strumenti personalizzati alla chiamata `create_deep_agent` - Configura i sub-agenti o altre funzionalitΓ  di DeepAgents - Crea plugin per estendere le funzionalitΓ  ## Monitoraggio e Logging -MaxClaw Agent include un sistema di monitoraggio e logging: +LangCode Agent include un sistema di monitoraggio e logging: -- **Log dettagliati**: Tutte le azioni vengono registrate in `~/.maxclaw/logs/` +- **Log dettagliati**: Tutte le azioni vengono registrate in `~/.langcode/logs/` - **Statistiche di sistema**: Monitoraggio di uptime, richieste, errori - **Metriche di performance**: Tempi di risposta, utilizzo cache - **Report di stato**: Visualizzazione completa dello stato del sistema @@ -1068,7 +1068,7 @@ MaxClaw Agent include un sistema di monitoraggio e logging: ## Sicurezza -MaxClaw Agent implementa misure di sicurezza avanzate: +LangCode Agent implementa misure di sicurezza avanzate: - **Crittografia a riposo**: Tutte le informazioni sensibili (chiavi API) sono crittografate usando la crittografia simmetrica Fernet - **Permessi di file sicuri**: La directory di configurazione e i file sono impostati con accesso solo al proprietario (700 per le directory, 600 per i file) diff --git a/__pycache__/config_manager.cpython-314.pyc b/__pycache__/config_manager.cpython-314.pyc index 744b290..d9a9267 100644 Binary files a/__pycache__/config_manager.cpython-314.pyc and b/__pycache__/config_manager.cpython-314.pyc differ diff --git a/analytics.py b/analytics.py index c30998e..9e723f7 100644 --- a/analytics.py +++ b/analytics.py @@ -1,5 +1,5 @@ """ -Advanced analytics for MaxClaw Agent +Advanced analytics for LangCode Agent Provides usage analytics, insights, and reporting """ import os @@ -16,7 +16,7 @@ sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) class AnalyticsEngine: - """Advanced analytics engine for MaxClaw Agent""" + """Advanced analytics engine for LangCode Agent""" def __init__(self, data_dir: Optional[str] = None): """ @@ -26,7 +26,7 @@ class AnalyticsEngine: data_dir: Directory for storing analytics data """ if data_dir is None: - self.data_dir = Path.home() / ".maxclaw" / "analytics" + self.data_dir = Path.home() / ".langcode" / "analytics" else: self.data_dir = Path(data_dir) @@ -411,7 +411,7 @@ class AnalyticsEngine: # Default insight if none generated if not insights: - insights.append("πŸ“Š Your usage patterns look normal. Keep using MaxClaw Agent!") + insights.append("πŸ“Š Your usage patterns look normal. Keep using LangCode Agent!") return insights diff --git a/api_server.py b/api_server.py index fe80e6d..ecde676 100644 --- a/api_server.py +++ b/api_server.py @@ -1,6 +1,6 @@ """ -MaxClaw Agent API Server -Provides REST API for remote access to MaxClaw Agent +LangCode Agent API Server +Provides REST API for remote access to LangCode Agent """ import os import sys @@ -16,13 +16,13 @@ import uvicorn sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) from config_manager import config_manager -from main import create_maxclaw_agent +from main import create_langcode_agent from langchain_core.messages import HumanMessage # Initialize FastAPI app app = FastAPI( - title="MaxClaw Agent API", - description="REST API for MaxClaw Agent - configurable AI agent", + title="LangCode Agent API", + description="REST API for LangCode Agent - configurable AI agent", version="1.0.0" ) @@ -83,7 +83,7 @@ def get_agent(): global agent if agent is None: try: - agent = create_maxclaw_agent() + agent = create_langcode_agent() except Exception as e: raise HTTPException(status_code=500, detail=f"Failed to create agent: {str(e)}") return agent @@ -94,8 +94,8 @@ async def startup_event(): """Initialize agent on startup""" global agent try: - agent = create_maxclaw_agent() - print("βœ… MaxClaw Agent API server started") + agent = create_langcode_agent() + print("βœ… LangCode Agent API server started") except Exception as e: print(f"❌ Failed to initialize agent: {e}") @@ -108,7 +108,7 @@ async def root(): return FileResponse(web_index) else: return { - "message": "MaxClaw Agent API", + "message": "LangCode Agent API", "version": "1.0.0", "endpoints": { "chat": "/chat", @@ -142,7 +142,7 @@ async def health_check(): @app.post("/chat", response_model=ChatResponse) async def chat(request: ChatRequest): - """Chat with MaxClaw Agent""" + """Chat with LangCode Agent""" try: agent_instance = get_agent() diff --git a/completions/maxclaw.bash b/completions/langcode.bash similarity index 100% rename from completions/maxclaw.bash rename to completions/langcode.bash diff --git a/completions/maxclaw.zsh b/completions/langcode.zsh similarity index 100% rename from completions/maxclaw.zsh rename to completions/langcode.zsh diff --git a/config_cli.py b/config_cli.py index ad61272..1c57ecc 100644 --- a/config_cli.py +++ b/config_cli.py @@ -1,5 +1,5 @@ """ -Command-line interface for managing MaxClaw Agent configurations +Command-line interface for managing LangCode Agent configurations Enhanced with export/import, search, and better formatting """ import sys @@ -11,7 +11,7 @@ from typing import Optional, Dict, Any from config_manager import config_manager -def print_configurations(configs=None, title="MaxClaw Agent Configurations"): +def print_configurations(configs=None, title="LangCode Agent Configurations"): """Print all configurations in a formatted way""" if configs is None: configs = config_manager.get_configurations() @@ -405,7 +405,7 @@ def import_configurations(): def main(): """Main CLI entry point""" - parser = argparse.ArgumentParser(description="MaxClaw Agent Configuration Manager") + parser = argparse.ArgumentParser(description="LangCode Agent Configuration Manager") subparsers = parser.add_subparsers(dest='command', help='Available commands') # List command diff --git a/config_manager.py b/config_manager.py index 816c919..863da5c 100644 --- a/config_manager.py +++ b/config_manager.py @@ -1,5 +1,5 @@ """ -Configuration manager for MaxClaw Agent +Configuration manager for LangCode Agent Handles persistent storage of provider configurations with encryption and validation """ import json @@ -17,17 +17,17 @@ except ImportError: class ConfigManager: - """Manages MaxClaw Agent configuration with encryption and validation""" + """Manages LangCode Agent configuration with encryption and validation""" def __init__(self, config_dir: Optional[str] = None): """ Initialize the config manager Args: - config_dir: Directory to store config files. If None, uses ~/.maxclaw + config_dir: Directory to store config files. If None, uses ~/.langcode """ if config_dir is None: - self.config_dir = Path.home() / ".maxclaw" + self.config_dir = Path.home() / ".langcode" else: self.config_dir = Path(config_dir) diff --git a/config_tui.py b/config_tui.py index 965d43d..77bb529 100644 --- a/config_tui.py +++ b/config_tui.py @@ -1,5 +1,5 @@ """ -Text User Interface for MaxClaw Agent configuration management +Text User Interface for LangCode Agent configuration management Enhanced with search/filter, export/import, and connection testing """ import curses @@ -11,7 +11,7 @@ from typing import Optional, List, Dict, Any from config_manager import config_manager -def draw_menu(stdscr, selected_row_idx, options, title="MaxClaw Agent Configuration TUI"): +def draw_menu(stdscr, selected_row_idx, options, title="LangCode Agent Configuration TUI"): """Draw a menu with options""" stdscr.clear() h, w = stdscr.getmaxyx() diff --git a/dashboard.py b/dashboard.py index 6cf901e..f2e56b4 100644 --- a/dashboard.py +++ b/dashboard.py @@ -1,5 +1,5 @@ """ -Performance monitoring dashboard for MaxClaw Agent +Performance monitoring dashboard for LangCode Agent """ import os import sys @@ -25,7 +25,7 @@ class PerformanceDashboard: data_dir: Directory for storing performance data """ if data_dir is None: - self.data_dir = Path.home() / ".maxclaw" / "performance" + self.data_dir = Path.home() / ".langcode" / "performance" else: self.data_dir = Path(data_dir) diff --git a/docker-compose.yml b/docker-compose.yml index 14af2af..619ebee 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,13 +1,13 @@ version: '3.8' services: - maxclaw: + langcode: build: . - container_name: maxclaw-agent + container_name: langcode-agent restart: unless-stopped volumes: # Mount configuration directory for persistence - - maxclaw-config:/root/.maxclaw + - langcode-config:/root/.langcode # Mount current directory for development (optional) # - .:/app environment: @@ -25,7 +25,7 @@ services: - PROXMOX_PASSWORD=${PROXMOX_PASSWORD:-} - PROXMOX_TOKEN=${PROXMOX_TOKEN:-} networks: - - maxclaw-network + - langcode-network # Interactive mode for terminal usage stdin_open: true tty: true @@ -40,14 +40,14 @@ services: # ports: # - "11434:11434" # networks: - # - maxclaw-network + # - langcode-network volumes: - maxclaw-config: + langcode-config: driver: local # ollama-data: # driver: local networks: - maxclaw-network: + langcode-network: driver: bridge \ No newline at end of file diff --git a/docs/architecture_and_usage.md b/docs/architecture_and_usage.md index 0a78878..db8829a 100644 --- a/docs/architecture_and_usage.md +++ b/docs/architecture_and_usage.md @@ -1,8 +1,8 @@ -# MaxClaw Agent: Architettura e Guida all'Utilizzo +# LangCode Agent: Architettura e Guida all'Utilizzo -## Cos'Γ¨ MaxClaw Agent? +## Cos'Γ¨ LangCode Agent? -MaxClaw Agent Γ¨ un **agente AI intelligente** che puΓ² essere configurato per lavorare con diversi modelli di intelligenza artificiale (come GPT-4o di OpenAI, modelli locali con Ollama, o Claude tramite OpenRouter). In pratica, Γ¨ come avere un assistente virtuale programmabile che puΓ²: +LangCode Agent Γ¨ un **agente AI intelligente** che puΓ² essere configurato per lavorare con diversi modelli di intelligenza artificiale (come GPT-4o di OpenAI, modelli locali con Ollama, o Claude tramite OpenRouter). In pratica, Γ¨ come avere un assistente virtuale programmabile che puΓ²: - **Leggere e scrivere file** sul tuo computer - **Eseguire comandi** di sistema @@ -16,7 +16,7 @@ MaxClaw Agent Γ¨ un **agente AI intelligente** che puΓ² essere configurato per l ``` β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” -β”‚ MaxClaw Agent β”‚ +β”‚ LangCode Agent β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ 1. Agente Principale (main.py) β”‚ β”‚ - Coordina tutto il sistema β”‚ @@ -327,13 +327,13 @@ python main.py ### 2. Prima Conversazione ``` πŸ‘€ Tu: Ciao, chi sei? -πŸ€– MaxClaw: Sono MaxClaw, un agente AI configurabile. Posso aiutarti a gestire file, eseguire comandi, analizzare dati e molto altro. Come posso aiutarti oggi? +πŸ€– LangCode: Sono LangCode, un agente AI configurabile. Posso aiutarti a gestire file, eseguire comandi, analizzare dati e molto altro. Come posso aiutarti oggi? πŸ‘€ Tu: Mostrami i file nella directory corrente -πŸ€– MaxClaw: [Esegue ls e mostra i file] +πŸ€– LangCode: [Esegue ls e mostra i file] πŸ‘€ Tu: Crea un file di testo con "Hello World" -πŸ€– MaxClaw: [Crea hello.txt con il contenuto specificato] +πŸ€– LangCode: [Crea hello.txt con il contenuto specificato] ``` ### 3. Configurazione Avanzata @@ -391,8 +391,8 @@ python config_cli.py test "openai-config" ### Problema: "Permessi insufficienti" **Soluzione**: Verifica i permessi dei file ```bash -ls -la ~/.maxclaw/ -chmod 600 ~/.maxclaw/config.json +ls -la ~/.langcode/ +chmod 600 ~/.langcode/config.json ``` ## Prossimi Passi @@ -404,6 +404,6 @@ chmod 600 ~/.maxclaw/config.json ## Conclusione -MaxClaw Agent Γ¨ uno strumento potente e flessibile che puΓ² adattarsi a molteplici esigenze. Che tu voglia gestire file, analizzare dati, amministrare server o sperimentare con modelli AI, questo agente puΓ² aiutarti a automatizzare e semplificare il tuo lavoro. +LangCode Agent Γ¨ uno strumento potente e flessibile che puΓ² adattarsi a molteplici esigenze. Che tu voglia gestire file, analizzare dati, amministrare server o sperimentare con modelli AI, questo agente puΓ² aiutarti a automatizzare e semplificare il tuo lavoro. La chiave Γ¨ iniziare con task semplici e gradualmente esplorare funzionalitΓ  piΓΉ avanzate man mano che acquisisci familiaritΓ  con il sistema. \ No newline at end of file diff --git a/example_usage.py b/example_usage.py index 8021573..b11159c 100644 --- a/example_usage.py +++ b/example_usage.py @@ -7,7 +7,7 @@ import os import sys sys.path.insert(0, '.') -from main import create_maxclaw_agent +from main import create_langcode_agent def example_with_openai(): """Example using OpenAI""" @@ -18,7 +18,7 @@ def example_with_openai(): # os.environ["OPENAI_API_KEY"] = "your-api-key" try: - agent = create_maxclaw_agent() + agent = create_langcode_agent() print("βœ… OpenAI agent created") # Uncomment to test (requires API key) # result = agent.invoke({"messages": [{"role": "user", "content": "Say hello in Italian"}]}) @@ -35,7 +35,7 @@ def example_with_ollama(): os.environ["OLLAMA_BASE_URL"] = "https://ollama.solarpi.net" # From user's profile try: - agent = create_maxclaw_agent() + agent = create_langcode_agent() print("βœ… Ollama agent created") # Uncomment to test (requires Ollama server) # result = agent.invoke({"messages": [{"role": "user", "content": "Say hello in Italian"}]}) @@ -53,7 +53,7 @@ def example_with_openrouter(): # os.environ["OPENROUTER_API_KEY"] = "your-api-key" try: - agent = create_maxclaw_agent() + agent = create_langcode_agent() print("βœ… OpenRouter agent created") # Uncomment to test (requires API key) # result = agent.invoke({"messages": [{"role": "user", "content": "Say hello in Italian"}]}) diff --git a/i18n/__init__.py b/i18n/__init__.py index 45610d7..c027569 100644 --- a/i18n/__init__.py +++ b/i18n/__init__.py @@ -1,5 +1,5 @@ """ -Internationalization (i18n) support for MaxClaw Agent +Internationalization (i18n) support for LangCode Agent """ import os import json @@ -8,7 +8,7 @@ from pathlib import Path class I18n: - """Internationalization manager for MaxClaw Agent""" + """Internationalization manager for LangCode Agent""" def __init__(self, default_language: str = "en"): """ @@ -31,7 +31,7 @@ class I18n: self._load_language(self.default_language) # Try to load current language from environment - env_lang = os.getenv("MAXCLAW_LANGUAGE") + env_lang = os.getenv("LANGCODE_LANGUAGE") if env_lang: self.set_language(env_lang) diff --git a/i18n/en.json b/i18n/en.json index dcde4af..19e9b61 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -1,5 +1,5 @@ { - "app.name": "MaxClaw Agent", + "app.name": "LangCode Agent", "app.description": "A configurable agent harness using DeepAgents", "commands.help": "Show available commands", @@ -52,7 +52,7 @@ "plugins.disabled": "Disabled", "plugins.no_plugins": "No plugins found.", - "agent.initializing": "Initializing MaxClaw Agent...", + "agent.initializing": "Initializing LangCode Agent...", "agent.initialized": "Agent initialized successfully!", "agent.tools.available": "Available tools:", "agent.tools.provider": "Provider tools: list models, test connections, set defaults", diff --git a/i18n/it.json b/i18n/it.json index cae9105..8962185 100644 --- a/i18n/it.json +++ b/i18n/it.json @@ -1,5 +1,5 @@ { - "app.name": "MaxClaw Agent", + "app.name": "LangCode Agent", "app.description": "Un agente configurabile basato su DeepAgents", "commands.help": "Mostra i comandi disponibili", @@ -52,7 +52,7 @@ "plugins.disabled": "Disabilitato", "plugins.no_plugins": "Nessun plugin trovato.", - "agent.initializing": "Inizializzazione MaxClaw Agent...", + "agent.initializing": "Inizializzazione LangCode Agent...", "agent.initialized": "Agente inizializzato con successo!", "agent.tools.available": "Strumenti disponibili:", "agent.tools.provider": "Strumenti provider: elenca modelli, testa connessioni, imposta predefiniti", diff --git a/maxclaw.py b/langcode.py similarity index 89% rename from maxclaw.py rename to langcode.py index 844c5a9..e87d435 100755 --- a/maxclaw.py +++ b/langcode.py @@ -1,23 +1,23 @@ #!/usr/bin/env python3 """ -MaxClaw Agent - Unified CLI Entry Point +LangCode Agent - Unified CLI Entry Point Usage: - maxclaw β†’ avvia l'agent (chat interattiva) - maxclaw chat β†’ avvia l'agent - maxclaw server [--port N] β†’ avvia web server - maxclaw tui β†’ apre TUI configurazione - maxclaw config list β†’ lista configurazioni - maxclaw config add β†’ aggiungi configurazione - maxclaw config remove NAME β†’ rimuovi configurazione - maxclaw config use NAME β†’ attiva configurazione - maxclaw config active β†’ mostra configurazione attiva - maxclaw config test [NAME] β†’ testa connessione - maxclaw config export β†’ esporta configurazioni - maxclaw config import FILE β†’ importa configurazioni - maxclaw config search Q β†’ cerca configurazioni - maxclaw analytics β†’ mostra analytics - maxclaw dashboard β†’ mostra dashboard performance - maxclaw version β†’ mostra versione + langcode β†’ avvia l'agent (chat interattiva) + langcode chat β†’ avvia l'agent + langcode server [--port N] β†’ avvia web server + langcode tui β†’ apre TUI configurazione + langcode config list β†’ lista configurazioni + langcode config add β†’ aggiungi configurazione + langcode config remove NAME β†’ rimuovi configurazione + langcode config use NAME β†’ attiva configurazione + langcode config active β†’ mostra configurazione attiva + langcode config test [NAME] β†’ testa connessione + langcode config export β†’ esporta configurazioni + langcode config import FILE β†’ importa configurazioni + langcode config search Q β†’ cerca configurazioni + langcode analytics β†’ mostra analytics + langcode dashboard β†’ mostra dashboard performance + langcode version β†’ mostra versione """ import sys import os @@ -31,13 +31,13 @@ VERSION = "1.0.0" def cmd_chat(args): """Avvia l'agent in modalitΓ  chat interattiva""" - from main import create_maxclaw_agent, process_command + from main import create_langcode_agent, process_command from langchain_core.messages import HumanMessage - print("πŸš€ Inizializzo MaxClaw Agent...") + print("πŸš€ Inizializzo LangCode Agent...") try: - agent = create_maxclaw_agent() + agent = create_langcode_agent() print("βœ… Agent inizializzato con successo!") print("\nπŸ”§ Strumenti disponibili:") @@ -71,7 +71,7 @@ def cmd_chat(args): try: result = agent.invoke({"messages": [HumanMessage(content=user_input)]}) ai_message = result["messages"][-1] - print(f"\nπŸ€– MaxClaw: {ai_message.content}") + print(f"\nπŸ€– LangCode: {ai_message.content}") except Exception as e: print(f"\n❌ Errore: {str(e)}") @@ -88,7 +88,7 @@ def cmd_server(args): host = args.host or "0.0.0.0" port = args.port or 8000 - print(f"🌐 Avvio MaxClaw Web Server su http://{host}:{port}") + print(f"🌐 Avvio LangCode Web Server su http://{host}:{port}") print(f"πŸ“Š Dashboard: http://{host}:{port}/monitoring") print(f"πŸ›’ Marketplace: http://{host}:{port}/marketplace") print(f"πŸ“‘ API Docs: http://{host}:{port}/docs") @@ -357,7 +357,7 @@ def cmd_analytics(args): summary = engine.get_usage_summary() insights = engine.get_insights() - print("\nπŸ“Š MaxClaw Analytics") + print("\nπŸ“Š LangCode Analytics") print("=" * 40) if summary.get("total_conversations", 0) > 0: @@ -384,7 +384,7 @@ def cmd_analytics(args): print(f" β€’ {insight}") print(f"\nπŸ“ Dati salvati in: {engine.data_dir}") - print(" Usa 'maxclaw analytics --report' per report completo") + print(" Usa 'langcode analytics --report' per report completo") def cmd_dashboard(args): @@ -398,7 +398,7 @@ def cmd_dashboard(args): print("βœ… Dati performance cancellati.") else: report = dashboard.get_summary() - print("\nπŸ“ˆ MaxClaw Performance Dashboard") + print("\nπŸ“ˆ LangCode Performance Dashboard") print("=" * 40) if report.get("total_requests", 0) > 0: @@ -422,29 +422,29 @@ def cmd_dashboard(args): def cmd_version(args): """Mostra versione""" - print(f"MaxClaw Agent v{VERSION}") + print(f"LangCode Agent v{VERSION}") print("Agent harness basato su LangChain Deep Agents") - print("https://github.com/truetype/maxclaw_agent") + print("https://github.com/truetype/langcode_agent") def main(): parser = argparse.ArgumentParser( - prog="maxclaw", - description="πŸš€ MaxClaw Agent - AI Agent harness configurabile", + prog="langcode", + description="πŸš€ LangCode Agent - AI Agent harness configurabile", formatter_class=argparse.RawDescriptionHelpFormatter, epilog=""" Esempi: - maxclaw Avvia l'agent (chat interattiva) - maxclaw server --port 3000 Avvia web server su porta 3000 - maxclaw config list Lista tutte le configurazioni - maxclaw config add -n ollama -p ollama -m gemma2:9b - maxclaw config use ollama Attiva configurazione 'ollama' - maxclaw config test Testa configurazione attiva - maxclaw analytics Mostra riepilogo analytics - maxclaw analytics --report Genera report completo + langcode Avvia l'agent (chat interattiva) + langcode server --port 3000 Avvia web server su porta 3000 + langcode config list Lista tutte le configurazioni + langcode config add -n ollama -p ollama -m gemma2:9b + langcode config use ollama Attiva configurazione 'ollama' + langcode config test Testa configurazione attiva + langcode analytics Mostra riepilogo analytics + langcode analytics --report Genera report completo """ ) - parser.add_argument("--version", "-v", action="version", version=f"maxclaw {VERSION}") + parser.add_argument("--version", "-v", action="version", version=f"langcode {VERSION}") subparsers = parser.add_subparsers(dest="command", help="Comandi disponibili") diff --git a/main.py b/main.py index b6c7c7e..d593d3d 100644 --- a/main.py +++ b/main.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 """ -MaxClaw Agent - A configurable agent harness using DeepAgents +LangCode Agent - A configurable agent harness using DeepAgents Supports multiple LLM providers via LangChain's init_chat_model Enhanced with unified provider tools and custom tools """ @@ -74,7 +74,7 @@ def load_model_from_config(): def get_custom_tools() -> List[Tool]: """ - Get custom tools for the MaxClaw agent + Get custom tools for the LangCode agent Returns: List of custom tools @@ -114,12 +114,12 @@ def get_custom_tools() -> List[Tool]: return custom_tools -def create_maxclaw_agent(system_prompt: Optional[str] = None): +def create_langcode_agent(system_prompt: Optional[str] = None): """ Create and return a DeepAgent instance with configurable model. """ if system_prompt is None: - system_prompt = """You are MaxClaw, a helpful AI agent that can plan, use tools, + system_prompt = """You are LangCode, a helpful AI agent that can plan, use tools, manage context, and delegate to subagents. You are designed to be configurable to work with various LLM providers. @@ -371,12 +371,12 @@ def process_command(user_input: str) -> bool: def main(): """ - Main entry point for the MaxClaw agent. + Main entry point for the LangCode agent. """ - print("πŸš€ Initializing MaxClaw Agent...") + print("πŸš€ Initializing LangCode Agent...") try: - agent = create_maxclaw_agent() + agent = create_langcode_agent() print("βœ… Agent initialized successfully!") # Show available tools @@ -408,7 +408,7 @@ def main(): result = agent.invoke({"messages": [HumanMessage(content=user_input)]}) # Extract the AI's response ai_message = result["messages"][-1] - print(f"\nπŸ€– MaxClaw: {ai_message.content}") + print(f"\nπŸ€– LangCode: {ai_message.content}") except Exception as e: print(f"\n❌ Error: {str(e)}") diff --git a/marketplace/__init__.py b/marketplace/__init__.py index a48a576..5352269 100644 --- a/marketplace/__init__.py +++ b/marketplace/__init__.py @@ -1,5 +1,5 @@ """ -MaxClaw Agent Marketplace Package +LangCode Agent Marketplace Package Provides plugin marketplace functionality """ diff --git a/marketplace/manager.py b/marketplace/manager.py index 38c11a0..211788f 100644 --- a/marketplace/manager.py +++ b/marketplace/manager.py @@ -1,5 +1,5 @@ """ -Plugin marketplace manager for MaxClaw Agent +Plugin marketplace manager for LangCode Agent """ import os import sys @@ -13,9 +13,9 @@ sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) class MarketplaceManager: - """Manages plugin marketplace for MaxClaw Agent""" + """Manages plugin marketplace for LangCode Agent""" - def __init__(self, marketplace_url: str = "https://api.github.com/repos/maxclaw-agent/plugins/contents"): + def __init__(self, marketplace_url: str = "https://api.github.com/repos/langcode-agent/plugins/contents"): """ Initialize marketplace manager @@ -23,8 +23,8 @@ class MarketplaceManager: marketplace_url: URL to the plugin marketplace """ self.marketplace_url = marketplace_url - self.local_plugins_dir = Path.home() / ".maxclaw" / "plugins" - self.marketplace_cache_file = Path.home() / ".maxclaw" / "marketplace_cache.json" + self.local_plugins_dir = Path.home() / ".langcode" / "plugins" + self.marketplace_cache_file = Path.home() / ".langcode" / "marketplace_cache.json" # Ensure directories exist self.local_plugins_dir.mkdir(parents=True, exist_ok=True) diff --git a/monitoring.py b/monitoring.py index 0ad5e45..9cb1072 100644 --- a/monitoring.py +++ b/monitoring.py @@ -1,5 +1,5 @@ """ -Monitoring and logging for MaxClaw Agent +Monitoring and logging for LangCode Agent """ import os import sys @@ -14,18 +14,18 @@ from pathlib import Path sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) -class MaxClawLogger: - """Custom logger for MaxClaw Agent""" +class LangCodeLogger: + """Custom logger for LangCode Agent""" def __init__(self, log_dir: Optional[str] = None): """ Initialize logger Args: - log_dir: Directory for log files. If None, uses ~/.maxclaw/logs + log_dir: Directory for log files. If None, uses ~/.langcode/logs """ if log_dir is None: - self.log_dir = Path.home() / ".maxclaw" / "logs" + self.log_dir = Path.home() / ".langcode" / "logs" else: self.log_dir = Path(log_dir) @@ -46,7 +46,7 @@ class MaxClawLogger: ) # Create file handler - log_file = self.log_dir / f"maxclaw_{datetime.now().strftime('%Y%m%d')}.log" + log_file = self.log_dir / f"langcode_{datetime.now().strftime('%Y%m%d')}.log" file_handler = logging.FileHandler(log_file) file_handler.setLevel(logging.INFO) file_handler.setFormatter(file_formatter) @@ -63,10 +63,10 @@ class MaxClawLogger: ) # Create specific loggers - self.agent_logger = logging.getLogger("maxclaw.agent") - self.config_logger = logging.getLogger("maxclaw.config") - self.api_logger = logging.getLogger("maxclaw.api") - self.tools_logger = logging.getLogger("maxclaw.tools") + self.agent_logger = logging.getLogger("langcode.agent") + self.config_logger = logging.getLogger("langcode.config") + self.api_logger = logging.getLogger("langcode.api") + self.tools_logger = logging.getLogger("langcode.tools") print(f"βœ… Logging initialized. Logs will be saved to: {self.log_dir}") @@ -187,7 +187,7 @@ class SystemMonitor: # Global instances -logger = MaxClawLogger() +logger = LangCodeLogger() system_monitor = SystemMonitor() @@ -241,7 +241,7 @@ except ImportError: if __name__ == "__main__": # Test logging - print("Testing MaxClaw logging system...") + print("Testing LangCode logging system...") # Log some test messages logger.log_agent_action("test_action", {"test": "data"}) diff --git a/performance.py b/performance.py index 5d6bdc3..cf613af 100644 --- a/performance.py +++ b/performance.py @@ -1,5 +1,5 @@ """ -Performance optimizations for MaxClaw Agent +Performance optimizations for LangCode Agent Enhanced with connection pooling, lazy loading, and advanced caching """ import os @@ -379,26 +379,26 @@ def optimize_provider_tools(): def optimize_agent_creation(): """Optimize agent creation with caching""" - from main import create_maxclaw_agent + from main import create_langcode_agent # Cache agent creation - original_create_maxclaw_agent = create_maxclaw_agent + original_create_langcode_agent = create_langcode_agent - @functools.wraps(original_create_maxclaw_agent) - def optimized_create_maxclaw_agent(system_prompt=None): + @functools.wraps(original_create_langcode_agent) + def optimized_create_langcode_agent(system_prompt=None): cache_key = f"agent:{system_prompt}" if cache_key in performance_monitor.cache: cached_time, cached_result = performance_monitor.cache[cache_key] if time.time() - cached_time < 600: # Cache for 10 minutes return cached_result - result = original_create_maxclaw_agent(system_prompt) + result = original_create_langcode_agent(system_prompt) performance_monitor.cache[cache_key] = (time.time(), result) return result # Replace function import main - main.create_maxclaw_agent = optimized_create_maxclaw_agent + main.create_langcode_agent = optimized_create_langcode_agent print("βœ… Agent creation optimized with caching") diff --git a/plugins/__init__.py b/plugins/__init__.py index d77db28..a242dc7 100644 --- a/plugins/__init__.py +++ b/plugins/__init__.py @@ -1,5 +1,5 @@ """ -MaxClaw Agent Plugins Package +LangCode Agent Plugins Package Provides plugin system for extensibility """ diff --git a/plugins/base.py b/plugins/base.py index 6901c96..76ac0ac 100644 --- a/plugins/base.py +++ b/plugins/base.py @@ -1,5 +1,5 @@ """ -Base plugin class for MaxClaw Agent +Base plugin class for LangCode Agent """ from abc import ABC, abstractmethod from typing import List, Dict, Any, Optional @@ -7,7 +7,7 @@ from langchain.tools import Tool class BasePlugin(ABC): - """Base class for MaxClaw plugins""" + """Base class for LangCode plugins""" def __init__(self, name: str, version: str = "1.0.0", description: str = ""): """ diff --git a/plugins/example_plugin.py b/plugins/example_plugin.py index cb797d2..25ecf28 100644 --- a/plugins/example_plugin.py +++ b/plugins/example_plugin.py @@ -1,5 +1,5 @@ """ -Example plugin for MaxClaw Agent +Example plugin for LangCode Agent Demonstrates how to create a plugin """ import os diff --git a/plugins/file_tools_plugin.py b/plugins/file_tools_plugin.py index f75c5ac..37adc1a 100644 --- a/plugins/file_tools_plugin.py +++ b/plugins/file_tools_plugin.py @@ -1,5 +1,5 @@ """ -File tools plugin for MaxClaw Agent +File tools plugin for LangCode Agent Provides additional file management tools """ import os @@ -23,7 +23,7 @@ class FileToolsPlugin(BasePlugin): super().__init__( name="file_tools", version="1.0.0", - description="Additional file management tools for MaxClaw Agent" + description="Additional file management tools for LangCode Agent" ) def get_tools(self) -> List[Tool]: diff --git a/plugins/manager.py b/plugins/manager.py index 3e9bda6..de9fd96 100644 --- a/plugins/manager.py +++ b/plugins/manager.py @@ -1,5 +1,5 @@ """ -Plugin manager for MaxClaw Agent +Plugin manager for LangCode Agent """ import os import sys @@ -15,7 +15,7 @@ from plugins.base import BasePlugin class PluginManager: - """Manages plugins for MaxClaw Agent""" + """Manages plugins for LangCode Agent""" def __init__(self, plugin_dir: Optional[str] = None): """ diff --git a/plugins/system_utils_plugin.py b/plugins/system_utils_plugin.py index 7ae92c5..86133e0 100644 --- a/plugins/system_utils_plugin.py +++ b/plugins/system_utils_plugin.py @@ -1,5 +1,5 @@ """ -System utilities plugin for MaxClaw Agent +System utilities plugin for LangCode Agent Provides system information and utility tools """ import os diff --git a/test_agent.py b/test_agent.py index 3a107ea..d6ce9e1 100644 --- a/test_agent.py +++ b/test_agent.py @@ -7,13 +7,13 @@ import os import sys sys.path.insert(0, '.') -from main import create_maxclaw_agent +from main import create_langcode_agent def test_agent_creation(): """Test that the agent can be created successfully.""" print("Testing agent creation...") try: - agent = create_maxclaw_agent() + agent = create_langcode_agent() print("βœ… Agent created successfully!") return agent except Exception as e: diff --git a/tests/test_config_manager.py b/tests/test_config_manager.py index a5d9313..d670d15 100644 --- a/tests/test_config_manager.py +++ b/tests/test_config_manager.py @@ -1,5 +1,5 @@ """ -Test suite for MaxClaw Agent configuration manager +Test suite for LangCode Agent configuration manager """ import os import json diff --git a/tests/test_provider_tools.py b/tests/test_provider_tools.py index b7dfa65..922653b 100644 --- a/tests/test_provider_tools.py +++ b/tests/test_provider_tools.py @@ -1,5 +1,5 @@ """ -Test suite for MaxClaw Agent provider tools +Test suite for LangCode Agent provider tools """ import os import sys diff --git a/tools/__init__.py b/tools/__init__.py index 3e4225a..526315a 100644 --- a/tools/__init__.py +++ b/tools/__init__.py @@ -1,5 +1,5 @@ """ -MaxClaw Agent Tools Package +LangCode Agent Tools Package Provides custom tools for Proxmox, Ollama, and unified provider management """ diff --git a/tools/ollama_tools.py b/tools/ollama_tools.py index 0172d1b..04fa1c4 100644 --- a/tools/ollama_tools.py +++ b/tools/ollama_tools.py @@ -1,5 +1,5 @@ """ -Ollama management tools for MaxClaw Agent +Ollama management tools for LangCode Agent Provides tools for managing Ollama models and instances """ import requests @@ -309,7 +309,7 @@ class OllamaTools: def get_ollama_tools(base_url: str = "http://localhost:11434") -> List[Tool]: """ - Get a list of Ollama tools for the MaxClaw agent + Get a list of Ollama tools for the LangCode agent Args: base_url: Base URL of the Ollama instance diff --git a/tools/provider_tools.py b/tools/provider_tools.py index dc5d7ac..eb4ba27 100644 --- a/tools/provider_tools.py +++ b/tools/provider_tools.py @@ -1,5 +1,5 @@ """ -Unified Provider Tools for MaxClaw Agent +Unified Provider Tools for LangCode Agent Provides a consistent interface for managing different LLM providers """ import os diff --git a/tools/proxmox_tools.py b/tools/proxmox_tools.py index a8a7acb..494d8e3 100644 --- a/tools/proxmox_tools.py +++ b/tools/proxmox_tools.py @@ -1,5 +1,5 @@ """ -Proxmox management tools for MaxClaw Agent +Proxmox management tools for LangCode Agent Provides tools for managing Proxmox virtual machines and containers """ import subprocess @@ -266,7 +266,7 @@ class ProxmoxTools: def get_proxmox_tools(host: str = "192.168.0.100", user: str = "root", password: Optional[str] = None, api_token: Optional[str] = None) -> List[Tool]: """ - Get a list of Proxmox tools for the MaxClaw agent + Get a list of Proxmox tools for the LangCode agent Args: host: Proxmox host address diff --git a/web/index.html b/web/index.html index e56905d..cbe3ded 100644 --- a/web/index.html +++ b/web/index.html @@ -3,7 +3,7 @@ - MaxClaw Agent - Configurazione + LangCode Agent - Configurazione