optimize_stage
Stage a batch of memory optimization suggestions for human review. Validates, skips invalid ones, and returns a run ID for dashboard approval.
Instructions
Stage a batch of curation suggestions for human review in the dashboard.
Step 2 of the "optimize my memories" workflow. Writes the suggestions to a new optimization run; they are NOT applied here -- the user reviews and applies/rejects each one in the admin dashboard's Optimization tab, where a backup is taken before the first apply and every applied change can be undone.
Each suggestion is an object: {"kind": ..., "target_uid": ..., "payload": {...}, "rationale": "why", "verified": "what live-facts check you did"}
Kinds and their payload: compact / reword {"new_content": str} retag {"tags": str} comma-separated redomain {"domain": str} set_confidence {"confidence": "unverified|confirmed|contradicted"} archive {"reason": str} soft/reversible; never hard-deletes link {"from_uid", "to_uid", "relation_type", "note"?} merge {"keep_uid", "drop_uid", "note"?} links supersedes + archives drop distill {"source_uids": [uid, ...], "new_type": "note|reasoning|anti_pattern", "new_content": str, "tags"?, "domain"?}
distill extracts the durable knowledge out of one or MORE source
memories into a newly authored one: creates it, links it supersedes
each source and archives the sources (all reversible). Use it to
retire closed-ticket checkpoints without losing what they taught, or
as an n-ary merge when the survivor needs synthesized content.
link/merge derive target_uid from the payload (from_uid / drop_uid)
and distill creates its target -- omit target_uid for those kinds.
Destructive suggestions (archive, set_confidence=contradicted,
distill) require a non-empty verified describing the live-facts
check that justifies them.
Invalid suggestions are skipped and reported in errors; the rest are
staged. Returns {run_id, staged, errors}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| suggestions | Yes |