Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
feat: add ID format validation to batch request schema (#9154)
Kian Jones45c0a4cd0d35
diff --git a/fern/openapi.json b/fern/openapi.jsonindex 9eaed96cc..6e0d32fe4 100644--- a/fern/openapi.json+++ b/fern/openapi.json@@ -36695,8 +36695,12 @@},"agent_id": {"type": "string",+ "maxLength": 42,+ "minLength": 42,+ "pattern": "^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$","title": "Agent Id",- "description": "The ID of the agent to send this batch request for"+ "description": "The ID of the agent to send this batch request for",+ "examples": ["agent-123e4567-e89b-42d3-8456-426614174000"]}},"type": "object",diff --git a/letta/schemas/letta_request.py b/letta/schemas/letta_request.pyindex 8bc74addd..9290cc385 100644--- a/letta/schemas/letta_request.py+++ b/letta/schemas/letta_request.py@@ -7,6 +7,7 @@ from letta.constants import DEFAULT_MAX_STEPS, DEFAULT_MESSAGE_TOOL, DEFAULT_MESfrom letta.schemas.letta_message import MessageTypefrom letta.schemas.letta_message_content import LettaMessageContentUnionfrom letta.schemas.message import MessageCreate, MessageCreateUnion, MessageRole+from letta.validators import AgentIdclass ClientToolSchema(BaseModel):@@ -151,7 +152,7 @@ class LettaAsyncRequest(LettaRequest):class LettaBatchRequest(LettaRequest):- agent_id: str = Field(..., description="The ID of the agent to send this batch request for")+ agent_id: AgentId = Field(..., description="The ID of the agent to send this batch request for")class CreateBatch(BaseModel):