22 Kloker

Kloker

Kloker, Klok's own AI, works in many places of klok.dev: it answers questions, plans changes, splits and builds work, and repairs failing merge requests. Kloker is where you see all of that in one place, and where its limits are written down: what it is working on and what waits for your answer, what it does without being asked and under which policy, what each kind of task may do and who approves it, what it knows about the tenant, and how to reach it from a terminal, an editor or another agent. Nothing Kloker does is hidden, and none of it goes further than a person lets it.

  • In the menu: Manage → Kloker, with the tabs Tasks (/kloker/agent-tasks), Background (/kloker/background), Skills (/kloker/skills), Knowledge (/kloker/agent-skills), Prompts (/kloker/prompt-library) and Connect (/kloker/connect)
  • For: everyone with harness read access sees it; developers and admins follow and answer their tasks; the tenant admin decides Kloker's policy
  • Reads: the Klok Integration Agent and klok.dev's mirror of its tasks; kloker/policy.json and the open merge requests in GitLab; the tenant's catalog of agent skills in GitLab; saved prompts in klok.dev's database

What You See

Tab The question it answers What it shows
Tasks What is Kloker working on? Every task of the tenant, whichever way it came in: Ask Kloker, Changes, an item's Review, klok-cli, an IDE or another agent. Needs answer, Running, Mine and All; a task opens with its input, its question, its result, its artifacts and its events. New task starts an impact analysis or a bead implementation
Background What does Kloker do unasked? The tenant's policy in plain words, the repairs Waiting for you, what is Running and Finished, and the beads Kloker may pick up
Skills What may Kloker do, and who approves? Every task type with its human gate, what it writes and the minimum role, and every capability
Knowledge What does Kloker know about the tenant? The agent skills in the tenant's catalog: one per documented repository, and the router skill
Prompts Which questions are saved? Saved prompts with Use in chat; the favourites are the starters in Ask Kloker
Connect How else do I reach it? The commands for klok-cli, the local proxy for Claude Code, Codex and Cursor, and the agent card for other agents

A task is Submitted, Working, Needs your answer, Completed, Failed or Canceled. A task that needs your answer stops until you give it.

