Skip to main content
Section ID: 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

UsageFields and validation
In requestsView fields
In responsesView fields

In requests​

Section ID: DOC-API-MODEL-schema-1im79fphmq#request

API JSON uses JSON field names (camelCase).

FieldTypePresenceMeaning
Section ID: DOC-API-MODEL-schema-1im79fphmq#request-field-memoriesmemoriesArray of MemoryReferenceOptionalMemory records captured in the generation context.
Section ID: DOC-API-MODEL-schema-1im79fphmq#request-field-relationsrelationsArray of RelationReferenceOptionalGraph relationships captured in the generation context.
Section ID: DOC-API-MODEL-schema-1im79fphmq#request-field-memorysearchmemorySearchMemorySearchParamsOptionalMemory-query parameters and counts recorded for this generation.
Section ID: DOC-API-MODEL-schema-1im79fphmq#request-field-turnturnTurnInfoOptionalTurn position and limit within the generation run.
Section ID: DOC-API-MODEL-schema-1im79fphmq#request-field-languagepreferencelanguagePreferencestringOptionalLanguage preference associated with the generation context.
Section ID: DOC-API-MODEL-schema-1im79fphmq#request-field-resolvedsystempromptresolvedSystemPromptstringOptionalSystem 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-profileidprofileIdstringOptionalAgent profile that produced this message ("" if none active).
Section ID: DOC-API-MODEL-schema-1im79fphmq#request-field-modelmodelstringOptionalModel actually used for this generation.
Section ID: DOC-API-MODEL-schema-1im79fphmq#request-field-promptsourcepromptSourcestring (PROMPT_SOURCE_CLIENT_OVERRIDE, PROMPT_SOURCE_PROFILE_TEMPLATE, PROMPT_SOURCE_DEFAULT_CONFIG) or integer (int32)Optional; explicit presenceWhich precedence tier supplied the prompt.
Section ID: DOC-API-MODEL-schema-1im79fphmq#request-field-baseconfigbaseConfigGenerationConfigOptionalSee meaning below.
Section ID: DOC-API-MODEL-schema-1im79fphmq#request-field-overrideconfigoverrideConfigGenerationConfigOptionalPer-call generation configuration supplied before the override merge.
Section ID: DOC-API-MODEL-schema-1im79fphmq#request-field-profileversionprofileVersionstring (int64)OptionalImmutable 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-fragmentsversionfragmentsVersionstring (int64)OptionalVersion of the prompt-fragment set used to render the profile prompt. Pattern: ^-?\d+$.
Section ID: DOC-API-MODEL-schema-1im79fphmq#request-field-promptvariablespromptVariablesMap from string to JSON valueOptionalValues bound to the prompt template for this generation.
Section ID: DOC-API-MODEL-schema-1im79fphmq#request-field-profilerenderfailedprofileRenderFailedbooleanOptionalWhether rendering the profile prompt failed for this generation.
Section ID: DOC-API-MODEL-schema-1im79fphmq#request-field-resolvedprompthashresolvedPromptHashstringOptionalSHA-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-resolvedusercontextresolvedUserContextstringOptionalSee meaning below.
Section ID: DOC-API-MODEL-schema-1im79fphmq#request-field-resolvedmcpserversresolvedMcpServersArray of MCPServerReferenceOptionalSee 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.

ValueNo.FormMeaning
PROMPT_SOURCE_CLIENT_OVERRIDE0CanonicalSee meaning below.
PROMPT_SOURCE_PROFILE_TEMPLATE1CanonicalSee meaning below.
PROMPT_SOURCE_DEFAULT_CONFIG2CanonicalSee 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).

