soma-memory-fix

Audit AgentStack agents for kb_search nodes missing knowledgeBaseId.

3|3|Updated Mar 5, 2026
One-click install
npx skills add https://github.com/webdevcom01-cell/agent-studio --skill soma-memory-fix
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: soma-memory-fix
Source: https://github.com/webdevcom01-cell/agent-studio/tree/main/skills/soma-memory-fix
Command: npx skills add https://github.com/webdevcom01-cell/agent-studio --skill soma-memory-fix

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Audits AgentStack agents for unwired kb_search nodes (missing knowledgeBaseId), proposes a fix plan, and — after confirmation — patches each node using only live MCP data. Zero hallucination tolerance: every ID used in a patch comes from a real tool response in the current session.

Core Features & Use Cases

  • Inspect production agents for unwired kb_search nodes
  • Match each unwired node to its correct KB in a strict 1:1 manner
  • Build and present a patch plan before applying changes
  • Patch nodes using as_patch_node_field with only live IDs
  • Verify patches via post-patch re-read

Hard rules (zero-hallucination constraints):

  • Every agent ID, KB ID, and node ID used in a patch command must come from a live MCP tool response in the current session. Never use values from memory or previous sessions.
  • Never call as_patch_node_field without first reading current node state via as_inspect_flow.
  • Never mark a node as FIXED without a post-patch re-read confirming the field is set.
  • If KB matching is ambiguous (0 or 2+ KBs for an agent) → halt that agent and report. Never guess which KB to use.

Quick Start

Run soma-memory-fix to audit, plan, and patch unwired kb_search nodes across all production agents.

Frequently Asked Questions about soma-memory-fix

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix unwired kb_search nodes missing knowledgeBaseId in AgentStack?

To fix unwired kb_search nodes, you audit production AgentStack agents to locate nodes missing knowledgeBaseId, match them to correct knowledge bases in a strict 1:1 manner, and apply patches using live MCP tool responses. The process inspects flows, proposes a plan, and verifies post-patch outcomes.

What are the safest steps to patch agent memory lookups in production?

Safely patching agent memory lookups requires reading current node states via as_inspect_flow, matching unwired kb_search nodes to knowledge bases, applying changes with as_patch_node_field using only live IDs, and re-reading the flow to verify the field is set before marking it fixed.

When do I need to audit agents for missing knowledgeBaseId?

You need to audit agents for missing knowledgeBaseId when production AgentStack deployments contain unwired kb_search nodes that fail to retrieve memory. This occurs across multiple agents and requires mapping each node to its correct knowledge base safely.

Does the kb_search patching process work with multiple agents simultaneously?

Yes, the kb_search patching process works across multiple production agents simultaneously. It audits each agent flow individually, lists available knowledge bases, and ensures a strict 1:1 KB mapping for each unwired node before applying any patches.

Why does my agent memory patch halt when knowledge base matching is ambiguous?

Agent memory patching halts when knowledge base matching is ambiguous, meaning there are zero or two plus KBs available for an agent. This strict constraint prevents guessing and ensures every patch uses a correctly matched, live knowledge base ID.

How do I verify a successful knowledgeBaseId patch without hallucinating IDs?

To verify a successful knowledgeBaseId patch without hallucinating IDs, you must perform a post-patch re-read using as_inspect_flow to confirm the field is set. Every patched ID must originate from a live MCP tool response in the current session, never memory.