Kairo is a premium, local-first No-Code ML Studio and Autonomous ML Research OS. It manages the complete machine learning lifecycle on behalf of the user—from a natural-language goal input to generating code, installing hardware-optimized dependencies, running training loops, evaluating results, and outputting reports.
Kairo utilizes a decoupled, dual-process supervisor-agent architecture to combine a high-performance native desktop GUI with flexible, data-science friendly Python execution.
graph TD
UI[React + TS Frontend] <-->|Tauri IPC Commands / Events| Rust[Tauri Rust Supervisor]
Rust <-->|JSON-lines over stdin/stdout| Daemon[Python Agent Daemon]
Daemon -->|Manages| Env[Project-Specific venv]
Daemon -->|Routes LLM calls| GW[LLMGateway]
Daemon -->|Invokes Tools| Reg[ToolRegistry]
-
Tauri Rust Supervisor (
src-tauri):- Manages lifecycle processes and environment creation.
- Spawns the python agent daemon, reads stdout events line-by-line, and propagates them as async IPC events to the UI.
- Manages project CRUD operations, secure API keyring storage, and system hardware profile detection.
-
Python Agent Daemon (
agent/):- Spawns as a single persistent daemon (
kairo_agent.py). - Communicates with the Rust supervisor using streaming JSON-line Events (e.g.
thinking,artifact,action_gate,preference_question).
- Spawns as a single persistent daemon (
-
React TypeScript Frontend (
src/):- Displays the Claude-style streaming chat interface, interactive Action Gates (for Human-in-the-Loop approvals), and dynamic training metric charts.
- Leverages Zustand for project-level state management and Monaco Editor for real-time code viewing.
ProjectStore: The sole module responsible for workspace database files, project metadata serialization, and folder structure.EnvManager: Detects system hardware capabilities (CUDA / ROCm / Apple Silicon / CPU) and manages project-specific virtual environments (venv) and dependency installation.AgentRunner: The core state machine driving the agent lifecycle (Intake → Preference Grill → Code Gen → Install Gate → Execution Gate).ToolRegistry: Unified interface mapping built-in utilities, MCP servers, and skill packages into a single execution registry.LLMGateway: Abstract LLM provider router built onLiteLLM. It supports 11+ providers (Ollama, Claude, GPT, Gemini, Groq, etc.) while automatically resolving system provider prefixes.
- Node.js (v18 or higher) and
npm - Rust compiler & Cargo (v1.75 or higher)
- Python (v3.11 or newer)
- Ollama (Optional, for running offline models locally)
- Clone the repository and navigate into the workspace.
- Install frontend Node dependencies:
npm install
- Start the Tauri development environment (this automatically builds the Rust backend and launches the React Vite server):
npm run tauri dev
Kairo runs an onboarding setup wizard on its first launch to validate system Python and bootstrap its environment. If you want to clear your local state, database, environments, and logs to check the onboarding flow from scratch:
# Stop the running application, then run:
rm -rf ~/.local/share/com.kairo.appKairo uses the LLMGateway powered by LiteLLM to support a wide range of LLMs.
When utilizing a local Ollama instance:
- Ensure Ollama is running (
ollama serve). - Input your model name (e.g.,
qwen3:8borllama3.1). - Set the Base URL to your Ollama endpoint (default:
http://localhost:11434). - Kairo automatically formats and prepends the required provider prefix (
ollama/) to the model string before dispatching it toLiteLLM.
Before committing, ensure both frontend and backend tests pass:
# Check TypeScript compilation
npx tsc --noEmit
# Run Rust backend test suite
cargo test --manifest-path src-tauri/Cargo.toml├── agent/ # Python Agent Daemon logic
│ ├── kairo_agent.py # Entry point / operation dispatcher
│ ├── agent_runner.py # Stage / phase manager state machine
│ ├── llm_gateway.py # LiteLLM routing & model prefixing
│ ├── env_manager.py # Hardware profile detection & venv management
│ ├── tool_registry.py # Built-in, MCP, and Skill tool mapper
│ └── requirements.txt # Python dependencies
├── docs/ # Product & technical documentation
│ ├── CONTEXT.md # Domain model & glossary (single source of truth)
│ └── walkthrough.md # Gap analysis & status walkthroughs
├── src-tauri/ # Rust supervisor & native Tauri commands
│ ├── src/lib.rs # IPC command orchestrator
│ └── Cargo.toml # Rust dependencies
└── src/ # React UI frontend
├── src/store/ # Zustand store (projectStore.ts)
├── src/pages/ # Main application page controllers
└── src/styles/ # Modular CSS stylesheets