Skip to main content

GenerationContext

Snapshot of retrieval inputs, prompt provenance, and turn position that shaped a generated message.

Usage profiles​

UsageFields and validation
In requestsView fields
In responsesView fields
In webhook payloadsView fields

In requests​

API JSON uses JSON field names (camelCase).

FieldTypePresenceMeaning
memoriesArray of MemoryReferenceOptionalMemory records captured in the generation context.
relationsArray of RelationReferenceOptionalGraph relationships captured in the generation context.
memorySearchMemorySearchParamsOptionalMemory-query parameters and counts recorded for this generation.
turnTurnInfoOptionalTurn position and limit within the generation run.
languagePreferencestringOptionalLanguage preference associated with the generation context.
resolvedSystemPromptstringOptionalSystem 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.
profileIdstringOptionalAgent profile that produced this message ("" if none active).
modelstringOptionalModel actually used for this generation.
promptSourcestring (PROMPT_SOURCE_CLIENT_OVERRIDE, PROMPT_SOURCE_PROFILE_TEMPLATE, PROMPT_SOURCE_DEFAULT_CONFIG) or integer (int32)OptionalWhich precedence tier supplied the prompt.
baseConfigGenerationConfigOptionalGeneration configuration resolved before per-call overrides and timeout adjustments, with system_prompt omitted. The active profile supplies the base when selected; otherwise the conversation default does. May be absent on older turns or when neither supplies a configuration.
overrideConfigGenerationConfigOptionalPer-call generation configuration supplied before the override merge.
profileVersioninteger (int32)OptionalImmutable version of the active agent profile used to render this turn’s prompt. Absent on older turns and turns without a profile template. Minimum: -2147483648. Maximum: 2147483647.
fragmentsVersioninteger (int32)OptionalVersion of the prompt-fragment set used to render the profile prompt. Minimum: -2147483648. Maximum: 2147483647.
promptVariablesMap from string to JSON valueOptionalValues bound to the prompt template for this generation.
profileRenderFailedbooleanOptionalWhether rendering the profile prompt failed for this generation.
resolvedPromptHashstringOptionalSHA-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.
resolvedUserContextstringOptionalThe [User Context] block as rendered into this turn's prompt: the user's name, locale, and location conditions (weather/AQI/UV/sun times). This is the literal text the model received, not a reconstruction. Empty when the user has no stored location, when enrichment degraded, or on turns predating capture.
resolvedMcpServersArray of MCPServerReferenceOptionalThe MCP server list that governed this turn — the tier actually resolved (conversation settings -> active profile -> per-turn override_mcp_servers), which is simultaneously the tool-discovery source and the CallTool allow/block basis. Empty on turns predating capture and on threads with no MCP servers.

Values of promptSource​

Source that supplied the effective prompt for a generation turn.

ValueNo.FormMeaning
PROMPT_SOURCE_CLIENT_OVERRIDE1CanonicalThe caller supplied the prompt through the send request's generation-configuration override.
PROMPT_SOURCE_PROFILE_TEMPLATE2CanonicalThe prompt was rendered from the active agent profile template.
PROMPT_SOURCE_DEFAULT_CONFIG3CanonicalThe prompt came from the conversation or project default generation configuration.

In responses​

API JSON uses JSON field names (camelCase).

FieldTypePresenceMeaning
memoriesArray of MemoryReferenceOptionalMemory records captured in the generation context.
relationsArray of RelationReferenceOptionalGraph relationships captured in the generation context.
memorySearchMemorySearchParamsOptionalMemory-query parameters and counts recorded for this generation.
turnTurnInfoOptionalTurn position and limit within the generation run.
languagePreferencestringOptionalLanguage preference associated with the generation context.
resolvedSystemPromptstringOptionalSystem 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.
profileIdstringOptionalAgent profile that produced this message ("" if none active).
modelstringOptionalModel actually used for this generation.
promptSourcestring (PROMPT_SOURCE_CLIENT_OVERRIDE, PROMPT_SOURCE_PROFILE_TEMPLATE, PROMPT_SOURCE_DEFAULT_CONFIG) or integer (int32)OptionalWhich precedence tier supplied the prompt.
baseConfigGenerationConfigOptionalGeneration configuration resolved before per-call overrides and timeout adjustments, with system_prompt omitted. The active profile supplies the base when selected; otherwise the conversation default does. May be absent on older turns or when neither supplies a configuration.
overrideConfigGenerationConfigOptionalPer-call generation configuration supplied before the override merge.
profileVersioninteger (int32)OptionalImmutable version of the active agent profile used to render this turn’s prompt. Absent on older turns and turns without a profile template. Minimum: -2147483648. Maximum: 2147483647.
fragmentsVersioninteger (int32)OptionalVersion of the prompt-fragment set used to render the profile prompt. Minimum: -2147483648. Maximum: 2147483647.
promptVariablesMap from string to JSON valueOptionalValues bound to the prompt template for this generation.
profileRenderFailedbooleanOptionalWhether rendering the profile prompt failed for this generation.
resolvedPromptHashstringOptionalSHA-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.
resolvedUserContextstringOptionalThe [User Context] block as rendered into this turn's prompt: the user's name, locale, and location conditions (weather/AQI/UV/sun times). This is the literal text the model received, not a reconstruction. Empty when the user has no stored location, when enrichment degraded, or on turns predating capture.
resolvedMcpServersArray of MCPServerReferenceOptionalThe MCP server list that governed this turn — the tier actually resolved (conversation settings -> active profile -> per-turn override_mcp_servers), which is simultaneously the tool-discovery source and the CallTool allow/block basis. Empty on turns predating capture and on threads with no MCP servers.

