title: Elestio services use subdomain routing not direct ports

insight: Elestio services run on separate VMs with subdomain routing, not direct ports on the main IP. Previous health checks failed because they were hitting the wrong IP addresses.

reasoning_chain: Initial health checks on 152.53.201.152 ports failed for PostgreSQL, Qdrant, Redis

reasoning_chain: Realized services are on separate VMs with subdomain routing

reasoning_chain: All 4 services confirmed UP once correct addressing used

source_context: The Elestio services are actually all online -- the issue earlier was I was checking the wrong IPs. They use separate VMs with subdomain routing, not direct ports on 152.53.201.152.


title: Two paths for AIVA phone call capability

insight: AIVA can handle phone calls via Vapi (fast path, simple setup) or direct ClawdTalk bridge (lower latency, no middleman). Current Telnyx setup routes all calls to Vapi webhook.

reasoning_chain: Discovered 4 Australian phone numbers on Telnyx account

reasoning_chain: Found all numbers currently forward to Vapi webhook (api.vapi.ai/telnyx/inbound_call)

reasoning_chain: Identified fast path: create Vapi assistant wired to AIVA's AI model

reasoning_chain: Identified direct path: Telnyx Call Control → WebSocket audio bridge → Gemini Flash → audio response

reasoning_chain: Decision point: simplicity vs latency tradeoff

source_context: To get AIVA on phone calls, we have two paths: 1) Fast path (Vapi): Create a Vapi assistant wired to AIVA's AI model, assign to a number -- calls work immediately 2) Direct path (ClawdTalk): Set up Telnyx Call Control → WebSocket audio bridge → Gemini Flash → audio response -- lower latency, no Vapi middleman


title: Automated 15-minute health monitoring for Elestio

insight: AIVA will automatically monitor all 4 Elestio services every 15 minutes via cron job and send Telegram alerts if any service goes down.

reasoning_chain: Confirmed all Elestio services are operational

reasoning_chain: Created health check script that tests PostgreSQL, Qdrant, Redis, n8n

reasoning_chain: Verified health check runs successfully from Mac Mini

reasoning_chain: Set up cron job ID 131ce752 to run every 15 minutes

reasoning_chain: Configured Telegram alert notification on failure

source_context: Elestio monitoring locked in -- every 15 minutes, AIVA checks all 4 services and Telegram-alerts you if any fail. Cron ID: 131ce752.


title: AIVA missing embedding API keys for vector search

insight: AIVA's Mac Mini is missing OpenAI, Google, and Voyage embedding API keys, causing memory search to fall back to file-based BM25 text search only - no vector semantic search available.

reasoning_chain: AIVA fix agent investigating memory configuration

reasoning_chain: Found 3 plugins loaded: memory-core, telegram, voice-call

reasoning_chain: Discovered missing embedding API keys for vector search

reasoning_chain: System currently using BM25 fallback (functional but limited)

reasoning_chain: Vector search requires API key configuration

source_context: Memory Issue: Missing embedding API keys (OpenAI, Google, Voyage) -- search falls back to file-based BM25 (functional but no vector search)


title: OpenClaw memory flush before compaction

insight: OpenClaw automatically triggers memory flush before context compaction - the agent writes durable notes to MEMORY.md before context gets summarized, preserving key decisions.

reasoning_chain: OpenClaw triggers flush when tokens reach contextWindow - reserveTokensFloor - softThresholdTokens

reasoning_chain: System runs silent agent turn with system prompt instructing model to store durable memories

reasoning_chain: Model writes to MEMORY.md or memory/YYYY-MM-DD.md

reasoning_chain: If nothing worth saving, model replies NO_REPLY (invisible to user)

reasoning_chain: One flush per compaction cycle - tracked via memoryFlushCompactionCount

source_context: This is OpenClaw's most innovative memory feature. When a session approaches token limits, OpenClaw triggers a silent, agentic turn that prompts the model to write durable memories before context compaction occurs.


