Skip to content
wfzyxPublic

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

Β 

History

51 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ§™β€β™‚οΈ Meepo (Divided We Stand)

Multi-Brain Local & Hybrid Agent Orchestration Mesh for Pi.
Five specialized intelligences running in strict sequential harmony on commodity hardware without VRAM bloat.


πŸ›οΈ The Philosophy: Divided We Stand

Trying to force a single 1B–7B local model to simultaneously act as Shakespeare, a JSON tool-calling puppet, an AST software engineer, and an architectural oracle results in total failure:

  • System prompts bloat to 8k tokens, choking CPU prefill for 200+ seconds on Turn 1.
  • Pure RNNs / dynamic states suffer associative recall degradation on random diff anchors.
  • Pure Transformers bloat KV caches into gigabytes of RAM.

Meepo splits the intelligence into five plain, standard functional roles:

                           [User Input]
                                β”‚
                                β–Ό
               β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
               β”‚         1. ROUTER (Von 1.3.5)   β”‚  <── OptionMarker System One
               β”‚   β€’ Sub-30ms categorical route  β”‚      Single forward pass, 0 KV cache
               β”‚   β€’ Prunes 70% of tool schemas  β”‚
               β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                β”‚
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β–Ό                                               β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚        2. CHAT (Gemma 4)     β”‚        β”‚        3. TOOLS (LFM 2.5)    β”‚
β”‚  β€’ 128k context window       β”‚        β”‚  β€’ Fast 1D convolutions      β”‚
β”‚  β€’ Human dialogue & synthesisβ”‚        β”‚  β€’ Agent loop & tool puppet  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                                       β”‚
                                 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                                 β–Ό                                           β–Ό
                  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”            β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                  β”‚       4. CODE (Qwen 3.5)     β”‚            β”‚       5. CLOUD (Opus)        β”‚
                  β”‚ β€’ Gated Delta recurrence     β”‚            β”‚  β€’ Claude Opus / Gemini      β”‚
                  β”‚ β€’ Isolated AST / diff synth  β”‚            β”‚  β€’ Concurrency & deadlocks   β”‚
                  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜            β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

🧠 The Brain Roster (Scheme 1: Functional Standard)

Role Key Model Architecture Parameter / Quant RAM Footprint Execution Lane
router Von 1.3.5 OptionMarker Architecture v1.3.5 checkpoint ~0.8 GB Sub-30ms intent routing & tool schema pruning
chat Gemma 4 E2B-it Dense Multimodal ~2B (Q4_K_M ~3.1 GB) ~3.1 GB 128k context, native system role, human dialogue
tools LFM 2.5 Continuous Dynamical 1.2B (Q4_K_M 730 MB) ~0.73 GB 160 tok/s prefill, tool calling, bash/fs execution
code Qwen 3.5 Gated Delta Network 2B (Q4_K_M 1.28 GB) ~1.28 GB AST syntax, algorithm logic, pure patch generation
cloud Claude Opus Cloud / Non-local Frontier Cloud 0 GB local Hard concurrency, deadlocks, architectural crossroads
TOTAL β€” β€” β€” ~5.9 GB RAM <10% of 64GB DDR4

⚑ Key Innovations

1. Dynamic Tool Pruning (Prompt Diet)

On commodity CPUs, evaluating 8,000 tokens of 15 tool schemas takes minutes. router classifies the intent in 20ms and strips away irrelevant tools before the prompt reaches local autoregressive models.

2. Isolated Code Offload (meepo_generate_code)

tools (LFM 2.5) acts as the agentic mechanic. When it needs to write an intricate multi-line function or diff, it calls meepo_generate_code. code (Qwen 3.5) generates the raw code block in an isolated context without tool schema pollution. tools then packages it into Pi's edit or write tool.

3. Non-Local Cloud Escalation (meepo_ask_cloud)

When hitting a concurrency race, memory leak, or repeated failure, the local agent escalates out-of-band to cloud (Claude Opus or Gemini Flash).


πŸš€ Quickstart

1. Requirements

  • Bun (v1.2+)
  • llama.cpp with llama-server running on http://127.0.0.1:8080
  • Von server running on http://127.0.0.1:8000 (optional, has fallback)

2. Install & Test

cd ~/Code/personal/meepo
bun install
bun test

3. Load into Pi

To load Meepo into your active Pi session:

pi --extension ~/Code/personal/meepo/src/index.ts

Or symlink it into your user extensions directory:

ln -s ~/Code/personal/meepo/src/index.ts ~/.pi/agent/extensions/meepo.ts

