Microverse

MicroverseSelf-sustaining AI agent engine

version 0.1.0
subsystems 8
type errors 0
April 2026
Scroll to explore
0
Subsystems
0
Source Files
0
Lines Written
0
PRDs Complete
0
Codebases Studied
0
Issues Resolved
Architecture

One API. Many models. Smarter than any of them alone.

Consumer App
Nexus Gateway — auth, routing, cost tracking
Model Router (microverse-1)
Memory Recall
Context Compactor
Plugin Hooks
QueryEngine — agent loop
Tool Executor
Coordinator
Event Log
Claude
GPT
Gemini
Ollama
Subsystems

Seven organs. One body. Each transplantable.

1

QueryEngine production

core/query-engine.ts — 230 lines

The agent loop. Async generator streaming with parallel tool execution, event sourcing for every state transition, and abort-safe turn management.

async generatorevent sourcingmax turnsabort signals
2

Tool System production

tools/ — 9 files, 6 built-in tools

buildTool() factory with Zod v4 schemas. Parallel execution, turn-level caching, per-tool timeouts. Path security guards block access to sensitive directories.

FileReadFileWriteFileEditBashGrepGlobPathGuard
3

Context Compactor production

context/compactor.ts — 380 lines

Five-tier compression. Semantic priority scoring ensures user corrections survive while boilerplate dies first. Pinned messages are immortal. Archive allows re-expansion.

proactivemicroreactivetrimmedemergencypinningarchive
4

Memory Engine production

memory/engine.ts — 430 lines

Extract patterns from every conversation. Recall with relevance scoring. Dream during idle to consolidate, merge duplicates, and resolve contradictions. Confidence decays over time.

extractionrecalldreamingconfidence decaycontradictionproactive surfacing
5

Coordinator production

coordinator/coordinator.ts — 360 lines

Multi-agent orchestration via task dependency graphs. Topological sort for execution order. Semaphore concurrency. Cascade failure. Agent-to-Agent message bus.

task DAGcycle detectionsemaphorecascade failureA2A protocol
6

Plugin System production

plugins/loader.ts — 280 lines

Plugin manifest loading. Skill discovery from markdown frontmatter. Hook registration with priority ordering. Hot-reload without restart. Standalone skill file support.

manifestsfrontmatterhookshot reloadstandalone skills
7

Model Router production

router/model-router.ts — 320 lines

The composite LLM. Classifies tasks, routes to optimal model, tracks costs, runs multi-model consensus for critical decisions. Implements LLMAdapter as drop-in "microverse-1".

task classifierrouting rulescost trackingconsensusmulti-provider
8

AutoDebugger PRD ready

docs/prd/08-auto-debugger.md — 320 lines spec

Self-healing code engine. 5-phase pipeline: detect, localize (SBFL + traces + git history), repair (self-debug + multi-attempt + model escalation), validate, and learn. Memory-integrated bug prevention.

SBFLtrace analysisself-debuggit blamemodel escalationpattern learningproactive prevention
Intelligence

Five codebases dissected. Every pattern extracted.

Anthropic

Claude Code

Decompiled v2.1.88. 163K lines. Agent loop, streaming tools, autoDream, context compaction, plugin system.

OpenAI

Codex

Apache 2.0. TS + 40 Rust crates. 4-crate sandboxing, V8 isolates, cloud tasks, OTel tracing.

Google

Gemini CLI

Apache 2.0. TS monorepo. Core/CLI/SDK split, A2A protocol, VS Code companion.

Community

open-multi-agent

MIT. DAG scheduler, agent pools, semaphore concurrency, message bus, multi-model teams.

Community

claw-code

Clean-room Python + Rust rewrites. Detailed PARITY.md gap analysis. ~20-40% parity.

Roadmap

What comes next. In order.

Wire Nexus as microverse-1 backend

Route model="microverse-1" through the full pipeline. Per-app memory namespaces. Every app in the ecosystem becomes instantly smarter.

Test suite

Unit + integration tests for all 7 subsystems. Vitest configured. Every bug fix starts with a failing test.

OpenAI + Ollama adapters

Make microverse-1 truly multi-model. GPT for reasoning diversity, Ollama for zero-cost local operations and privacy.

Embedding-based memory recall

Replace keyword matching with vector similarity. OllamaEmbedder + SQLite-vec. Semantic search across all memories.

Hook execution + CLI wrapper

Execute plugin hooks via child_process. Build a terminal interface for direct Microverse usage.