Letta Memory Files API

Memory-mapped file resources attached to agents.

Operations 3

GET /v1/agents/{agent_id}/memory-files/directory List Directory #
GET /v1/agents/{agent_id}/memory-files/history Get File History #
GET /v1/agents/{agent_id}/memory-files/content Read File Content #

Documentation

Specifications

Schemas & Data

📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/json-schema/letta-agent-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/json-schema/letta-block-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/json-schema/letta-tool-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/json-schema/letta-source-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/json-schema/letta-run-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/json-schema/letta-group-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/json-schema/letta-identity-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/json-schema/letta-message-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/json-schema/letta-passage-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/json-schema/letta-archive-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/json-schema/letta-job-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/json-schema/letta-llm-config-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/json-schema/letta-embedding-config-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/json-schema/letta-provider-schema.json

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/letta-memory-files-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

letta-memory-files-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Letta Admin Memory Files API
  version: 1.0.0
  description: REST API for Letta, the stateful agents platform. Manage agents, memory blocks, archival passages, sources, custom tools, MCP servers, multi-agent groups, runs, and streaming responses. Available as Letta Cloud (managed) at https://api.letta.com/v1 and as the self-hosted open-source server (Apache-2.0) typically run at http://localhost:8283.
  contact:
    name: Letta
    url: https://www.letta.com/
    email: support@letta.com
  license:
    name: Apache-2.0
    url: https://github.com/letta-ai/letta/blob/main/LICENSE
  x-logo:
    url: https://www.letta.com/favicon.ico
servers:
- url: https://api.letta.com
  description: Letta Cloud (managed)
- url: https://app.letta.com
  description: Letta Cloud (app)
- url: http://localhost:8283
  description: Self-hosted Letta server
security:
- bearerAuth: []
tags:
- name: Memory Files
  description: Memory-mapped file resources attached to agents.
paths:
  /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:
      - Memory Files
      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:
      - Memory Files
      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:
      - Memory Files
      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
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer