{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "#/components/schemas/LettaResponse", "title": "LettaResponse", "properties": { "messages": { "items": { "$ref": "#/components/schemas/LettaMessageUnion" }, "type": "array", "title": "Messages", "description": "The messages returned by the agent." }, "stop_reason": { "$ref": "#/components/schemas/LettaStopReason" }, "usage": { "$ref": "#/components/schemas/LettaUsageStatistics", "description": "The usage statistics of the agent." }, "logprobs": { "anyOf": [ { "$ref": "#/components/schemas/letta__schemas__openai__chat_completion_response__ChoiceLogprobs" }, { "type": "null" } ], "description": "Log probabilities of the output tokens from the last LLM call. Only present if return_logprobs was enabled." }, "turns": { "anyOf": [ { "items": { "$ref": "#/components/schemas/TurnTokenData" }, "type": "array" }, { "type": "null" } ], "title": "Turns", "description": "Token data for all LLM generations in multi-turn agent interaction. Includes token IDs and logprobs for each assistant turn, plus tool result content. Only present if return_token_ids was enabled. Used for RL training with loss masking." } }, "type": "object", "required": [ "messages", "stop_reason", "usage" ], "description": "Response object from an agent interaction, consisting of the new messages generated by the agent and usage statistics.\nThe type of the returned messages can be either `Message` or `LettaMessage`, depending on what was specified in the request.\n\nAttributes:\n messages (List[Union[Message, LettaMessage]]): The messages returned by the agent.\n usage (LettaUsageStatistics): The usage statistics" }