Skip to content
Loom Docs
Esc
↑↓navigate↵open⌘Jpreview
Product
View as Markdown
On this page

learnings operations

The exact fields each learnings.* operation takes and returns.

The exact fields each learnings.* operation takes and returns.

Every op is served at POST /v1/<op> over HTTP and, unless its line says otherwise, as the MCP tool loom_<op>. The identity fields (org, namespace, agent, user_id, session_id) are filled from the token and the MCP session when a transport can; for an HTTP call with no token on a single-user server, the install’s org on every op but code.* and tracker.* (which keep their plane’s), and on some ops its namespace and agent; see identities and namespaces. The operations index explains role, kind and the MCP all listing. Unknown input fields are served and named in ignored_args, and a response served from a fallback or a partial read names it in degraded (degraded answers).

learnings.list

List learnings candidates by status (pending by default, promoted, rejected).

POST /v1/learnings.list · not served over MCP · role viewer · read

Input field Type Default Meaning
org str required The tenant (first element of the identity tuple).
namespace str required The namespace the op reads or writes.
status Literal['pending', 'promoted', 'rejected'] | None None None = pending
limit int 50 At most this many candidates, 1-500, newest proposal first.
source_kind str | None None None = all seeders
Output field Type Meaning
rows list[_LearningEntry] Candidates with the requested status in namespace, newest proposal first.

learnings.quality

Per-namespace approve-ratio rollup of the learnings queue.

POST /v1/learnings.quality · MCP loom_learnings_quality · role viewer · read · not listed under the MCP all toolset

Input field Type Default Meaning
org str required The tenant (first element of the identity tuple).
namespace str | None None None = org-wide rollup
source_kind str | None 'conversation_seeder' Only candidates from this producer; None counts every producer.
Output field Type Meaning
rows list[LearningsQualityRow] One row per namespace the caller may see, most pending first; empty without access.

learnings.review

Approve or reject a pending learning.

POST /v1/learnings.review · not served over MCP · role admin · idempotent · audited

Input field Type Default Meaning
org str required The tenant (first element of the identity tuple).
namespace str required The namespace the op reads or writes.
candidate_id str required The queued candidate to decide; one unknown in namespace answers 404.
decision Literal['promote', 'reject'] required promote writes it to destination and marks it promoted; reject only marks it rejected.
reason str '' Why; stored as decision_reason and carried into the promoted row’s provenance.
destination Literal['memory', 'knowledge', 'both'] | None None Where a promotion lands: ‘memory’, ‘knowledge’ or ‘both’, but query_history, knowledge_gap and curator_draft candidates allow only ‘memory’; unset is ‘knowledge’ for an assistant_turn rule and ‘memory’ otherwise.
approver str 'learnings-reviewer' Promotion label for other candidates (default ‘learnings-reviewer’); query_history, knowledge_gap and curator_draft use the authenticated actor instead, and the audit subject always records the authenticated actor.
approved_sha256 str '' To promote a curator_draft: the content_sha256 learnings.list served for it, so the text accepted is the text read.
Output field Type Meaning
candidate_id str The candidate, echoed.
new_status Literal['pending', 'promoted', 'rejected'] The status the candidate holds after this call.
promoted_to_shared bool True when this call wrote memory: loom.shared for a supporters candidate, a namespace row for a seeder, the agent’s user_id ‘-’ row for a bot’s rule.
promoted_to_knowledge bool True when this call upserted the candidate as a knowledge document.
knowledge_source_uri str source_uri the knowledge doc was upserted under (for later knowledge.delete).
decided_at datetime When this call ran (UTC), also on a repeat that changed nothing.

Last updated on

Was this page helpful?