Skip to content

memory governance ​

Sibyl's memory loop is governed. Raw memories and reflection candidates are not written straight into the shared graph; they move through review, promotion, and audit. Agents inspect and repair source truth with correct; operators use the admin memory command family:

CommandDescription
sibyl correctInspect or correct a raw memory source
sibyl citeRecord material citation or misleading usage
CommandDescription
sibyl admin memory auditInspect memory audit receipts
sibyl admin memory inspectInspect a memory source and its audit trail
sibyl admin memory import-statusInspect a source import receipt and its published raw memory IDs
sibyl admin memory promotePreview or auto-review candidate promotion
sibyl admin memory sharePreview memory sharing across scopes
sibyl admin memory spaceMemory-space inspection and preview
sibyl admin memory reviewReflection review queue automation

For the dream-cycle automation that drives much of this, see memory-review.

correct ​

Run correct without an action to inspect revisions, corrections, audits, derivations, and supersession lineage:

bash
sibyl correct raw_memory:abc123

Apply the smallest correction matching what happened and provide a durable reason:

bash
sibyl correct raw_memory:abc123 --action wrong \
  --reason "Contradicted by the verified configuration"
sibyl correct raw_memory:abc123 --action stale \
  --reason "Valid only before the v2 migration"
sibyl correct raw_memory:abc123 --action duplicate \
  --duplicate-of raw_memory:def456 --reason "Same decision captured twice"
sibyl correct raw_memory:abc123 --action superseded \
  --replacement raw_memory:def456 --reason "The newer decision replaces this one"
printf '%s' "Corrected canonical body" | sibyl correct raw_memory:abc123 \
  --action revise --reason "The prior wording was misleading" --expected-revision 3

Lifecycle actions change who sees a memory rather than what it says. Each prints the server's own preview first (the target state and flags, how many derived records follow, and whether the move can be undone), then applies:

bash
sibyl correct raw_memory:abc123 --action restore \
  --reason "Marked wrong by mistake"          # also: --action undo, --action active
sibyl correct raw_memory:abc123 --action hide --reason "Noise in recall"
sibyl correct raw_memory:abc123 --action mark_sensitive --reason "Names a customer"
sibyl correct raw_memory:abc123 --action redact --reason "Contains a credential"
sibyl correct raw_memory:abc123 --action delete --reason "Captured in the wrong org" --yes

restore returns a contested or superseded memory to active and clears its wrong, hidden, and superseded marks. redact and delete cannot be undone, so they ask before applying; pass --yes to skip the question. --json requires --yes, and so does any run without a terminal to answer the question. The apply is pinned to the revision the preview showed, so a memory that changes in between is refused rather than corrected against a different plan.

ActionEffect
wrong, stale, duplicateMarks the memory contested and out of recall
supersededPoints to the replacement and leaves recall
reviseReplaces the canonical body with a new revision
restore (undo, active)Reverses a correction back to active
hideKeeps the memory but takes it out of recall
mark_sensitive (sensitive)Flags it sensitive and takes it out of recall
redactFlags the body redacted everywhere; irreversible
deleteDeletes the memory; irreversible

Raw memories change only through correct. sibyl entity delete raw_memory:<id> refuses and prints the correct --action delete command instead, because a graph delete can never remove a raw memory and a failed write would otherwise wait in the pending-write queue.

Every applied correction returns a mutation receipt with its operation ID, affected records, and revision. Use --preview to validate a mutation without applying it. The hidden blame alias remains available during migration, but new instructions should use correct for inspection.

Usage Feedback ​

Record positive feedback only when memory materially shaped the result:

bash
sibyl cite decision_abc raw_memory:def456

Use --misled only when the cited memory shaped the result incorrectly. Irrelevant or unused context is not misleading:

bash
sibyl cite raw_memory:def456 --misled

Memory Scopes ​

Raw memories and artifacts carry a scope that controls who can recall them:

