Skip to content

Mnehmos/mnehmos.multi-agent.framework

Agentic Nervous System

Your LLM is a brain in a jar. Give it a nervous system.

A biological architecture for artificial minds. Sensation, reflex, memory, and actionβ€”organized into coherent loops that turn chatbots into organisms.

🌐 Website: UNDER CONSTRUCTION! mnehmos.github.io/mnehmos.multi-agent.framework

πŸ“– Blog Post: From Chatbot to Organism


MCP Ecosystem

Server Layer Description
OODA MCP Somatic 62 tools for computer automation: files, screen, keyboard, mouse, batch ops
Synch MCP Autonomic Memory persistence, agent handoff, file locks, bug tracking
Index Foundry Autonomic RAG pipelines, document Q&A, semantic search
Trace MCP Reflex Schema validation, contract enforcement, type scaffolding
arXiv MCP Central Academic paper search for Deep Research mode
ChatRPG Game Engine D&D 5e combat, characters, encounters

The Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    CENTRAL (BRAIN) - Cognition                      β”‚
β”‚    Orchestrator β€’ Architect β€’ Planner β€’ Ask β€’ Deep Research        β”‚
β”‚         ↑ Receives sensory input   ↓ Sends motor commands          β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                   SOMATIC (BODY) - Voluntary Action                 β”‚
β”‚         Red Phase β€’ Green Phase β€’ Blue Phase β€’ Code β€’ Debug        β”‚
β”‚              ↑ Tool results   ↓ Tool invocations                   β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                AUTONOMIC (SUBCONSCIOUS) - Background                β”‚
β”‚              Memory β€’ Synch MCP β€’ Index Foundry MCP                 β”‚
β”‚           State persistence, retrieval, agent coordination         β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚              REFLEX (SPINAL CORD) - Immediate.                     β”‚
β”‚                     (UNDER CONSTRUCTION)                            β”‚
β”‚                Trace MCP β€’ Schema Validation β€’ Contracts            β”‚
β”‚              Rejects bad inputs before cognition                    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Quick Start

1. Copy the baseline templates

# Create .roo directory in your project
mkdir -p .roo

# Copy templates
cp templates/custom_modes.yaml .roo/
cp templates/universal/AGENTS.md .

Files to copy:

2. Add global instructions

Copy templates/custom-instructions-for-all-modes.md content to your IDE's global instructions field.

3. (Optional) Add MCP tools

Install tools to extend capabilities. See templates/tools/ for integration docs:

Tier Tool Layer Integration Guide
2 OODA MCP Somatic ooda-mcp.md
3 Synch MCP Autonomic synch-mcp.md
3 Index Foundry Autonomic index-foundry-mcp.md
4 Trace MCP Reflex trace-mcp.md

Template Tiers

Progressive enhancementβ€”start simple, add capabilities as needed:

Tier Components What You Get
0 Baseline templates Toolless coordination with 13 modes
1 + Native tools File I/O, command execution
2 + OODA MCP Full computer automation (62 tools)
3 + Synch + Index Foundry Memory persistence + RAG
4 + Trace MCP Schema validation layer

Each tier preserves all contracts from previous tiers.


The 13 Modes

Central (Brain)

Mode Purpose
πŸ”„ Orchestrator Task decomposition, delegation, integration
πŸ›οΈ Architect System design, ADRs, contracts
πŸ“‹ Planner Task maps, backlogs, dependencies
❓ Ask Clarification, research synthesis
πŸ”Ž Deep Research Multi-source investigation
πŸ”¬ Deep Scope Issue scoping

Somatic (Body)

Mode Purpose
πŸ”΄ Red Phase Write failing tests
🟒 Green Phase Minimal implementation
πŸ”΅ Blue Phase Refactor with green tests
πŸ’» Code Complex implementation
πŸ› Debug Root cause analysis

Autonomic (Subconscious)

Mode Purpose
πŸ“ Memory Documentation, knowledge management
πŸ—„οΈ Index Foundry RAG pipeline specialist

Core Contracts

OODA Loop

All work follows Observe β†’ Orient β†’ Decide β†’ Act:

  1. Observe πŸ‘οΈ β€” Read the task, scan files, check tests
  2. Orient 🧭 β€” Map what exists vs what's needed
  3. Decide 🎯 β€” Choose approach with lowest risk
  4. Act ⚑ β€” Execute one step, validate, repeat

TDD Cycle

πŸ”΄ RED    β†’  Write failing tests
🟒 GREEN  β†’  Minimal implementation
πŸ”΅ BLUE   β†’  Refactor with green tests

Boomerang Protocol

Every completed task returns structured data:

{
  "type": "task-completed",
  "task_id": "auth-impl-001",
  "from": "green-phase",
  "status": "success",
  "files_changed": ["src/auth/jwt.ts"],
  "tests_run": ["npm test -- auth"],
  "summary": "Implemented JWT validation"
}

IDE Support

Templates for every major AI-assisted IDE:

IDE Template Location
Roo Code templates/custom_modes.yaml
Claude Code templates/claude-code/CLAUDE.md
Cursor templates/cursor/rules/_global.mdc
Copilot templates/copilot/copilot-instructions.md

File Structure

Path Description
templates/custom_modes.yaml Mode definitions (13 modes with layer mappings)
templates/custom-instructions-for-all-modes.md Global contracts (paste into IDE)
templates/universal/AGENTS.md Universal agent contract (OODA + TDD + Scope)
Tool Integration
templates/tools/ooda-mcp.md OODA MCP integration (Somatic layer)
templates/tools/synch-mcp.md Synch MCP integration (Autonomic layer)
templates/tools/index-foundry-mcp.md Index Foundry integration (Autonomic layer)
templates/tools/trace-mcp.md Trace MCP integration (Reflex layer)

Philosophy

Why a Nervous System?

LLMs are stateless text predictors. They have:

  • βœ… High intelligence
  • ❌ No agency
  • ❌ No persistent memory
  • ❌ No sensory-motor integration

A nervous system provides:

  • Closed loops of action and sensation
  • Reflexes that reject bad inputs immediately
  • Autonomic processes that maintain state
  • Central coordination of specialized capabilities

From Chatbot to Organism

Chatbot:    User β†’ LLM β†’ Response
                   ↑
                   └── (no feedback)

Organism:   Environment β†’ Senses β†’ Brain β†’ Motor β†’ Environment
                 ↑                              ↓
                 └──────── Feedback β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Support


License

MIT

Releases

No releases published

Packages

 
 
 

Contributors