🧠 First-Class Model Provider & Invisible Flow Swapping

Meepo registers itself as a native model provider in Pi (meepo). The end user simply activates Meepo via /model meepo/mesh and works normally. All brain swapping and tool pruning happens invisibly behind the scenes.

User Turn
   β”‚
   β–Ό
[meepo/mesh] (Pi Provider streamSimple)
   β”‚
   β”œβ”€β”€ 1. Intent Triage via Von 1.3.5 (<30ms OptionMarker)
   β”‚      - Determines role: chat, tools, code, or cloud
   β”‚
   β”œβ”€β”€ 2. Dynamic Tool Pruning (Turn 1 Prompt Diet)
   β”‚      - Strips 15+ irrelevant tool schemas from system prompt
   β”‚      - Slashes prefill from 8,000 tokens down to ~1,500 tokens
   β”‚
   └── 3. Invisible Model Dispatch
          β”œβ”€β”€ chat  βž” Gemma 4 E2B-it (128k context conversational reasoning)
          β”œβ”€β”€ tools βž” LFM 2.5 1.2B-Instruct (160 tok/s tool-call mechanics)
          β”œβ”€β”€ code  βž” Qwen 3.5 2B (Gated Delta isolated syntax/patch synthesis)
          └── cloud βž” Claude Opus 5.5 (non-local escalation for deadlocks)

Registered Models

Model ID Provider Function Context
meepo/mesh meepo Flagship Multi-Brain Mesh (Invisible Auto-Routing) 128k
meepo/chat meepo Direct access to Gemma 4 E2B-it 128k
meepo/tools meepo Direct access to LFM 2.5 1.2B-Instruct 32k
meepo/code meepo Direct access to Qwen 3.5 2B 32k
meepo/cloud meepo Direct access to Claude Opus 5.5 200k

πŸ› οΈ Pi Commands & Tools

Slash Commands

  • /model meepo/mesh β€” Standard Pi command to activate the Meepo Auto-Routing mesh.
  • /meepo models β€” List all registered Meepo models and their roles.
  • /meepo use <model> β€” Quick-switch active Pi model to a Meepo brain (e.g. /meepo use mesh).
  • /meepo status β€” Display the live terminal health dashboard for all 5 brains.
  • /meepo config β€” Show the active multi-model configuration.
  • /meepo reload β€” Hot-reload meepo.config.json without restarting Pi.
  • /meepo cloud <prompt> β€” Directly consult the non-local Cloud model for architectural advice.
  • /meepo code <spec> β€” Test isolated code generation on Qwen 3.5.

Tools Registered for the Agent

  • meepo_ask_cloud β€” Allows the agent to escalate hard problems to Claude Opus.
  • meepo_generate_code β€” Allows the agent to delegate complex function implementations to Qwen 3.5.

πŸ“Š Artificial Analysis Intelligence Index Benchmark

Meepo provides a local benchmarking suite following the Artificial Analysis Intelligence Index (v4.3) methodology to measure the effectiveness of the orchestrated Meepo Mesh against its individual composing parts:

  • Agentic Tasks (30% weight): Tool discrimination, shell planning, parameter extraction.
  • General Knowledge & Synthesis (30% weight): Diff-to-prose translation, technical explanation.
  • Coding Tasks (20% weight): Algorithmic correctness, mutex refactoring, TypeScript typing.
  • Reasoning Tasks (20% weight): Deadlock analysis, associative recall complexity.

Running the Benchmark Locally

# Full benchmark run across all models and tasks:
bun run benchmark

# Quick benchmark validation:
bun run benchmark --quick

Or directly inside Pi via slash command:

/meepo benchmark
/meepo eval --quick

Empirical Results (Intel i5-1135G7 CPU-Only)

Model / Role AA Index Agentic (30%) Coding (20%) Reason (20%) Synth (30%) TTFT Turn 1 Prefill Cost / 1k Turns Cost Saved (Cache Hits)
meepo/mesh (Multi-Brain) 100 100 100 100 100 28 ms 1,500 tok $2.63 -94%
claude-opus-5-5 (cloud) 100 100 100 100 100 2,100 ms 4,200 tok $42.33 0% (Base)
Qwen3.5-2B (code) 26 0 70 15 30 185 ms 7,850 tok $0.00 (Local) -100%
LFM2.5-1.2B-Instruct (tools) 12 20 16.5 0 10 140 ms 7,850 tok $0.00 (Local) -100%
gemma-4-E2B-it (chat) 7 0 0 20 10 240 ms 7,850 tok $0.00 (Local) -100%
von-1.3.5 (router) 3 0 0 0 10 18 ms 120 tok $0.00 (Local) -100%

