feat(brain): Phase B — Vector-DB-Memory, Conversation-Loop, Skills, Tool-Use

OpenClaw (aria-core) ist raus, ARIA laeuft jetzt mit eigenem Agent-Framework
im aria-brain Container. Vector-DB-basiertes Gedaechtnis statt Sessions,
eigener Conversation-Loop mit Hot+Cold-Memory + Rolling Window, Tool-Use
fuer Skills, Memory-Destillat-Pipeline.

aria-brain/ (neuer Container)
  - main.py            FastAPI auf 8080, alle Endpoints
  - agent.py           Conversation-Loop mit Tool-Use (skill_create + run_<skill>)
  - conversation.py    Rolling Window, JSONL-Persistenz, Distill-Marker
  - proxy_client.py    httpx-Wrapper zum Claude-Proxy, OpenAI-Format
  - prompts.py         System-Prompt aus Hot+Cold+Skills
  - migration.py       Markdown-Parser fuer brain-import/ → atomare Memories
  - skills.py          Filesystem-Layer fuer /data/skills/<name>/ (Python-only,
                       venv pro Skill, tar.gz Export/Import, Run-Logs)
  - memory/            Embedder (sentence-transformers, multilingual MiniLM)
                       + VectorStore (Qdrant-Wrapper)

docker-compose.yml
  - aria-core (OpenClaw) raus, openclaw-config Volume raus
  - aria-brain Service (FastAPI + Memory)
  - aria-qdrant Service (Vector-DB) mit Bind-Mount aria-data/brain/qdrant/
  - Diagnostic teilt jetzt Netzwerk mit Bridge (vorher: aria-core)
  - Brain bekommt SSH-Mount fuer aria-wohnung + /import fuer brain-import/

bridge/aria_bridge.py
  - send_to_core → HTTP-Call an aria-brain:8080/chat (statt OpenClaw-WS)
  - aria-core-spezifische Handler raus: doctor_fix, aria_restart,
    aria_session_reset, Auto-Compact-Logik, OpenClaw-Handshake
  - Generischer container_restart-Handler (Whitelist Bridge/Brain/Qdrant)
  - Side-Channel-Events aus /chat-Response (z.B. skill_created) werden
    als RVS-Events forwarded
  - file_list_request / file_delete_request → an Diagnostic forwarded
  - Tote OpenClaw-Connection-Logik bleibt im Code als Referenz (nicht aktiv)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-11 22:23:17 +02:00