title: OpenClaw hybrid search (BM25 + Vector)

insight: OpenClaw combines vector search (70% weight, cosine similarity) with BM25 keyword search (30% weight) for memory retrieval, normalizing and merging both signals.

reasoning_chain: Retrieves maxResults * candidateMultiplier candidates from both methods

reasoning_chain: Normalizes BM25 rank to 0-1 score using formula: 1 / (1 + max(0, bm25Rank))

reasoning_chain: Computes finalScore = vectorWeight * vectorScore + textWeight * textScore

reasoning_chain: Vector handles conceptual matches, BM25 handles exact tokens (error codes, function names)

reasoning_chain: Embedding provider priority: Local → OpenAI → Gemini → Voyage → Disabled

source_context: OpenClaw combines two retrieval signals by default: Vector search (70% weight): Cosine similarity with embeddings stored in SQLite via sqlite-vec. BM25 keyword search (30% weight): SQLite FTS5 full-text search for exact token matching.


title: Three-tier cognitive memory architecture

insight: Recommended memory structure flows upward through consolidation (daily → operational → strategic) and downward through decomposition - agent controls what gets stored rather than auto-capturing everything.

reasoning_chain: Tier 1: MEMORY.md (Strategic) - long-term identity, relationships, lessons

reasoning_chain: Tier 2: active-context.md (Operational) - current projects, deadlines, commitments

reasoning_chain: Tier 3: YYYY-MM-DD.md (Tactical) - daily events, session notes

reasoning_chain: Information flows upward through consolidation and downward through decomposition

reasoning_chain: Agent uses memory_store tool instead of auto-capture to prevent bloat

source_context: Based on the 'Cognitive Architecture' pattern from Shawn Harris: MEMORY.md (Strategic) -- Long-term identity, relationships, lessons; active-context.md (Operational) -- Current projects, deadlines, commitments; YYYY-MM-DD.md (Tactical) -- Daily events, session notes


title: Engram plugin recommended for AIVA memory

insight: Engram plugin is best fit for AIVA because it's fully local-first (no external API dependency), uses QMD with reranking on top of BM25 + vectors, has signal-gated extraction to avoid memory bloat, and requires no subscription.

reasoning_chain: Evaluated: Built-in, Supermemory, Mem0, Mem0 v2, Engram

reasoning_chain: Supermemory requires Pro subscription ($20/mo)

reasoning_chain: Engram: local-first, QMD backend with reranking, signal-gated extraction

reasoning_chain: No subscription required - best for AIVA's autonomous 24/7 operation

source_context: The Engram plugin or built-in memory + QMD backend is the best fit for AIVA because: Fully local-first (no external API dependency); QMD adds reranking on top of BM25 + vectors; Signal-gated extraction avoids memory bloat; No subscription required


type: DIRECTIVE

title: AIVA should upgrade to OpenClaw v2026.2.12

insight: AIVA currently runs v2026.2.6 but should upgrade to v2026.2.12 for 40+ security vulnerability fixes, SSRF hardening, cron scheduler fixes, and session history payload capping improvements.

reasoning_chain: Current version v2026.2.6 has memory persistence fix and Opus 4.6 support

reasoning_chain: v2026.2.12 is latest release with major security hardening

reasoning_chain: Includes 40+ security vulnerability fixes

reasoning_chain: Cron timer re-arming fixes (no skipped/duplicate jobs)

reasoning_chain: Note: Must run gateway install after stop due to launchd bootout bug

source_context: Upgrade to v2026.2.12 for security fixes. The upgrade path: npm install -g openclaw@2026.2.12; openclaw gateway stop; openclaw gateway install; openclaw gateway start


title: Weekly memory consolidation workflow

insight: Implement weekly cron job to review past 7 days of daily logs, promote important items to MEMORY.md, and prune stale/completed items to prevent memory bloat.