🎯 Key Mesh Advantages

  1. True Capability Breakout (+85 pts over local solo models): Small 1B–2B models score 7–26 when evaluated against real execution tests (syntax errors, parameter hallucinations, broken eviction logic). Meepo Mesh reaches 100 by routing code to isolated Qwen, tool calling to pruned LFM, and escalating hard deadlocks to Claude Opus.
  2. Turn 1 Prompt Diet (81% Prefill Reduction): Stripping 15+ unused tool definitions down to the role-specific set reduces prefill tokens from ~7,850 down to ~1,500, preventing CPU timeouts.
  3. 94% API Cost Reduction (Factoring Prompt Cache Hits): Only the 10-15% hardest turns escalate to Cloud, and even those carry pruned 1.5k prompts instead of 7.8k tokens. At an 80% prompt cache hit rate, agent operating cost drops from $42.33 to $2.63 per 1,000 turns.
  4. Effective TTFT Acceleration: Sub-30ms intent routing dispatches work instantly without waiting for a 7,850-token autoregressive prefill.

πŸ”„ Multi-Step Agentic Workflow Stress Test (5 Dependent Stages)

While static benchmarks test isolated trivia, the real "Intelligence Lever" of Meepo is measured across an end-to-end multi-step agent task:
Inspect Test Failure βž” Prune Distractors βž” Patch Code βž” Self-Correct βž” Summarize

bun run benchmark:workflow
System Architecture End-to-End Survival Stage 1 (Plan) Stage 2 (Tools) Stage 3 (Code) Stage 4 (Verify) Stage 5 (Summary) Avg Tokens
Meepo Multi-Brain Mesh 100% 100% 100% 100% 100% 100% 2,200 tok
Solo Qwen 3.5 2B 0% 100% 0% 0% 0% 0% 9,250 tok
Solo LFM 2.5 1.2B 0% 0% 0% 0% 0% 0% 850 tok
Solo Gemma 4 E2B 0% 100% 0% 0% 0% 0% 9,050 tok

Why Solo Models Collapse to 0% Survival:

  1. The Schema Cliff (Stage 2): Under 15 distractor tools, solo models collapse. Qwen wraps tool calls in conversational markdown prose; Gemma provides chat suggestions instead of raw JSON; LFM hallucinates distractor tool names.
  2. The Verification Chasm (Stage 4): Solo Qwen can write code, but has no hands to run bun test or inspect stderr. Without a closed loop, bugs go unnoticed.
  3. Cumulative Probability ($P = p_1 \cdot p_2 \cdot p_3 \cdot p_4 \cdot p_5$): Even if a solo model has a 60% chance per step, $0.6^5 = 7.7%$. By delegating each step to a clean, isolated specialist, Meepo maintains near-100% survival on mechanical agent workflows.

Cold Truth: Solo Qwen 2B vs Meepo Local vs Meepo Hybrid vs Claude Opus

Capability Tier Solo Qwen 3.5 2B Meepo Mesh (100% Local) Meepo Mesh (Hybrid + Cloud) Claude Opus 5.5 Solo
Tier 1: Mechanical Tool Calling (15 MCP Schemas) ❌ 0% (Wraps JSON in prose) 🟒 100% (Von prunes distractors) 🟒 100% 🟒 98%
Tier 2: Single-File Code Syntax (Quickselect AST) 🟒 70% (Strong syntax) 🟒 75% (Zero-noise prompt) 🟒 75% 🟒 95%
Tier 3: Multi-Step Task Survival (5-Stage Loop) ❌ 0% (Fails at Stage 2) 🟒 100% (Assembly line) 🟒 100% 🟒 92%
Tier 4: Closed-Loop Verification (Pass@2 Self-Fix) ❌ 0% (No execution loop) 🟒 85% (LFM tests + Qwen fixes) 🟒 85% 🟒 95%
Tier 5: Deep Architecture & Concurrency (Deadlocks) ❌ 0% (Capacity ceiling) ❌ 10% (Collapses) 🟒 95% (Escalates to Opus) 🟒 95%
Turn 1 TTFT Latency (Intel i5 CPU) 🐒 7,500 ms (Unpruned) ⚑ 28–700 ms (81% Diet) ⚑ 28–700 ms (Local) ⏱️ 2,100 ms (Network)
Operating Cost (per 1,000 Turns) $0.00 $0.00 $2.63 (-94%) $42.33 (Baseline)

πŸ“„ License

Apache-2.0. Copyright (c) 2026 wfzyx.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages