Build on it
Adapters
Three independent adapter types connect Clankie to where code lives, how workers run, and which agent loop they use. Runtimes include Claude Code, Codex, Antigravity, Grok, and OpenCode, on your Mac or on Clankie Cloud.
On this page
Three types
| Type | What it covers | Day-0 default | Required |
|---|---|---|---|
| Code host | Repository, PR or MR, CI checks | None | No |
| Agent host | How a worker is launched, watched and stopped | Built-in (native) | Yes |
| Runtime | The agent loop itself | Built-in Pi, plus detected harnesses | Yes |
They are independent: any code host works with any agent host and any runtime. On day 0, Clankie runs workers directly on your Mac with built-in Pi (or your own API keys, local models, or existing coding harnesses: Claude Code, Codex, Antigravity, Grok, and OpenCode) with zero Herdr dependency. When you want live visible terminal panes, switch the agent host to Herdr. The same workers also run on Clankie Cloud.
Each project picks its own adapters, and its own tracker:
| Choices | |
|---|---|
| Code host | GitHub |
| Agent host | Built-in (native), Herdr (optional) |
| Runtime | Built-in Pi, Claude Code, Codex, Antigravity, Grok, OpenCode |
| Tracker | Built-in, Markdown files, GitHub issues, Linear |
The tracker is where the lead and workers read and write work items.
Code host
interface CodeHostAdapter {
readonly kind: string; // 'github', ...
readonly changeLabel: string; // what the host calls a change: 'PR', 'MR'
openChange(repo: RepoRef, input: { head: string; base: string; title: string; body: string; draft: boolean }): Promise<ChangeRequest>;
updateChange(repo: RepoRef, id: string, update: ChangeUpdate): Promise<ChangeRequest>;
getChange(repo: RepoRef, id: string): Promise<ChangeRequest>;
listChanges(repo: RepoRef, filter?: { state?: 'open' | 'closed' | 'all'; head?: string; base?: string }): Promise<ChangeRequest[]>;
listChecks(repo: RepoRef, revision: string): Promise<CheckRun[]>;
getStatus(repo: RepoRef, id: string): Promise<ChangeStatus>; // the change plus its checks at its head
getPatch(repo: RepoRef, id: string, head?: string): Promise<Buffer>; // unified diff
}The app never assumes GitHub. It says "PR or MR" in general and shows the host's own label (changeLabel) on a specific change. Tokens come from your verified connected account, never from the adapter.
Agent host
interface AgentHostAdapter {
readonly kind: string;
start(spec: WorkerSpec): Promise<WorkerHandle>;
startMany(specs: WorkerSpec[]): Promise<Array<WorkerHandle | Error>>;
state(handle: WorkerHandle): Promise<WorkerState>;
stop(handle: WorkerHandle): Promise<void>;
}startMany hires several workers at once. Starts run concurrently, and one failed start doesn't block the rest.
Runtime
interface RuntimeAdapter {
readonly kind: string;
discover(): Promise<{ tools: string[]; supportsAsks: boolean; supportsResume: boolean }>;
open(input: { cwd: string; brief: string; parentId?: string; model?: string; effort?: string }): Promise<RuntimeSession>;
}Every runtime shares the same contract, so the app treats them alike:
- Capability discovery: tools, asks, resume.
- Progress events while the worker runs.
- Asks: a worker's question to you, answered once, in one place.
- Decisions the worker logs at material gaps.
- Receipts for each delivery: stored, delivered, consumed or uncertain.
- Lineage: each session records the parent session that started it.