Skip to content
ablozhouPublic

About

Octopus-inspired distributed agent nervous system. Decouples central brain reasoning into autonomous edge arm intelligence, unifying heterogeneous multi-agent frameworks into a biomimetic mesh.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Octpex

Biomimetic Distributed Cognitive Topology & Self-Evolving Edge-Cloud Agent Fabric

License Chinese Readme PRD Architecture K8s Guide


Table of Contents

  1. Vision & Biomimetic Topology
  2. Comparison with Popular Multi-Agent Frameworks
  3. 5-Minute Quick Start
  4. Architecture & Key Capabilities
  5. Documentation Index
  6. License

Vision & Biomimetic Topology

Octpex is a domain-agnostic Distributed Cognitive Fabric & Scheduling Runtime built in Go. It solves a core bottleneck in production multi-agent systems: routing every routine step to expensive frontier cloud LLMs does not scale in cost or latency.

Inspired by cephalopod neurobiology—where two-thirds of an octopus's neurons reside in its arms rather than its central brain—Octpex separates cognition into three tiers:

  • Octo-Brain (Central Cortex): Frontier cloud LLMs (e.g., Gemini, GPT, Claude) focused on global planning, complex reasoning, conflict arbitration, and skill distillation.
  • Basal Nerve Ring (Shared Coordination Substrate): A distributed control and working-memory bus providing dynamic capability discovery, pass-by-reference Shared Data Substrate (sub://), and peer-to-peer lateral signaling.
  • Octo-Arms (Edge Ganglia): Autonomous edge workers equipped with local Small Language Models (SLMs, 0.5B-4B via Ollama/vLLM) and Arm-private storage, resolving 70%-85% of routine tasks in sub-second local reflex loops.
Core Pain Point Monolithic Cloud-Centric Agents How Octpex Solves It
Token Cost Explosion Routine parsing, summarization, and retries call frontier cloud LLMs. Edge Offloading: Local SLMs in Octo-Arms resolve routine tasks at near-zero marginal cost.
High End-to-End Latency Multi-hop cloud API loops add 5-30s latency per workflow. Local Reflex & Lateral Bus: Sub-second local loops and direct arm-to-arm handoffs.
Silent SLM Hallucination Small models fail silently when asked to self-assess certainty. Zero-Trust 3-Gate Funnel: Objective structural, confidence, and semantic gates enforce safe escalation.
Framework Silos Agents built in different SDKs cannot collaborate or share learned tools. Heterogeneous Mesh & Dynamic MCP: Wraps Go, Python, and third-party agents; distills Brain solutions back to Arms.

Comparison with Popular Multi-Agent Frameworks

Octpex is not another single-process agent orchestration SDK. It acts as a distributed edge-cloud nervous system that can also wrap and coordinate agents built with existing frameworks as Octo-Arms.

Dimension Octpex LangGraph CrewAI Microsoft Agent Framework (AutoGen) Google ADK / OpenAI Agents SDK Temporal
Core Positioning Distributed edge-cloud cognitive fabric & runtime (Go + Python SDK) Stateful graph workflow orchestration SDK (Python / JS) Role-based multi-agent task orchestration SDK (Python) Multi-agent conversation & enterprise workflow framework (.NET / Python) Single-vendor / ecosystem agent development & handoff SDKs Durable event-sourced workflow execution engine
Edge-Cloud Tiering Native Brain (Cloud LLM) + Arm (Local SLM) hierarchy Single-tier LLM calls per node (custom routing required) Single-tier LLM calls per agent Single-tier LLM calls per agent Primarily cloud LLM centric General-purpose worker/activity model (no built-in SLM/LLM tiering)
Escalation Control Built-in Zero-Trust 3-Gate Escalation Funnel (no SLM self-grading) Manual conditional edges Manual delegation / manager LLM Manual termination / speaker selection Manual handoff / guardrails Retry policies & timers (no semantic/confidence gates)
Self-Evolution Brain-to-Arm skill distillation & Dynamic MCP synthesis Static developer-defined graph Static crew & task definitions Static agent definitions Static tool & agent definitions Deterministic code workflows (no skill distillation)
Data & Context Passing Two-tier storage: Arm-private store + sub:// CAS references Full state dictionary passed across graph nodes Context string passing between tasks Message history broadcast / group chat Conversation history passed on handoff Event history payload (size-limited)
Ecosystem Interop Native adapters for LangGraph, CrewAI, MS Agent Framework, Google ADK, Temporal, MCP LangChain ecosystem Python tools / LangChain Microsoft / Semantic Kernel ecosystem Google / OpenAI ecosystems Multi-language SDKs (Go, Python, TS, Java)
Deployment Single static Go binary (standalone), multi-host physical distributed mesh, or Kubernetes Helm Python/Node app server Python process / CrewAI Enterprise Python/.NET service Python/Cloud Run/Agent Engine Temporal Server + DB cluster + Workers

Complementary by design: Keep your existing LangGraph, CrewAI, Google ADK, or Microsoft Agent Framework agents—use Octpex's Python bridge (bridge/python/octpex/adapters/) to mount them as distributed Octo-Arms, or plug Temporal into GlobalOrchestratorSPI for durable long-running Octo-Brain workflows.


5-Minute Quick Start

1. Build & Launch Octo-Brain

make build
make run

Open http://localhost:8080 in your browser to access the Web UI (chat dialogue, topology view, model/arm management, and runtime settings). octpex run mounts the resident Document Summary & Distillation Arm (arm-doc-distiller) out of the box.

2. Dispatch a Task (Web UI or REST API)

# Summarize a single file (Single Document Mode) or a directory (Directory Index Mode)
curl -X POST http://localhost:8080/api/v1/dispatch \
  -H "Content-Type: application/json" \
  -d '{
    "target_capability": "analyze-document",
    "parameters": { "path": "docs/PRD.md" }
  }'

