Skip to main content

Agent Context

This category lists the 5 Runtime system commands under system.luna..

1. Read context tool result​

Full name: system.luna.context.tool-result.read

Read a previously persisted result by the explicit runId and toolCallId from a stored tool-result reference. Only owned tenant conversations are accessible. Never re-execute a completed write to recover output. · Risk: Read

sl system luna context tool-result read \
(--definition-json json|--definition-file path) [--json]

Parameters:

  • appCode(optional)— Application code from the current context; defaults to luna
  • threadId(required)— Owned tenant conversation UUID from the current context
  • runId(required)— Explicit run ID from a stored tool-result reference
  • toolCallId(required)— Exact completed tool call ID from that reference
  • offset(optional)— Character offset; defaults to zero. Continue with nextOffset
  • length(optional)— Characters to return, 1–16000; defaults to 8000

2. List memories​

Full name: system.luna.memory.list

List or search private long-term memories with provenance, versions and scope revision. Use pagination to inspect all saved memories. · Risk: Read

sl system luna memory list \
(--definition-json json|--definition-file path) [--json]

Parameters:

  • appCode(optional)— Current application code; defaults to luna. Identity is derived from the authenticated actor
  • query(optional)— Literal content filter; empty returns all active memories with pagination
  • offset / limit(optional)— Offset defaults to 0; limit 1–100 defaults to 30. Continue with nextOffset

3. Search context​

Full name: system.luna.context.search

Search the current owned conversation branch for original user requirements, corrections and execution evidence. Return source step IDs for exact reading. · Risk: Read

sl system luna context search \
(--definition-json json|--definition-file path) [--json]

Parameters:

  • appCode(optional)— Application code from the current context; defaults to luna
  • threadId(required)— Owned tenant conversation UUID from the current context
  • headMessageId(required)— Exact branch head from the current context. Sibling branches are excluded
  • query(required)— Literal text to find in original messages and stored execution evidence
  • offset(optional)— Result offset; defaults to zero. Continue with nextOffset
  • limit(optional)— Page size 1–50; defaults to 20

4. Apply memory​

Full name: system.luna.memory.apply

Atomically remember, correct or forget private memories. List first for revision and exact IDs. Supply the original user source message and exact supporting quotes. Confirm only after success. · Risk: Memory write

sl system luna memory apply \
(--definition-json json|--definition-file path) [--json]

Parameters:

  • appCode(optional)— Current application code; defaults to luna
  • expectedRevision(required)— Exact scope revision returned by list. On conflict, list again and reconsider the requested changes
  • source(required)— {threadId, messageId}: original owned user message authorizing this change; never assistant or tool content
  • operations(required)— 1–20 atomic changes. create: {action:"create",key,content,quote,priority?}; update: {action:"update",id,version,content,quote,priority?}; delete: {action:"delete",id,version,quote}. priority is core only for stable cross-topic preferences or identity, otherwise contextual. Quote must be an exact substring of the source user message. List first for IDs and versions. Use stable semantic keys and update existing facts. Deletion clears saved content, not original chat history

5. Read context​

Full name: system.luna.context.read

Read a stored evidence step by its exact stepId, with character pagination. Supply appCode, threadId and headMessageId from the current context. Never repeat a completed write merely to recover its result. · Risk: Read

sl system luna context read \
(--definition-json json|--definition-file path) [--json]

Parameters:

  • appCode(optional)— Application code from the current context; defaults to luna
  • threadId(required)— Owned tenant conversation UUID from the current context
  • headMessageId(required)— Exact branch head from the current context
  • stepId(required)— Exact source stepId returned by search or an evidence reference
  • offset(optional)— Character offset; defaults to zero. Continue with nextOffset
  • length(optional)— Characters to return, 1–16000; defaults to 8000