Skip to content

armgit / letta

Public Imported from GitHub
0

Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.

chore: mark agent.messages.stream endpoint as deprecated (#8227)

Charles Packere57adc0a6e9c
diff --git a/fern/openapi.json b/fern/openapi.json
index 11f1d366c..eb9498693 100644
--- a/fern/openapi.json
+++ b/fern/openapi.json
@@ -7748,8 +7748,9 @@
"post": {
"tags": ["agents"],
"summary": "Send Message Streaming",
- "description": "Process a user message and return the agent's response.\nThis endpoint accepts a message from a user and processes it through the agent.\nIt will stream the steps of the response always, and stream the tokens if 'stream_tokens' is set to True.",
+ "description": "Process a user message and return the agent's response.\n\nDeprecated: Use the `POST /{agent_id}/messages` endpoint with `streaming=true` in the request body instead.\n\nThis endpoint accepts a message from a user and processes it through the agent.\nIt will stream the steps of the response always, and stream the tokens if 'stream_tokens' is set to True.",
"operationId": "create_agent_message_stream",
+ "deprecated": true,
"parameters": [
{
"name": "agent_id",
diff --git a/letta/server/rest_api/routers/v1/agents.py b/letta/server/rest_api/routers/v1/agents.py
index 2e60def33..3dbc7a4d6 100644
--- a/letta/server/rest_api/routers/v1/agents.py
+++ b/letta/server/rest_api/routers/v1/agents.py
@@ -1625,6 +1625,7 @@ async def send_message(
},
}
},
+ deprecated=True,
)
async def send_message_streaming(
request_obj: Request, # FastAPI Request
@@ -1635,6 +1636,9 @@ async def send_message_streaming(
) -> StreamingResponse | LettaResponse:
"""
Process a user message and return the agent's response.
+
+ Deprecated: Use the `POST /{agent_id}/messages` endpoint with `streaming=true` in the request body instead.
+
This endpoint accepts a message from a user and processes it through the agent.
It will stream the steps of the response always, and stream the tokens if 'stream_tokens' is set to True.
"""