Values of promptSource​

Source that supplied the effective prompt for a generation turn.

ValueNo.FormMeaning
PROMPT_SOURCE_CLIENT_OVERRIDE1CanonicalThe caller supplied the prompt through the send request's generation-configuration override.
PROMPT_SOURCE_PROFILE_TEMPLATE2CanonicalThe prompt was rendered from the active agent profile template.
PROMPT_SOURCE_DEFAULT_CONFIG3CanonicalThe prompt came from the conversation or project default generation configuration.

In webhook payloads​

Webhook JSON uses protobuf field names (snake_case).

FieldTypePresenceMeaning
memoriesArray of MemoryReferenceOptionalMemory records captured in the generation context.
relationsArray of RelationReferenceOptionalGraph relationships captured in the generation context.
memory_searchMemorySearchParamsOptionalMemory-query parameters and counts recorded for this generation.
turnTurnInfoOptionalTurn position and limit within the generation run.
language_preferencestringOptionalLanguage preference associated with the generation context.
resolved_system_promptstringOptionalSystem 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.
profile_idstringOptionalAgent profile that produced this message ("" if none active).
modelstringOptionalModel actually used for this generation.
prompt_sourcestring (PROMPT_SOURCE_CLIENT_OVERRIDE, PROMPT_SOURCE_PROFILE_TEMPLATE, PROMPT_SOURCE_DEFAULT_CONFIG) or integer (int32)OptionalWhich precedence tier supplied the prompt.
base_configGenerationConfigOptionalGeneration configuration resolved before per-call overrides and timeout adjustments, with system_prompt omitted. The active profile supplies the base when selected; otherwise the conversation default does. May be absent on older turns or when neither supplies a configuration.
override_configGenerationConfigOptionalPer-call generation configuration supplied before the override merge.
profile_versioninteger (int32)OptionalImmutable version of the active agent profile used to render this turn’s prompt. Absent on older turns and turns without a profile template. Minimum: -2147483648. Maximum: 2147483647.
fragments_versioninteger (int32)OptionalVersion of the prompt-fragment set used to render the profile prompt. Minimum: -2147483648. Maximum: 2147483647.
prompt_variablesMap from string to JSON valueOptionalValues bound to the prompt template for this generation.
profile_render_failedbooleanOptionalWhether rendering the profile prompt failed for this generation.
resolved_prompt_hashstringOptionalSHA-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.
resolved_user_contextstringOptionalThe [User Context] block as rendered into this turn's prompt: the user's name, locale, and location conditions (weather/AQI/UV/sun times). This is the literal text the model received, not a reconstruction. Empty when the user has no stored location, when enrichment degraded, or on turns predating capture.
resolved_mcp_serversArray of MCPServerReferenceOptionalThe MCP server list that governed this turn — the tier actually resolved (conversation settings -> active profile -> per-turn override_mcp_servers), which is simultaneously the tool-discovery source and the CallTool allow/block basis. Empty on turns predating capture and on threads with no MCP servers.

Values of prompt_source​

Source that supplied the effective prompt for a generation turn.

ValueNo.FormMeaning
PROMPT_SOURCE_CLIENT_OVERRIDE1CanonicalThe caller supplied the prompt through the send request's generation-configuration override.
PROMPT_SOURCE_PROFILE_TEMPLATE2CanonicalThe prompt was rendered from the active agent profile template.
PROMPT_SOURCE_DEFAULT_CONFIG3CanonicalThe prompt came from the conversation or project default generation configuration.

Where used​

ReferenceRelationship
Append a message without generatingPOST /api/v1/llm/append-message
Send a message to a conversationPOST /api/v1/llm/send-message
Send a message and wait for the resultPOST /api/v1/llm/send-message-sync
Withdraw your rating on a messagePOST /api/v1/llm/delete-message-rating
Get full conversation statePOST /api/v1/llm/conversation-state
Rate an assistant messagePOST /api/v1/llm/rate-message
Submit client-side tool results and wait for the next segmentPOST /api/v1/llm/submit-client-tool-results-sync
llm.message_publishedWebhook JSON uses protobuf field names (snake_case).
MessageNested in model
MessageNested in model
MessageNested in model

Download the public reference contract.

Document: DOC-API-MODEL-generation-context.