Kantor digital yang sesungguhnya β AI worker orchestration framework
Quick Start β’ Architecture β’ Workers β’ API Keys β’ CLI β’ Credits
KantorKu adalah framework orchestrasi multi-agent LLM yang memodelkan kantor digital sesungguhnya. Daripada satu AI monolitik, KantorKu menggunakan 14 specialized workers yang berkoordinasi melalui Conductor (CEO) β masing-masing dengan model LLM, spesialisasi, dan peran yang berbeda.
Konsep utama: Bayangkan kantor developer sungguhan β ada CEO yang mengatur, programmer frontend/backend, QA, auditor, researcher, dan documentation writer. Mereka rapat, diskusi, dan kerja sesuai tugas masing-masing.
- π§ 14 Specialized Workers β masing-masing dengan model & spesialisasi berbeda
- π Contract-Based Workflow β kontrak formal sebelum eksekusi, dengan approval gates
- π¬ Interactive Questions β AI Manager bisa bertanya dengan pilihan A/B/C/Other (seperti Claude)
- π’ BriefingRoom β tim diskusi sebelum eksekusi dimulai
- πΎ 3-Ring Memory β DuckDB (hot) β SQLite (warm) β Vector DB (cold)
- π DAG Execution β parallel task execution dengan dependency resolution
- π‘οΈ Circuit Breakers β auto-recovery saat provider down
- π° Cost Guard β budget enforcement & real-time cost tracking
- π Full Observability β distributed tracing, spans, metrics
- π 7 LLM Providers β Anthropic, Google, MiniMax, DeepSeek, OpenAI, xAI, Ollama
- π₯οΈ 3-Zone UI β Lobby (Chat), Ruang Kerja (Workers), Dashboard (Monitoring)
- π Undo/Redo β contract action history with undo/redo support
- ποΈ Cache Panel β LLM response cache visualization
- π Per-Worker API Keys β configure provider/model/key per worker
- π€ CLI Tool β interactive setup, chat, worker management
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β KantorKu β
ββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββ€
β web-ui/ β framework/ β
β (Next.js) β (Python) β
β β β
β π₯οΈ Web UI β π Backend engine β
β Dashboard β Workers + Memory + Providers β
β Chat panel β Event bus + DAG + Hooks β
β Monitoring β ββββββββββββ ββββββββββββββββββββ β
β Settings β β tui/ β β interface/ β β
β β β CLI+TUI β β Server+MW+Health β β
β β ββββββββββββ ββββββββββββββββββββ β
ββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββ
β Conductor β β CEO β understands, drafts, orchestrates
β (CEO/Manager) β
ββββββββββ¬βββββββββ
β
ββββββββββββββββββββββΌβββββββββββββββββββββ
β β β
βββββββΌβββββββ ββββββββββΌβββββββββ βββββββββΌββββββββ
β Intake β β BriefingRoom β β GroupChannel β
β (Parse) β β (Team Discuss) β β (Discussion) β
βββββββ¬βββββββ ββββββββββ¬βββββββββ βββββββββ¬ββββββββ
β β β
ββββββββββββββββββββββΌβββββββββββββββββββββ
β
ββββββββββΌβββββββββ
β TodoReview β β Team reviews TODOs
β Phase β
ββββββββββ¬βββββββββ
β
ββββββββββββββββββββββΌββββββββββββββββββββββ
β β β
βββββββΌβββββββ ββββββββββΌβββββββββ ββββββββββΌββββββββ
β DAG β β Context Pool β β Worker Hub β
β Resolver β β (DeepSeek V3.2) β β (P2P DM) β
βββββββ¬βββββββ ββββββββββ¬βββββββββ ββββββββββ¬ββββββββ
β β β
ββββββββββββββββββββββΌβββββββββββββββββββββββ
β
ββββββββββΌβββββββββ
β 14 Workers β β Execute tasks
β (Coding/Verify/ β
β Support/Trans) β
ββββββββββ¬βββββββββ
β
ββββββββββββββββββββββΌββββββββββββββββββββββ
β β β
βββββββΌβββββββ ββββββββββΌβββββββββ ββββββββββΌββββββββ
β Debrief β β 3-Ring Memory β β EventBus β
β (Lessons) β β (Duck/SQLite/Vec)β β (Real-time) β
ββββββββββββββ βββββββββββββββββββ ββββββββββββββββββ
| Worker | Emoji | Model | Role |
|---|---|---|---|
coder_frontend |
π¨ | Claude Sonnet 4.6 | React/CSS/UI specialist |
coder_backend |
βοΈ | MiniMax M2.7 | Python/Rust/Systems |
coder_wiring |
π | Gemini 3.1 Pro | API/WS/MCP/Glue |
| Worker | Emoji | Model | Role |
|---|---|---|---|
verifier_designer |
ποΈ | Gemini 3.1 Pro | Visual/UX judge |
verifier_engineer |
β | MiniMax M2.5 | Logic/test/security |
| Worker | Emoji | Model | Role |
|---|---|---|---|
debugger |
π | DeepSeek V3.2 | Root cause analysis |
scout |
π | Gemini 2.5 Pro | Research & documentation |
auditor |
π | Claude Sonnet 4.6 | Architecture review |
scribe |
π | DeepSeek V4 Flash | Documentation writing |
summarizer |
π | DeepSeek V4 Flash | Context compression |
sentinel |
π‘οΈ | Ollama Llama3 | Error monitoring |
| Worker | Emoji | Model | Role |
|---|---|---|---|
intake |
π | Ollama Llama3 | Message parsing |
narrator |
π | Ollama Llama3 | Output formatting |
| Component | Model | Role |
|---|---|---|
| Conductor | Claude Opus 4.6 | CEO β orchestration |
| Context Pool (x3) | DeepSeek V3.2 | Proactive prefetch |
- Python 3.11+ (untuk framework)
- Node.js 18+ (untuk web-ui & CLI)
- Bun (recommended, untuk web-ui)
git clone https://github.com/Wolfvin/KantorKu.git
cd KantorKuVia CLI (Recommended):
cd framework
pip install -e ".[all]"
kantorku setupVia Environment Variables:
export ANTHROPIC_API_KEY="sk-ant-..."
export GOOGLE_API_KEY="AIza..."
export MINIMAX_API_KEY="..."
export DEEPSEEK_API_KEY="sk-..."
export OPENAI_API_KEY="sk-..."
export XAI_API_KEY="xai-..."cd web-ui
npm install
npm run dev
# Open http://localhost:3000# Terminal 1: Python backend
cd framework
pip install -e ".[all]"
kantorku serve --config kantorku.toml
# Terminal 2: Next.js web-ui
cd web-ui
npm install
npm run devcd framework
pip install -e ".[all]"
kantorku tui # Terminal UI mode
kantorku chat # Chat mode
kantorku --help # All commandsKantorKu mendukung 8 LLM providers. Anda tidak perlu semua β cukup yang Anda gunakan.
| Provider | Env Variable | Workers | Required? |
|---|---|---|---|
| Anthropic | ANTHROPIC_API_KEY |
Conductor, coder_frontend, auditor | β Recommended |
GOOGLE_API_KEY |
coder_wiring, verifier_designer, scout | β Recommended | |
| MiniMax | MINIMAX_API_KEY |
coder_backend, verifier_engineer | Optional |
| DeepSeek | DEEPSEEK_API_KEY |
debugger, scribe, summarizer, Pool | β Recommended |
| OpenAI | OPENAI_API_KEY |
coder_wiring (Codex) | Optional |
| xAI | XAI_API_KEY |
debugger (Grok) | Optional |
| Ollama | (local) | intake, narrator, sentinel | Optional (free, local) |
| Z-AI SDK | (built-in) | Standalone mode | β For web-ui |
Untuk menjalankan KantorKu dengan biaya minimal:
- Z-AI SDK β gratis untuk standalone mode
- Ollama β gratis, jalankan lokal (intake, narrator, sentinel)
- DeepSeek β murah ($0.28/M) untuk support workers
kantorku # Show banner & quick start
kantorku init # Scaffold new project
kantorku setup # Interactive API key wizard
kantorku tui # Terminal UI (Textual)
kantorku chat # Chat with Conductor
kantorku serve # Start Python backend
kantorku dev # Start Next.js web-ui
kantorku worker list # List all workers
kantorku worker show # Show worker details
kantorku status # System health check
kantorku version # Show versionIDLE β MANAGER_THINKING β TEAM_CONSULT β CLARIFYING β
CONTRACT_PRESENTED β TEAM_REVIEW β TODO_REVIEW β
CLIENT_FEEDBACK β WORKING β DONE
Setiap permintaan client melalui alur formal ini β memastikan transparansi, persetujuan, dan kualitas.
| Zone | Panel | Fungsi |
|---|---|---|
| ποΈ Lobby | Panel 1 | Client β Manager chat, Interactive Questions |
| ποΈ Ruang Kerja | Panel 2 | Worker grid, Contract, BriefingRoom, DAG |
| π Dashboard | Panel 3 | Cost, Health, Metrics, Memory, Traces |
KantorKu/
βββ framework/ # Python backend
β βββ kantorku/ # Main package
β β βββ office.py # Office class (entry point)
β β βββ interface/ # Server-side infrastructure
β β β βββ server.py # FastAPI + WebSocket + SSE
β β β βββ middleware.py # Auth, logging, rate-limit, cost guard
β β β βββ health.py # Health monitoring
β β β βββ protocol.py # WS/SSE message protocol
β β β βββ persistence.py # Checkpoint & crash recovery
β β β βββ task_queue.py # Persistent queue + DLQ
β β βββ tui/ # Terminal UI + CLI (merged)
β β β βββ app.py # TUI app (Textual)
β β β βββ cli.py # CLI entry point
β β β βββ connection.py # WS/HTTP/SSE client
β β β βββ commands.py # Slash commands
β β β βββ themes.py # Color schemes
β β β βββ markdown_renderer.py # Rich markdown
β β βββ layers/ # Conductor, BriefingRoom, GroupChannel...
β β βββ workers/ # 14 built-in workers
β β βββ providers/ # 7 LLM providers + router
β β βββ memory/ # 3-Ring memory system
β β βββ pool/ # Context pool
β β βββ events/ # EventBus + EventEmitter
β β βββ redteam/ # Adversarial testing tools
β β βββ worker/ # Base classes + registry
β β βββ config/ # Settings (TOML loader)
β β βββ ... # DAG, hooks, cost, cache, etc.
β βββ workers/ # Worker plugins (SKILL.md + plugin.json)
β βββ examples/ # Usage examples
β βββ tests/ # Test suite
β βββ kantorku.toml # Configuration
β βββ pyproject.toml # Python package
β
βββ web-ui/ # Next.js frontend (Web UI)
β βββ src/
β β βββ app/ # Next.js App Router + API routes
β β βββ components/ # UI components (kantorku/ + shadcn/ui)
β β βββ hooks/ # Custom React hooks
β β βββ lib/kantorku/ # Types, store, workers data, API client
β βββ package.json
β βββ ...
β
βββ docs/ # Documentation
βββ .github/ # CI/CD, issue templates
βββ CREDITS.md # Credits & acknowledgments
βββ CHANGELOG.md # Version history
βββ CONTRIBUTING.md # Contribution guidelines
βββ CODE_OF_CONDUCT.md # Code of conduct
βββ SECURITY.md # Security policy
βββ README.md # This file
βββ LICENSE # MIT
βββ .gitignore
| Technology | Purpose |
|---|---|
| Next.js 16 | React framework with App Router |
| React 19 | UI component library |
| TypeScript (strict) | Type-safe code with noImplicitAny |
| Zustand | State management with persistence |
| shadcn/ui | UI primitives (Radix-based) |
| Tailwind CSS 4 | Utility-first styling |
| Recharts | Data visualization |
| react-markdown | Safe markdown rendering (XSS-safe) |
| Framer Motion | Animations |
| Lucide | Icon library |
| Technology | Purpose |
|---|---|
| FastAPI | Async web framework |
| Uvicorn | ASGI server |
| Pydantic | Data validation |
| DuckDB | Ring 1 memory |
| aiosqlite | Ring 2 memory |
| httpx | Async HTTP client |
| Strategy | Implementation |
|---|---|
| Model routing | Cheap workers (Ollama) for simple tasks, expensive (Claude) for reasoning |
| Circuit breaker | Auto-switch provider when one is down |
| Cost guard | Middleware blocks requests when budget exceeded |
| LLM cache | Avoid redundant API calls |
| Context pool | Prefetch once, reuse many times |
Estimated costs per task (with full team):
- Simple task: ~$0.01-0.05
- Moderate task: ~$0.05-0.20
- Complex task: ~$0.20-1.00
MIT License β see LICENSE for details.
See CREDITS.md for full acknowledgments and source repositories.
"Kantor yang sesungguhnya bukan soal gedung β tapi soal orang-orang yang bekerja bersama."