LettaMessage

class LettaMessage(BaseModel)

Base class for simplified Letta message response type. This is intended to be used for developers who want the internal monologue, function calls, and function returns in a simplified format that does not include additional information other than the content and timestamp.

Attributes:

  • id str - The ID of the message
  • date datetime - The date the message was created in ISO format

InternalMonologue

class InternalMonologue(LettaMessage)

Representation of an agent’s internal monologue.

Attributes:

  • internal_monologue str - The internal monologue of the agent
  • id str - The ID of the message
  • date datetime - The date the message was created in ISO format

FunctionCallMessage

class FunctionCallMessage(LettaMessage)

A message representing a request to call a function (generated by the LLM to trigger function execution).

Attributes:

  • function_call Union[FunctionCall, FunctionCallDelta] - The function call
  • id str - The ID of the message
  • date datetime - The date the message was created in ISO format

FunctionReturn

class FunctionReturn(LettaMessage)

A message representing the return value of a function call (generated by Letta executing the requested function).

Attributes:

  • function_return str - The return value of the function
  • status Literal[“success”, “error”] - The status of the function call
  • id str - The ID of the message
  • date datetime - The date the message was created in ISO format