FieldTypePresenceMeaning
Section ID: DOC-API-MODEL-schema-1im79fphmq#field-memoriesSection ID: DOC-API-MODEL-schema-1im79fphmq#response-field-memoriesmemoriesArray of MemoryReferenceOptionalMemory records captured in the generation context.
Section ID: DOC-API-MODEL-schema-1im79fphmq#field-relationsSection ID: DOC-API-MODEL-schema-1im79fphmq#response-field-relationsrelationsArray of RelationReferenceOptionalGraph relationships captured in the generation context.
Section ID: DOC-API-MODEL-schema-1im79fphmq#field-memorysearchSection ID: DOC-API-MODEL-schema-1im79fphmq#response-field-memorysearchmemorySearchMemorySearchParamsOptionalMemory-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-turnturnTurnInfoOptionalTurn position and limit within the generation run.
Section ID: DOC-API-MODEL-schema-1im79fphmq#field-languagepreferenceSection ID: DOC-API-MODEL-schema-1im79fphmq#response-field-languagepreferencelanguagePreferencestringOptionalLanguage preference associated with the generation context.
Section ID: DOC-API-MODEL-schema-1im79fphmq#field-resolvedsystempromptSection ID: DOC-API-MODEL-schema-1im79fphmq#response-field-resolvedsystempromptresolvedSystemPromptstringOptionalSystem 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-profileidprofileIdstringOptionalAgent 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-modelmodelstringOptionalModel actually used for this generation.
Section ID: DOC-API-MODEL-schema-1im79fphmq#field-promptsourceSection ID: DOC-API-MODEL-schema-1im79fphmq#response-field-promptsourcepromptSourcestring (PROMPT_SOURCE_CLIENT_OVERRIDE, PROMPT_SOURCE_PROFILE_TEMPLATE, PROMPT_SOURCE_DEFAULT_CONFIG) or integer (int32)Optional; explicit presenceWhich precedence tier supplied the prompt.
Section ID: DOC-API-MODEL-schema-1im79fphmq#field-baseconfigSection ID: DOC-API-MODEL-schema-1im79fphmq#response-field-baseconfigbaseConfigGenerationConfigOptionalSee meaning below.
Section ID: DOC-API-MODEL-schema-1im79fphmq#field-overrideconfigSection ID: DOC-API-MODEL-schema-1im79fphmq#response-field-overrideconfigoverrideConfigGenerationConfigOptionalPer-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-profileversionprofileVersionstring (int64)OptionalImmutable 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-fragmentsversionfragmentsVersionstring (int64)OptionalVersion 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-promptvariablespromptVariablesMap from string to JSON valueOptionalValues 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-profilerenderfailedprofileRenderFailedbooleanOptionalWhether 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-resolvedprompthashresolvedPromptHashstringOptionalSHA-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-resolvedusercontextresolvedUserContextstringOptionalSee meaning below.
Section ID: DOC-API-MODEL-schema-1im79fphmq#field-resolvedmcpserversSection ID: DOC-API-MODEL-schema-1im79fphmq#response-field-resolvedmcpserversresolvedMcpServersArray of MCPServerReferenceOptionalSee 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.

ValueNo.FormMeaning
PROMPT_SOURCE_CLIENT_OVERRIDE0CanonicalSee meaning below.
PROMPT_SOURCE_PROFILE_TEMPLATE1CanonicalSee meaning below.
PROMPT_SOURCE_DEFAULT_CONFIG2CanonicalSee 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

ReferenceRelationship
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
Send a message and wait for the resultPOST /api/v1/llm/send-message-sync
Submit client-side tool results and wait for the next segmentPOST /api/v1/llm/submit-client-tool-results-sync
Append a message without generatingPOST /api/v1/llm/append-message
Send a message to a conversationPOST /api/v1/llm/send-message
ReceiveMessageRequestAPI JSON uses JSON field names (camelCase).
ClientToolDispatchAPI JSON uses JSON field names (camelCase).
Models containing this value
ModelRelationship
MessageNested in model
MessageNested in model

Download the public reference contract.

Document ID: DOC-API-MODEL-schema-1im79fphmq