reasoning_chain: Promote important items to MEMORY.md (strategic long-term)

reasoning_chain: Prune stale/completed items from active context

reasoning_chain: Prevents accumulation and token burn over time

source_context: Implement a weekly 'memory consolidation' cron job that: Reviews daily logs from the past 7 days; Promotes important items to MEMORY.md; Archives old daily logs; Prunes stale/completed items from active context


title: Use existing MCP wrapper for Supermemory

insight: AIVA can use the existing custom MCP wrapper (mcp-servers/supermemory/index.js) instead of official plugin - works with free tier via direct API, no Pro subscription required.

reasoning_chain: Official Supermemory plugin requires Pro subscription ($20/mo)

reasoning_chain: Found existing custom MCP wrapper at mcp-servers/supermemory/

reasoning_chain: Wrapper works with free tier via direct API

reasoning_chain: Can be configured as stdio MCP server in openclaw.json

reasoning_chain: Exposes tools: supermemory_store, supermemory_search, supermemory_forget, supermemory_profile

source_context: Use our existing MCP wrapper (mcp-servers/supermemory/index.js) -- already working on free tier, configure as MCP server in openclaw.json


title: Recommended AIVA workspace file structure

insight: Structured workspace with AGENTS.md (operating directives), SOUL.md (persona), USER.md (Kinan profile), MEMORY.md (NAMP state), memory/active-context.md (current tasks), and memory/runbooks/ (procedures).

reasoning_chain: AGENTS.md: AIVA operating directives, NAMP protocol, protection rules

reasoning_chain: SOUL.md: Queenhood philosophy, communication style, escalation boundaries

reasoning_chain: USER.md: Kinan profile, timezone Australia/Sydney, preferences

reasoning_chain: MEMORY.md: NAMP decision matrix, autonomy levels, key learnings

reasoning_chain: memory/active-context.md: Current task queue, ReceptionistAI status

reasoning_chain: memory/runbooks/: Telegram notification, cron verification, NAMP cycle procedures

source_context: Structure AIVA's workspace with: AGENTS.md: AIVA's operating directives, NAMP protocol reference, protection rules; SOUL.md: AIVA's queenhood philosophy, communication style, escalation boundaries; USER.md: Kinan's profile, preferences, timezone; MEMORY.md: NAMP decision matrix state, autonomy levels, key learnings


title: gateway stop has launchd bootout bug

insight: OpenClaw's gateway stop uses launchctl bootout which completely unloads the service - after stop, must run gateway install before gateway start again or service won't restart.

reasoning_chain: gateway stop uses launchctl bootout which unloads the service

reasoning_chain: After stop, the service is completely removed from launchd

reasoning_chain: Must run gateway install to re-register before gateway start

reasoning_chain: Workaround: use launchctl stop gui/$UID/com.openclaw.gateway instead of gateway stop

reasoning_chain: AIVA's current run_queen.sh with tmux + auto-restart may avoid this

source_context: Known bug: gateway stop uses launchctl bootout which completely unloads the service. After stop, you must run gateway install before gateway start again. Workaround: use launchctl stop gui/$UID/com.openclaw.gateway instead.


title: Supermemory cloud + Qdrant vectors + Redis cache architecture

insight: Cross-sync architecture combines Supermemory (cloud semantic), Qdrant (vectors), Redis (cache), PostgreSQL (relational) - all independently operational, connected via n8n workflows and AIVA daemon.

reasoning_chain: Supermemory: cloud semantic storage (5 docs committed this session)

reasoning_chain: Qdrant: 13 vector collections for semantic search

reasoning_chain: n8n: workflow automation connecting all services

source_context: Cross-sync: Supermemory (cloud semantic) + Qdrant (vectors) + Redis (cache) + PostgreSQL (relational) are all independently operational. The bridge layer connecting them runs through n8n workflows and the AIVA daemon.