metashared last reviewed 2026-07-05

How agents contribute to Knowledge OS

Knowledge OS is read and write. You discover facts with knowledge_query / knowledge_get_page, and you contribute back β€” but only with citations. This page is the contract (write-back shipped 2026-07-05).

The one rule: every write cites its sources

There is no uncited write. If you don't say where a fact came from, the write is refused β€” not silently stripped, not accepted. A source looks like:

{ "type": "url", "ref": "https://…", "label": "supplier price list" }

type is required (url, file, meetgeek, gmail, invoice, wiki, manual, …); give a ref (the locator) and/or a label (human hint). One or more per write.

Two write paths β€” pick by intent

You want to…ToolNotes
Create a new pageknowledge_ingest / knowledge_ingest_fileroutes by confidence; low-confidence lands in _inbox/needs-review/
Revise an existing pageknowledge_update_pagethe page must already exist; updates never create

knowledge_update_page(namespace, slug, content, sources, title?)

knowledge_update_page(
  namespace = "chanya",
  slug      = "suppliers/chiang-mai-spices",
  content   = "Updated pricing for Q3. Minimum order 20kg…",
  sources   = [{ "type": "url", "ref": "https://…/pricelist", "label": "Q3 price list" }],
)
β†’ { "status": "queued", "job_id": 1234, "page_path": "chanya/suppliers/chiang-mai-spices.md" }

What you control vs. what the system manages

You supply: the body, the sources, an optional title.

The system manages the frontmatter β€” you cannot spoof it:

always reflects the latest revision.

Namespace scope

Your token is scoped to one or more namespaces. You can only read and write within that scope β€” a write to a namespace you don't hold returns an error (HTTP 403 underneath). Ask an operator to widen your scope if you need more.

What happens after you call it

The call returns immediately with status: "queued". Under the hood:

  1. wiki-api validates (auth, scope, page exists, content + β‰₯1 source) and

enqueues a page_update job.

  1. worker-ocr β€” the only service allowed to write the vault β€” applies it

through the crash-safe queue: writes the file, commits + pushes to the vault git repo authored as agent:<you>, then refreshes the search index.

  1. Your change is now in the vault (Obsidian + GitLab) and queryable.

If a write fails, you get status: "error" with the reason β€” never a success-shaped no-op. Fix and retry.

Good vs. bad

βœ… Good β€” a real change, cited:

content: "Chef confirmed the kitchen now closes at 22:00 on weekends." sources: [{ type: "meetgeek", ref: "mtg-2026-07-02", label: "ops sync" }]

❌ Refused β€” no citation:

content: "The kitchen closes at 22:00." Β· sources: [] β†’ error: "at least one source is required β€” every agent write must cite…"

❌ Wrong tool β€” the page doesn't exist yet:

knowledge_update_page on a new slug β†’ 404. Use knowledge_ingest to create.

See also: how-to-use-knowledge-os for the read side, and style-guide for page conventions.

πŸ”— Relationships

graph LR how_to_contribute["how-to-contribute"]:::self how_to_contribute --> how_to_use_knowledge_os["how-to-use-knowledge-os"] how_to_contribute --> style_guide["style-guide"] classDef self fill:#715EE3,color:#fff,stroke:#291F50;