3. Attach an External Arm (Optional)

python examples/weather_mcp_arm/server.py 8081

The arm automatically registers with Octo-Brain (http://127.0.0.1:8080/api/v1/register) and starts heartbeating. For more examples (AIOps triage mesh, blog publishing mesh, generic declarative arms, and Python multi-framework integration), see examples/README.md.


Architecture & Key Capabilities

%%{init: {
  "themeVariables": {
    "background": "transparent",
    "mainBkg": "transparent",
    "subGraphBkg": "transparent",
    "clusterBkg": "transparent",
    "edgeLabelBackground": "transparent"
  },
  "themeCSS": ".edgeLabel, .edgeLabel span, .edgeLabel div { background-color: transparent !important; } .edgeLabel rect { fill: transparent !important; opacity: 0 !important; }"
}}%%
flowchart TD
    classDef default fill:none;

    %% 1. OCTO-BRAIN (THE HEAD: WIDE & HORIZONTAL)
    subgraph BRAIN["OCTO-BRAIN (Central Cortex / Head)"]
        direction LR
        B_ORCH["Global Orchestrator (Planner & HITL)"] --> B_CORE["Frontier Reasoning LLM (Strategic Arbitration)"] --> B_FINOPS["FinOps Telemetry & Dynamic MCP Distiller"]
    end

    %% 2. BASAL NERVE RING (THE COLLAR SUBSTRATE: WIDE & HORIZONTAL)
    subgraph RING["BASAL NERVE RING (Circular Nervous Collar / Substrate)"]
        direction LR
        RING_REG["Capability Registry (NATS KV / etcd)"] --> RING_SUB["Shared Data Substrate (sub:// + CAS Leases)"] --> RING_BOX["Dynamic MCP Box (Shared Tool Registry)"]
    end

    %% Central Vertical Nervous Bus connects Head to Collar
    BRAIN <==>|"Vertical Bus (gRPC / NATS JetStream)"| RING

    %% 3. OCTO-ARMS (HORIZONTAL TENTACLES: 3 DISTINCT SPECIALIZED ARMS IN SOLID BOXES)
    subgraph ARMS_LAYER["OCTO-ARMS MESH (Horizontal Tentacles Fanning Out)"]
        direction LR

        %% Left Arm: Telemetry & Log Distiller
        subgraph ARM1["Octo-Arm 1: Telemetry Distiller"]
            direction TB
            A1_CORE["Adapter & SLM 0.5B (Edge Log Reducer)"]
            A1_PRIV["Private Ganglion Store (Raw Logs & Vector Buffer)"]
            A1_TOOL["Sucker / Tool SPI (Prometheus & Loki MCP)"]
            A1_CORE --> A1_PRIV --> A1_TOOL
        end

        %% Middle Arm: Code & Patch Synthesizer
        subgraph ARM2["Octo-Arm 2: Patch Synthesizer"]
            direction TB
            A2_CORE["Adapter & SLM 3B (AST Refactoring Reflex)"]
            A2_PRIV["Private Ganglion Store (AST Tree & Few-Shot Snippets)"]
            A2_TOOL["Sucker / Tool SPI (Git & Sandbox MCP)"]
            A2_CORE --> A2_PRIV --> A2_TOOL
        end

        %% Right Arm: Security & Policy Auditor (Representative of Arms 3..8)
        subgraph ARM3["Octo-Arm 3: Security Auditor (Arms 3..8)"]
            direction TB
            A3_CORE["Adapter & SLM 1.5B (Policy Gatekeeper)"]
            A3_PRIV["Private Ganglion Store (CVE Cache & RBAC Rules)"]
            A3_TOOL["Sucker / Tool SPI (Falco & Cloud Custodian MCP)"]
            A3_CORE --> A3_PRIV --> A3_TOOL
        end
    end

    %% 3 Dedicated Nerve Trunks down to the Arms Mesh (Trunk 1, Trunk 2, Trunk 3)
    RING ==>|"Nerve Trunk 1"| ARMS_LAYER
    RING ==>|"Nerve Trunk 2 (sub:// Substrate)"| ARMS_LAYER
    RING ==>|"Nerve Trunk 3"| ARMS_LAYER

    %% 4. EXTERNAL ENVIRONMENT & SUCKERS INTERACTION (BOTTOM TARGETS)
    subgraph ENV["External Environment (Sensory Perception & Action Targets)"]
        direction LR
        ENV_OBS["Observability (Metrics, Traces & Logs)"] --> ENV_DEV["Developer Ecosystem (Git & Sandboxes)"] --> ENV_SEC["Runtime Security (K8s API & Falco)"]
    end

    %% Arms Mesh connects cleanly to Environment container
    ARMS_LAYER -->|"Sensory Perception & Tool Execution"| ENV

    style BRAIN fill:none;
    style RING fill:none;
    style ARMS_LAYER fill:none,stroke-dasharray: 4 4;
    style ARM1 fill:none,stroke-width:1.5px;
    style ARM2 fill:none,stroke-width:1.5px;
    style ARM3 fill:none,stroke-width:1.5px;
    style ENV fill:none;
Loading

Deep technical details have been organized into dedicated specification documents:

  • Zero-Trust 3-Gate Escalation Funnel: Structural schema checks (Gate 1), objective SLM confidence/perplexity thresholds (Gate 2), and semantic drift arbitration (Gate 3) ensure edge SLMs never silently hallucinate. See System Architecture (Section 3).
  • Brain-to-Arm Self-Evolution & Dynamic MCP: Complex tasks escalated to Octo-Brain are distilled into reusable skills and MCP tools and pushed back down to Octo-Arms. See System Architecture (Section 3).
  • SPI Contracts & Declarative Generic Arms: Standardized Bus, Registry, DataSubstrate, and InferenceAdapter interfaces, plus zero-code arm.yaml + AGENT.md + SKILL.md arm definitions. See Arm Developer Guide and Developer Guide.
  • Security Governance & Hybrid Physical/Cloud Deployment: Supports standalone single-binary mode (zero dependencies), distributed multi-host physical deployment (Octo-Brain and Octo-Arms running across separate bare-metal servers or edge devices with autonomous registration, arm admission keys, and mTLS), and Kubernetes Helm Chart with HPA. See Deployment Guide and Kubernetes Guide.

Documentation Index


License

This project is licensed under the Apache License 2.0.

About

Octopus-inspired distributed agent nervous system. Decouples central brain reasoning into autonomous edge arm intelligence, unifying heterogeneous multi-agent frameworks into a biomimetic mesh.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages