get_context
Load the last few recent messages and semantically related past turns.
Call this before you compose your reply. Pass the user's latest prompt only. Vilix runs relevance retrieval internally. For anything more specific you may also call the optional search_semantic / search_keyword / recent_messages tools (e.g. when the user names a source like ChatGPT).
Every retrieved item carries an ISO timestamp — when two items
disagree about a changing fact (a plan, a status, a decision), the
NEWEST timestamp is the latest known value. Related turns may include
context_before/context_after (the adjacent turns) and the payload
may include also_related: additional nearby matches as compact
snippets, newest first — check it before concluding a fact is
unknown or unchanged.
chat_id — pass null (or omit) on a brand-new conversation to also
receive user_rules, system_behavior, active_projects, and
active_project_state. Pass the chat_id returned by a prior
save_turn to skip those — they are already in the chat's own
context from turn 1 and re-injecting wastes tokens. recent_messages
and related_conversations are always returned (they're the
cross-tool memory bridge).
attachment_context (optional, default "") — if the user's CURRENT
message has an attachment (file, image, code paste, screenshot OCR),
pass a short plain-text summary of it here so retrieval can match on
the attachment topic in addition to the bare prompt. Pass the SAME
summary to save_turn for this turn. Empty = no attachment, ignored.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chat_id | No | ||
| user_prompt | Yes | ||
| attachment_context | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| inbox | No | ||
| skills | No | ||
| message | No | ||
| user_rules | No | ||
| instruction | No | ||
| upgrade_url | No | ||
| also_related | No | ||
| announcements | No | ||
| advisory_nonce | No | ||
| active_projects | No | ||
| recent_messages | No | ||
| server_advisory | No | ||
| system_behavior | No | ||
| active_project_state | No | ||
| related_conversations | No |