Skip to content
Huang Anping edited this page Jun 2, 2026 · 4 revisions

MOSAIC Wiki

🌐 语言 / Language: English · 中文

MOSAIC — an A-share self-improving multi-agent quantitative trading framework, inspired by ATLAS. It runs a hybrid architecture: heavy logic (numpy/pandas/git/SQLite/market data) lives in a Python sidecar; orchestration, LLM, CLI and TUI live in a TypeScript front-end. The two halves talk over line-delimited JSON-RPC over stdio.

This wiki is generated from and cross-checked against the actual code. Where a fact comes from a specific file, the path is cited so you can verify it.

Contents

  • Architecture — the hybrid sidecar/front-end split, the JSON-RPC bridge, repo layout.
  • Getting Started — install (uv + pnpm), optional extras, .env, first run.
  • CLI Reference — every pnpm dev <command> and its subcommands.
  • Bridge RPC — the full @method surface by namespace.
  • Agents — the 4-layer, 25-agent decision graph.
  • Data Layer — qlib local reader, ingest, vendored collectors, ETF routing.
  • Self-Improvement — Autoresearch / PRISM / JANUS / MiroFish.
  • Scorecard & Paper Trading — scoring, win-rate, Darwinian weights, the paper engine.
  • TUI — the read/edit Ink dashboard and its tabs.
  • ConfigurationMosaicConfig, persistence, env overrides.
  • Contributing — branch naming, the verification matrix, PR conventions.

At a glance

Aspect Summary
Decision graph 4 layers, 25 agents (10 macro → 7 sector → 4 superinvestor → 4 decision), orchestrated by LangGraph.js as one daily cycle
Self-improvement Autoresearch rewrites prompts on git branches and keeps/reverts by ΔSharpe
Multi-regime PRISM trains across 7 market-regime cohorts; JANUS meta-weights across them
Reflexive sim MiroFish forward-simulates scenarios (Monte-Carlo default, opt-in swarm engine)
Backtest / paper qlib two-stage vectorized backtest + a bespoke paper-trading engine (T+1, commission)
Languages Python ≥3.10 sidecar · Node ≥22 + TypeScript front-end
License Apache-2.0 (vendored qlib collector deps remain MIT — see Data Layer)

Source of truth

The canonical design/phase document is mosaic-tsplan.md at the repo root. The READMEs (root, mosaic-ts) cover quick usage. This wiki expands on both and keeps every claim tied to code.

Clone this wiki locally