Response object from an agent interaction, consisting of the new messages generated by the agent and usage statistics. The type of the returned messages can be either `Message` or `LettaMessage`, depending on what was specified in the request. Attributes: messages (List[Union[Message, LettaMessage]]): The messages returned by the agent. usage (LettaUsageStatistics): The usage statistics
Log probabilities of the output tokens from the last LLM call. Only present if return_logprobs was enabled.
turns
object
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. Use
{
"$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"
}
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.