Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
chore: read project slug from header (#1062)
cthomasd20082bf6449
diff --git a/letta/schemas/agent.py b/letta/schemas/agent.pyindex 089f2fd3b..da06e6b56 100644--- a/letta/schemas/agent.py+++ b/letta/schemas/agent.py@@ -152,7 +152,7 @@ class CreateAgent(BaseModel, validate_assignment=True): #project: Optional[str] = Field(None,deprecated=True,- description="Deprecated: Project should now be passed via the project-slug header instead of in the request body. If using the sdk, this can be done via the new project_slug field below.",+ description="Deprecated: Project should now be passed via the X-Project header instead of in the request body. If using the sdk, this can be done via the new x_project field below.",)tool_exec_environment_variables: Optional[Dict[str, str]] = Field(None, description="The environment variables for tool execution specific to this agent."diff --git a/letta/server/rest_api/routers/v1/agents.py b/letta/server/rest_api/routers/v1/agents.pyindex a26baea56..ed8a81780 100644--- a/letta/server/rest_api/routers/v1/agents.py+++ b/letta/server/rest_api/routers/v1/agents.py@@ -114,7 +114,7 @@ def create_agent(agent: CreateAgentRequest = Body(...),server: "SyncServer" = Depends(get_letta_server),user_id: Optional[str] = Header(None, alias="user_id"), # Extract user_id from header, default to None if not present- project_slug: Optional[str] = Header(None, alias="project-slug"), # Only handled by next js middleware+ x_project: Optional[str] = Header(None, alias="X-Project"), # Only handled by next js middleware):"""Create a new agent with the specified configuration.diff --git a/letta/server/rest_api/routers/v1/identities.py b/letta/server/rest_api/routers/v1/identities.pyindex 83766339e..24a136d4f 100644--- a/letta/server/rest_api/routers/v1/identities.py+++ b/letta/server/rest_api/routers/v1/identities.py@@ -55,7 +55,7 @@ def create_identity(identity: IdentityCreate = Body(...),server: "SyncServer" = Depends(get_letta_server),user_id: Optional[str] = Header(None, alias="user_id"), # Extract user_id from header, default to None if not present- project_slug: Optional[str] = Header(None, alias="project-slug"), # Only handled by next js middleware+ x_project: Optional[str] = Header(None, alias="X-Project"), # Only handled by next js middleware):try:actor = server.user_manager.get_user_or_default(user_id=user_id)@@ -71,7 +71,7 @@ def upsert_identity(identity: IdentityCreate = Body(...),server: "SyncServer" = Depends(get_letta_server),user_id: Optional[str] = Header(None, alias="user_id"), # Extract user_id from header, default to None if not present- project_slug: Optional[str] = Header(None, alias="project-slug"), # Only handled by next js middleware+ x_project: Optional[str] = Header(None, alias="X-Project"), # Only handled by next js middleware):try:actor = server.user_manager.get_user_or_default(user_id=user_id)