Skip to main content
The canonical memory surface has two resources:
  • /admin/facts reads the fact ledger and accepts explicit user pins.
  • /admin/wiki/pages manages versioned wiki pages.
All endpoints require the usual Bearer token. See Authentication.

Facts

GET /admin/facts lists facts. GET /admin/facts/search?query=... searches them. Both accept subject, include_inactive, and limit (1–100). Use the returned next_after object’s created_at and fact_id as after_created_at and after_fact_id together to continue a page.
Responses contain facts, total, has_more, and next_after. Read one fact with GET /admin/facts/{fact_id}; its response contains fact.

Pin

POST /admin/facts persists one explicit user pin. Send a stable request_id to make retries idempotent:
Other fact changes use the plan-and-commit agent tools rather than generic HTTP mutation endpoints.

Batch read

POST /admin/facts/batch reads up to the server’s batch limit in one request:

Wiki pages

These /admin endpoints are the Desktop/backend concurrency interface, so they expose internal page and revision identifiers. Agent wiki tools do not: they use managed paths and keep this bookkeeping inside the server.

Read

  • GET /admin/wiki/pages lists active pages. Pass include_redirects=true to include redirects.
  • GET /admin/wiki/pages/{page_id} reads one page, including content.
  • GET /admin/wiki/pages/{page_id}/history?limit=50 returns commit history (1–200).
  • GET /admin/wiki/pages/{page_id}/diff returns a diff. It accepts optional base, target, offset, limit, and tail.
  • GET /admin/wiki/pages/{page_id}/links returns outgoing links and backlinks.
Page responses include page_id, path, resource_state, title, excerpt, aliases, lifecycle, redirect_to, metadata, version, repository_head, created_at, and updated_at. Detail responses also include content.

Create

POST /admin/wiki/pages requires path, title, and expected_head. It also accepts body, page_id, aliases, and metadata.

Update, archive, and restore

PUT /admin/wiki/pages/{page_id} requires content, expected_version, and expected_head. Archive and restore use POST and require expected_version and expected_head:
Writes are optimistic: supply the version and repository head you read. A stale write returns 409 with the current revision, head, and, when available, content. Invalid paths or request values return 422; unknown resources return 404. Restore one historical revision with:
The request uses the current expected_version and expected_head, just like other wiki writes.