Letta · Capability

Letta API — Agents

Stateful agents — create, list, modify, export, and message agents with persistent memory and tools. 56 operations. Lead operation: List Agents. Self-contained Naftiko capability covering one Letta business surface.

Letta API — Agents is a Naftiko capability published by Letta, one of 36 capabilities the APIs.io network indexes for this provider. It bundles 56 operations across the PATCH, GET, POST, and DELETE methods rooted at /v1/agents.

The capability includes 21 read-only operations and 35 state-changing operations. Lead operation: List Agents. Can be deployed as a REST endpoint, MCP tool, or Agent Skill via Naftiko.

Tagged areas include Letta, Stateful Agents, and Agents.

Run with Naftiko LettaStateful AgentsAgents

What You Can Do

GET
List_agents — List Agents
/v1/agents/
POST
Create_agent — Create Agent
/v1/agents/
GET
Count_agents — Count Agents
/v1/agents/count
GET
Export_agent — Export Agent
/v1/agents/{agent-id}/export
POST
Export_agent_with_skills — Export Agent with Skills
/v1/agents/{agent-id}/export
POST
Import_agent — Import Agent
/v1/agents/import
GET
Retrieve_agent_context_window — Retrieve Agent Context Window
/v1/agents/{agent-id}/context
PATCH
Modify_agent — Modify Agent
/v1/agents/{agent-id}
GET
Retrieve_agent — Retrieve Agent
/v1/agents/{agent-id}
DELETE
Delete_agent — Delete Agent
/v1/agents/{agent-id}
GET
List_tools_for_agent — List Tools for Agent
/v1/agents/{agent-id}/tools
PATCH
Attach_tool_to_agent — Attach Tool to Agent
/v1/agents/{agent-id}/tools/attach/{tool-id}
PATCH
Detach_tool_from_agent — Detach Tool from Agent
/v1/agents/{agent-id}/tools/detach/{tool-id}
PATCH
Modify_approval_for_tool — Modify Approval for Tool
/v1/agents/{agent-id}/tools/approval/{tool-name}
POST
Run_tool_for_agent — Run Tool for Agent
/v1/agents/{agent-id}/tools/{tool-name}/run
PATCH
Attach_source_to_agent — Attach Source
/v1/agents/{agent-id}/sources/attach/{source-id}
PATCH
Attach_folder_to_agent — Attach Folder to Agent
/v1/agents/{agent-id}/folders/attach/{folder-id}
PATCH
Detach_source_from_agent — Detach Source
/v1/agents/{agent-id}/sources/detach/{source-id}
PATCH
Detach_folder_from_agent — Detach Folder from Agent
/v1/agents/{agent-id}/folders/detach/{folder-id}
PATCH
Close_all_files_for_agent — Close All Files for Agent
/v1/agents/{agent-id}/files/close-all
PATCH
Open_file_for_agent — Open File for Agent
/v1/agents/{agent-id}/files/{file-id}/open
PATCH
Close_file_for_agent — Close File for Agent
/v1/agents/{agent-id}/files/{file-id}/close
GET
List_agent_sources — List Agent Sources
/v1/agents/{agent-id}/sources
GET
List_folders_for_agent — List Folders for Agent
/v1/agents/{agent-id}/folders
GET
List_files_for_agent — List Files for Agent
/v1/agents/{agent-id}/files
GET
Retrieve_agent_memory — Retrieve Agent Memory
/v1/agents/{agent-id}/core-memory
GET
Retrieve_core_memory_block — Retrieve Block for Agent
/v1/agents/{agent-id}/core-memory/blocks/{block-label}
PATCH
Modify_core_memory_block — Modify Block for Agent
/v1/agents/{agent-id}/core-memory/blocks/{block-label}
GET
List_core_memory_blocks — List Blocks for Agent
/v1/agents/{agent-id}/core-memory/blocks
POST
Recompile_agent — Recompile Agent
/v1/agents/{agent-id}/recompile
POST
Recompile_agent_system_prompt — Recompile Agent System Prompt
/v1/agents/{agent-id}/system-prompt/recompile
PATCH
Attach_core_memory_block — Attach Block to Agent
/v1/agents/{agent-id}/core-memory/blocks/attach/{block-id}
PATCH
Detach_core_memory_block — Detach Block from Agent
/v1/agents/{agent-id}/core-memory/blocks/detach/{block-id}
PATCH
Attach_archive_to_agent — Attach Archive to Agent
/v1/agents/{agent-id}/archives/attach/{archive-id}
PATCH
Detach_archive_from_agent — Detach Archive from Agent
/v1/agents/{agent-id}/archives/detach/{archive-id}
PATCH
Attach_identity_to_agent — Attach Identity to Agent
/v1/agents/{agent-id}/identities/attach/{identity-id}
PATCH
Detach_identity_from_agent — Detach Identity from Agent
/v1/agents/{agent-id}/identities/detach/{identity-id}
GET
List_passages — List Passages
/v1/agents/{agent-id}/archival-memory
POST
Create_passage — Create Passage
/v1/agents/{agent-id}/archival-memory
GET
Search_archival_memory — Search Archival Memory
/v1/agents/{agent-id}/archival-memory/search
DELETE
Delete_passage — Delete Passage
/v1/agents/{agent-id}/archival-memory/{memory-id}
GET
List_messages — List Messages
/v1/agents/{agent-id}/messages
POST
Send_message — Send Message
/v1/agents/{agent-id}/messages
PATCH
Modify_message — Modify Message
/v1/agents/{agent-id}/messages/{message-id}
POST
Create_agent_message_stream — Send Message Streaming
/v1/agents/{agent-id}/messages/stream
POST
Cancel_message — Cancel Message
/v1/agents/{agent-id}/messages/cancel
POST
Generate_completion — Generate Completion
/v1/agents/{agent-id}/generate
POST
Search_messages — Search Messages
/v1/agents/messages/search
POST
Create_agent_message_async — Send Message Async
/v1/agents/{agent-id}/messages/async
PATCH
Reset_messages — Reset Messages
/v1/agents/{agent-id}/reset-messages
GET
List_groups_for_agent — List Groups for Agent
/v1/agents/{agent-id}/groups
POST
Preview_model_request — Preview Model Request
/v1/agents/{agent-id}/messages/preview-raw-payload
POST
Summarize_messages — Summarize Messages
/v1/agents/{agent-id}/summarize
POST
Agents_searchdeployedagents — Search Deployed Agents
/v1/agents/search
GET
Agents_countdeployedagents — Count Deployed Agents
/v1/agents/search/count
GET
Agents_getagentvariables — Retrieve Memory Variables
/v1/agents/{agent-id}/core-memory/variables

