Multi-agent system that plans, executes, and quality-checks your tasks β with on-demand agent lifecycle, hybrid memory, and structured protocols.
Three specialized agents (Leo π§ planner, Jerry π€ executor, Alic ποΈ reviewer) collaborate via file-backed coordination, self-claim tasks, peer-review outputs, and evolve on performance drops. LazyRuntime starts agents on demand, saving ~600MB when idle.
User βββΊ Telegram / Discord / ι£δΉ¦ / Slack / HTTP API / Dashboard
β
βΌ
Orchestrator
ββ TaskRouter βββΊ DIRECT_ANSWER (Leo only)
β MAS_PIPELINE (Leo β Jerry β Alic β Leo)
ββ LazyRuntime ββ on-demand agent processes
ββ TaskBoard ββββ file-locked JSON state machine
β
ββββββββββΌβββββββββ
βΌ βΌ βΌ
Leo π§ Jerry π€ Alic ποΈ (independent OS processes)
β β β
βΌ βΌ βΌ
MiniMax LLM Β· HybridMemory Β· EpisodicMemory Β· ContextBus
| Agent | Role | Tools | Model |
|---|---|---|---|
| Leo | Planner β route, decompose, synthesize | minimal |
MiniMax-M2.5 |
| Jerry | Executor β code, search, build | coding |
MiniMax-M2.5 |
| Alic | Reviewer β 5-dimension scoring, quality reports | minimal |
MiniMax-M2.5 |
curl -fsSL https://raw.githubusercontent.com/createpjf/cleo-dev/main/install.sh | bash
# or
git clone https://github.com/createpjf/cleo-dev.git && cd cleo-dev && bash setup.shcleo # interactive chat
cleo run "your task" # one-shot
cleo gateway start # dashboard at http://127.0.0.1:19789
cleo doctor # system health checkThree modes, switchable via config/agents.yaml:
| Mode | How it works | Status |
|---|---|---|
lazy |
Only always_on agents start; others launch on demand when TaskBoard has matching pending tasks. Idle agents auto-stop after idle_shutdown seconds. |
Active |
process |
One mp.Process per agent, all start upfront. |
Stable |
in_process |
asyncio.Task per agent, single process. |
Experimental |
File-locked JSON (.task_board.json) with state machine:
pending β claimed β review β completed
β
critique β claimed (rework)
Role-based routing via _ROLE_TO_AGENTS mapping. Timeout recovery: claimed > 180s or review > 300s β auto-reset to pending.
- SubTaskSpec β Leo β Jerry task ticket: objective, constraints, tool_hint, complexity
- CritiqueSpec β Alic's 5-dimension review: accuracy (30%), completeness (20%), technical (20%), calibration (20%), efficiency (10%)
- TaskRouter β Heuristic classifier: signal words β
DIRECT_ANSWERvsMAS_PIPELINE
| Layer | Module | Description |
|---|---|---|
| Hybrid Search | adapters/memory/hybrid.py |
ChromaDB vectors + self-contained BM25 with RRF fusion |
| Episodic Memory | adapters/memory/episodic.py |
3-layer progressive: L0 atomic (~100 tok) β L1 overview (~500 tok) β L2 full detail |
| Knowledge Base | adapters/memory/knowledge_base.py |
Shared Zettelkasten-style notes + insights |
| Context Bus | core/context_bus.py |
4-layer KV store (TASK/SESSION/SHORT/LONG) with TTL |
| Memory Consolidation | adapters/memory/consolidator.py |
3-phase pipeline: cluster old episodes (>3d) β compress β promote to KB |
Two-stage quality scoring for every task:
- Baseline β Agent self-assigns at episode creation (
success=8, partial=5, other=2) - Critique backfill β Alic's score retroactively written to evaluated agent's episode via
update_episode_score()
Real-time token streaming for chat responses:
- Per-task
.streamfiles with lockless append + cursor-based reads GET /v1/stream/:task_idβ Server-Sent Events endpoint- Auto-cleanup on task complete/fail/cancel
Web UI at http://127.0.0.1:19789:
- Session sidebar β multi-session conversation management
- KB grid β horizontal 2-column layout with scrollable cards
- Tab badges β live count indicators on Episodes/Cases/KB tabs
- Episode table β score + timestamp columns
- Daily log β auto-filters tool call artifacts
- SSE streaming β real-time token-by-token chat display
web Β· fs Β· memory Β· task Β· automation Β· skill Β· browser Β· media Β· messaging Β· a2a
Access control: profiles (minimal / coding / full) + per-agent allow/deny lists. Audit log at .logs/tool_audit.log.
generate_doc supports 8 output formats: PDF, DOCX, XLSX, PPTX, CSV, TXT, MD, HTML.
| Channel | Auth | Config |
|---|---|---|
| Telegram | Pairing code | TELEGRAM_BOT_TOKEN |
| Discord | Pairing code | DISCORD_BOT_TOKEN |
| Feishu | Pairing code | FEISHU_APP_ID + FEISHU_APP_SECRET |
| Slack | Pairing code | SLACK_BOT_TOKEN + SLACK_APP_TOKEN |
5-dimension EMA scoring: new = 0.3 Γ signal + 0.7 Γ old. Composite = weighted sum. Optional blockchain sync to ERC-8004 registry.
Cross-provider LLM failover: MiniMax β OpenAI β Ollama. Strategies: latency / cost / preference / round_robin. Circuit breaker per provider.
Gateway on port 19789 (+ WebSocket on 19790). Auth: Authorization: Bearer <token>.
| Method | Endpoint | Description |
|---|---|---|
| POST | /v1/task |
Submit task |
| GET | /v1/task/:id |
Task status |
| GET | /v1/status |
Full task board |
| GET | /v1/scores |
Reputation scores |
| GET | /v1/agents |
Agent info |
| GET | /v1/doctor |
Health check |
| GET | /v1/skills |
Skill list |
| GET | /v1/usage |
Token usage |
| GET | /v1/memory/* |
Memory status / episodes / cases |
| GET | /v1/chain/* |
Blockchain status / balance |
| POST | /v1/cron |
Create scheduled job |
| GET | /v1/stream/:id |
SSE token stream |
| GET/POST | /v1/sessions |
Dashboard sessions |
| GET/PUT/DELETE | /v1/sessions/:id |
Session CRUD |
| GET | /health |
Gateway health |
30+ endpoints total β see ARCHITECTURE.md for the full list.
All config in config/agents.yaml:
runtime:
mode: lazy
always_on: [leo]
idle_shutdown: 300
llm:
provider: minimax
memory:
backend: hybrid
embedding:
provider: chromadb_default
episodic:
enabled: true
knowledge_base:
enabled: true
channels:
telegram:
enabled: true
auth_mode: pairingSee ARCHITECTURE.md for full config reference.
cleo-dev/
βββ main.py # CLI entry
βββ config/agents.yaml # All configuration
βββ core/
β βββ orchestrator.py # Task lifecycle engine (~1900 lines)
β βββ agent.py # BaseAgent + AgentConfig
β βββ runtime/ # ProcessRuntime / LazyRuntime / InProcessRuntime
β βββ task_board.py # File-locked task state machine
β βββ context_bus.py # Layered KV store
β βββ protocols.py # SubTaskSpec, CritiqueSpec, ToolCategory
β βββ task_router.py # DIRECT_ANSWER vs MAS_PIPELINE
β βββ tools.py # 37 built-in tools
β βββ gateway.py # HTTP REST API (30+ endpoints)
β βββ ws_gateway.py # WebSocket 1Hz state push
β βββ provider_router.py # Cross-provider LLM failover
β βββ cron.py # Scheduled jobs
β βββ doctor.py # Health check + auto-repair
βββ adapters/
β βββ llm/minimax.py # MiniMax SSE streaming + truncation recovery
β βββ memory/ # hybrid, episodic, embedding, consolidator
β βββ channels/ # manager, telegram, discord, feishu, slack
β βββ memo/ # Memo Protocol integration
βββ reputation/
β βββ scorer.py # 5-dim EMA scoring
β βββ textgrad.py # TextGrad critique β skill patches
βββ skills/ # 56+ hot-reload markdown skills
βββ tests/ # 399 tests
βββ cli/memo_cmd.py # Memo CLI
βββ docs/ # Architecture + product docs
βββ ARCHITECTURE.md
βββ Cleo_V0.01_Product_Logic.md
βββ Cleo_V0.01_Product_Narrative.md
βββ Cleo_V0.01_Technical_Architecture.md
- Python 3.11+
- One LLM API key (MiniMax, OpenAI, or local Ollama)
Core: pyyaml filelock requests chromadb websockets
Optional: python-telegram-bot Β· discord.py Β· web3 Β· rich Β· python-pptx Β· slack-sdk
- ARCHITECTURE.md β Full technical architecture with code details
- Product Logic β Product design and decision logic
- Product Narrative β Product vision and narrative
- Technical Architecture V0.01 β Original technical architecture
MIT