DOC-API-MODEL-schema-1im79fphmq#overview
GenerationContext
Snapshot of retrieval inputs, prompt provenance, and turn position that shaped a generated message.
Type-reference view: API Schema 9frhv4euve, API Schema 9ftjkkjhfa. Request and response views describe this type; they do not declare an endpoint.
Meaning and usage
Section ID: DOC-API-MODEL-schema-1im79fphmq#meaning
See the definition above.
Usage profiles
Section ID: DOC-API-MODEL-schema-1im79fphmq#fields
| Usage | Fields and validation |
|---|---|
| In requests | View fields |
| In responses | View fields |
In requests
Section ID: DOC-API-MODEL-schema-1im79fphmq#request
API JSON uses JSON field names (camelCase).
| Field | Type | Presence | Meaning |
|---|---|---|---|
Section ID: DOC-API-MODEL-schema-1im79fphmq#request-field-memoriesmemories | Array of MemoryReference | Optional | Memory records captured in the generation context. |
Section ID: DOC-API-MODEL-schema-1im79fphmq#request-field-relationsrelations | Array of RelationReference | Optional | Graph relationships captured in the generation context. |
Section ID: DOC-API-MODEL-schema-1im79fphmq#request-field-memorysearchmemorySearch | MemorySearchParams | Optional | Memory-query parameters and counts recorded for this generation. |
Section ID: DOC-API-MODEL-schema-1im79fphmq#request-field-turnturn | TurnInfo | Optional | Turn position and limit within the generation run. |
Section ID: DOC-API-MODEL-schema-1im79fphmq#request-field-languagepreferencelanguagePreference | string | Optional | Language preference associated with the generation context. |
Section ID: DOC-API-MODEL-schema-1im79fphmq#request-field-resolvedsystempromptresolvedSystemPrompt | string | Optional | System prompt selected for this generation after prompt precedence is resolved. This field is retained in the schema but is not populated; use resolved_prompt_hash for recorded prompt identity. |
Section ID: DOC-API-MODEL-schema-1im79fphmq#request-field-profileidprofileId | string | Optional | Agent profile that produced this message ("" if none active). |
Section ID: DOC-API-MODEL-schema-1im79fphmq#request-field-modelmodel | string | Optional | Model actually used for this generation. |
Section ID: DOC-API-MODEL-schema-1im79fphmq#request-field-promptsourcepromptSource | string (PROMPT_SOURCE_CLIENT_OVERRIDE, PROMPT_SOURCE_PROFILE_TEMPLATE, PROMPT_SOURCE_DEFAULT_CONFIG) or integer (int32) | Optional; explicit presence | Which precedence tier supplied the prompt. |
Section ID: DOC-API-MODEL-schema-1im79fphmq#request-field-baseconfigbaseConfig | GenerationConfig | Optional | See meaning below. |
Section ID: DOC-API-MODEL-schema-1im79fphmq#request-field-overrideconfigoverrideConfig | GenerationConfig | Optional | Per-call generation configuration supplied before the override merge. |
Section ID: DOC-API-MODEL-schema-1im79fphmq#request-field-profileversionprofileVersion | string (int64) | Optional | Immutable version of the active agent profile used to render this turn’s prompt. Absent on older turns and turns without a profile template. Pattern: ^-?\d+$. |
Section ID: DOC-API-MODEL-schema-1im79fphmq#request-field-fragmentsversionfragmentsVersion | string (int64) | Optional | Version of the prompt-fragment set used to render the profile prompt. Pattern: ^-?\d+$. |
Section ID: DOC-API-MODEL-schema-1im79fphmq#request-field-promptvariablespromptVariables | Map from string to JSON value | Optional | Values bound to the prompt template for this generation. |
Section ID: DOC-API-MODEL-schema-1im79fphmq#request-field-profilerenderfailedprofileRenderFailed | boolean | Optional | Whether rendering the profile prompt failed for this generation. |
Section ID: DOC-API-MODEL-schema-1im79fphmq#request-field-resolvedprompthashresolvedPromptHash | string | Optional | SHA-256 hash, as 64 hexadecimal characters, of the resolved system prompt before the current-time instruction is appended. Identifies prompt content only, excluding model and sampling parameters. Absent on older turns without prompt capture. |
Section ID: DOC-API-MODEL-schema-1im79fphmq#request-field-resolvedusercontextresolvedUserContext | string | Optional | See meaning below. |
Section ID: DOC-API-MODEL-schema-1im79fphmq#request-field-resolvedmcpserversresolvedMcpServers | Array of MCPServerReference | Optional | See meaning below. |
baseConfig
Generation configuration resolved at send time before per-call overrides and timeout adjustments, with system_prompt omitted. The active profile supplies the base when selected; otherwise the conversation default does. Use prompt_source and profile_id for prompt attribution. The base configuration can be absent when neither source supplies one or no snapshot was captured.
For a supplied per-call override, the populated top-level fields of override_config overlay base_config to form the effective configuration. override_config can be absent when no override was supplied.
resolvedUserContext
The literal user-context text supplied to the model for this turn, including the available name, locale and location conditions. It is a captured prompt input, not a reconstruction from the user’s current profile.
The value is computed once per turn and reused across its model calls. It can be empty when location context is unavailable, enrichment fails or the turn predates capture.
resolvedMcpServers
The MCP server list used for this turn after resolving conversation settings, the active profile, and any per-turn override_mcp_servers. It determines both tool discovery and the allow/block rules applied by CallTool.
A per-turn override does not change the conversation's stored MCP settings. Compare this snapshot with settings.mcp_servers to inspect how the turn's tool set differed.
Empty on turns predating capture and on threads with no MCP servers.
Values of promptSource
Section ID: DOC-API-MODEL-schema-1im79fphmq#request-values-promptsource
Source that supplied the effective system prompt for a generation turn. Distinguishes a client override, a profile template and the conversation default configuration for prompt attribution.
| Value | No. | Form | Meaning |
|---|---|---|---|
PROMPT_SOURCE_CLIENT_OVERRIDE | 0 | Canonical | See meaning below. |
PROMPT_SOURCE_PROFILE_TEMPLATE | 1 | Canonical | See meaning below. |
PROMPT_SOURCE_DEFAULT_CONFIG | 2 | Canonical | See meaning below. |
PROMPT_SOURCE_CLIENT_OVERRIDE
The caller supplied the prompt through the send request's generation-configuration override.
SendRequest.override_generation_config
PROMPT_SOURCE_PROFILE_TEMPLATE
The prompt was rendered from the active agent profile template.
active agent profile's rendered template
PROMPT_SOURCE_DEFAULT_CONFIG
The prompt came from the conversation or project default generation configuration.
conversation/project default_generation_config
In responses
Section ID: DOC-API-MODEL-schema-1im79fphmq#response
API JSON uses JSON field names (camelCase).
| Field | Type | Presence | Meaning |
|---|---|---|---|
Section ID: DOC-API-MODEL-schema-1im79fphmq#field-memoriesSection ID: DOC-API-MODEL-schema-1im79fphmq#response-field-memoriesmemories | Array of MemoryReference | Optional | Memory records captured in the generation context. |
Section ID: DOC-API-MODEL-schema-1im79fphmq#field-relationsSection ID: DOC-API-MODEL-schema-1im79fphmq#response-field-relationsrelations | Array of RelationReference | Optional | Graph relationships captured in the generation context. |
Section ID: DOC-API-MODEL-schema-1im79fphmq#field-memorysearchSection ID: DOC-API-MODEL-schema-1im79fphmq#response-field-memorysearchmemorySearch | MemorySearchParams | Optional | Memory-query parameters and counts recorded for this generation. |
Section ID: DOC-API-MODEL-schema-1im79fphmq#field-turnSection ID: DOC-API-MODEL-schema-1im79fphmq#response-field-turnturn | TurnInfo | Optional | Turn position and limit within the generation run. |
Section ID: DOC-API-MODEL-schema-1im79fphmq#field-languagepreferenceSection ID: DOC-API-MODEL-schema-1im79fphmq#response-field-languagepreferencelanguagePreference | string | Optional | Language preference associated with the generation context. |
Section ID: DOC-API-MODEL-schema-1im79fphmq#field-resolvedsystempromptSection ID: DOC-API-MODEL-schema-1im79fphmq#response-field-resolvedsystempromptresolvedSystemPrompt | string | Optional | System prompt selected for this generation after prompt precedence is resolved. This field is retained in the schema but is not populated; use resolved_prompt_hash for recorded prompt identity. |
Section ID: DOC-API-MODEL-schema-1im79fphmq#field-profileidSection ID: DOC-API-MODEL-schema-1im79fphmq#response-field-profileidprofileId | string | Optional | Agent profile that produced this message ("" if none active). |
Section ID: DOC-API-MODEL-schema-1im79fphmq#field-modelSection ID: DOC-API-MODEL-schema-1im79fphmq#response-field-modelmodel | string | Optional | Model actually used for this generation. |
Section ID: DOC-API-MODEL-schema-1im79fphmq#field-promptsourceSection ID: DOC-API-MODEL-schema-1im79fphmq#response-field-promptsourcepromptSource | string (PROMPT_SOURCE_CLIENT_OVERRIDE, PROMPT_SOURCE_PROFILE_TEMPLATE, PROMPT_SOURCE_DEFAULT_CONFIG) or integer (int32) | Optional; explicit presence | Which precedence tier supplied the prompt. |
Section ID: DOC-API-MODEL-schema-1im79fphmq#field-baseconfigSection ID: DOC-API-MODEL-schema-1im79fphmq#response-field-baseconfigbaseConfig | GenerationConfig | Optional | See meaning below. |
Section ID: DOC-API-MODEL-schema-1im79fphmq#field-overrideconfigSection ID: DOC-API-MODEL-schema-1im79fphmq#response-field-overrideconfigoverrideConfig | GenerationConfig | Optional | Per-call generation configuration supplied before the override merge. |
Section ID: DOC-API-MODEL-schema-1im79fphmq#field-profileversionSection ID: DOC-API-MODEL-schema-1im79fphmq#response-field-profileversionprofileVersion | string (int64) | Optional | Immutable version of the active agent profile used to render this turn’s prompt. Absent on older turns and turns without a profile template. Pattern: ^-?\d+$. |
Section ID: DOC-API-MODEL-schema-1im79fphmq#field-fragmentsversionSection ID: DOC-API-MODEL-schema-1im79fphmq#response-field-fragmentsversionfragmentsVersion | string (int64) | Optional | Version of the prompt-fragment set used to render the profile prompt. Pattern: ^-?\d+$. |
Section ID: DOC-API-MODEL-schema-1im79fphmq#field-promptvariablesSection ID: DOC-API-MODEL-schema-1im79fphmq#response-field-promptvariablespromptVariables | Map from string to JSON value | Optional | Values bound to the prompt template for this generation. |
Section ID: DOC-API-MODEL-schema-1im79fphmq#field-profilerenderfailedSection ID: DOC-API-MODEL-schema-1im79fphmq#response-field-profilerenderfailedprofileRenderFailed | boolean | Optional | Whether rendering the profile prompt failed for this generation. |
Section ID: DOC-API-MODEL-schema-1im79fphmq#field-resolvedprompthashSection ID: DOC-API-MODEL-schema-1im79fphmq#response-field-resolvedprompthashresolvedPromptHash | string | Optional | SHA-256 hash, as 64 hexadecimal characters, of the resolved system prompt before the current-time instruction is appended. Identifies prompt content only, excluding model and sampling parameters. Absent on older turns without prompt capture. |
Section ID: DOC-API-MODEL-schema-1im79fphmq#field-resolvedusercontextSection ID: DOC-API-MODEL-schema-1im79fphmq#response-field-resolvedusercontextresolvedUserContext | string | Optional | See meaning below. |
Section ID: DOC-API-MODEL-schema-1im79fphmq#field-resolvedmcpserversSection ID: DOC-API-MODEL-schema-1im79fphmq#response-field-resolvedmcpserversresolvedMcpServers | Array of MCPServerReference | Optional | See meaning below. |
baseConfig
Generation configuration resolved at send time before per-call overrides and timeout adjustments, with system_prompt omitted. The active profile supplies the base when selected; otherwise the conversation default does. Use prompt_source and profile_id for prompt attribution. The base configuration can be absent when neither source supplies one or no snapshot was captured.
For a supplied per-call override, the populated top-level fields of override_config overlay base_config to form the effective configuration. override_config can be absent when no override was supplied.
resolvedUserContext
The literal user-context text supplied to the model for this turn, including the available name, locale and location conditions. It is a captured prompt input, not a reconstruction from the user’s current profile.
The value is computed once per turn and reused across its model calls. It can be empty when location context is unavailable, enrichment fails or the turn predates capture.
resolvedMcpServers
The MCP server list used for this turn after resolving conversation settings, the active profile, and any per-turn override_mcp_servers. It determines both tool discovery and the allow/block rules applied by CallTool.
A per-turn override does not change the conversation's stored MCP settings. Compare this snapshot with settings.mcp_servers to inspect how the turn's tool set differed.
Empty on turns predating capture and on threads with no MCP servers.
Values of promptSource
Section ID: DOC-API-MODEL-schema-1im79fphmq#response-values-promptsource
Source that supplied the effective system prompt for a generation turn. Distinguishes a client override, a profile template and the conversation default configuration for prompt attribution.
| Value | No. | Form | Meaning |
|---|---|---|---|
PROMPT_SOURCE_CLIENT_OVERRIDE | 0 | Canonical | See meaning below. |
PROMPT_SOURCE_PROFILE_TEMPLATE | 1 | Canonical | See meaning below. |
PROMPT_SOURCE_DEFAULT_CONFIG | 2 | Canonical | See meaning below. |
PROMPT_SOURCE_CLIENT_OVERRIDE
The caller supplied the prompt through the send request's generation-configuration override.
SendRequest.override_generation_config
PROMPT_SOURCE_PROFILE_TEMPLATE
The prompt was rendered from the active agent profile template.
active agent profile's rendered template
PROMPT_SOURCE_DEFAULT_CONFIG
The prompt came from the conversation or project default generation configuration.
conversation/project default_generation_config
Where used
Section ID: DOC-API-MODEL-schema-1im79fphmq#where-used
| Reference | Relationship |
|---|---|
| Withdraw your rating on a message | POST /api/v1/llm/delete-message-rating |
| Get full conversation state | POST /api/v1/llm/conversation-state |
| Rate an assistant message | POST /api/v1/llm/rate-message |
| Send a message and wait for the result | POST /api/v1/llm/send-message-sync |
| Submit client-side tool results and wait for the next segment | POST /api/v1/llm/submit-client-tool-results-sync |
| Append a message without generating | POST /api/v1/llm/append-message |
| Send a message to a conversation | POST /api/v1/llm/send-message |
| ReceiveMessageRequest | API JSON uses JSON field names (camelCase). |
| ClientToolDispatch | API JSON uses JSON field names (camelCase). |
Download the public reference contract.
Document ID: DOC-API-MODEL-schema-1im79fphmq