MCP Tools

list-agents

List Agents

read-only idempotent
create-agent

Create Agent

count-agents

Count Agents

read-only idempotent
export-agent

Export Agent

read-only idempotent
export-agent-skills

Export Agent with Skills

read-only
import-agent

Import Agent

retrieve-agent-context-window

Retrieve Agent Context Window

read-only idempotent
modify-agent

Modify Agent

idempotent
retrieve-agent

Retrieve Agent

read-only idempotent
delete-agent

Delete Agent

idempotent
list-tools-agent

List Tools for Agent

read-only idempotent
attach-tool-agent

Attach Tool to Agent

idempotent
detach-tool-agent

Detach Tool from Agent

idempotent
modify-approval-tool

Modify Approval for Tool

idempotent
run-tool-agent

Run Tool for Agent

attach-source

Attach Source

idempotent
attach-folder-agent

Attach Folder to Agent

idempotent
detach-source

Detach Source

idempotent
detach-folder-agent

Detach Folder from Agent

idempotent
close-all-files-agent

Close All Files for Agent

idempotent
open-file-agent

Open File for Agent

idempotent
close-file-agent

Close File for Agent

idempotent
list-agent-sources

List Agent Sources

read-only idempotent
list-folders-agent

List Folders for Agent

read-only idempotent
list-files-agent

