ec0b4a7214
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
79 lines
2.3 KiB
Markdown
79 lines
2.3 KiB
Markdown
# 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
|
|
```
|