- Root setup.sh orchestrator with per-phase dispatch (./setup.sh p1..p8 | all | status) - Makefile convenience targets (make infra, make llm, make status, etc.) - scripts/common.sh: shared bash library for OS detection, Docker helpers, service management (launchd/systemd), package install, env management - .env.example + .gitignore: shared config template and secret exclusions P1 (homeai-infra): full implementation - docker-compose.yml: Uptime Kuma, code-server, n8n - Note: Home Assistant, Portainer, Gitea are pre-existing instances - setup.sh: Docker install, homeai network, container health checks P2 (homeai-llm): full implementation - Ollama native install with CUDA/ROCm/Metal auto-detection - launchd plist (macOS) + systemd service (Linux) for auto-start - scripts/pull-models.sh: idempotent model puller from manifest - scripts/benchmark.sh: tokens/sec measurement per model - Open WebUI on port 3030 (avoids Gitea :3000 conflict) P3-P8: working stubs with prerequisite checks and TODO sections Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
66 lines
3.4 KiB
Bash
66 lines
3.4 KiB
Bash
#!/usr/bin/env bash
|
|
# homeai-agent/setup.sh — P4: OpenClaw agent + skills + mem0
|
|
#
|
|
# Components:
|
|
# - OpenClaw — AI agent runtime (port 8080)
|
|
# - skills/ — home_assistant, memory, weather, timer, music stubs
|
|
# - mem0 — long-term memory (Chroma backend)
|
|
# - n8n workflows — morning briefing, notification router, memory backup
|
|
#
|
|
# Prerequisites:
|
|
# - P1 (homeai-infra) — Home Assistant running, HA_TOKEN set
|
|
# - P2 (homeai-llm) — Ollama running with llama3.3:70b + nomic-embed-text
|
|
# - P3 (homeai-voice) — Wyoming TTS running (for voice output)
|
|
# - P5 (homeai-character) — aria.json character config exists
|
|
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
REPO_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)"
|
|
source "${REPO_DIR}/scripts/common.sh"
|
|
|
|
log_section "P4: Agent (OpenClaw + skills + mem0)"
|
|
detect_platform
|
|
|
|
# ─── Prerequisite check ────────────────────────────────────────────────────────
|
|
log_info "Checking prerequisites..."
|
|
|
|
for service in "http://localhost:11434:Ollama(P2)" "http://localhost:8123:HomeAssistant(P1)"; do
|
|
url="${service%%:*}"; name="${service##*:}"
|
|
if ! curl -sf "$url" -o /dev/null 2>/dev/null; then
|
|
log_warn "$name not reachable at $url"
|
|
fi
|
|
done
|
|
|
|
load_env_services
|
|
if [[ -z "${HA_TOKEN:-}" ]]; then
|
|
log_warn "HA_TOKEN not set in ~/.env.services — needed for home_assistant skill"
|
|
fi
|
|
|
|
# ─── TODO: Implementation ──────────────────────────────────────────────────────
|
|
cat <<'EOF'
|
|
|
|
┌─────────────────────────────────────────────────────────────────┐
|
|
│ P4: homeai-agent — NOT YET IMPLEMENTED │
|
|
│ │
|
|
│ OPEN QUESTION: Which OpenClaw version/fork to use? │
|
|
│ Decide before implementing. See homeai-agent/PLAN.md. │
|
|
│ │
|
|
│ Implementation steps: │
|
|
│ 1. Install OpenClaw (pip install or git clone) │
|
|
│ 2. Create ~/.openclaw/config.yaml from config/config.yaml.example │
|
|
│ 3. Create skills: home_assistant, memory, weather, timer, music│
|
|
│ 4. Install mem0 + Chroma backend │
|
|
│ 5. Create systemd/launchd service for OpenClaw (port 8080) │
|
|
│ 6. Import n8n workflows from workflows/ │
|
|
│ 7. Smoke test: POST /chat "turn on living room lights" │
|
|
│ │
|
|
│ Interface contracts: │
|
|
│ OPENCLAW_URL=http://localhost:8080 │
|
|
└─────────────────────────────────────────────────────────────────┘
|
|
|
|
EOF
|
|
|
|
log_info "P4 is not yet implemented. See homeai-agent/PLAN.md for details."
|
|
exit 0
|