ScopeVisibility
privateThe capturing principal only (default)
projectMembers working in a project
teamA named team
orgOrganization-wide memory

--scope-key pins a scope to a specific project, team, or organization bucket.


memory-audit ​

Inspect memory audit receipts. Every governed memory action (capture, promotion, share preview, denial) writes an audit event. memory-audit reads that trail.

Synopsis ​

bash
sibyl admin memory audit [options]

Options ​

OptionShortDefaultDescription
--action-a(all)Filter by audit action
--actor(all)Filter by actor user ID
--source-id(all)Filter by source ID
--derived-id(all)Filter by derived ID
--scope(all)Filter by memory scope
--project-p(all)Filter by project ID
--policy(all)Filter: allowed or denied
--limit-l50Maximum events (1-200)
--json-jfalseOutput as JSON

Examples ​

bash
# Recent governed memory events
sibyl admin memory audit

# Only denied actions
sibyl admin memory audit --policy denied

# Promotions by a specific actor
sibyl admin memory audit --action promote --actor user_abc123 --json

memory-inspect ​

Inspect a memory source and its audit trail. Given a raw memory source ID, this shows the source record together with every audit event that touched it.

Synopsis ​

bash
sibyl admin memory inspect <source_id> [options]

Arguments ​

ArgumentRequiredDescription
source_idYesRaw memory source ID

Options ​

OptionShortDescription
--json-jOutput as JSON

Example ​

bash
sibyl admin memory inspect mem_abc123def456

memory-import-status ​

Inspect a source import receipt and its published raw memory IDs. Given a source import ID, this shows the import receipt together with the raw memory IDs the import published.

Synopsis ​

bash
sibyl admin memory import-status <import_id> [options]

Arguments ​

ArgumentRequiredDescription
import_idYesSource import ID

Options ​

OptionShortDescription
--json-jOutput as JSON

Example ​

bash
sibyl admin memory import-status imp_abc123def456

memory-promote ​

Preview, apply, or auto-review candidate promotion. The target is a raw memory or a reflection candidate (a typed memory extracted by reflect and routed to the review queue). Promotion moves it into the shared graph.

Synopsis ​

bash
sibyl admin memory promote <candidate_id> [options]

Arguments ​

ArgumentRequiredDescription
candidate_idYesRaw memory or reflection candidate ID

Options ​

OptionShortDescription
--previewPreview without promoting
--applyApply the promotion now
--autoAuto-review and promote when safe
--dry-runEvaluate auto-review without applying
--confidence-thresholdOverride the auto-review confidence threshold (0.0-1.0)
--scopeTarget memory scope
--scope-keyTarget scope key
--domain-dDomain/category
--project-pProject ID
--all-projectsDo not auto-scope to the linked project
--related-toComma-separated graph IDs to relate after promotion
--taskComma-separated task IDs to relate after promotion
--json-jOutput as JSON

Promotion Modes ​

Exactly one of --preview, --apply, or --auto is required.

  • --preview: show what promotion would produce; write nothing.
  • --apply: apply the promotion now.
  • --auto: auto-review the candidate and promote it when it clears the confidence threshold.
  • --dry-run: with --auto, run the auto-review scoring and report the decision without applying it.

Examples ​

bash
# Preview a candidate before promoting
sibyl admin memory promote cand_abc123 --preview

# Dry-run the auto-review decision
sibyl admin memory promote cand_abc123 --dry-run

# Auto-promote into a project scope when safe
sibyl admin memory promote cand_abc123 --auto \
  --scope project --scope-key proj_abc123 \
  --confidence-threshold 0.8

memory-share ​

Preview or apply promotion-backed memory sharing. memory-share reports what sharing one or more raw memories into another scope would entail; add --apply to perform the sharing writes.

Synopsis ​

bash
sibyl admin memory share <source_ids>... [options]

Arguments ​

ArgumentRequiredDescription
source_idsYesRaw memory IDs to share-preview

Options ​

