The browser runtime
built for agents.

A controlled browser runtime for automation, agents, and programmable web execution. Lightweight, CDP-native, MCP-ready — programmable web infrastructure without the Chromium monolith.

0.22× navigation vs Chromium.
SPEED
CDP compatible automation API.
PROTOCOL
MCP native agent tools.
AGENTS
Zig low-level runtime control.
ENGINE

// RUNTIME

Browser infrastructure
for machine execution.

Koko treats the browser as a controlled execution runtime — observable, embeddable, and automation-native. Built for AI agents, crawling, and scalable web interaction.

  GET /api
  ────────►
  ◄────────
  { data }

CDP-Compatible Runtime

Connect over Chrome DevTools Protocol — use the Koko SDK, existing CDP clients, or raw WebSocket automation without Chromium internals.

  ┌───────┐
  │ ◉ ◎ ○ │
  │ ◎ ◉ ◎ │
  │ ○ ◎ ◉ │
  └───────┘

MCP for AI Agents

Native Model Context Protocol tools: goto, markdown, links, evaluate, and semantic_tree for token-efficient agent browsing.

  ┌─┐   ┌─┐
  │A├──►│B│
  └─┘   └┬┘
        ┌▼┐
        │C│
        └─┘

Controlled Execution

Choose the navigation contract that fits the page — DOMContentLoaded, load, domstable, networkidle, or done — with explicit timeouts and lifecycle state.

   ╔═══╗
   ║ ◈ ║
  ┌╨───╨┐
  │░░░░░│
  └─────┘

Journey Observability

Inspect network, DOM, runtime, and browser signals as a live journey. Use timelines and structured events to explain slow or incomplete pages.

  │  ▄ 
  │▁ ▄ █ ▄
  │█ █ █ █
  └────────

Deterministic Export

Export the page you actually observed as HTML, Markdown, or JSON — including progressive results for long-running crawls and SPA navigation.

    .--.
   /    \
  | (  ) |
   \    /
    '--'

Profiles & Sessions

Reuse browser profiles, cookies, headers, storage state, and fingerprint settings across runs without coupling your workflow to a desktop browser.

// HOW IT WORKS

Three steps to
programmable browsing.

quickstart.ts
1git clone https://github"text-primary">.com/ivanUri/koko-core
2cd koko-core
3"text-foreground">zig build
Ready

// ARCHITECTURE

Engine internals, explicit layers.

Koko separates browser execution into explicit runtime layers — keeping engine internals isolated, protocols modular, and public APIs stable for embeddable automation.

Zig-based runtime

Low-level control over lifecycle, memory, and protocol behavior

🔗

CDP + MCP first-class

Automation scripts and AI agents connect through standard protocols

📦

Embeddable by design

Multi-session model for crawling, testing, and cloud browser runtimes

Core Engine

stable

DOM, parser, V8 bindings, Web APIs

Runtime

active

Lifecycle, network, storage, telemetry

Protocols

active

CDP and MCP implementations

Adapters

stable

CLI and server entry points

Public API

active

Koko SDK and CDP surface

SDK / CLI

stable

koko-fetch, koko-sdk client

CDP
Automation
MCP
AI agents
SDK
TypeScript

// BENCHMARKS

Measured on
local fixtures.

Local fixtures only9:36:46 AM
0.00×
Navigation geomean vs Chromium
Local static fixtures (2026-06-29)
0ms
Cold start (Koko mean)
Comparable to bundled headless Chromium
0
Fixture pages benchmarked
dom-heavy, js-compute, minimal, mixed
0
Benchmark errors
Koko + Chromium, 3 repeats each
Navigation results (mean ms)
dom-heavy.html
19.9ms72.7ms0.27×
js-compute.html
8.1ms37.9ms0.21×
minimal.html
8.1ms37.9ms0.21×
mixed.html
9.4ms48.7ms0.19×

// PROTOCOLS & TOOLING

Connect agents,
scripts, and infra.

Koko speaks the protocols automation systems already use — CDP for scripts, MCP for agents, and a first-party SDK for programmatic control.

  ┌─┐
  │C│
  └─┘

CDP

Protocol

  ╔═╗
  ║M║
  ╚═╝

MCP

Agents

  ┌▶┐
  └─┘

Koko SDK

Client

  [TS]
  [TS]

TypeScript

Language

  ◈◈
  ◈◈

Zig

Engine

  ≋≋
  ≋≋

V8

JS runtime

  {f}
  ---

koko-fetch

CLI

  ▲
  ─

Node.js

Tooling

Agent-oriented extraction

Token-efficient page state for LLM workflows — markdown, semantic trees, structured data, and stable backendNodeId handles.

SDK documentation
// Agent extraction
const md = await page.markdown();
const tree = await page.semanticTree({
format: "text",
maxDepth: 4
});

// ENGINEERING

Correctness you can rely on.

Reliable automation depends on browser lifecycle behavior. Koko engineers correctness into navigation, realms, and teardown — not as an afterthought.

  ╔═══╗
  ║ ◈ ║
  ╚═══╝

Realm Isolation

Frames, workers, and execution contexts stay isolated — no cross-realm leaks in automation

  ┌───┐
  │ ✓ │
  └───┘

Navigation Ordering

Deterministic domcontentloaded and lifecycle events for anti-flake scripts

  ╭───╮
  │ ★ │
  ╰───╯

WindowProxy Semantics

Correct proxy behavior across frames — critical for protocol integrations

  [===]
  [===]

Teardown Correctness

Clean session close without zombie processes or leaked handles

  ◉─◉─◉
  │ │ │

Deterministic Events

Predictable event ordering and microtask scheduling for stable automation

  ▪ ▪ ▪
  ▪ ▪ ▪

Lifecycle Tests

Regression suites under code-check/lifecycle for continuous correctness

Development focus

Under active development — automation reliability, CDP consistency, and AI-agent integration

CDPConsistent
MCPActive dev
RealmsTested
AGPL-3.0Open source
📋

Open source & transparent

Koko is AGPL-3.0 licensed. Benchmarks, lifecycle tests, and engineering notes are published in-repo.Read engineering notes →

// SDK

Koko SDK,
automate in code.

Connect over CDP, automate pages, and extract agent-friendly state — without pulling in a full Chromium stack.

Browser automation API

Browser, Context, Page, Locator, and wait strategies for scripts and test suites.

Koko-only agent APIs

markdown(), semanticTree(), detectForms(), searchGoogle(), and backendNodeId handles.

Direct CDP transport

Lightweight WebSocket CDP client — no third-party browser driver stack.

CLI helpers

koko-fetch and CDP probes for quick extraction and regression testing.

1"text-primary">import { Browser } "text-primary">from "koko-sdk";
2
3"text-primary">const browser = "text-primary">await Browser.connect(
4 "http://127.0.0.1:9222"
5);
6"text-primary">const page = "text-primary">await browser.newPage();
$npm install koko-sdk
workspace package in the Koko monorepo

Build on programmable browser infrastructure.

Koko is under active development — focused on automation reliability, lifecycle correctness, and AI-agent integration. Clone the repo and run your first session today.

AGPL-3.0 · Zig + TypeScript · CDP + MCP