Skip to content
← ProjectsAIDevOpen source

The OS for AI-assisted development: from idea to deploy, under control.

Role
Founder — architecture and dev
Period
2025 — 2026
Context
Open-core product
Koklo

12

Rust crates

4

LLM providers

AGPLv3

core licence

1

cockpit instead of 14 tools

Context

Developers juggle a dozen tools with no AI governance and no link between what was asked of the agent and what ships.

The challenge

Unify the lifecycle in one cockpit, work with any LLM, and cleanly separate the open-source core from the enterprise edition.

  1. 01AI

    LLM gateway

    `providers` crate: Claude Code, Codex, OpenRouter and Ollama behind one interface, agents defined in Markdown.

  2. 02Dev

    Workflow engine

    DAG pipelines, agent runtime, event bus and sandboxed shell in a layered Rust workspace.

  3. 03Dev

    Desktop + CLI

    Tauri 2 / React app and a ratatui TUI CLI, shared TypeScript packages (ui, tRPC client).

  4. 04Ops

    Verified open-core

    A CI script ensures the AGPLv3 code never references the enterprise edition (SSO, audit, on-premise).

Architecture

Stack

  • Rust
  • Tauri
  • React
  • TypeScript
  • SQLite
  • AOAgents & orchestration
  • OpenRouter / Mistral
  • Ollama
  • GitHub Actions

Results

  • ✦Core reused and narrowed down in koklo-cli
  • ✦Dedicated product site, docs and design system

The story

The screens below come from Koklo’s design system (the Storybook), with demo data. The components are then copied into the desktop app, which today wires the Sessions and Transcript screens to the Rust runtime through Tauri commands.

How it works

1. The project as the entry point

Project home in Koklo: counters for sprints, tickets and running agents, quick actions and activity feed
The project home puts AI sessions, commits, tickets and deploys in a single feed: that is where the cockpit starts.

You open a project, not a file. The home screen shows what is moving: active sprints, open tickets, running agents. The activity feed puts an AI proposal, a push, a ticket moved to review and a staging deploy on the same level. That is the starting idea of Koklo: stop rebuilding the history of a feature from four different tools.

2. A phased workflow with human gates

BMAD workflow at phase 2 of 5: the Architecture phase waits for human approval with Validate Phase and Request Changes buttons
A human gate mid-run: the architect agent has handed in its work, and nothing moves on to implementation without a click.

A request goes through a workflow preset. The engine knows ten of them: SDD (spec, plan, implement, test, review), eight-phase BMAD, GitHub Spec Kit, bugfix, release, review only, audit only… Each phase is handled by an agent defined in Markdown. At the end of a phase, the engine stops and asks for a decision. Here the architect has handed in its analysis: I can approve, request changes, or edit the file before resuming.

Workflows screen: three recent runs, the detail of a seven-phase SDD Strict preset and the Docs phase output
Each run keeps a record of its phases, the agent behind each one and the file it produced: you can reread what was approved, and by whom.

The Workflows screen keeps the history. For each run you get the phases, the agent, the status and the file produced. The note at the bottom of the right column sums up the rule: an output stays a proposal until its phase is approved.

3. Tickets linked to code

Sprint Kanban board with a ticket open on the right: linked AI sessions, linked commits and activity
The ticket is the pivot of traceability: it links conversations with the agent to the commits that came out of them.

The sprint board is standard. What changes is the ticket panel: linked AI sessions, linked commits, activity log. On the Rust side, ticket-system stores tickets in SQLite and can attach a session to a ticket (link_session).

4. Any LLM

Settings, AI accounts tab: Koklo Gateway, Anthropic, OpenAI and OpenRouter with their status and selected model
Providers are configured in one place, each with its status and model: the agent does not know which LLM it runs on.

AI accounts are set in the settings. The providers crate puts Claude Code, Codex, OpenRouter and Ollama behind one trait. Agent CLIs reuse the subscription you already have, with no key. Ollama lets everything run locally.

5. Constellation, still a mockup

Constellation view mockup: Git branches as curves, AI session, decision and deploy nodes, and the causal trace of a commit
The Constellation view mockup: clicking a commit walks back to the AI session that proposed it and the human gate that accepted it.

The Constellation view is the most ambitious one: a map of the Git history where each commit is linked to the AI session that proposed it and the human decision that accepted it. For now it exists as an HTML mockup. On the roadmap it comes in phase 9.

Under the hood

A gate, from phase to decision

What the orchestrator does at the end of every phase

The PipelineOrchestrator does not know who will decide. It publishes a GateRequired event on the bus, then hands a GateDisplay (phase, tokens, cost) to a GateHandler. There are three of them: one reads stdin for CI, one approves everything for benchmarks, and one goes through a channel to the TUI. The decision is written to the database before GateResolved announces it. A rejection or an edit pauses the session, and koklo resume picks it up later.

Picking a provider with zero setup

The detection order in crates/providers/src/detect.rs

On first run, nothing is imposed. Detection takes the first provider that is actually ready. The detail that matters: an Ollama server that runs without the wanted model is skipped, otherwise the first run would fail. Once a provider is chosen, a FallbackProvider can chain a second one.

crates/providers/src/fallback.rs
/// Returns `true` for errors that justify trying the fallback provider.
pub fn is_fallback_worthy(e: &ProviderError) -> bool {
    match e {
        ProviderError::CliNotInstalled { .. } => true,
        ProviderError::CliSessionExpired { .. } => true,
        // Ollama is reachable but the configured model isn't pulled — another
        // configured provider may be ready, so try it rather than hard-failing.
        ProviderError::OllamaModelNotFound { .. } => true,
        ProviderError::PtyUnavailable => true,
        ProviderError::RateLimited { .. } => true,
        ProviderError::Timeout { .. } => true,
        ProviderError::HttpError { status, .. } => *status >= 500,
        // EmptyResponse, MissingApiKey, UnknownProvider → don't fallback
        _ => false,
    }
}

The list of errors that justify a fallback is short on purpose. A rate limit, a timeout, a 5xx or a missing CLI: try the next one. A missing key or an empty response: stop, because another provider would hide a real configuration problem.

The open-core boundary

The core is AGPLv3, the enterprise edition lives in another repository. A CI script checks that no Rust or TOML file in the core references it:

scripts/check-boundary.sh

What I take away

  • Human gates live in a single function, on purpose: one place publishes, records and decides. The rest of the engine does not know whether it talks to a TUI, a desktop screen or a script.
  • The scope was too wide. Five repositories, a Tauri app, three TypeScript fronts, a design system: every step forward on one front left the others behind. I took the engine, the providers and the gates into koklo-cli, a single binary, and the desktop app will wait until that core is proven.
  • The design system got ahead of the product. That helps pin down the intent (Constellation is the best example), but a mockup is not a feature, and I label it as such.

Gallery

Project home in Koklo: counters for sprints, tickets and running agents, quick actions and activity feed
Workflows screen: three recent runs, the detail of a seven-phase SDD Strict preset and the Docs phase output
Sprint Kanban board with a ticket open on the right: linked AI sessions, linked commits and activity
Constellation view mockup: Git branches as curves, AI session, decision and deploy nodes, and the causal trace of a commit
koklo-cli
Next project →koklo-cliMulti-agent delivery in a single Rust binary, with roles running in parallel.

Let’s talk. Describe your need in a few lines, I’ll get back to you within 48 hours.