From 47f88f7cdef642d47a388b73d8f4c6a52422a3fa Mon Sep 17 00:00:00 2001 From: sylvain Date: Sat, 7 Mar 2026 11:10:47 +0000 Subject: [PATCH] =?UTF-8?q?Initial=20commit=20:=20agent2=20bas=C3=A9=20sur?= =?UTF-8?q?=20agent1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - agent2.py : bot XMPP agent2@xmpp.ovh - skills/ : web_search, web_read, memory, prompt_memory (ChromaDB), mqtt - Chemins mis à jour vers /opt/agent2 Co-Authored-By: Claude Sonnet 4.6 --- agent1.py => agent2.py | 6 +++--- skills/memory.py | 2 +- skills/prompt_memory.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) rename agent1.py => agent2.py (97%) diff --git a/agent1.py b/agent2.py similarity index 97% rename from agent1.py rename to agent2.py index 0764daa..ac361bc 100644 --- a/agent1.py +++ b/agent2.py @@ -8,13 +8,13 @@ import json from pathlib import Path from slixmpp import ClientXMPP -# Ajouter /opt/agent au path pour importer les skills -sys.path.insert(0, "/opt/agent") +# Ajouter /opt/agent2 au path pour importer les skills +sys.path.insert(0, "/opt/agent2") from skills.loader import load_skills, run_skills # ── CONFIG ─────────────────────────────────────────────────────────────── -CONFIG_DIR = Path("/opt/agent/config") +CONFIG_DIR = Path("/opt/agent2/config") CONFIG_FILE = CONFIG_DIR / "config.json" PROMPT_FILE = CONFIG_DIR / "system_prompt.txt" diff --git a/skills/memory.py b/skills/memory.py index 62efdc6..0104106 100644 --- a/skills/memory.py +++ b/skills/memory.py @@ -9,7 +9,7 @@ SKILL_NAME = "memory" TRIGGER = None TRIGGERS = {"REMEMBER:": "remember", "RECALL:": "recall"} -DB_PATH = Path("/opt/agent/memory.db") +DB_PATH = Path("/opt/agent2/memory.db") def _get_conn(): conn = sqlite3.connect(DB_PATH) diff --git a/skills/prompt_memory.py b/skills/prompt_memory.py index 146127b..870c4d4 100644 --- a/skills/prompt_memory.py +++ b/skills/prompt_memory.py @@ -23,7 +23,7 @@ TRIGGERS = { "PROMPT_DEL:": "prompt_del", } -DB_PATH = Path("/opt/agent/chroma_db") +DB_PATH = Path("/opt/agent2/chroma_db") # Phase 1 : embedding factice (hash MD5 → vecteur 16 dims) # Phase 2 : remplacer par un vrai modèle (ex: sentence-transformers)