List Files for Agent

read-only idempotent
retrieve-agent-memory

Retrieve Agent Memory

read-only idempotent
retrieve-block-agent

Retrieve Block for Agent

read-only idempotent
modify-block-agent

Modify Block for Agent

idempotent
list-blocks-agent

List Blocks for Agent

read-only idempotent
recompile-agent

Recompile Agent

recompile-agent-system-prompt

Recompile Agent System Prompt

attach-block-agent

Attach Block to Agent

idempotent
detach-block-agent

Detach Block from Agent

idempotent
attach-archive-agent

Attach Archive to Agent

idempotent
detach-archive-agent

Detach Archive from Agent

idempotent
attach-identity-agent

Attach Identity to Agent

idempotent
detach-identity-agent

Detach Identity from Agent

idempotent
list-passages

List Passages

read-only idempotent
create-passage

Create Passage

search-archival-memory

Search Archival Memory

read-only idempotent
delete-passage

Delete Passage

idempotent
list-messages

List Messages

read-only idempotent
send-message

Send Message

modify-message

Modify Message

idempotent
send-message-streaming

Send Message Streaming

cancel-message

Cancel Message

generate-completion

Generate Completion

search-messages

Search Messages

read-only
send-message-async

Send Message Async

reset-messages

Reset Messages

idempotent
list-groups-agent

List Groups for Agent

read-only idempotent
preview-model-request

Preview Model Request

summarize-messages

Summarize Messages

search-deployed-agents

Search Deployed Agents

read-only
count-deployed-agents

Count Deployed Agents

read-only idempotent
retrieve-memory-variables

Retrieve Memory Variables

read-only idempotent

Capability Spec

letta-agents.yaml Raw ↑
naftiko: "1.0.0-alpha2"

info:
  label: "Letta API — Agents"
  description: >-
    Stateful agents — create, list, modify, export, and message agents with persistent memory and tools. 56 operations. Lead operation: List Agents. Self-contained Naftiko capability covering one Letta business surface.
  tags:
    - Letta
    - Stateful Agents
    - Agents
  created: "2026-05-08"
  modified: "2026-05-22"

binds:
  - namespace: env
    keys:
      LETTA_API_KEY: LETTA_API_KEY

capability:

  consumes:
    - type: http
      namespace: "letta-agents"
      baseUri: "https://api.letta.com"
      description: "Letta API — Agents business capability. Self-contained, no shared references."
      authentication:
        type: bearer
        token: "{{env.LETTA_API_KEY}}"
      resources:
        - name: "agents"
          path: "/v1/agents/"
          operations:
            - name: "list_agents"
              method: GET
              description: "List Agents"
              inputParameters:
                - name: "name"
                  in: query
                  type: string
                  required: false
                  description: "Name of the agent"
                - name: "tags"
                  in: query
                  type: string
                  required: false
                  description: "List of tags to filter agents by"
                - name: "match_all_tags"
                  in: query
                  type: boolean
                  required: false
                  description: "If True, only returns agents that match ALL given tags. Otherwise, return agents that have ANY of the passed-in tags."
                - name: "before"
                  in: query
                  type: string
                  required: false
                  description: "Cursor for pagination"
                - name: "after"
                  in: query
                  type: string
                  required: false
                  description: "Cursor for pagination"
                - name: "limit"
                  in: query
                  type: string
                  required: false
                  description: "Limit for pagination"
                - name: "query_text"
                  in: query
                  type: string
                  required: false
                  description: "Search agents by name"
                - name: "project_id"
                  in: query
                  type: string
                  required: false
                  description: "Search agents by project ID - this will default to your default project on cloud"
                - name: "template_id"
                  in: query
                  type: string
                  required: false
                  description: "Search agents by template ID"
                - name: "base_template_id"
                  in: query
                  type: string
                  required: false
                  description: "Search agents by base template ID"
                - name: "identity_id"
                  in: query
                  type: string
                  required: false
                  description: "Search agents by identity ID"
                - name: "identifier_keys"
                  in: query
                  type: string
                  required: false
                  description: "Search agents by identifier keys"
                - name: "include_relationships"
                  in: query
                  type: string
                  required: false
                  description: "Specify which relational fields (e.g., 'tools', 'sources', 'memory') to include in the response. If not provided, all relationships are loaded by default. Using this can optimize performance by reduci"
                - name: "include"
                  in: query
                  type: array
                  required: false
                  description: "Specify which relational fields to include in the response. No relationships are included by default."
                - name: "order"
                  in: query
                  type: string
                  required: false
                  description: "Sort order for agents by creation time. 'asc' for oldest first, 'desc' for newest first"
                - name: "order_by"
                  in: query
                  type: string
                  required: false
                  description: "Field to sort by"
                - name: "ascending"
                  in: query
                  type: boolean
                  required: false
                  description: "Whether to sort agents oldest to newest (True) or newest to oldest (False, default)"
                - name: "sort_by"
                  in: query
                  type: string
                  required: false
                  description: "Field to sort by. Options: 'created_at' (default), 'last_run_completion'"
                - name: "last_stop_reason"
                  in: query
                  type: string
                  required: false
                  description: "Filter agents by their last stop reason."
                - name: "created_by_id"
                  in: query
                  type: string
                  required: false
                  description: "Filter agents by the user who created them."
              outputRawFormat: json
              outputParameters:
                - name: result
                  type: object
                  value: "$."
            - name: "create_agent"
              method: POST
              description: "Create Agent"
              inputParameters:
                - name: "X-Project"
                  in: header
                  type: string
                  required: false
                  description: "The project slug to associate with the agent (cloud only)."
                - name: "body"
                  in: body
                  type: object
                  required: true
                  description: "Request payload"
              outputRawFormat: json
              outputParameters:
                - name: result
                  type: object
                  value: "$."
        - name: "agents-count"
          path: "/v1/agents/count"
          operations:
            - name: "count_agents"
              method: GET
              description: "Count Agents"
              inputParameters:
                - name: "name"
                  in: query
                  type: string
                  required: false
                  description: "Name of the agent"
                - name: "tags"
                  in: query
                  type: string
                  required: false
                  description: "List of tags to filter agents by"
                - name: "match_all_tags"
                  in: query
                  type: boolean
                  required: false
                  description: "If True, only counts agents that match ALL given tags. Otherwise, counts agents that have ANY of the passed-in tags."
                - name: "query_text"
                  in: query
                  type: string
                  required: false
                  description: "Search agents by name"
                - name: "project_id"
                  in: query
                  type: string
                  required: false
                  description: "Search agents by project ID - this will default to your default project on cloud"
                - name: "template_id"
                  in: query
                  type: string
                  required: false
                  description: "Search agents by template ID"
                - name: "base_template_id"
                  in: query
                  type: string
                  required: false
                  description: "Search agents by base template ID"
                - name: "identity_id"
                  in: query
                  type: string
                  required: false
                  description: "Search agents by identity ID"
                - name: "identifier_keys"
                  in: query
                  type: string
                  required: false
                  description: "Search agents by identifier keys"
                - name: "last_stop_reason"
                  in: query
                  type: string
                  required: false
                  description: "Filter agents by their last stop reason."
                - name: "created_by_id"
                  in: query
                  type: string
                  required: false
                  description: "Filter agents by the user who created them."
              outputRawFormat: json
              outputParameters:
                - name: result
                  type: object
                  value: "$."
        - name: "agents-by-id-export"
          path: "/v1/agents/{agent_id}/export"
          operations:
            - name: "export_agent"
              method: GET
              description: "Export Agent"
              inputParameters:
                - name: "agent_id"
                  in: path
                  type: string
                  required: true
                  description: "agent_id parameter"
                - name: "max_steps"
                  in: query
                  type: integer
                  required: false
                  description: "max_steps parameter"
                - name: "use_legacy_format"
                  in: query
                  type: boolean
                  required: false
                  description: "If True, exports using the legacy single-agent 'v1' format with inline tools/blocks. If False, exports using the new multi-entity 'v2' format, with separate agents, tools, blocks, files, etc."
                - name: "conversation_id"
                  in: query
                  type: string
                  required: false
                  description: "Conversation ID to export. If provided, uses messages from this conversation instead of the agent's global message history."
                - name: "scrub_messages"
                  in: query
                  type: boolean
                  required: false
                  description: "If True, excludes all messages from the export. Useful for sharing agent configs without conversation history."
                - name: "body"
                  in: body
                  type: object
                  required: true
                  description: "Request payload"
              outputRawFormat: json
              outputParameters:
                - name: result
                  type: object
                  value: "$."
            - name: "export_agent_with_skills"
              method: POST
              description: "Export Agent with Skills"
              inputParameters:
                - name: "agent_id"
                  in: path
                  type: string
                  required: true
                  description: "agent_id parameter"
                - name: "body"
                  in: body
                  type: object
                  required: true
                  description: "Request payload"
              outputRawFormat: json
              outputParameters:
                - name: result
                  type: object
                  value: "$."
        - name: "agents-import"
          path: "/v1/agents/import"
          operations:
            - name: "import_agent"
              method: POST
              description: "Import Agent"
              inputParameters:
                - name: "x-override-embedding-model"
                  in: header
                  type: string
                  required: false
                  description: "x-override-embedding-model parameter"
                - name: "body"
                  in: body
                  type: object
                  required: true
                  description: "Request payload"
              outputRawFormat: json
              outputParameters:
                - name: result
                  type: object
                  value: "$."
        - name: "agents-by-id-context"
          path: "/v1/agents/{agent_id}/context"
          operations:
            - name: "retrieve_agent_context_window"
              method: GET
              description: "Retrieve Agent Context Window"
              inputParameters:
                - name: "agent_id"
                  in: path
                  type: string
                  required: true
                  description: "The ID of the agent in the format 'agent-<uuid4>'"
                - name: "conversation_id"
                  in: query
                  type: string
                  required: false
                  description: "Conversation ID to get context window for. If provided, uses messages from this conversation."
              outputRawFormat: json
              outputParameters:
                - name: result
                  type: object
                  value: "$."
        - name: "agents-by-id"
          path: "/v1/agents/{agent_id}"
          operations:
            - name: "modify_agent"
              method: PATCH
              description: "Modify Agent"
              inputParameters:
                - name: "agent_id"
                  in: path
                  type: string
                  required: true
                  description: "The ID of the agent in the format 'agent-<uuid4>'"
                - name: "body"
                  in: body
                  type: object
                  required: true
                  description: "Request payload"
              outputRawFormat: json
              outputParameters:
                - name: result
                  type: object
                  value: "$."
            - name: "retrieve_agent"
              method: GET
              description: "Retrieve Agent"
              inputParameters:
                - name: "agent_id"
                  in: path
                  type: string
                  required: true
                  description: "The ID of the agent in the format 'agent-<uuid4>'"
                - name: "include_relationships"
                  in: query
                  type: string
                  required: false
                  description: "Specify which relational fields (e.g., 'tools', 'sources', 'memory') to include in the response. If not provided, all relationships are loaded by default. Using this can optimize performance by reduci"
                - name: "include"
                  in: query
                  type: array
                  required: false
                  description: "Specify which relational fields to include in the response. No relationships are included by default."
              outputRawFormat: json
              outputParameters:
                - name: result
                  type: object
                  value: "$."
            - name: "delete_agent"
              method: DELETE
              description: "Delete Agent"
              inputParameters:
                - name: "agent_id"
                  in: path
                  type: string
                  required: true
                  description: "The ID of the agent in the format 'agent-<uuid4>'"
              outputRawFormat: json
              outputParameters:
                - name: result
                  type: object
                  value: "$."
        - name: "agents-by-id-tools"
          path: "/v1/agents/{agent_id}/tools"
          operations:
            - name: "list_tools_for_agent"
              method: GET
              description: "List Tools for Agent"
              inputParameters:
                - name: "agent_id"
                  in: path
                  type: string
                  required: true
                  description: "The ID of the agent in the format 'agent-<uuid4>'"
                - name: "before"
                  in: query
                  type: string
                  required: false
                  description: "Tool ID cursor for pagination. Returns tools that come before this tool ID in the specified sort order"
                - name: "after"
                  in: query
                  type: string
                  required: false
                  description: "Tool ID cursor for pagination. Returns tools that come after this tool ID in the specified sort order"
                - name: "limit"
                  in: query
                  type: string
                  required: false
                  description: "Maximum number of tools to return"
                - name: "order"
                  in: query
                  type: string
                  required: false
                  description: "Sort order for tools by creation time. 'asc' for oldest first, 'desc' for newest first"
                - name: "order_by"
                  in: query
                  type: string
                  required: false
                  description: "Field to sort by"
              outputRawFormat: json
              outputParameters:
                - name: result
                  type: object
                  value: "$."
        - name: "agents-by-id-tools-attach-by-id"
          path: "/v1/agents/{agent_id}/tools/attach/{tool_id}"
          operations:
            - name: "attach_tool_to_agent"
              method: PATCH
              description: "Attach Tool to Agent"
              inputParameters:
                - name: "tool_id"
                  in: path
                  type: string
                  required: true
                  description: "The ID of the tool in the format 'tool-<uuid4>'"
                - name: "agent_id"
                  in: path
                  type: string
                  required: true
                  description: "The ID of the agent in the format 'agent-<uuid4>'"
              outputRawFormat: json
              outputParameters:
                - name: result
                  type: object
                  value: "$."
        - name: "agents-by-id-tools-detach-by-id"
          path: "/v1/agents/{agent_id}/tools/detach/{tool_id}"
          operations:
            - name: "detach_tool_from_agent"
              method: PATCH
              description: "Detach Tool from Agent"
              inputParameters:
                - name: "tool_id"
                  in: path
                  type: string
                  required: true
                  description: "The ID of the tool in the format 'tool-<uuid4>'"
                - name: "agent_id"
                  in: path
                  type: string
                  required: true
                  description: "The ID of the agent in the format 'agent-<uuid4>'"
              outputRawFormat: json
              outputParameters:
                - name: result
                  type: object
                  value: "$."
        - name: "agents-by-id-tools-approval-by-id"
          path: "/v1/agents/{agent_id}/tools/approval/{tool_name}"
          operations:
            - name: "modify_approval_for_tool"
              method: PATCH
              description: "Modify Approval for Tool"
              inputParameters:
                - name: "tool_name"
                  in: path
                  type: string
                  required: true
                  description: "tool_name parameter"
                - name: "agent_id"
                  in: path
                  type: string
                  required: true
                  description: "The ID of the agent in the format 'agent-<uuid4>'"
                - name: "requires_approval"
                  in: query
                  type: string
                  required: false
                  description: "Whether the tool requires approval before execution"
                - name: "body"
                  in: body
                  type: object
                  required: true
                  description: "Request payload"
              outputRawFormat: json
              outputParameters:
                - name: result
                  type: object
                  value: "$."
        - name: "agents-by-id-tools-by-id-run"
          path: "/v1/agents/{agent_id}/tools/{tool_name}/run"
          operations:
            - name: "run_tool_for_agent"
              method: POST
              description: "Run Tool for Agent"
              inputParameters:
                - name: "agent_id"
                  in: path
                  type: string
                  required: true
                  description: "The ID of the agent in the format 'agent-<uuid4>'"
                - name: "tool_name"
                  in: path
                  type: string
                  required: true
                  description: "tool_name parameter"
                - name: "body"
                  in: body
                  type: object
                  required: true
                  description: "Request payload"
              outputRawFormat: json
              outputParameters:
                - name: result
                  type: object
                  value: "$."
        - name: "agents-by-id-sources-attach-by-id"
          path: "/v1/agents/{agent_id}/sources/attach/{source_id}"
          operations:
            - name: "attach_source_to_agent"
              method: PATCH
              description: "Attach Source"
              inputParameters:
                - name: "source_id"
                  in: path
                  type: string
                  required: true
                  description: "The ID of the source in the format 'source-<uuid4>'"
                - name: "agent_id"
                  in: path
                  type: string
                  required: true
                  description: "The ID of the agent in the format 'agent-<uuid4>'"
              outputRawFormat: json
              outputParameters:
                - name: result
                  type: object
                  value: "$."
        - name: "agents-by-id-folders-attach-by-id"
          path: "/v1/agents/{agent_id}/folders/attach/{folder_id}"
          operations:
            - name: "attach_folder_to_agent"
              method: PATCH
              description: "Attach Folder to Agent"
              inputParameters:
                - name: "folder_id"
                  in: path
                  type: string
                  required: true
                  description: "The ID of the source in the format 'source-<uuid4>'"
                - name: "agent_id"
                  in: path
                  type: string
                  required: true
                  description: "The ID of the agent in the format 'agent-<uuid4>'"
              outputRawFormat: json
              outputParameters:
                - name: result
                  type: object
                  value: "$."
        - name: "agents-by-id-sources-detach-by-id"
          path: "/v1/agents/{agent_id}/sources/detach/{source_id}"
          operations:
            - name: "detach_source_from_agent"
              method: PATCH
              description: "Detach Source"
              inputParameters:
                - name: "source_id"
                  in: path
                  type: string
                  required: true
                  description: "The ID of the source in the format 'source-<uuid4>'"
                - name: "agent_id"
                  in: path
                  type: string
                  required: true
                  description: "The ID of the agent in the format 'agent-<uuid4>'"
              outputRawFormat: json
              outputParameters:
                - name: result
                  type: object
                  value: "$."
        - name: "agents-by-id-folders-detach-by-id"
          path: "/v1/agents/{agent_id}/folders/detach/{folder_id}"
          operations:
            - name: "detach_folder_from_agent"
              method: PATCH
              description: "Detach Folder from Agent"
              inputParameters:
                - name: "folder_id"
                  in: path
                  type: string
                  required: true
                  description: "The ID of the source in the format 'source-<uuid4>'"
                - name: "agent_id"
                  in: path
                  type: string
                  required: true
                  description: "The ID of the agent in the format 'agent-<uuid4>'"
              outputRawFormat: json
              outputParameters:
                - name: result
                  type: object
                  value: "$."
        - name: "agents-by-id-files-close-all"
          path: "/v1/agents/{agent_id}/files/close-all"
          operations:
            - name: "close_all_files_for_agent"
              method: PATCH
              description: "Close All Files for Agent"
              inputParameters:
                - name: "agent_id"
                  in: path
                  type: string
                  required: true
                  description: "The ID of the agent in the format 'agent-<uuid4>'"
              outputRawFormat: json
              outputParameters:
                - name: result
                  type: object
                  value: "$."
        - name: "agents-by-id-files-by-id-open"
          path: "/v1/agents/{agent_id}/files/{file_id}/open"
          operations:
            - name: "open_file_for_agent"
              method: PATCH
              description: "Open File for Agent"
              inputParameters:
                - name: "file_id"
                  in: path
                  type: string
                  required: true
                  description: "The ID of the file in the format 'file-<uuid4>'"
                - name: "agent_id"
                  in: path
                  type: string
                  required: true
                  description: "The ID of the agent in the format 'agent-<uuid4>'"
              outputRawFormat: json
              outputParameters:
                - name: result
                  type: object
                  value: "$."
        - name: "agents-by-id-files-by-id-close"
          path: "/v1/agents/{agent_id}/files/{file_id}/close"
          operations:
            - name: "close_file_for_agent"
              method: PATCH
              description: "Close File for Agent"
              inputParameters:
                - name: "file_id"
                  in: path
                  type: string
                  required: true
                  description: "The ID of the file in the format 'file-<uuid4>'"
                - name: "agent_id"
                  in: path
                  type: string
                  required: true
                  description: "The ID of the agent in the format 'agent-<uuid4>'"
              outputRawFormat: json
              outputParameters:
                - name: result
                  type: object
                  value: "$."
        - name: "agents-by-id-sources"
          path: "/v1/agents/{agent_id}/sources"
          operations:
            - name: "list_agent_sources"
              method: GET
              description: "List Agent Sources"
              inputParameters:
                - name: "agent_id"
                  in: path
                  type: string
                  required: true
                  description: "The ID of the agent in the format 'agent-<uuid4>'"
                - name: "before"
                  in: query
                  type: string
                  required: false
                  description: "Source ID cursor for pagination. Returns sources that come before this source ID in the specified sort order"
                - name: "after"
                  in: query
                  type: string
                  required: false
                  description: "Source ID cursor for pagination. Returns sources that come after this source ID in the specified sort order"
                - name: "limit"
                  in: query
                  type: string
                  required: false
                  description: "Maximum number of sources to return"
                - name: "order"
                  in: query
                  type: string
                  required: false
                  description: "Sort order for sources by creation time. 'asc' for oldest first, 'desc' for newest first"
                - name: "order_by"
                  in: query
                  type: string
                  required: false
                  description: "Field to sort by"
              outputRawFormat: json
              outputParameters:
                - name: result
                  type: object
                  value: "$."
        - name: "agents-by-id-folders"
          path: "/v1/agents/{agent_id}/folders"
          operations:
            - name: "list_folders_for_agent"
              method: GET
              description: "List Folders for Agent"
              inputParameters:
                - name: "agent_id"
                  in: path
                  type: string
                  required: true
                  description: "The ID of the agent in the format 'agent-<uuid4>'"
                - name: "before"
                  in: query
                  type: string
                  required: false
                  description: "Source ID cursor for pagination. Returns sources that come before this source ID in the specified sort order"
                - name: "after"
                  in: query
                  type: string
                  required: false
                  description: "Source ID cursor for pagination. Returns sources that come after this source ID in the specified sort order"
                - name: "limit"
                  in: query
                  type: string
                  required: false
                  description: "Maximum number of sources to return"
                - name: "order"
                  in: query
                  type: string
                  required: false
                  description: "Sort order for sources by creation time. 'asc' for oldest first, 'desc' for newest first"
                - name: "order_by"
                  in: query
                  type: string
                  required: false
                  description: "Field to sort by"
              outputRawFormat: json
              outputParameters:
                - name: result
                  type: object
                  value: "$."
        - name: "agents-by-id-files"
          path: "/v1/agents/{agent_id}/files"
          operations:
            - name: "list_files_for_agent"
              method: GET
              description: "List Files for Agent"
              inputParameters:
                - name: "agent_id"
                  in: path
                  type: string
                  required: true
                  description: "The ID of the agent in the format 'agent-<uuid4>'"
                - name: "before"
                  in: query
                  type: string
                  required: false
                  description: "File ID cursor for pagination. Returns files that come before this file ID in the specified sort order"
                - name: "after"
                  in: query
                  type: string
                  required: false
                  description: "File ID cursor for pagination. Returns files that come after this file ID in the specified sort order"
                - name: "limit"
                  in: query
                  type: string
                  required: false
                  description: "Maximum number of files to return"
                - name: "order"
                  in: query
                  type: string
                  required: false
                  description: "Sort order for files by creation time. 'asc' for oldest first, 'desc' for newest first"
                - name: "order_by"
                  in: query
                  type: string
                  required: false
                  description: "Field to sort by"
                - name: "cursor"
                  in: query
                  type: string
                  required: false
                  description: "Pagination cursor from previous response (deprecated, use before/after)"
                - name: "is_open"
                  in: query
                  type: string
                  required: false
                  description: "Filter by open status (true for open files, false for closed files)"
              outpu

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