Skip to documentation

Ports

Write-via-approval

Agents read the knowledge base freely — but they never write to it directly. The only agent write path into the KB is kb_propose_note: the agent proposes a note, the run suspends into the approvals inbox, and a human decision either materializes a vault document or resumes the run with a rejection. The KB stays a human-curated asset.

The flow

Write-via-approval lifecycle

propose → suspend → human decision → materialize or resume with rejection.

Rendering diagram

Downloads

Concepts

  • Write via approval
  • Capabilities
  • Propose

Keywords

  • Agent run
  • Approvals inbox
  • status: suspended
  • cursor persisted
  • review proposal
  • resume with document id
  • propose (title, body, sources)
  • persist proposal · run suspends
  • materialize vault document
  • resume with rejection + note
  • run continues either way
  • kb_propose_note
  • Human
  • Vault
Source and generation provenance

Status: current

Generated at: 2026-08-12T23:43:38.769Z

Source hash: 0025a784a2aad21c8ca0f826d00fa88f81b18b375b30dc8d7608feb55765adbc

Metadata payload hash: 069e3f2c663fda06bdb42eed11167b667425ca18ca5f16858bd29199334e2e83

Canonical appearance

src/app/(docs)/docs/capabilities/write-via-approval/page.tsx:31 route /docs/capabilities/write-via-approval

All appearances

  • canonicalsrc/app/(docs)/docs/capabilities/write-via-approval/page.tsx:31 route /docs/capabilities/write-via-approval

No mirrored appearances.

Generation versions

App: eli-ai 0.1.0

Mermaid: 11.16.0 · Mermaid CLI: 11.16.0

Node: v26.3.1 · Yarn: 4.17.1

Renderer config hash: 68c10966fe84406ee626034d58bfabd555df9f65f691204b7c46db24038da101

Renderer theme hash: c80287a78d80ad63d27bd5ca348b2ef9a7e2f44da289e436be6484ea28a1b033

Adapter versions: diagramGenerator=2, drawioFlowchart=1, drawioGantt=1, drawioSequence=1, drawioState=1

Full sidecar JSON: write-via-approval-lifecycle-0025a784.json

The kb_propose_note tool

kb_propose_noteis a built-in tool available to agents. A call carries the proposed note — title, markdown body, and the sources it was derived from — and behaves like any other gated tool call: the run's status becomes suspended, the full resume cursor is persisted, and the proposal lands in the workspace's approvals inbox alongside gated MCP calls.

a kb_propose_note calljson
{
  "name": "kb_propose_note",
  "input": {
    "title": "Q3 renewal risk — Acme Corp",
    "body": "## Summary\nAcme flagged budget pressure in the 2026-07-14 call…",
    "sources": ["doc_01J8…", "conv_01J9…"]
  }
}

Approve or reject

  • Approve — the proposal is materialized as a real vault document: markdown on disk, indexed, extractable, citable — indistinguishable from a document a human wrote, except its provenance records the proposing run. The run resumes with the new document's id and can reference it in its final answer.
  • Reject — nothing is written. The run resumes with a rejection result (and your optional note), which the model sees as the tool outcome and can react to — revise the proposal, continue without it, or report why the note was declined.

Because the suspend/resume record is durable, the human can take hours or days; the run picks up from its persisted cursor either way — even across a process restart.

Why agents never write directly

This is a deliberate architectural line, not a missing feature:

  • The KB is the asset.Retrieval, extraction, coverage scoring, and every downstream answer are grounded in vault documents. One hallucinated "fact" written directly would be laundered into a citable source and poison everything built on it.
  • Prompt-injection containment. Agents read untrusted content — imported documents, MCP tool output, the web. A write gate means injected instructions can at worst propose a note a human will read, never silently plant one.
  • Provenance and audit.Every agent-originated document traces to a proposal, a run, and a named approver — the story an enterprise client expects when they ask "who put this here?".
  • Quality stays measurable. Approval decisions are captured as feedback signal, so the proposal-acceptance rate becomes a measurable quality metric per agent version.

One gate, no exceptions

There is no configuration that lets an agent bypass the inbox — no auto-approve flag, no trusted-agent mode. If a workflow seems to need direct writes, the answer is a faster approval loop, not a hole in the gate.

Related