The AI Agent β
When KaimonSlate runs under Kaimon, the π¬ agent pane drives the notebook through the same operations you use β adding, editing, running, and deleting cells one at a time. It is a live collaborator, not a file-rewriter: you watch each cell appear and run.

How it works β
The agent is a consumer of Kaimon's agent service. A chat turn is forwarded to an agent session bound to the notebook; the agent calls the slate.* tools; their effects flow through the normal reactive path, and the agent's event stream is relayed onto the notebook's SSE so the chat pane updates live (streaming text, tool calls, and figures).
The tool surface β
A selection of the surface. The full set runs to about seventy tools, with the worker, region, publishing and export ones documented on their own pages, and the debugger's dbg_* and profiler's prof_* tools on Debugging a Cell and Profiling a Cell.
| Tool | Purpose |
|---|---|
slate_api | the index of Slate's cell helpers: one name, several batched, a category, or all |
slate_read | the whole notebook β every cell's source + output/error |
slate_add_cell | append a cell, run it, return its result |
slate_edit_cell | revise a cell, run it, return its result |
slate_run | run a cell (or all stale) |
slate_rename_cell | give a cell a meaningful id |
slate_delete_cell | remove a cell |
slate_pkg | add or remove a package in the notebook's own environment |
slate_view | see a cell's rendered figure (returns the image) |
slate_search_docs / slate_index_docs | semantic search of the notebook's package docs |
slate_api is the reference the agent reads before writing a cell, so what it writes uses the helpers that actually exist with their real arguments. slate_search_docs searches the same content under the module name "Slate". The agent also has slate_inspect, slate_eval, slate_eval_js and slate_diag.
slate_eval runs code in the notebook's worker without adding a cell, and its result lands in the scratchpad behind the π§ͺ pill, which badges in-flight and unread runs. With region="name" it runs on that region's worker instead, where the region's cells keep their bindings and packages. Scratch output is read-only text, values and static images, and the panel's π§Ή button empties it.
Tool calls are shown in the chat with friendly labels (e.g. β add cell, πΌ view figure) rather than raw mcp__kaimon__β¦ names. Consecutive calls by the same agent are one block, headed by how many actions it took, and the same call made again and again (a cell run until it passes) is one line with a count, Γ7. Click a call for its arguments and result; a counted line lists every call. A β id chip goes to the cell the call touched.
The agent can see your plots
slate_view returns the cell's figure as an image β CairoMakie rasters and ECharts canvas snapshots both flow through one interface β so the agent can inspect a chart it made and fix it.
Scoping a turn to a cell β β¨ β
Click β¨ on a cell header to scope the next turn to that cell. The server sends the agent that cell's source and output, its upstream dependency cone, and its downstream impact β and instructs it to work only there (not survey the whole notebook). A "focused on cell" banner shows the scope; click β to clear.
Referencing cells β @id β
Type @ in the chat to autocomplete a cell id; picking one inserts @id. The server expands each @id mention into that cell's source and current result, so you can point the agent at specific cells without it reading everything.
Models and permissions β
The in-browser agent runs on Claude (via the claude CLI), installed ACP agents (the Agent Client Protocol), or a locally-configured model (Ollama or vmlx).
In β° β β Settings:
Agent model β Sonnet (default), Opus, Haiku, any locally-served model found on your Ollama or vmlx server (both listed automatically), installed ACP agents, or Customβ¦, which sends an exact model id straight through (
ollama:llama3.1, say). See Running the Hub.Agent permissions β
notebook(default: Kaimon's notebook tools),lab(also permits files and shell),auto(model self-governs),default(edits only), orbypass(no checks; trusted only).
Both bind when the agent spawns, so changing either reaps the running agent (the transcript is kept) and the next message respawns on the new setting. A note appears in the chat; if a turn is in flight you're asked to confirm before it's interrupted.
Codex through ACP β
Codex needs Kaimon 2.11.0 or later. Install the maintained adapter:
npm install -g @agentclientprotocol/codex-acpWhen codex-acp is on the hub process's PATH, Settings lists Codex. It uses the adapter's configured model and existing Codex login, including a ChatGPT plan login. For an explicit model, choose Custom⦠and enter acp:codex:<model-id>. Codex discovery only checks for the executable; it does not start an agent or send an inference request.
Kaimon disables inherited MCP connections for its Codex agents and supplies a connection tagged with the owning agent's identity. Calls through that connection are subject to tool policy, including the recursion guard and workspace path checks. These overrides apply only to the agent process; the existing Codex login and global configuration are preserved.
Codex's native file and shell tools still follow its own approval and sandbox settings. Kaimon's notebook and specialist presets do not fully restrict those native tools; Kaimon reports that limitation when the agent starts.
The panel β
Drag the panel's left edge to make it wider or narrower; the notebook's cells move over to stay clear of it, and the width is remembered. Double-click the edge to go back to the default. βΆ opens the panel full screen for reading long replies, and π puts it back. Clicking a β id chip in full screen returns to the notebook at that cell.
In the message box, β on the first line recalls what you sent before, newest first, and β on the last line moves back towards what you were typing. π shows or hides the agent's thinking, and β opens the agent's settings.
Asking for more access β
A tool outside the agent's permission preset does not simply fail: the agent's request appears in the page with Allow once, Always allow and Deny. Silence refuses it after two minutes. The agent can also ask, with request_file_access, to read and write files; granted, it gets the lab preset from the next message.
Specialists β
The agent can bring in a specialist: another agent given one job, the tools for that job and nothing else. A debugging specialist steps through a cell in the debugger; a profiling one works in the profiler. The workspace shows it working beside you. More roles can be defined in specialists.toml in your config home, and Settings β Specialists sets the model each role runs on.
A specialist that needs to know something it cannot find out asks, and the question reaches both you and the agent that brought it in. It appears as a card above the page with the answer's choices and room for a comment; either of you can answer.
When it is done, a specialist reports findings: the cell it holds responsible, the claim in a sentence, and the evidence. Each finding says which upstream cells the investigation never looked at, and a checker reads the claim on its own and marks it confirmed or disputed. The agent proposes a plan from the findings for you to approve or change. Settings β This notebook β Carry findings in the file keeps them in the notebook's .jl.
The background checker (Settings β Specialists) is a specialist nobody summons. Once the notebook goes quiet after a turn, it reads the cells that changed, read-only, and says something only when it can name a cell and a problem.
Stopping β
The βΉ Stop button interrupts the in-flight turn. If the agent is wedged, a second press (β Force stop) hard-kills it; the next message spawns a fresh agent (transcript kept).
Conversation history β
The transcript is buffered server-side and persisted to disk per notebook, so it survives both a browser reload and a server restart. The π§Ή button clears it (memory and disk) and stops the agent.
Multiple agents on one notebook β
A build-floor + version-CAS layer lets several agents (e.g. a Seaworthy crew) drive one notebook without clobbering each other:
Build-floor β a notebook-scoped lease (
slate_acquire_floor/slate_release_floor). While held, only the holder may commit; it auto-expires after idle so a crashed holder can't deadlock the notebook.Version-CAS β when no floor is held, a mutation may carry the
nb.versionit was decided against and is rejected if the notebook moved since (lost-update guard).
Both are opt-in, so the solo-agent path is unaffected. Each crew member gets a colored lane in the chat.
A tool call that reaches the notebook from outside its own chat, such as an agent running in your terminal or one Kaimon spawned for another notebook, is surfaced in the pane too, marked β‘ external. Every write to the notebook is visible in one place. Those are buffered like any other message, so a reload replays them.
Tool cells β
A #%% tool cell holds an @tool name(arg = value) call to a Kaimon tool, the same tools an agent calls over MCP, and renders the tool's full declared parameter list beside the result. That turns an agent's action into a durable, re-runnable part of the document rather than a line in a transcript.
A Kaimon tool is called by its name (@tool ping()), an extension's by its namespace and name (@tool fusionkb.search(query = "bootstrap current", limit = 5)). The call goes to the Kaimon server on this machine, so a notebook whose worker runs elsewhere (a cluster node) reaches only the tools registered in its own worker.
slate_tools() lists what a tool cell can call, and where each comes from. tool_handle(tc) threads a background call's run id into the next call. A tool cell is never swept up by an automatic run, so reopening a notebook or a reactive update does not re-fire it.
Working without Kaimon β
In standalone mode (no Kaimon) the chat pane reports that the agent service is unavailable β everything else (cells, widgets, figures, history, export) works.