Walkthrough: Follow And Answer Kloker's Tasks

  1. Open Tasks and choose Needs answer. Here Kloker waits in its plan for change request #19: should the alert mail go to the solution owner or to the operations mailbox?
  2. Open the task. Choose one of the suggested answers or write your own, and Send answer. The task goes on, and your answer is also written on the change request as your comment (Changes).
  3. New task → Impact analysis: name a datamodel or topic, such as PersonnelSchedulingV1, and the kind of change. The task works through its steps while you watch and ends with a report of the legs, topics, projects and datamodels the change reaches. The report is read here; nothing is written anywhere.
  4. Cancel task stops a task that has not ended. Starting, answering and cancelling a task that writes needs a Domain Admin, a Tenant Admin or platform staff (frontend-klok-dev#107); the repairs and checks of one repository are for whoever may change that repository.

Walkthrough: Decide What Kloker Does On Its Own

  1. Open Background. How Kloker works in the background is the tenant's policy, kloker/policy.json in <tenant>/integration-solutions on main, in plain words.

  2. Read what Kloker found under Waiting for you: here a test on Anna's merge request in klok-egress-konvoj fails, and Kloker has the cause. Let Kloker push the fix is your yes: a new repair task in your name that pushes the fix to the merge request's branch. The merge request is still reviewed and merged by a person.

  3. To change the policy, choose Change it in GitLab and change the file in a merge request. Without the file the default applies: Kloker picks up no beads, diagnoses a failing pipeline or a merge conflict and asks before it pushes, and makes at most two repairs per merge request. Here the example tenant has turned pickup on for the repositories of hr: one bead at a time, at most four a day, on weekdays 07:00–18:00.

Policy key What it decides Default
pickup.enabled, repos, types Whether Kloker implements ready beads by itself, in which repositories, of which types Off
pickup.maxParallel, maxPerDay, window How many beads at a time, how many a day, and when Kloker picks them up 1, 10, Monday–Friday 07:00–19:00 Europe/Stockholm
pipelineFix, mergeConflicts off, ask (diagnose, ask before pushing) or push ask
maxRepairAttempts Repairs per merge request before Kloker leaves it to a person 2

The background Kloker looks, by default every five minutes, at the tenant's open merge requests from agent/ and klok-dev/ branches, and, with pickup on and inside the window, at ready beads of issues labelled kloker. The page reads it every half minute and stores nothing.

Walkthrough: See What Kloker May Do And Knows

  1. Skills lists every task type with its human gate. Point at a gate to read what it means.
Gate Meaning
None Read only; nothing outside the sandbox changes
Reviewed in klok.dev The result is an artifact on the task's page; nothing is written until a person uses it
Human triage It creates issues or cards a person prioritises and assigns
Merge request Changes land on a branch and reach main only through a merge request a person reviews
Confirmation dialog The person confirms the exact action in klok.dev before it runs
  1. Knowledge shows what Kloker, and any coding agent in the tenant, knows about the tenant's repositories: one skill per documented repository with its facts, and the router <tenant>-context, read from the tenant's catalog in GitLab on every load. KlokDocumentationEgress writes them on every documentation run of a repository, without a model; only a skill's overview and the first sentence of its description reuse what Kloker wrote for the repository's documentation. A wrong skill is fixed in the repository's documentation, not here. The egress reads tenant klok's documentation and that of the tenants on its list, so a tenant that is not on the list has no skills (Another tenant's documentation).

  2. Prompts holds saved questions; Use in chat opens one in Ask Kloker and shows it, with any placeholders to fill in, before it is sent. A favourite is marked for everyone who sees the prompt; favourites per person are frontend-klok-dev#112.

  3. Connect gives the other doors: klok-cli (npm install -g @klok-integration/cli, then klok config set agentUrl https://agent.klok.dev and klok login), klok agent serve for a local proxy that Claude Code, Codex and Cursor reach on 127.0.0.1:3091, and the tenant's agent card for an orchestrating agent. Every door reaches the same queue and the same policy with your own identity, so the tasks show under Tasks.

What Happens In Git

In klok.dev What it writes and where Who decides By hand
New task → Impact analysis Nothing in Git: a task on the Klok Integration Agent, mirrored in klok.dev, with its report as an artifact — klok agent impact <datamodel> --change major
New task → Implement a bead A merge request from an agent/ branch that sets the bead to done A person reviews and merges klok agent implement <bead id>
Send answer The answer to the task, and on its change request your own comment You klok agent answer <task id>
Cancel task The task stops You klok agent cancel <task id>
Let Kloker push the fix A new repair task in your name; Kloker's fix as a commit on the merge request's branch The merge request's owner reviews and merges Fix it on the branch yourself
The policy kloker/policy.json in <tenant>/integration-solutions, changed in a merge request Whoever merges in the registry The same file
Knowledge, Skills, Connect Nothing: they read — klok agents update installs the same skills on your machine
Prompts → New prompt, Edit, Delete klok.dev's database; a shared prompt only by platform staff — —

Kloker's own writes always end in a merge request, an issue or a comment that a person reviews. See What klok.dev Does In Git.

Who Does What

Automation Kloker You
klok.dev mirrors every task and its events; the background loop looks every five minutes by default; KlokDocumentationEgress writes the agent skills on every documentation run; Create N issues and Check build are task types that use no model Answers, analyses, plans, splits, implements and repairs, each within its task type's gate and capabilities, with the rights of the person who asked. It never merges, never pushes to a default branch, never deploys, and never reads or writes secrets or Vault Answer its questions, say yes or no to a repair, decide the policy in Git, review and merge

Kloker's work runs from an interactive assistant (Ask Kloker, a business case) to an agent with tools (Implement, a repair) and a background agent (Background, under the policy); the higher the mode, the more the gates matter. You, The Automation And Kloker places each kind on that scale.

How It Connects

Kloker's tasks come from Ask Kloker, from Changes and from an item's Review (Integration Projects, Datamodels); its knowledge comes from each repository's documentation (Documentation). Home shows the tasks that wait for you, and Tenant is where the roles that limit Kloker are given.

Read More