sylvain 9e3aa29d74 Batch 2 : file d'attente SQLite + pause/resume + stats par agent
- task_queue.py : module FIFO SQLite (queue.db) pour agent2_debian13 et agent2_ansible
- agent2_debian13.py : intégration queue, topic agents/agent2_debian13/control,
  commandes pause/resume/report, QoS 1 + clean_session=False
- agent2_ansible.py : idem

Les tâches MQTT sont maintenant persistées avant exécution.
Le worker traite en FIFO, les tâches en pause s'accumulent sans être perdues.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-08 15:34:45 +00:00
2026-03-07 13:20:32 +00:00

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: <agent> | <tâche>)
  • 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: <requête> Recherche DuckDuckGo
READ: <url> Lecture de page web
REMEMBER: <clé> | <valeur> Mémoire SQLite
RECALL: <clé> Récupération mémoire
MQTT_PUBLISH: <topic> | <msg> Publication MQTT
DELEGATE: <agent> | <tâche> Délégation à un agent spécialisé
PLAN: <agent>|<tâche> ;; <agent>|<tâche> Plan multi-étapes
SCHEDULE: <cron> | <agent> | <tâche> Planification
PLAN_LIST: Lister les tâches planifiées
PLAN_CANCEL: <id> Annuler une planification
REPORT: Rapport d'exécutions
REPORT_ERRORS: Rapport des erreurs

Déploiement manuel

# 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)

{
  "ollama_url"  : "http://<ip_ollama>:11434/api/chat",
  "model"       : "qwen3:8b",
  "xmpp_jid"   : "agent1@xmpp.ovh",
  "xmpp_pass"  : "<mot_de_passe>",
  "admin_jid"  : "sylvain@xmpp.ovh",
  "mqtt_host"  : "localhost",
  "mqtt_port"  : 1883
}

CLI

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

journalctl -u agent -f
S
Description
Agent XMPP autonome avec skills (recherche web, mémoire)
Readme 143 KiB
Languages
Python 100%