Skip to content

Concepts

A room is a flight recorder and a group chat for one piece of agent work. While a run is live, you watch every step, steer the agent, and approve actions it may not take alone. Afterwards the room stays as an ordered, redacted record nobody can rewrite, ready to audit, fork from any message, or hand off to the next run.

In one picture

    flowchart LR
  factory["The factory<br/>opens the room, posts the brief"] --> room
  humans["Humans<br/>watch · steer · approve"] <--> room
  subgraph run["A run's sandbox pod"]
    agent["The agent"] --- bridge["Its bridge"]
  end
  bridge -->|"every step, as events"| room[("The room<br/>one ordered log")]
  room -->|"steering, decisions"| bridge
  agent -->|opens| pr["The pull request"]
  room --> record["The record<br/>audit · fork · hand off"]
  

Everything that happens in a room is an event in its log, assigned a gapless sequence number by the broker alone.

Glossary

The factory

TermMeaning
TaskOne labelled issue’s lifecycle (Task CR in maku.ogenki.io, reference): its room, runs, pull request, verdict and narration
TriggerWhat starts or stops work: factory/ready, factory/stop, factory/revert, /factory retry, /factory split, a schedule, a RunLore finding, or a sponsored API call
TriagePicks a task’s workflow, template and tier once at intake (Triage)
Tierlight, standard or frontier: a run’s logical model alias (tier-*), deadline and budget, fixed per run
WorkflowWhich roles work on a task (template names the ordered list): quick (implementer), standard (implementer + reviewer, default), careful (scoped first, judged before review), or none (adopted PR); see shipped workflows
BudgetToken or USD cap enforced outside the sandbox per run, task, day and person (Budgets)
PolicyOne bounded merge rule (docs-links, dead-links, or one you define); no matching policy hands the pull request to a maintainer
Merge gateDecides whether an agent PR merges itself (maku/merge-gate): each bound policy is live (merges when checks hold), shadow (decided identically without merging), or disabled
Oracle classClass backed by a deterministic detector (dead-links) whose holdout check proves the PR fixed that exact finding
Held commandA maintainer’s slash command posted before the task reached the phase it applies in: kept in status.held, answered, and applied once when the task gets there (Commands posted early)
SplitBreaking a broad task into bounded child tasks proposed by the scoper and approved with /factory split
Kill switchagent-factory-stop ConfigMap or factory/stop on the control issue: pauses intake and revokes active runs
NarrationProgress and status comments posted from the factory’s outbox onto the issue and pull request
Needs youItems waiting on a viewer: a pending approval, a driver hold, an escalated question, or a human merge
SummaryDeterministic fold (summary/v1) of a room’s log rendered by the web UI and maku status
Progress noteA run’s one-line status update (room_progress, API, ≤ 280 characters, at most once a minute)

Rooms and runs

TermMeaning
RoomOne session’s policy (owner, driver, members, approvals, retention, data class) and log (Room CR, reference)
RunOne sandboxed AgentRun pod on one role and branch, with a fixed deadline and budget; one run is Running per room at a time
SandboxIsolated gVisor pod behind default-deny network policy and an explicit egress allow-list
Run roleA run’s role is one of four: implementer, reviewer, tester, triager. The scoper is a triager run; the judge is a model call inside the implementer’s run, not a run
HarnessOpenHands agent-server loop inside the run container on 127.0.0.1:8000
Bridgemaku-bridge (sidecar room-bridge): pushes harness events to the broker and delivers steering, interrupts and decisions back
Brokermaku-broker (room-broker, see naming): authenticates writers, redacts, sequences and stores events, and serves the UI and APIs
Model gatewayProxy outside the sandbox that holds provider keys, pins aliases, enforces budgets and meters calls (Model gateway)
ParticipantAny human, run or system caller recorded joining or leaving a room
PrincipalVerified identity stamped on every event by the broker: agent:<runId>, human:<sub> or system:<component>
Room id8 lowercase unpadded base32 characters ([a-z2-7]{8}), shared by room, run and task names (agent/<id> branches)
Room roleCumulative human standing in a room (watcher < collaborator < owner), plus the separate approver flag
DriverSingle principal allowed to steer or interrupt the active run, fenced by driverEpoch across give, request and take
Message deliverynone (chat only), queued (FIFO into the next run’s brief; in a factory room, the next planner, triager or implementer run, of any trigger), or steering (injected live by the driver)
HandoffWork and commit SHA passed from one run role to the next (handoff event), distinct from driver transfer
VerdictThe reviewer’s approve or changes (message{kind: review_verdict}), also posted once on the PR
BriefBounded, fenced context assembled by the broker for the next run from the latest handoff, verdict and queued messages
ApprovalHuman allow/deny decision on a pending harness action (approval_requested / approval_decided)
ForkNew room copied from events 1..N (maku fork), owned by the forker with attended approvals by default
Step / Call lineOne collapsible agent message with its tool calls on the room page, and each tool_call + tool_result row inside it