OptionShortDescription
--applyApply sharing writes
--previewPreview without sharing
--target-scopeIntended target scope
--target-keyTarget scope key
--recipient-orgFuture recipient organization ID
--project-pProject ID
--all-projectsDo not auto-scope to the linked project
--json-jOutput as JSON

Examples ​

bash
# Preview what sharing would entail
sibyl admin memory share mem_abc123 mem_def456 \
  --target-scope shared --preview

# Apply the sharing writes
sibyl admin memory share mem_abc123 mem_def456 \
  --target-scope shared --apply

memory-space ​

Memory-space inspection and preview commands. A memory space groups raw memory under an access boundary an agent or API key can be scoped to.

memory-space preview-agent ​

Preview what an agent could recall from selected memory spaces. Use this to confirm an agent's reach before granting it.

Synopsis ​

bash
sibyl admin memory space preview-agent <agent_id> --space <space_id> [options]

Arguments ​

ArgumentRequiredDescription
agent_idYesAgent principal ID

Options ​

OptionShortRequiredDescription
--spaceYesPrimary memory space ID
--also-spaceNoComma-separated additional memory space IDs
--limit-lNoMaximum sources (1-200, default 50)
--json-jNoOutput as JSON

Example ​

bash
sibyl admin memory space preview-agent agent_abc123 \
  --space space_main \
  --also-space space_shared,space_team \
  --limit 100

memory-review ​

Memory review queue automation commands. This is the reflection dream-cycle: the automation that drains pending candidates, runs the org-scoped nightly maintenance job, and records decision receipts.

SubcommandDescription
memory-review drainDrain pending reflection candidates through automatic review
memory-review dreamQueue the automatic reflection dream-cycle job
memory-review statusShow dream-cycle runs and automatic decision receipts

memory-review drain ​

Drain pending reflection candidates through automatic review. By default this previews the drain; --apply commits safe promotions.

Synopsis ​

bash
sibyl admin memory review drain [options]

Options ​

OptionShortDescription
--applyApply safe promotions instead of only previewing
--limitCandidates to process (1-200, default 50)
--confidence-thresholdOverride the auto-review confidence threshold (0.0-1.0)
--scopeTarget memory scope
--scope-keyTarget scope key
--domain-dDomain/category
--project-pProject ID
--all-projectsDo not auto-scope to the linked project
--related-toComma-separated graph IDs to relate after promotion
--taskComma-separated task IDs to relate after promotion
--archive-exceptionsArchive terminal duplicate/stale exceptions when applying
--archive-reasonsComma-separated exception reasons eligible for archive
--json-jOutput as JSON

Examples ​

bash
# Preview the drain
sibyl admin memory review drain

# Apply safe promotions and archive stale exceptions
sibyl admin memory review drain --apply --archive-exceptions

memory-review dream ​

Queue the automatic reflection dream-cycle maintenance job. The dream cycle is the org-scoped nightly pass that reflects raw sources, drains candidates, and records lifecycle findings. By default it queues a dry run; --apply queues a run that commits safe promotions.

Synopsis ​

bash
sibyl admin memory review dream [options]

Options ​

OptionDescription
--applyApply safe automatic promotions instead of a dry run
--source-limitRaw sources to process (0-100, default 20)
--candidate-limitPending reflection candidates (0-200, default 50)
--archive-exceptionsArchive terminal duplicate/stale exceptions when applying (--keep-exceptions to disable, default on)
--json / -jOutput as JSON

Examples ​

bash
# Queue a dry-run dream cycle
sibyl admin memory review dream

# Queue an applying run with wider source coverage
sibyl admin memory review dream --apply --source-limit 50

memory-review status ​

Show reflection dream-cycle runs and automatic decision receipts.

Synopsis ​

bash
sibyl admin memory review status [options]

Options ​

OptionShortDefaultDescription
--limit-l10Maximum runs/events (1-50)
--json-jfalseOutput as JSON

Example ​

bash
sibyl admin memory review status --limit 20

Released under the Apache-2.0 License.