parent d0cb7acd10
commit 70d1500096
14 changed files with 2572 additions and 149 deletions
+44 -33
View File
@@ -28,35 +28,40 @@ services:
networks:
- aria-net
# ─── OpenClaw (ARIA Gehirn) ─────────────────────────────
aria:
image: ghcr.io/openclaw/openclaw:latest
container_name: aria-core
hostname: aria-wohnung
privileged: true # ARIAs Wohnung — sie hat die Schlüssel
# ─── Qdrant (Vector-DB fuer ARIAs Gedaechtnis) ────────
# Storage liegt im Repo-Bind-Mount aria-data/brain/qdrant.
# Damit Backup/Export/Import komplett ueber das Filesystem gehen.
qdrant:
image: qdrant/qdrant:latest
container_name: aria-qdrant
volumes:
- ./aria-data/brain/qdrant:/qdrant/storage
restart: unless-stopped
networks:
- aria-net
# ─── ARIA Brain (Agent + Memory) ─────────────────────────
# Loest das alte aria-core (OpenClaw) ab. Vector-DB-basiertes
# Memory, eigener Agent-Loop, SSH zur aria-wohnung-VM.
brain:
build: ./aria-brain
container_name: aria-brain
hostname: aria-wohnung-brain # damit ssh known_hosts stabil bleibt
extra_hosts:
- "host.docker.internal:host-gateway" # Zugriff auf die VM via SSH
depends_on:
- qdrant
- proxy
ports:
- "3001:3001" # Diagnostic Web-UI (laeuft im shared network)
environment:
- CANVAS_HOST=127.0.0.1
- OPENCLAW_GATEWAY_TOKEN=${ARIA_AUTH_TOKEN}
- DEFAULT_MODEL=proxy/claude-sonnet-4
- RATE_LIMIT_PER_USER=30
- DISPLAY=:0
- QDRANT_HOST=aria-qdrant
- QDRANT_PORT=6333
- PROXY_URL=http://proxy:3456
- ARIA_AUTH_TOKEN=${ARIA_AUTH_TOKEN:-}
volumes:
# PHASE A — OpenClaw laeuft noch, aber System-Prompt-Files sind nach
# aria-data/brain-import/ gewandert und werden vom OpenClaw nicht mehr
# gelesen. ARIA antwortet bis zum Abriss ohne ihre Persoenlichkeit —
# einfach "raw Claude" durch den Proxy.
- openclaw-config:/home/node/.openclaw # bleibt — enthaelt Memory + Sessions fuer den Import-Schritt
- claude-config:/home/node/.claude
- ./aria-data/ssh:/home/node/.ssh
- /tmp/.X11-unix:/tmp/.X11-unix
- /var/run/docker.sock:/var/run/docker.sock
- aria-shared:/shared
- ./aria-data/brain/data:/data # Memory-Cache + Skills + Models (bind-mount fuer Export)
- ./aria-data/brain-import:/import:ro # Quell-MDs fuer den initialen Memory-Import (read-only)
- ./aria-data/ssh:/root/.ssh # SSH-Keys fuer aria-wohnung (geteilt mit Proxy)
- aria-shared:/shared # gleicher Austausch-Speicher wie Bridge
restart: unless-stopped
networks:
- aria-net
@@ -66,10 +71,13 @@ services:
build: ./bridge
container_name: aria-bridge
depends_on:
- aria
network_mode: "service:aria" # Teilt Netzwerk mit aria-core → localhost:18789
- brain
networks:
- aria-net
ports:
- "3001:3001" # Diagnostic Web-UI (Diagnostic teilt Netzwerk mit Bridge)
volumes:
- aria-shared:/shared # Shared Volume fuer Datei-Austausch (Bridge <> Core)
- aria-shared:/shared # Shared Volume fuer Datei-Austausch
# Audio-Zugriff
- /run/user/1000/pulse:/run/user/1000/pulse
- /dev/snd:/dev/snd
@@ -77,6 +85,7 @@ services:
- /dev/snd
environment:
- PULSE_SERVER=unix:/run/user/1000/pulse/native
- BRAIN_URL=http://aria-brain:8080
- ARIA_AUTH_TOKEN=${ARIA_AUTH_TOKEN:-}
- RVS_HOST=${RVS_HOST:-}
- RVS_PORT=${RVS_PORT:-443}
@@ -86,19 +95,23 @@ services:
restart: unless-stopped
# ─── Diagnostic (Selbstcheck-UI und Einstellungen) ────
# Teilt Netzwerk mit Bridge, damit der Diagnostic-Server die
# Bridge auf localhost erreichen kann.
diagnostic:
build: ./diagnostic
container_name: aria-diagnostic
depends_on:
- aria
network_mode: "service:aria" # Teilt Netzwerk mit aria-core → localhost:18789
- bridge
network_mode: "service:bridge"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /var/run/docker.sock:/var/run/docker.sock # Container Restart + Brain-Export/Import
- ./aria-data/config/diag-state:/data # Persistenter State (aktive Session etc.)
- aria-shared:/shared # Shared Volume (Uploads + Config)
- aria-shared:/shared # Shared Volume (Uploads + Config + Voices)
- ./aria-data/brain:/brain # Brain-Export/Import (tar.gz aus Bind-Mount)
environment:
- ARIA_AUTH_TOKEN=${ARIA_AUTH_TOKEN:-}
- PROXY_URL=http://proxy:3456
- BRAIN_URL=http://aria-brain:8080
- RVS_HOST=${RVS_HOST:-}
- RVS_PORT=${RVS_PORT:-443}
- RVS_TLS=${RVS_TLS:-true}
@@ -107,9 +120,7 @@ services:
restart: unless-stopped
volumes:
openclaw-config: # Persistiert ~/.openclaw (Model, Auth, Sessions)
claude-config: # Persistiert ~/.claude (Permissions, Settings)
aria-shared: # Datei-Austausch zwischen Bridge und Core
aria-shared: # Datei-Austausch zwischen Bridge / Brain / Diagnostic
networks:
aria-net: