Distributed Cognitive Mesh · On-Chain Verified

SHINGEKI

Agents that always move forward.
A distributed cognitive mesh where AI nodes compete, evolve, and log every decision on-chain — fully verifiable, unstoppable.

Node Capacity
0G
Log Store
TEE
Verified
≥22
Node.js
01 — Intelligence Superiority

What makes it
different.

Every other framework runs one LLM after another on a fixed track. Shingeki distributes, competes, and evolves — on verifiable infrastructure.

Framework Architecture Evolution Verified
LangChain Single chain, single node Static prompts — None
AutoGen Agent pairs, static roles Static — None
CrewAI Fixed crew, sequential Static — None
Shingeki Distributed mesh Genome-driven (live TEE scoring) TEE ✓ + 0G Log

How it
works.

Three interlocking systems: a living genome, a competitive mesh, and a relentless fitness engine that never lets quality slip.

01
System 01
Genome
Every node carries a genome — a config object holding model, strategy, tools, reflection depth, and mutation rate. The genome is the agent's identity.

Starts from agentmesh.example.yaml and mutates automatically when output quality drops below threshold.
Model Strategy Mutation Rate Reflection Depth
02
System 02
Mesh
The orchestrator dispatches plan steps across nodes over WebSocket. Step 1 runs on all nodes in parallel — a fitness scorer picks the winner. Subsequent steps use round-robin + domain-aware routing.

Nodes advertise specializations like research or planning.
WebSocket Parallel Round-Robin Domain Routing
03
System 03
Evolution
After every step, a two-path fitness scorer evaluates output: a fast heuristic pre-filter, then a TEE-verified LLM judge. If quality drops, the genome mutates.

Every mutation is recorded to the lineage store, visible live in the browser viewer.
Heuristic TEE Judge Lineage Store Live Viewer

Architecture.

Three views of the same system — from high-level flow, to execution sequence, to a full layer-by-layer breakdown.

Flow Chart
Execution Sequence
Layer Reference
Entry Points
CLI
npm run demo / hub / node / run
POST /api/run
MeshHub HTTP
Programmatic SDK
import from 'shingeki'
Planner
planTask / splitCompoundTask
detects compound tasks · infers domain per step (research · planning · coding · defi)
Presets
planResearchAnalyzeDecide · planJapanTrip · defiPlan
MeshOrchestrator
Step 1 → PARALLEL competition
all available nodes race · best score wins
Steps 2–N → round-robin
domain-aware routing · retry fallback
Crash recovery
writeCheckpointAtomic · resume --resume task-id
NodeRuntime
executes one plan step
builds prompt with prior context · calls 0G Router
Uniswap Tool
scans LLM output for {tool:uniswap_quote,...} · executes if found
0G Network
0G Router
LLM inference · provider sort: latency · verify_tee: true always on
0G Log Store
per-step trace · input · output · TEE flag · rootHash · append-only
0G KV Store
final genome checkpoint after task completes
Genome (Agent Identity)
id · model · strategy · tools · reflection_depth · mutation_rate
Fitness Scorer — two paths
① Heuristic: length · bullets · numbers · domain keywords (0 tokens)
② LLM Judge: ~128 tokens · verify_tee:true (score < 0.55 only)
Genome Mutator
cycles: prompt → model → strategy · recorded in lineage store
Uniswap Trade API
POST /v1/quote
BEST_PRICE routing · UNISWAPX_V2 · V4 · V3 · V2
POST /v1/swap
build calldata · not submitted — returned to wallet
POST /v1/check_approval
approval tx or null · Dutch guard: classic only in MVP
Distributed Coordination
MeshHub
WebSocket + HTTP · /health /ready /metrics /status /lineage /viewer
Worker Nodes
NODE_ROLE: executor · critic · reasoning · memory · general
AXL P2P Transport
Gensyn sidecar · HTTP /topology /send /recv · AXL_ENABLED=true
Lineage Viewer
localhost:8765/viewer
live genome mutation tree
fitness bars per step
TEE verification badges
parent→child arrows
User
Planner
Orchestrator
Node 1
(research)
Node 2
(research)
0G Router
+ TEE
Fitness
Scorer
task prompt / preset
Plan [step1…stepN] + domain tags
par — Competition (step 1)
execute step 1
LLM call (verify_tee:true)
text + tee_verified
StepResult
winner = N1 (heuristic 0.85)
append step 1 trace + rootHash → 0G Log Store
alt — genome has uniswap tool + output contains tool call JSON
POST /v1/quote + /v1/swap
tx calldata + approval
alt — heuristic score < 0.55
LLM judge
{score, reason} → mutate genome
write final genome → 0G KV Store
final step output
Layer What it does
Planner Splits any free-form task into steps, tags each with a domain
MeshOrchestrator Runs step 1 as a parallel competition across all nodes; steps 2–N route to domain specialists with retry fallback
Genome Each agent's identity — model, strategy, tools, mutation rate; evolves automatically when output quality drops
Fitness Scorer Two-path: fast heuristic (0 tokens) pre-filters every step; LLM judge (~128 tokens, TEE-verified) fires only below threshold TEE
Genome Mutator On low score: cycles prompt → model → strategy; every mutation recorded to lineage store
NodeRuntime Executes one plan step — builds prompt with prior context, calls 0G Router, runs Uniswap tool if output contains a tool call
0G Router TEE-backed LLM inference — every call cryptographically attested, fastest provider selected automatically TEE ✓
Uniswap Tool LLM embeds {"tool":"uniswap_quote",...} in output; runtime detects it, calls Trade API, appends quote + swap tx to result
0G Log Store Append-only per-step trace — input, output, TEE flag, root hash; anyone can verify what ran Tamper-proof
0G KV Store Final genome checkpoint written after every completed task
MeshHub WebSocket + HTTP coordination hub for distributed mode — /health, /metrics, /lineage, /viewer, POST /api/run
AXL Transport Peer-to-peer alternative to WebSocket hub via Gensyn sidecar — no central broker P2P
Lineage Viewer Browser UI at /viewer — live tree of genome mutations, fitness bars, TEE badges, parent→child arrows

Quick
Start.

Get up in two commands. Or spin up a full distributed mesh across 4 terminals.

Node.js ≥ 22
ROUTER_API_KEY
npm ≥ 8
shingeki — bash
Local Mode
Distributed Mesh
Resume / Presets
# Prerequisites: copy .env.example → .env, fill ROUTER_API_KEY
$cd shingeki
$cp ../.env.example ../.env  # edit ROUTER_API_KEY
$npm install
# Run with 2 in-process nodes
$npm run run
# Terminal 1 — coordination hub (opens lineage viewer)
$npm run hub
# Terminal 2 — worker A (research specialist)
$NODE_ID=node-1 NODE_ROLE=executor NODE_SPECIALIZATION=research npm run node
# Terminal 3 — worker B (planning specialist)
$NODE_ID=node-2 NODE_ROLE=reasoning NODE_SPECIALIZATION=planning npm run node
# Terminal 4 — orchestrator
$npm run run -- --mesh
# Japan trip preset
$npm run run -- --preset japan
# Resume after crash
$npm run run -- --resume task-1746000000000
# Lineage viewer opens automatically at:
 http://localhost:8765/viewer

Tamper-proof
by design.

Every inference call, every fitness score, every genome mutation — anchored on 0G's decentralized infrastructure. Any participant can verify what ran, on what model, and with what result.

Router
0G Router
Every LLM step and fitness evaluation judge. TEE signature + fastest-provider routing always on.
Log Store
Trace Log
Per-step execution trace — input, output, TEE flag, rootHash — append-only after each step.
KV Store
Genome KV
Final genome state checkpoint written to 0G KV Store after finalize(). Crash-safe and verifiable.