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.

fix: createAgent issue (#639)

Shubham Naik996377fb76e0
diff --git a/letta/schemas/agent.py b/letta/schemas/agent.py
index 32cbcb781..e20c6e48d 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."