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.

feat: remove unused max length parameter [LET-5796] (#5666)

cthomas8a3574bc4843
diff --git a/fern/openapi.json b/fern/openapi.json
index bac63d10e..474699e88 100644
--- a/fern/openapi.json
+++ b/fern/openapi.json
@@ -7226,7 +7226,7 @@
"post": {
"tags": ["agents"],
"summary": "Summarize Messages",
- "description": "Summarize an agent's conversation history to a target message length.\n\nThis endpoint summarizes the current message history for a given agent,\ntruncating and compressing it down to the specified `max_message_length`.",
+ "description": "Summarize an agent's conversation history.",
"operationId": "summarize_messages",
"parameters": [
{
@@ -7243,17 +7243,6 @@
"title": "Agent Id"
},
"description": "The ID of the agent in the format 'agent-<uuid4>'"
- },
- {
- "name": "max_message_length",
- "in": "query",
- "required": true,
- "schema": {
- "type": "integer",
- "description": "Maximum number of messages to retain after summarization.",
- "title": "Max Message Length"
- },
- "description": "Maximum number of messages to retain after summarization."
}
],
"responses": {
diff --git a/letta/server/rest_api/routers/v1/agents.py b/letta/server/rest_api/routers/v1/agents.py
index f69e0a83d..c9f1e11a2 100644
--- a/letta/server/rest_api/routers/v1/agents.py
+++ b/letta/server/rest_api/routers/v1/agents.py
@@ -1683,17 +1683,12 @@ async def preview_raw_payload(
@router.post("/{agent_id}/summarize", status_code=204, operation_id="summarize_messages")
async def summarize_messages(
- request_obj: Request, # FastAPI Request
agent_id: AgentId,
- max_message_length: int = Query(..., description="Maximum number of messages to retain after summarization."),
server: SyncServer = Depends(get_letta_server),
headers: HeaderParams = Depends(get_headers),
):
"""
- Summarize an agent's conversation history to a target message length.
-
- This endpoint summarizes the current message history for a given agent,
- truncating and compressing it down to the specified `max_message_length`.
+ Summarize an agent's conversation history.
"""
actor = await server.user_manager.get_actor_or_default_async(actor_id=headers.actor_id)