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: add memfs file list and read endpoints to cloud-api [LET-7437] (#9520)

Ari Webbc325b2b0028f
diff --git a/fern/openapi.json b/fern/openapi.json
index 03fe544fa..b30f6d085 100644
--- a/fern/openapi.json
+++ b/fern/openapi.json
@@ -24214,6 +24214,322 @@
}
}
},
+ "/v1/agents/{agent_id}/memory-files/directory": {
+ "get": {
+ "description": "List immediate children of a directory in the agent memory repo (single level).",
+ "summary": "List Directory",
+ "tags": ["memoryFiles"],
+ "parameters": [
+ {
+ "name": "agent_id",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "path",
+ "in": "query",
+ "description": "Directory path to list. Empty for root.",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "depth",
+ "in": "query",
+ "description": "Depth of directory listing (default: 1).",
+ "schema": {
+ "type": "number",
+ "nullable": true
+ }
+ },
+ {
+ "name": "ref",
+ "in": "query",
+ "description": "Git ref (default: HEAD).",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "operationId": "memoryFiles.listDirectory",
+ "responses": {
+ "200": {
+ "description": "200",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "path": {
+ "type": "string"
+ },
+ "entries": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string",
+ "enum": ["file", "directory"]
+ }
+ },
+ "required": ["name", "type"]
+ }
+ },
+ "depth": {
+ "type": "number"
+ }
+ },
+ "required": ["path", "entries", "depth"]
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "404",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": ["message"]
+ }
+ }
+ }
+ },
+ "501": {
+ "description": "501",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": ["message"]
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/v1/agents/{agent_id}/memory-files/history": {
+ "get": {
+ "description": "Get commit history for a specific file in the agent memory repo.",
+ "summary": "Get File History",
+ "tags": ["memoryFiles"],
+ "parameters": [
+ {
+ "name": "agent_id",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "file_path",
+ "in": "query",
+ "description": "Path to the file (e.g. \"blocks/persona.md\").",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "limit",
+ "in": "query",
+ "description": "Max commits to return (default: 50).",
+ "schema": {
+ "type": "number",
+ "nullable": true
+ }
+ }
+ ],
+ "operationId": "memoryFiles.getFileHistory",
+ "responses": {
+ "200": {
+ "description": "200",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "path": {
+ "type": "string"
+ },
+ "commits": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "sha": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ },
+ "timestamp": {
+ "type": "string"
+ },
+ "author_name": {
+ "type": "string",
+ "nullable": true
+ }
+ },
+ "required": [
+ "sha",
+ "message",
+ "timestamp",
+ "author_name"
+ ]
+ }
+ }
+ },
+ "required": ["path", "commits"]
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "404",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": ["message"]
+ }
+ }
+ }
+ },
+ "501": {
+ "description": "501",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": ["message"]
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/v1/agents/{agent_id}/memory-files/content": {
+ "get": {
+ "description": "Read a single file content at a specific git ref from the agent memory repo.",
+ "summary": "Read File Content",
+ "tags": ["memoryFiles"],
+ "parameters": [
+ {
+ "name": "agent_id",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "file_path",
+ "in": "query",
+ "description": "Path to the file (e.g. \"blocks/persona.md\").",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "ref",
+ "in": "query",
+ "description": "Git ref (default: HEAD).",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "operationId": "memoryFiles.readFileContent",
+ "responses": {
+ "200": {
+ "description": "200",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "path": {
+ "type": "string"
+ },
+ "content": {
+ "type": "string"
+ },
+ "ref": {
+ "type": "string"
+ }
+ },
+ "required": ["path", "content", "ref"]
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "404",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": ["message"]
+ }
+ }
+ }
+ },
+ "501": {
+ "description": "501",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": ["message"]
+ }
+ }
+ }
+ }
+ }
+ }
+ },
"/v1/pipelines": {
"post": {
"description": "Create a new pipeline (producer + feed + optionally subscribers)",