Letta Agents API

Create, list, modify, export, and delete stateful agents with memory and tools.

Business capability
Artificial Intelligence Management BC-610.60

Operations 56

GET /v1/agents/ List Agents #
POST /v1/agents/ Create Agent #
GET /v1/agents/count Count Agents #
GET /v1/agents/{agent_id}/export Export Agent #
POST /v1/agents/{agent_id}/export Export Agent with Skills #
POST /v1/agents/import Import Agent #
GET /v1/agents/{agent_id}/context Retrieve Agent Context Window #
PATCH /v1/agents/{agent_id} Modify Agent #
GET /v1/agents/{agent_id} Retrieve Agent #
DELETE /v1/agents/{agent_id} Delete Agent #
GET /v1/agents/{agent_id}/tools List Tools for Agent #
PATCH /v1/agents/{agent_id}/tools/attach/{tool_id} Attach Tool to Agent #
PATCH /v1/agents/{agent_id}/tools/detach/{tool_id} Detach Tool from Agent #
PATCH /v1/agents/{agent_id}/tools/approval/{tool_name} Modify Approval for Tool #
POST /v1/agents/{agent_id}/tools/{tool_name}/run Run Tool for Agent #
PATCH /v1/agents/{agent_id}/sources/attach/{source_id} Attach Source #
PATCH /v1/agents/{agent_id}/folders/attach/{folder_id} Attach Folder to Agent #
PATCH /v1/agents/{agent_id}/sources/detach/{source_id} Detach Source #
PATCH /v1/agents/{agent_id}/folders/detach/{folder_id} Detach Folder from Agent #
PATCH /v1/agents/{agent_id}/files/close-all Close All Files for Agent #
PATCH /v1/agents/{agent_id}/files/{file_id}/open Open File for Agent #
PATCH /v1/agents/{agent_id}/files/{file_id}/close Close File for Agent #
GET /v1/agents/{agent_id}/sources List Agent Sources #
GET /v1/agents/{agent_id}/folders List Folders for Agent #
GET /v1/agents/{agent_id}/files List Files for Agent #
GET /v1/agents/{agent_id}/core-memory Retrieve Agent Memory #
GET /v1/agents/{agent_id}/core-memory/blocks/{block_label} Retrieve Block for Agent #
PATCH /v1/agents/{agent_id}/core-memory/blocks/{block_label} Modify Block for Agent #
GET /v1/agents/{agent_id}/core-memory/blocks List Blocks for Agent #
POST /v1/agents/{agent_id}/recompile Recompile Agent #
POST /v1/agents/{agent_id}/system-prompt/recompile Recompile Agent System Prompt #
PATCH /v1/agents/{agent_id}/core-memory/blocks/attach/{block_id} Attach Block to Agent #
PATCH /v1/agents/{agent_id}/core-memory/blocks/detach/{block_id} Detach Block from Agent #
PATCH /v1/agents/{agent_id}/archives/attach/{archive_id} Attach Archive to Agent #
PATCH /v1/agents/{agent_id}/archives/detach/{archive_id} Detach Archive from Agent #
PATCH /v1/agents/{agent_id}/identities/attach/{identity_id} Attach Identity to Agent #
PATCH /v1/agents/{agent_id}/identities/detach/{identity_id} Detach Identity from Agent #
GET /v1/agents/{agent_id}/archival-memory List Passages #
POST /v1/agents/{agent_id}/archival-memory Create Passage #
GET /v1/agents/{agent_id}/archival-memory/search Search Archival Memory #
DELETE /v1/agents/{agent_id}/archival-memory/{memory_id} Delete Passage #
GET /v1/agents/{agent_id}/messages List Messages #
POST /v1/agents/{agent_id}/messages Send Message #
PATCH /v1/agents/{agent_id}/messages/{message_id} Modify Message #
POST /v1/agents/{agent_id}/messages/stream Send Message Streaming #
POST /v1/agents/{agent_id}/messages/cancel Cancel Message #
POST /v1/agents/{agent_id}/generate Generate Completion #
POST /v1/agents/messages/search Search Messages #
POST /v1/agents/{agent_id}/messages/async Send Message Async #
PATCH /v1/agents/{agent_id}/reset-messages Reset Messages #
GET /v1/agents/{agent_id}/groups List Groups for Agent #
POST /v1/agents/{agent_id}/messages/preview-raw-payload Preview Model Request #
POST /v1/agents/{agent_id}/summarize Summarize Messages #
POST /v1/agents/search Search Deployed Agents #
GET /v1/agents/search/count Count Deployed Agents #
GET /v1/agents/{agent_id}/core-memory/variables Retrieve Memory Variables #

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-agents-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-agents-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Letta Agents 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:


# --- truncated at 32 KB (436 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/openapi/letta-agents-api-openapi.yml