Architecture
Architecture
┌──────────────────────────────────────────────┐
│ Layer 1 · Agent Brain │
│ planning · state machine · sub-agents │
└──────────────┬───────────────────────────────┘
┌──────────────▼───────────────────────────────┐
│ Layer 2 · Developer Tools │
│ file CRUD · diff/undo · code index │
└──────────────┬───────────────────────────────┘
┌──────────────▼───────────────────────────────┐
│ Layer 3 · Model Ecosystem │
│ cloud 16+ providers · local Ollama/LM Studio │
└──────────────┬───────────────────────────────┘
┌──────────────▼───────────────────────────────┐
│ Layer 4 · Safety System │
│ sandbox · egress guard · confirm · rollback │
└──────────────────────────────────────────────┘
Module map
wow_agent/
├── agent.py # core loop + state machine
├── cli.py # entry point, commands
├── config.py # providers, env
├── indexer.py # AST code index
├── tools.py # tool schema + executors
├── subagent.py # isolated research/review agents
├── todo.py # task tree
├── memory.py # long-term memory
├── undo.py # snapshots & rollback
├── mcp.py # MCP protocol
├── session.py # persistence
├── i18n.py # en/zh strings
└── ui.py # Rich terminal UI
Design principles
- Pure Python, minimal deps — starts in under a second
- Terminal-native UI — Rich output, prompt_toolkit input
- Local-first — no telemetry; offline capable
- Safety by default — sandbox on until you opt out
- Extensible — JSON-schema tools, MCP servers