diff --git a/README.md b/README.md new file mode 100644 index 0000000..bcdf2b7 --- /dev/null +++ b/README.md @@ -0,0 +1,78 @@ +# Agent1 — Orchestrateur XMPP/MQTT + +Agent principal du réseau. Il reçoit les instructions de l'utilisateur (via XMPP ou CLI MQTT), les analyse avec un LLM, et délègue les tâches aux agents spécialisés. + +## Rôle + +- Point d'entrée unique pour l'utilisateur (`sylvain@xmpp.ovh`) +- Délègue aux agents spécialisés via MQTT (`DELEGATE: | `) +- Planifie des tâches récurrentes (`SCHEDULE:`) +- Centralise les rapports et erreurs des agents +- Maintient un registre des agents disponibles + +## Skills disponibles + +| Trigger | Description | +|---|---| +| `SEARCH: ` | Recherche DuckDuckGo | +| `READ: ` | Lecture de page web | +| `REMEMBER: \| ` | Mémoire SQLite | +| `RECALL: ` | Récupération mémoire | +| `MQTT_PUBLISH: \| ` | Publication MQTT | +| `DELEGATE: \| ` | Délégation à un agent spécialisé | +| `PLAN: \| ;; \|` | Plan multi-étapes | +| `SCHEDULE: \| \| ` | Planification | +| `PLAN_LIST:` | Lister les tâches planifiées | +| `PLAN_CANCEL: ` | Annuler une planification | +| `REPORT:` | Rapport d'exécutions | +| `REPORT_ERRORS:` | Rapport des erreurs | + +## Déploiement manuel + +```bash +# Prérequis +apt-get install -y python3 python3-pip python3-venv git mosquitto + +# Cloner et installer +git clone https://git.piaf.im/sylvain/agent1.git /opt/agent +cd /opt/agent +python3 -m venv venv +venv/bin/pip install slixmpp paho-mqtt requests ddgs beautifulsoup4 chromadb apscheduler + +# Configurer +cp config/config.json.example config/config.json # adapter les valeurs + +# Service systemd +cp agent.service /etc/systemd/system/ +systemctl daemon-reload +systemctl enable agent +systemctl start agent +``` + +## Configuration (`config/config.json`) + +```json +{ + "ollama_url" : "http://:11434/api/chat", + "model" : "qwen3:8b", + "xmpp_jid" : "agent1@xmpp.ovh", + "xmpp_pass" : "", + "admin_jid" : "sylvain@xmpp.ovh", + "mqtt_host" : "localhost", + "mqtt_port" : 1883 +} +``` + +## CLI + +```bash +python3 /opt/agent/cli.py # parler à agent1 +python3 /opt/agent/cli.py agent2_debian13 # accès direct à un agent +python3 /opt/agent/cli.py --plans # voir les planifications +``` + +## Logs + +```bash +journalctl -u agent -f +``` diff --git a/config/agents_registry.json b/config/agents_registry.json index 995e5fe..c460c68 100644 --- a/config/agents_registry.json +++ b/config/agents_registry.json @@ -10,5 +10,11 @@ "mqtt_inbox" : "agents/agent2_ansible/inbox", "mqtt_outbox" : "agents/agent1/inbox", "speciality" : "Automatisation infrastructure via Ansible : playbooks, commandes ad-hoc, déploiement multi-hôtes, gestion de configuration sur le réseau local" + }, + "agent2_deploy": { + "jid" : "agent2_deploy@xmpp.ovh", + "mqtt_inbox" : "agents/agent2_deploy/inbox", + "mqtt_outbox" : "agents/agent1/inbox", + "speciality" : "Déploiement d'agents : installe et configure d'autres agents sur des machines distantes ou locales via SSH" } }