Ajouter agent2_deploy au registre + README agent1
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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: <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
|
||||||
|
|
||||||
|
```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://<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
|
||||||
|
|
||||||
|
```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
|
||||||
|
```
|
||||||
@@ -10,5 +10,11 @@
|
|||||||
"mqtt_inbox" : "agents/agent2_ansible/inbox",
|
"mqtt_inbox" : "agents/agent2_ansible/inbox",
|
||||||
"mqtt_outbox" : "agents/agent1/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"
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user