agents

Process a user message and return the agent's response. This endpoint accepts a message from a user and processes it through the agent.

post/v1/agents/{agent_id}/messages

Request

  • Base URL
    https://app.letta.com
  • URL
    https://app.letta.com/v1/agents/{agent_id}/messages
  • Auth
    HTTP bearer

Path parameters

agent_idstring required

Request body

max_stepsinteger

Maximum number of steps the agent should take to process the request.

use_assistant_messageboolean

Whether the server should parse specific tool call arguments (default send_message) as AssistantMessage objects.

assistant_message_tool_namestring

The name of the designated message tool.

assistant_message_tool_kwargstring

The name of the message argument in the designated message tool.

include_return_message_typesMessageType[] nullable

Only return specified message types in the response. If None (default) returns all messages.

enable_thinkingstring

If set to True, enables reasoning before responses or tool calls from the agent.

Response

Successful Response

Changes

    • info

      added the optional property /// to the response with the status

    • info

      response property messages/items/oneOf[subschema #5: ToolCallMessage]/tool_call deprecated

    • info

      added the optional property /// to the response with the status

    • info

      response property messages/items/oneOf[subschema #6: ToolReturnMessage]/status deprecated

    • info

      response property messages/items/oneOf[subschema #6: ToolReturnMessage]/stderr deprecated

    • info

      response property messages/items/oneOf[subschema #6: ToolReturnMessage]/stdout deprecated

    • info

      response property messages/items/oneOf[subschema #6: ToolReturnMessage]/tool_call_id deprecated

    • info

      response property messages/items/oneOf[subschema #6: ToolReturnMessage]/tool_return deprecated