The log

TermMeaning
EnvelopeFrozen v1 event shape (v, id, seq, roomId, runId, actor, type, causedBy, origin, ts, redactions, payload; Event envelope)
seqGapless per-room sequence number starting at 1, assigned under the room’s database row lock
OriginEvent source: harness (from a run), client (human, system caller or room tool) or broker
Idempotency key(roomId, originClient, originSeq): replays return the stored event without appending a duplicate
SealFinal event closing a room (on close, deletion, or 100,000 events / 256 MiB), starting its retention clock
RetentionDays a sealed log is kept (spec.retention, default 90d) before maku-broker retention purges it
Bridge leaseSingle-run lock (rooms.bridge_run) fencing displaced bridges and refusing concurrent live bridges with 409 room_busy
Data classImmutable public or internal classification governing allowed model backends and PR verdict summary visibility
RedactionBroker replacement of detected secrets with [REDACTED:<rule>] before storage, recorded in redactions
End reasonRoom-level cause on state_changed{run_phase} (agent_finished, agent_error, model_unavailable_*, agent_stuck, deadline, pod_lost, room_busy, judge_impossible, stalled, not_met, budget_calls, revoked, deleted, budget-run)

A room’s phases

The broker projects status.phase from the log and the room’s runs every 15 s.

    stateDiagram-v2
  [*] --> Open: Room created, log seq 1
  Open --> Active: a run is Running
  Active --> Idle: run ended, no successor yet
  Idle --> Active: the next run starts
  Active --> AwaitingHuman: approval pending, or no event for 30 min
  AwaitingHuman --> Active: decided, expired, or events resume
  Idle --> Closed: owner or the factory closes, or the Room is deleted
  Active --> Closed: the log reaches its limit
  Closed --> [*]: retention elapsed, log purged
  

AwaitingHuman reflects a pending approval or a 30-minute stall. Deleting a Room runs the maku.ogenki.io/room-log finalizer, which deletes its runs and seals the log; the sealed log keeps its own retention clock after the CR is gone.

Who does what

ActorCreatesReadsWrites into the log
The factoryRoom CRs and every AgentRunGET /v1/rooms/{id}/events, GET /v1/rooms/{id}/queueTask snapshot (task_state), task facts (POST /v1/rooms/{id}/task), queued PR reviews (POST /v1/rooms/{id}/queue)
A runnothingroom_readHarness events via the bridge; room_post, room_handoff, room_verdict
A humanrooms from the UI, forksthe web UI, makuMessages, driver actions, approval decisions
The brokerhuman-requested and forked Rooms; never an AgentRuneverythingLifecycle events, seals, limits, verdict outcomes

The factory re-reads the pull request right before starting the next run: reviews submitted while waiting join its brief, reviews dismissed beforehand are skipped, and a review dismissed after being queued still reaches that run. Full permissions are in Security controls.