From d407adef1d0ceaa0d1e4dcc076cb8ff86c47b512 Mon Sep 17 00:00:00 2001 From: Shubham Naik Date: Tue, 14 Jan 2025 08:41:04 -0800 Subject: [PATCH] fix: createAgent issue (#639) Co-authored-by: Shubham Naik --- letta/schemas/agent.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/letta/schemas/agent.py b/letta/schemas/agent.py index 32cbcb78..e20c6e48 100644 --- a/letta/schemas/agent.py +++ b/letta/schemas/agent.py @@ -95,8 +95,8 @@ class CreateAgent(BaseModel, validate_assignment=True): # name: str = Field(default_factory=lambda: create_random_username(), description="The name of the agent.") # memory creation - memory_blocks: List[CreateBlock] = Field( - ..., + memory_blocks: Optional[List[CreateBlock]] = Field( + None, description="The blocks to create in the agent's in-context memory.", ) # TODO: This is a legacy field and should be removed ASAP to force `tool_ids` usage @@ -129,6 +129,7 @@ class CreateAgent(BaseModel, validate_assignment=True): # context_window_limit: Optional[int] = Field(None, description="The context window limit used by the agent.") embedding_chunk_size: Optional[int] = Field(DEFAULT_EMBEDDING_CHUNK_SIZE, description="The embedding chunk size used by the agent.") from_template: Optional[str] = Field(None, description="The template id used to configure the agent") + template: bool = Field(False, description="Whether the agent is a template") project: Optional[str] = Field(None, description="The project slug that the agent will be associated with.") tool_exec_environment_variables: Optional[Dict[str, str]] = Field( None, description="The environment variables for tool execution specific to this agent."