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-'" - 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-'" - 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-'" - 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-'" 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-'" - 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-'" - name: "agent_id" in: path type: string required: true description: "The ID of the agent in the format 'agent-'" 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-'" - name: "agent_id" in: path type: string required: true description: "The ID of the agent in the format 'agent-'" 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-'" - 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-'" - 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-'" - name: "agent_id" in: path type: string required: true description: "The ID of the agent in the format 'agent-'" 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-'" - name: "agent_id" in: path type: string required: true description: "The ID of the agent in the format 'agent-'" 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-'" - name: "agent_id" in: path type: string required: true description: "The ID of the agent in the format 'agent-'" 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-'" - name: "agent_id" in: path type: string required: true description: "The ID of the agent in the format 'agent-'" 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-'" 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-'" - name: "agent_id" in: path type: string required: true description: "The ID of the agent in the format 'agent-'" 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-'" - name: "agent_id" in: path type: string required: true description: "The ID of the agent in the format 'agent-'" 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-'" - 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-'" - 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-'" - 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)" outputRawFormat: json outputParameters: - name: result type: object value: "$." - name: "agents-by-id-core-memory" path: "/v1/agents/{agent_id}/core-memory" operations: - name: "retrieve_agent_memory" method: GET description: "Retrieve Agent Memory" inputParameters: - name: "agent_id" in: path type: string required: true description: "The ID of the agent in the format 'agent-'" outputRawFormat: json outputParameters: - name: result type: object value: "$." - name: "agents-by-id-core-memory-blocks-by-id" path: "/v1/agents/{agent_id}/core-memory/blocks/{block_label}" operations: - name: "retrieve_core_memory_block" method: GET description: "Retrieve Block for Agent" inputParameters: - name: "block_label" in: path type: string required: true description: "block_label parameter" - name: "agent_id" in: path type: string required: true description: "The ID of the agent in the format 'agent-'" outputRawFormat: json outputParameters: - name: result type: object value: "$." - name: "modify_core_memory_block" method: PATCH description: "Modify Block for Agent" inputParameters: - name: "block_label" in: path type: string required: true description: "block_label parameter" - name: "agent_id" in: path type: string required: true description: "The ID of the agent in the format 'agent-'" - name: "body" in: body type: object required: true description: "Request payload" outputRawFormat: json outputParameters: - name: result type: object value: "$." - name: "agents-by-id-core-memory-blocks" path: "/v1/agents/{agent_id}/core-memory/blocks" operations: - name: "list_core_memory_blocks" method: GET description: "List Blocks for Agent" inputParameters: - name: "agent_id" in: path type: string required: true description: "The ID of the agent in the format 'agent-'" - name: "before" in: query type: string required: false description: "Block ID cursor for pagination. Returns blocks that come before this block ID in the specified sort order" - name: "after" in: query type: string required: false description: "Block ID cursor for pagination. Returns blocks that come after this block ID in the specified sort order" - name: "limit" in: query type: string required: false description: "Maximum number of blocks to return" - name: "order" in: query type: string required: false description: "Sort order for blocks 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-recompile" path: "/v1/agents/{agent_id}/recompile" operations: - name: "recompile_agent" method: POST description: "Recompile Agent" inputParameters: - name: "agent_id" in: path type: string required: true description: "The ID of the agent in the format 'agent-'" - name: "update_timestamp" in: query type: boolean required: false description: "If True, update the in-context memory last edit timestamp embedded in the system prompt." - name: "dry_run" in: query type: boolean required: false description: "If True, do not persist changes; still returns the compiled system prompt." outputRawFormat: json outputParameters: - name: result type: object value: "$." - name: "agents-by-id-system-prompt-recompile" path: "/v1/agents/{agent_id}/system-prompt/recompile" operations: - name: "recompile_agent_system_prompt" method: POST description: "Recompile Agent System Prompt" inputParameters: - name: "agent_id" in: path type: string required: true description: "The ID of the agent in the format 'agent-'" - name: "update_timestamp" in: query type: boolean required: false description: "If True, update the in-context memory last edit timestamp embedded in the system prompt." - name: "dry_run" in: query type: boolean required: false description: "If True, do not persist changes; still returns the compiled system prompt." outputRawFormat: json outputParameters: - name: result type: object value: "$." - name: "agents-by-id-core-memory-blocks-attach-by-id" path: "/v1/agents/{agent_id}/core-memory/blocks/attach/{block_id}" operations: - name: "attach_core_memory_block" method: PATCH description: "Attach Block to Agent" inputParameters: - name: "block_id" in: path type: string required: true description: "The ID of the block in the format 'block-'" - name: "agent_id" in: path type: string required: true description: "The ID of the agent in the format 'agent-'" outputRawFormat: json outputParameters: - name: result type: object value: "$." - name: "agents-by-id-core-memory-blocks-detach-by-id" path: "/v1/agents/{agent_id}/core-memory/blocks/detach/{block_id}" operations: - name: "detach_core_memory_block" method: PATCH description: "Detach Block from Agent" inputParameters: - name: "block_id" in: path type: string required: true description: "The ID of the block in the format 'block-'" - name: "agent_id" in: path type: string required: true description: "The ID of the agent in the format 'agent-'" outputRawFormat: json outputParameters: - name: result type: object value: "$." - name: "agents-by-id-archives-attach-by-id" path: "/v1/agents/{agent_id}/archives/attach/{archive_id}" operations: - name: "attach_archive_to_agent" method: PATCH description: "Attach Archive to Agent" inputParameters: - name: "archive_id" in: path type: string required: true description: "archive_id parameter" - name: "agent_id" in: path type: string required: true description: "The ID of the agent in the format 'agent-'" outputRawFormat: json outputParameters: - name: result type: object value: "$." - name: "agents-by-id-archives-detach-by-id" path: "/v1/agents/{agent_id}/archives/detach/{archive_id}" operations: - name: "detach_archive_from_agent" method: PATCH description: "Detach Archive from Agent" inputParameters: - name: "archive_id" in: path type: string required: true description: "archive_id parameter" - name: "agent_id" in: path type: string required: true description: "The ID of the agent in the format 'agent-'" outputRawFormat: json outputParameters: - name: result type: object value: "$." - name: "agents-by-id-identities-attach-by-id" path: "/v1/agents/{agent_id}/identities/attach/{identity_id}" operations: - name: "attach_identity_to_agent" method: PATCH description: "Attach Identity to Agent" inputParameters: - name: "identity_id" in: path type: string required: true description: "identity_id parameter" - name: "agent_id" in: path type: string required: true description: "The ID of the agent in the format 'agent-'" outputRawFormat: json outputParameters: - name: result type: object value: "$." - name: "agents-by-id-identities-detach-by-id" path: "/v1/agents/{agent_id}/identities/detach/{identity_id}" operations: - name: "detach_identity_from_agent" method: PATCH description: "Detach Identity from Agent" inputParameters: - name: "identity_id" in: path type: string required: true description: "identity_id parameter" - name: "agent_id" in: path type: string required: true description: "The ID of the agent in the format 'agent-'" outputRawFormat: json outputParameters: - name: result type: object value: "$." - name: "agents-by-id-archival-memory" path: "/v1/agents/{agent_id}/archival-memory" operations: - name: "list_passages" method: GET description: "List Passages" inputParameters: - name: "agent_id" in: path type: string required: true description: "The ID of the agent in the format 'agent-'" - name: "after" in: query type: string required: false description: "Unique ID of the memory to start the query range at." - name: "before" in: query type: string required: false description: "Unique ID of the memory to end the query range at." - name: "limit" in: query type: string required: false description: "How many results to include in the response." - name: "search" in: query type: string required: false description: "Search passages by text" - name: "ascending" in: query type: string required: false description: "Whether to sort passages oldest to newest (True, default) or newest to oldest (False)" outputRawFormat: json outputParameters: - name: result type: object value: "$." - name: "create_passage" method: POST description: "Create Passage" inputParameters: - name: "agent_id" in: path type: string required: true description: "The ID of the agent in the format 'agent-'" - name: "body" in: body type: object required: true description: "Request payload" outputRawFormat: json outputParameters: - name: result type: object value: "$." - name: "agents-by-id-archival-memory-search" path: "/v1/agents/{agent_id}/archival-memory/search" operations: - name: "search_archival_memory" method: GET description: "Search Archival Memory" inputParameters: - name: "agent_id" in: path type: string required: true description: "The ID of the agent in the format 'agent-'" - name: "query" in: query type: string required: true description: "String to search for using semantic similarity" - name: "tags" in: query type: string required: false description: "Optional list of tags to filter search results" - name: "tag_match_mode" in: query type: string required: false description: "How to match tags - 'any' to match passages with any of the tags, 'all' to match only passages with all tags" - name: "top_k" in: query type: string required: false description: "Maximum number of results to return. Uses system default if not specified" - name: "start_datetime" in: query type: string required: false description: "Filter results to passages created after this datetime" - name: "end_datetime" in: query type: string required: false description: "Filter results to passages created before this datetime" outputRawFormat: json outputParameters: - name: result type: object value: "$." - name: "agents-by-id-archival-memory-by-id" path: "/v1/agents/{agent_id}/archival-memory/{memory_id}" operations: - name: "delete_passage" method: DELETE description: "Delete Passage" inputParameters: - name: "memory_id" in: path type: string required: true description: "memory_id parameter" - name: "agent_id" in: path type: string required: true description: "The ID of the agent in the format 'agent-'" outputRawFormat: json outputParameters: - name: result type: object value: "$." - name: "agents-by-id-messages" path: "/v1/agents/{agent_id}/messages" operations: - name: "list_messages" method: GET description: "List Messages" inputParameters: - name: "agent_id" in: path type: string required: true description: "The ID of the agent in the format 'agent-'" - name: "before" in: query type: string required: false description: "Message ID cursor for pagination. Returns messages that come before this message ID in the specified sort order" - name: "after" in: query type: string required: false description: "Message ID cursor for pagination. Returns messages that come after this message ID in the specified sort order" - name: "limit" in: query type: string required: false description: "Maximum number of messages to return" - name: "order" in: query type: string required: false description: "Sort order for messages 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: "group_id" in: query type: string required: false description: "Group ID to filter messages by." - name: "conversation_id" in: query type: string required: false description: "Conversation ID to filter messages by." - name: "use_assistant_message" in: query type: boolean required: false description: "Whether to use assistant messages" - name: "assistant_message_tool_name" in: query type: string required: false description: "The name of the designated message tool." - name: "assistant_message_tool_kwarg" in: query type: string required: false description: "The name of the message argument." - name: "include_err" in: query type: string required: false description: "Whether to include error messages and error statuses. For debugging purposes only." - name: "include_return_message_types" in: query type: string required: false description: "Message types to include in response. When null, all message types are returned." outputRawFormat: json outputParameters: - name: result type: object value: "$." - name: "send_message" method: POST description: "Send Message" inputParameters: - name: "agent_id" in: path type: string required: true description: "The ID of the agent in the format 'agent-'" - name: "body" in: body type: object required: true description: "Request payload" outputRawFormat: json outputParameters: - name: result type: object value: "$." - name: "agents-by-id-messages-by-id" path: "/v1/agents/{agent_id}/messages/{message_id}" operations: - name: "modify_message" method: PATCH description: "Modify Message" inputParameters: - name: "agent_id" in: path type: string required: true description: "The ID of the agent in the format 'agent-'" - name: "message_id" in: path type: string required: true description: "The ID of the message in the format 'message-'" - name: "body" in: body type: object required: true description: "Request payload" outputRawFormat: json outputParameters: - name: result type: object value: "$." - name: "agents-by-id-messages-stream" path: "/v1/agents/{agent_id}/messages/stream" operations: - name: "create_agent_message_stream" method: POST description: "Send Message Streaming" inputParameters: - name: "agent_id" in: path type: string required: true description: "The ID of the agent in the format 'agent-'" - name: "body" in: body type: object required: true description: "Request payload" outputRawFormat: json outputParameters: - name: result type: object value: "$." - name: "agents-by-id-messages-cancel" path: "/v1/agents/{agent_id}/messages/cancel" operations: - name: "cancel_message" method: POST description: "Cancel Message" inputParameters: - name: "agent_id" in: path type: string required: true description: "The ID of the agent in the format 'agent-'" - name: "body" in: body type: object required: true description: "Request payload" outputRawFormat: json outputParameters: - name: result type: object value: "$." - name: "agents-by-id-generate" path: "/v1/agents/{agent_id}/generate" operations: - name: "generate_completion" method: POST description: "Generate Completion" inputParameters: - name: "agent_id" in: path type: string required: true description: "The ID of the agent in the format 'agent-'" - name: "body" in: body type: object required: true description: "Request payload" outputRawFormat: json outputParameters: - name: result type: object value: "$." - name: "agents-messages-search" path: "/v1/agents/messages/search" operations: - name: "search_messages" method: POST description: "Search Messages" inputParameters: - name: "body" in: body type: object required: true description: "Request payload" outputRawFormat: json outputParameters: - name: result type: object value: "$." - name: "agents-by-id-messages-async" path: "/v1/agents/{agent_id}/messages/async" operations: - name: "create_agent_message_async" method: POST description: "Send Message Async" inputParameters: - name: "agent_id" in: path type: string required: true description: "The ID of the agent in the format 'agent-'" - name: "body" in: body type: object required: true description: "Request payload" outputRawFormat: json outputParameters: - name: result type: object value: "$." - name: "agents-by-id-reset-messages" path: "/v1/agents/{agent_id}/reset-messages" operations: - name: "reset_messages" method: PATCH description: "Reset Messages" inputParameters: - name: "agent_id" in: path type: string required: true description: "The ID of the agent in the format 'agent-'" - name: "body" in: body type: object required: true description: "Request payload" outputRawFormat: json outputParameters: - name: result type: object value: "$." - name: "agents-by-id-groups" path: "/v1/agents/{agent_id}/groups" operations: - name: "list_groups_for_agent" method: GET description: "List Groups for Agent" inputParameters: - name: "agent_id" in: path type: string required: true description: "The ID of the agent in the format 'agent-'" - name: "manager_type" in: query type: string required: false description: "Manager type to filter groups by" - name: "before" in: query type: string required: false description: "Group ID cursor for pagination. Returns groups that come before this group ID in the specified sort order" - name: "after" in: query type: string required: false description: "Group ID cursor for pagination. Returns groups that come after this group ID in the specified sort order" - name: "limit" in: query type: string required: false description: "Maximum number of groups to return" - name: "order" in: query type: string required: false description: "Sort order for groups 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-messages-preview-raw-payload" path: "/v1/agents/{agent_id}/messages/preview-raw-payload" operations: - name: "preview_model_request" method: POST description: "Preview Model Request" inputParameters: - name: "agent_id" in: path type: string required: true description: "The ID of the agent in the format 'agent-'" - name: "body" in: body type: object required: true description: "Request payload" outputRawFormat: json outputParameters: - name: result type: object value: "$." - name: "agents-by-id-summarize" path: "/v1/agents/{agent_id}/summarize" operations: - name: "summarize_messages" method: POST description: "Summarize Messages" inputParameters: - name: "agent_id" in: path type: string required: true description: "The ID of the agent in the format 'agent-'" - name: "body" in: body type: object required: true description: "Request payload" outputRawFormat: json outputParameters: - name: result type: object value: "$." - name: "agents-search" path: "/v1/agents/search" operations: - name: "agents_searchdeployedagents" method: POST description: "Search Deployed Agents" inputParameters: - name: "body" in: body type: object required: true description: "Body" outputRawFormat: json outputParameters: - name: result type: object value: "$." - name: "agents-search-count" path: "/v1/agents/search/count" operations: - name: "agents_countdeployedagents" method: GET description: "Count Deployed Agents" inputParameters: - name: "search" in: query type: array required: false description: "search parameter" - name: "project_id" in: query type: string required: false description: "project_id parameter" - name: "combinator" in: query type: string required: false description: "combinator parameter" outputRawFormat: json outputParameters: - name: result type: object value: "$." - name: "agents-by-id-core-memory-variables" path: "/v1/agents/{agent_id}/core-memory/variables" operations: - name: "agents_getagentvariables" method: GET description: "Retrieve Memory Variables" inputParameters: - name: "agent_id" in: path type: string required: true description: "agent_id parameter" outputRawFormat: json outputParameters: - name: result type: object value: "$." exposes: - type: rest namespace: "letta-agents-rest" port: 8080 description: "REST adapter for Letta API — Agents. One Spectral-compliant resource per consumed operation." resources: - path: "/v1/agents/" name: "agents" description: "REST surface for agents." operations: - method: GET name: "list_agents" description: "List Agents" call: "letta-agents.list_agents" with: "name": "rest.name" "tags": "rest.tags" "match_all_tags": "rest.match_all_tags" "before": "rest.before" "after": "rest.after" "limit": "rest.limit" "query_text": "rest.query_text" "project_id": "rest.project_id" "template_id": "rest.template_id" "base_template_id": "rest.base_template_id" "identity_id": "rest.identity_id" "identifier_keys": "rest.identifier_keys" "include_relationships": "rest.include_relationships" "include": "rest.include" "order": "rest.order" "order_by": "rest.order_by" "ascending": "rest.ascending" "sort_by": "rest.sort_by" "last_stop_reason": "rest.last_stop_reason" "created_by_id": "rest.created_by_id" outputParameters: - type: object mapping: "$." - method: POST name: "create_agent" description: "Create Agent" call: "letta-agents.create_agent" with: "X-Project": "rest.X-Project" "body": "rest.body" outputParameters: - type: object mapping: "$." - path: "/v1/agents/count" name: "agents-count" description: "REST surface for agents-count." operations: - method: GET name: "count_agents" description: "Count Agents" call: "letta-agents.count_agents" with: "name": "rest.name" "tags": "rest.tags" "match_all_tags": "rest.match_all_tags" "query_text": "rest.query_text" "project_id": "rest.project_id" "template_id": "rest.template_id" "base_template_id": "rest.base_template_id" "identity_id": "rest.identity_id" "identifier_keys": "rest.identifier_keys" "last_stop_reason": "rest.last_stop_reason" "created_by_id": "rest.created_by_id" outputParameters: - type: object mapping: "$." - path: "/v1/agents/{agent-id}/export" name: "agents-by-id-export" description: "REST surface for agents-by-id-export." operations: - method: GET name: "export_agent" description: "Export Agent" call: "letta-agents.export_agent" with: "agent_id": "rest.agent_id" "max_steps": "rest.max_steps" "use_legacy_format": "rest.use_legacy_format" "conversation_id": "rest.conversation_id" "scrub_messages": "rest.scrub_messages" "body": "rest.body" outputParameters: - type: object mapping: "$." - method: POST name: "export_agent_with_skills" description: "Export Agent with Skills" call: "letta-agents.export_agent_with_skills" with: "agent_id": "rest.agent_id" "body": "rest.body" outputParameters: - type: object mapping: "$." - path: "/v1/agents/import" name: "agents-import" description: "REST surface for agents-import." operations: - method: POST name: "import_agent" description: "Import Agent" call: "letta-agents.import_agent" with: "x-override-embedding-model": "rest.x-override-embedding-model" "body": "rest.body" outputParameters: - type: object mapping: "$." - path: "/v1/agents/{agent-id}/context" name: "agents-by-id-context" description: "REST surface for agents-by-id-context." operations: - method: GET name: "retrieve_agent_context_window" description: "Retrieve Agent Context Window" call: "letta-agents.retrieve_agent_context_window" with: "agent_id": "rest.agent_id" "conversation_id": "rest.conversation_id" outputParameters: - type: object mapping: "$." - path: "/v1/agents/{agent-id}" name: "agents-by-id" description: "REST surface for agents-by-id." operations: - method: PATCH name: "modify_agent" description: "Modify Agent" call: "letta-agents.modify_agent" with: "agent_id": "rest.agent_id" "body": "rest.body" outputParameters: - type: object mapping: "$." - method: GET name: "retrieve_agent" description: "Retrieve Agent" call: "letta-agents.retrieve_agent" with: "agent_id": "rest.agent_id" "include_relationships": "rest.include_relationships" "include": "rest.include" outputParameters: - type: object mapping: "$." - method: DELETE name: "delete_agent" description: "Delete Agent" call: "letta-agents.delete_agent" with: "agent_id": "rest.agent_id" outputParameters: - type: object mapping: "$." - path: "/v1/agents/{agent-id}/tools" name: "agents-by-id-tools" description: "REST surface for agents-by-id-tools." operations: - method: GET name: "list_tools_for_agent" description: "List Tools for Agent" call: "letta-agents.list_tools_for_agent" with: "agent_id": "rest.agent_id" "before": "rest.before" "after": "rest.after" "limit": "rest.limit" "order": "rest.order" "order_by": "rest.order_by" outputParameters: - type: object mapping: "$." - path: "/v1/agents/{agent-id}/tools/attach/{tool-id}" name: "agents-by-id-tools-attach-by-id" description: "REST surface for agents-by-id-tools-attach-by-id." operations: - method: PATCH name: "attach_tool_to_agent" description: "Attach Tool to Agent" call: "letta-agents.attach_tool_to_agent" with: "tool_id": "rest.tool_id" "agent_id": "rest.agent_id" outputParameters: - type: object mapping: "$." - path: "/v1/agents/{agent-id}/tools/detach/{tool-id}" name: "agents-by-id-tools-detach-by-id" description: "REST surface for agents-by-id-tools-detach-by-id." operations: - method: PATCH name: "detach_tool_from_agent" description: "Detach Tool from Agent" call: "letta-agents.detach_tool_from_agent" with: "tool_id": "rest.tool_id" "agent_id": "rest.agent_id" outputParameters: - type: object mapping: "$." - path: "/v1/agents/{agent-id}/tools/approval/{tool-name}" name: "agents-by-id-tools-approval-by-id" description: "REST surface for agents-by-id-tools-approval-by-id." operations: - method: PATCH name: "modify_approval_for_tool" description: "Modify Approval for Tool" call: "letta-agents.modify_approval_for_tool" with: "tool_name": "rest.tool_name" "agent_id": "rest.agent_id" "requires_approval": "rest.requires_approval" "body": "rest.body" outputParameters: - type: object mapping: "$." - path: "/v1/agents/{agent-id}/tools/{tool-name}/run" name: "agents-by-id-tools-by-id-run" description: "REST surface for agents-by-id-tools-by-id-run." operations: - method: POST name: "run_tool_for_agent" description: "Run Tool for Agent" call: "letta-agents.run_tool_for_agent" with: "agent_id": "rest.agent_id" "tool_name": "rest.tool_name" "body": "rest.body" outputParameters: - type: object mapping: "$." - path: "/v1/agents/{agent-id}/sources/attach/{source-id}" name: "agents-by-id-sources-attach-by-id" description: "REST surface for agents-by-id-sources-attach-by-id." operations: - method: PATCH name: "attach_source_to_agent" description: "Attach Source" call: "letta-agents.attach_source_to_agent" with: "source_id": "rest.source_id" "agent_id": "rest.agent_id" outputParameters: - type: object mapping: "$." - path: "/v1/agents/{agent-id}/folders/attach/{folder-id}" name: "agents-by-id-folders-attach-by-id" description: "REST surface for agents-by-id-folders-attach-by-id." operations: - method: PATCH name: "attach_folder_to_agent" description: "Attach Folder to Agent" call: "letta-agents.attach_folder_to_agent" with: "folder_id": "rest.folder_id" "agent_id": "rest.agent_id" outputParameters: - type: object mapping: "$." - path: "/v1/agents/{agent-id}/sources/detach/{source-id}" name: "agents-by-id-sources-detach-by-id" description: "REST surface for agents-by-id-sources-detach-by-id." operations: - method: PATCH name: "detach_source_from_agent" description: "Detach Source" call: "letta-agents.detach_source_from_agent" with: "source_id": "rest.source_id" "agent_id": "rest.agent_id" outputParameters: - type: object mapping: "$." - path: "/v1/agents/{agent-id}/folders/detach/{folder-id}" name: "agents-by-id-folders-detach-by-id" description: "REST surface for agents-by-id-folders-detach-by-id." operations: - method: PATCH name: "detach_folder_from_agent" description: "Detach Folder from Agent" call: "letta-agents.detach_folder_from_agent" with: "folder_id": "rest.folder_id" "agent_id": "rest.agent_id" outputParameters: - type: object mapping: "$." - path: "/v1/agents/{agent-id}/files/close-all" name: "agents-by-id-files-close-all" description: "REST surface for agents-by-id-files-close-all." operations: - method: PATCH name: "close_all_files_for_agent" description: "Close All Files for Agent" call: "letta-agents.close_all_files_for_agent" with: "agent_id": "rest.agent_id" outputParameters: - type: object mapping: "$." - path: "/v1/agents/{agent-id}/files/{file-id}/open" name: "agents-by-id-files-by-id-open" description: "REST surface for agents-by-id-files-by-id-open." operations: - method: PATCH name: "open_file_for_agent" description: "Open File for Agent" call: "letta-agents.open_file_for_agent" with: "file_id": "rest.file_id" "agent_id": "rest.agent_id" outputParameters: - type: object mapping: "$." - path: "/v1/agents/{agent-id}/files/{file-id}/close" name: "agents-by-id-files-by-id-close" description: "REST surface for agents-by-id-files-by-id-close." operations: - method: PATCH name: "close_file_for_agent" description: "Close File for Agent" call: "letta-agents.close_file_for_agent" with: "file_id": "rest.file_id" "agent_id": "rest.agent_id" outputParameters: - type: object mapping: "$." - path: "/v1/agents/{agent-id}/sources" name: "agents-by-id-sources" description: "REST surface for agents-by-id-sources." operations: - method: GET name: "list_agent_sources" description: "List Agent Sources" call: "letta-agents.list_agent_sources" with: "agent_id": "rest.agent_id" "before": "rest.before" "after": "rest.after" "limit": "rest.limit" "order": "rest.order" "order_by": "rest.order_by" outputParameters: - type: object mapping: "$." - path: "/v1/agents/{agent-id}/folders" name: "agents-by-id-folders" description: "REST surface for agents-by-id-folders." operations: - method: GET name: "list_folders_for_agent" description: "List Folders for Agent" call: "letta-agents.list_folders_for_agent" with: "agent_id": "rest.agent_id" "before": "rest.before" "after": "rest.after" "limit": "rest.limit" "order": "rest.order" "order_by": "rest.order_by" outputParameters: - type: object mapping: "$." - path: "/v1/agents/{agent-id}/files" name: "agents-by-id-files" description: "REST surface for agents-by-id-files." operations: - method: GET name: "list_files_for_agent" description: "List Files for Agent" call: "letta-agents.list_files_for_agent" with: "agent_id": "rest.agent_id" "before": "rest.before" "after": "rest.after" "limit": "rest.limit" "order": "rest.order" "order_by": "rest.order_by" "cursor": "rest.cursor" "is_open": "rest.is_open" outputParameters: - type: object mapping: "$." - path: "/v1/agents/{agent-id}/core-memory" name: "agents-by-id-core-memory" description: "REST surface for agents-by-id-core-memory." operations: - method: GET name: "retrieve_agent_memory" description: "Retrieve Agent Memory" call: "letta-agents.retrieve_agent_memory" with: "agent_id": "rest.agent_id" outputParameters: - type: object mapping: "$." - path: "/v1/agents/{agent-id}/core-memory/blocks/{block-label}" name: "agents-by-id-core-memory-blocks-by-id" description: "REST surface for agents-by-id-core-memory-blocks-by-id." operations: - method: GET name: "retrieve_core_memory_block" description: "Retrieve Block for Agent" call: "letta-agents.retrieve_core_memory_block" with: "block_label": "rest.block_label" "agent_id": "rest.agent_id" outputParameters: - type: object mapping: "$." - method: PATCH name: "modify_core_memory_block" description: "Modify Block for Agent" call: "letta-agents.modify_core_memory_block" with: "block_label": "rest.block_label" "agent_id": "rest.agent_id" "body": "rest.body" outputParameters: - type: object mapping: "$." - path: "/v1/agents/{agent-id}/core-memory/blocks" name: "agents-by-id-core-memory-blocks" description: "REST surface for agents-by-id-core-memory-blocks." operations: - method: GET name: "list_core_memory_blocks" description: "List Blocks for Agent" call: "letta-agents.list_core_memory_blocks" with: "agent_id": "rest.agent_id" "before": "rest.before" "after": "rest.after" "limit": "rest.limit" "order": "rest.order" "order_by": "rest.order_by" outputParameters: - type: object mapping: "$." - path: "/v1/agents/{agent-id}/recompile" name: "agents-by-id-recompile" description: "REST surface for agents-by-id-recompile." operations: - method: POST name: "recompile_agent" description: "Recompile Agent" call: "letta-agents.recompile_agent" with: "agent_id": "rest.agent_id" "update_timestamp": "rest.update_timestamp" "dry_run": "rest.dry_run" outputParameters: - type: object mapping: "$." - path: "/v1/agents/{agent-id}/system-prompt/recompile" name: "agents-by-id-system-prompt-recompile" description: "REST surface for agents-by-id-system-prompt-recompile." operations: - method: POST name: "recompile_agent_system_prompt" description: "Recompile Agent System Prompt" call: "letta-agents.recompile_agent_system_prompt" with: "agent_id": "rest.agent_id" "update_timestamp": "rest.update_timestamp" "dry_run": "rest.dry_run" outputParameters: - type: object mapping: "$." - path: "/v1/agents/{agent-id}/core-memory/blocks/attach/{block-id}" name: "agents-by-id-core-memory-blocks-attach-by-id" description: "REST surface for agents-by-id-core-memory-blocks-attach-by-id." operations: - method: PATCH name: "attach_core_memory_block" description: "Attach Block to Agent" call: "letta-agents.attach_core_memory_block" with: "block_id": "rest.block_id" "agent_id": "rest.agent_id" outputParameters: - type: object mapping: "$." - path: "/v1/agents/{agent-id}/core-memory/blocks/detach/{block-id}" name: "agents-by-id-core-memory-blocks-detach-by-id" description: "REST surface for agents-by-id-core-memory-blocks-detach-by-id." operations: - method: PATCH name: "detach_core_memory_block" description: "Detach Block from Agent" call: "letta-agents.detach_core_memory_block" with: "block_id": "rest.block_id" "agent_id": "rest.agent_id" outputParameters: - type: object mapping: "$." - path: "/v1/agents/{agent-id}/archives/attach/{archive-id}" name: "agents-by-id-archives-attach-by-id" description: "REST surface for agents-by-id-archives-attach-by-id." operations: - method: PATCH name: "attach_archive_to_agent" description: "Attach Archive to Agent" call: "letta-agents.attach_archive_to_agent" with: "archive_id": "rest.archive_id" "agent_id": "rest.agent_id" outputParameters: - type: object mapping: "$." - path: "/v1/agents/{agent-id}/archives/detach/{archive-id}" name: "agents-by-id-archives-detach-by-id" description: "REST surface for agents-by-id-archives-detach-by-id." operations: - method: PATCH name: "detach_archive_from_agent" description: "Detach Archive from Agent" call: "letta-agents.detach_archive_from_agent" with: "archive_id": "rest.archive_id" "agent_id": "rest.agent_id" outputParameters: - type: object mapping: "$." - path: "/v1/agents/{agent-id}/identities/attach/{identity-id}" name: "agents-by-id-identities-attach-by-id" description: "REST surface for agents-by-id-identities-attach-by-id." operations: - method: PATCH name: "attach_identity_to_agent" description: "Attach Identity to Agent" call: "letta-agents.attach_identity_to_agent" with: "identity_id": "rest.identity_id" "agent_id": "rest.agent_id" outputParameters: - type: object mapping: "$." - path: "/v1/agents/{agent-id}/identities/detach/{identity-id}" name: "agents-by-id-identities-detach-by-id" description: "REST surface for agents-by-id-identities-detach-by-id." operations: - method: PATCH name: "detach_identity_from_agent" description: "Detach Identity from Agent" call: "letta-agents.detach_identity_from_agent" with: "identity_id": "rest.identity_id" "agent_id": "rest.agent_id" outputParameters: - type: object mapping: "$." - path: "/v1/agents/{agent-id}/archival-memory" name: "agents-by-id-archival-memory" description: "REST surface for agents-by-id-archival-memory." operations: - method: GET name: "list_passages" description: "List Passages" call: "letta-agents.list_passages" with: "agent_id": "rest.agent_id" "after": "rest.after" "before": "rest.before" "limit": "rest.limit" "search": "rest.search" "ascending": "rest.ascending" outputParameters: - type: object mapping: "$." - method: POST name: "create_passage" description: "Create Passage" call: "letta-agents.create_passage" with: "agent_id": "rest.agent_id" "body": "rest.body" outputParameters: - type: object mapping: "$." - path: "/v1/agents/{agent-id}/archival-memory/search" name: "agents-by-id-archival-memory-search" description: "REST surface for agents-by-id-archival-memory-search." operations: - method: GET name: "search_archival_memory" description: "Search Archival Memory" call: "letta-agents.search_archival_memory" with: "agent_id": "rest.agent_id" "query": "rest.query" "tags": "rest.tags" "tag_match_mode": "rest.tag_match_mode" "top_k": "rest.top_k" "start_datetime": "rest.start_datetime" "end_datetime": "rest.end_datetime" outputParameters: - type: object mapping: "$." - path: "/v1/agents/{agent-id}/archival-memory/{memory-id}" name: "agents-by-id-archival-memory-by-id" description: "REST surface for agents-by-id-archival-memory-by-id." operations: - method: DELETE name: "delete_passage" description: "Delete Passage" call: "letta-agents.delete_passage" with: "memory_id": "rest.memory_id" "agent_id": "rest.agent_id" outputParameters: - type: object mapping: "$." - path: "/v1/agents/{agent-id}/messages" name: "agents-by-id-messages" description: "REST surface for agents-by-id-messages." operations: - method: GET name: "list_messages" description: "List Messages" call: "letta-agents.list_messages" with: "agent_id": "rest.agent_id" "before": "rest.before" "after": "rest.after" "limit": "rest.limit" "order": "rest.order" "order_by": "rest.order_by" "group_id": "rest.group_id" "conversation_id": "rest.conversation_id" "use_assistant_message": "rest.use_assistant_message" "assistant_message_tool_name": "rest.assistant_message_tool_name" "assistant_message_tool_kwarg": "rest.assistant_message_tool_kwarg" "include_err": "rest.include_err" "include_return_message_types": "rest.include_return_message_types" outputParameters: - type: object mapping: "$." - method: POST name: "send_message" description: "Send Message" call: "letta-agents.send_message" with: "agent_id": "rest.agent_id" "body": "rest.body" outputParameters: - type: object mapping: "$." - path: "/v1/agents/{agent-id}/messages/{message-id}" name: "agents-by-id-messages-by-id" description: "REST surface for agents-by-id-messages-by-id." operations: - method: PATCH name: "modify_message" description: "Modify Message" call: "letta-agents.modify_message" with: "agent_id": "rest.agent_id" "message_id": "rest.message_id" "body": "rest.body" outputParameters: - type: object mapping: "$." - path: "/v1/agents/{agent-id}/messages/stream" name: "agents-by-id-messages-stream" description: "REST surface for agents-by-id-messages-stream." operations: - method: POST name: "create_agent_message_stream" description: "Send Message Streaming" call: "letta-agents.create_agent_message_stream" with: "agent_id": "rest.agent_id" "body": "rest.body" outputParameters: - type: object mapping: "$." - path: "/v1/agents/{agent-id}/messages/cancel" name: "agents-by-id-messages-cancel" description: "REST surface for agents-by-id-messages-cancel." operations: - method: POST name: "cancel_message" description: "Cancel Message" call: "letta-agents.cancel_message" with: "agent_id": "rest.agent_id" "body": "rest.body" outputParameters: - type: object mapping: "$." - path: "/v1/agents/{agent-id}/generate" name: "agents-by-id-generate" description: "REST surface for agents-by-id-generate." operations: - method: POST name: "generate_completion" description: "Generate Completion" call: "letta-agents.generate_completion" with: "agent_id": "rest.agent_id" "body": "rest.body" outputParameters: - type: object mapping: "$." - path: "/v1/agents/messages/search" name: "agents-messages-search" description: "REST surface for agents-messages-search." operations: - method: POST name: "search_messages" description: "Search Messages" call: "letta-agents.search_messages" with: "body": "rest.body" outputParameters: - type: object mapping: "$." - path: "/v1/agents/{agent-id}/messages/async" name: "agents-by-id-messages-async" description: "REST surface for agents-by-id-messages-async." operations: - method: POST name: "create_agent_message_async" description: "Send Message Async" call: "letta-agents.create_agent_message_async" with: "agent_id": "rest.agent_id" "body": "rest.body" outputParameters: - type: object mapping: "$." - path: "/v1/agents/{agent-id}/reset-messages" name: "agents-by-id-reset-messages" description: "REST surface for agents-by-id-reset-messages." operations: - method: PATCH name: "reset_messages" description: "Reset Messages" call: "letta-agents.reset_messages" with: "agent_id": "rest.agent_id" "body": "rest.body" outputParameters: - type: object mapping: "$." - path: "/v1/agents/{agent-id}/groups" name: "agents-by-id-groups" description: "REST surface for agents-by-id-groups." operations: - method: GET name: "list_groups_for_agent" description: "List Groups for Agent" call: "letta-agents.list_groups_for_agent" with: "agent_id": "rest.agent_id" "manager_type": "rest.manager_type" "before": "rest.before" "after": "rest.after" "limit": "rest.limit" "order": "rest.order" "order_by": "rest.order_by" outputParameters: - type: object mapping: "$." - path: "/v1/agents/{agent-id}/messages/preview-raw-payload" name: "agents-by-id-messages-preview-raw-payload" description: "REST surface for agents-by-id-messages-preview-raw-payload." operations: - method: POST name: "preview_model_request" description: "Preview Model Request" call: "letta-agents.preview_model_request" with: "agent_id": "rest.agent_id" "body": "rest.body" outputParameters: - type: object mapping: "$." - path: "/v1/agents/{agent-id}/summarize" name: "agents-by-id-summarize" description: "REST surface for agents-by-id-summarize." operations: - method: POST name: "summarize_messages" description: "Summarize Messages" call: "letta-agents.summarize_messages" with: "agent_id": "rest.agent_id" "body": "rest.body" outputParameters: - type: object mapping: "$." - path: "/v1/agents/search" name: "agents-search" description: "REST surface for agents-search." operations: - method: POST name: "agents_searchdeployedagents" description: "Search Deployed Agents" call: "letta-agents.agents_searchdeployedagents" with: "body": "rest.body" outputParameters: - type: object mapping: "$." - path: "/v1/agents/search/count" name: "agents-search-count" description: "REST surface for agents-search-count." operations: - method: GET name: "agents_countdeployedagents" description: "Count Deployed Agents" call: "letta-agents.agents_countdeployedagents" with: "search": "rest.search" "project_id": "rest.project_id" "combinator": "rest.combinator" outputParameters: - type: object mapping: "$." - path: "/v1/agents/{agent-id}/core-memory/variables" name: "agents-by-id-core-memory-variables" description: "REST surface for agents-by-id-core-memory-variables." operations: - method: GET name: "agents_getagentvariables" description: "Retrieve Memory Variables" call: "letta-agents.agents_getagentvariables" with: "agent_id": "rest.agent_id" outputParameters: - type: object mapping: "$." - type: mcp namespace: "letta-agents-mcp" port: 9090 transport: http description: "MCP adapter for Letta API — Agents. One verb-noun tool per consumed operation." tools: - name: "list-agents" description: "List Agents" hints: readOnly: true destructive: false idempotent: true call: "letta-agents.list_agents" with: "name": "tools.name" "tags": "tools.tags" "match_all_tags": "tools.match_all_tags" "before": "tools.before" "after": "tools.after" "limit": "tools.limit" "query_text": "tools.query_text" "project_id": "tools.project_id" "template_id": "tools.template_id" "base_template_id": "tools.base_template_id" "identity_id": "tools.identity_id" "identifier_keys": "tools.identifier_keys" "include_relationships": "tools.include_relationships" "include": "tools.include" "order": "tools.order" "order_by": "tools.order_by" "ascending": "tools.ascending" "sort_by": "tools.sort_by" "last_stop_reason": "tools.last_stop_reason" "created_by_id": "tools.created_by_id" outputParameters: - type: object mapping: "$." - name: "create-agent" description: "Create Agent" hints: readOnly: false destructive: false idempotent: false call: "letta-agents.create_agent" with: "X-Project": "tools.X-Project" "body": "tools.body" outputParameters: - type: object mapping: "$." - name: "count-agents" description: "Count Agents" hints: readOnly: true destructive: false idempotent: true call: "letta-agents.count_agents" with: "name": "tools.name" "tags": "tools.tags" "match_all_tags": "tools.match_all_tags" "query_text": "tools.query_text" "project_id": "tools.project_id" "template_id": "tools.template_id" "base_template_id": "tools.base_template_id" "identity_id": "tools.identity_id" "identifier_keys": "tools.identifier_keys" "last_stop_reason": "tools.last_stop_reason" "created_by_id": "tools.created_by_id" outputParameters: - type: object mapping: "$." - name: "export-agent" description: "Export Agent" hints: readOnly: true destructive: false idempotent: true call: "letta-agents.export_agent" with: "agent_id": "tools.agent_id" "max_steps": "tools.max_steps" "use_legacy_format": "tools.use_legacy_format" "conversation_id": "tools.conversation_id" "scrub_messages": "tools.scrub_messages" "body": "tools.body" outputParameters: - type: object mapping: "$." - name: "export-agent-skills" description: "Export Agent with Skills" hints: readOnly: true destructive: false idempotent: false call: "letta-agents.export_agent_with_skills" with: "agent_id": "tools.agent_id" "body": "tools.body" outputParameters: - type: object mapping: "$." - name: "import-agent" description: "Import Agent" hints: readOnly: false destructive: false idempotent: false call: "letta-agents.import_agent" with: "x-override-embedding-model": "tools.x-override-embedding-model" "body": "tools.body" outputParameters: - type: object mapping: "$." - name: "retrieve-agent-context-window" description: "Retrieve Agent Context Window" hints: readOnly: true destructive: false idempotent: true call: "letta-agents.retrieve_agent_context_window" with: "agent_id": "tools.agent_id" "conversation_id": "tools.conversation_id" outputParameters: - type: object mapping: "$." - name: "modify-agent" description: "Modify Agent" hints: readOnly: false destructive: false idempotent: true call: "letta-agents.modify_agent" with: "agent_id": "tools.agent_id" "body": "tools.body" outputParameters: - type: object mapping: "$." - name: "retrieve-agent" description: "Retrieve Agent" hints: readOnly: true destructive: false idempotent: true call: "letta-agents.retrieve_agent" with: "agent_id": "tools.agent_id" "include_relationships": "tools.include_relationships" "include": "tools.include" outputParameters: - type: object mapping: "$." - name: "delete-agent" description: "Delete Agent" hints: readOnly: false destructive: true idempotent: true call: "letta-agents.delete_agent" with: "agent_id": "tools.agent_id" outputParameters: - type: object mapping: "$." - name: "list-tools-agent" description: "List Tools for Agent" hints: readOnly: true destructive: false idempotent: true call: "letta-agents.list_tools_for_agent" with: "agent_id": "tools.agent_id" "before": "tools.before" "after": "tools.after" "limit": "tools.limit" "order": "tools.order" "order_by": "tools.order_by" outputParameters: - type: object mapping: "$." - name: "attach-tool-agent" description: "Attach Tool to Agent" hints: readOnly: false destructive: false idempotent: true call: "letta-agents.attach_tool_to_agent" with: "tool_id": "tools.tool_id" "agent_id": "tools.agent_id" outputParameters: - type: object mapping: "$." - name: "detach-tool-agent" description: "Detach Tool from Agent" hints: readOnly: false destructive: false idempotent: true call: "letta-agents.detach_tool_from_agent" with: "tool_id": "tools.tool_id" "agent_id": "tools.agent_id" outputParameters: - type: object mapping: "$." - name: "modify-approval-tool" description: "Modify Approval for Tool" hints: readOnly: false destructive: false idempotent: true call: "letta-agents.modify_approval_for_tool" with: "tool_name": "tools.tool_name" "agent_id": "tools.agent_id" "requires_approval": "tools.requires_approval" "body": "tools.body" outputParameters: - type: object mapping: "$." - name: "run-tool-agent" description: "Run Tool for Agent" hints: readOnly: false destructive: false idempotent: false call: "letta-agents.run_tool_for_agent" with: "agent_id": "tools.agent_id" "tool_name": "tools.tool_name" "body": "tools.body" outputParameters: - type: object mapping: "$." - name: "attach-source" description: "Attach Source" hints: readOnly: false destructive: false idempotent: true call: "letta-agents.attach_source_to_agent" with: "source_id": "tools.source_id" "agent_id": "tools.agent_id" outputParameters: - type: object mapping: "$." - name: "attach-folder-agent" description: "Attach Folder to Agent" hints: readOnly: false destructive: false idempotent: true call: "letta-agents.attach_folder_to_agent" with: "folder_id": "tools.folder_id" "agent_id": "tools.agent_id" outputParameters: - type: object mapping: "$." - name: "detach-source" description: "Detach Source" hints: readOnly: false destructive: false idempotent: true call: "letta-agents.detach_source_from_agent" with: "source_id": "tools.source_id" "agent_id": "tools.agent_id" outputParameters: - type: object mapping: "$." - name: "detach-folder-agent" description: "Detach Folder from Agent" hints: readOnly: false destructive: false idempotent: true call: "letta-agents.detach_folder_from_agent" with: "folder_id": "tools.folder_id" "agent_id": "tools.agent_id" outputParameters: - type: object mapping: "$." - name: "close-all-files-agent" description: "Close All Files for Agent" hints: readOnly: false destructive: false idempotent: true call: "letta-agents.close_all_files_for_agent" with: "agent_id": "tools.agent_id" outputParameters: - type: object mapping: "$." - name: "open-file-agent" description: "Open File for Agent" hints: readOnly: false destructive: false idempotent: true call: "letta-agents.open_file_for_agent" with: "file_id": "tools.file_id" "agent_id": "tools.agent_id" outputParameters: - type: object mapping: "$." - name: "close-file-agent" description: "Close File for Agent" hints: readOnly: false destructive: false idempotent: true call: "letta-agents.close_file_for_agent" with: "file_id": "tools.file_id" "agent_id": "tools.agent_id" outputParameters: - type: object mapping: "$." - name: "list-agent-sources" description: "List Agent Sources" hints: readOnly: true destructive: false idempotent: true call: "letta-agents.list_agent_sources" with: "agent_id": "tools.agent_id" "before": "tools.before" "after": "tools.after" "limit": "tools.limit" "order": "tools.order" "order_by": "tools.order_by" outputParameters: - type: object mapping: "$." - name: "list-folders-agent" description: "List Folders for Agent" hints: readOnly: true destructive: false idempotent: true call: "letta-agents.list_folders_for_agent" with: "agent_id": "tools.agent_id" "before": "tools.before" "after": "tools.after" "limit": "tools.limit" "order": "tools.order" "order_by": "tools.order_by" outputParameters: - type: object mapping: "$." - name: "list-files-agent" description: "List Files for Agent" hints: readOnly: true destructive: false idempotent: true call: "letta-agents.list_files_for_agent" with: "agent_id": "tools.agent_id" "before": "tools.before" "after": "tools.after" "limit": "tools.limit" "order": "tools.order" "order_by": "tools.order_by" "cursor": "tools.cursor" "is_open": "tools.is_open" outputParameters: - type: object mapping: "$." - name: "retrieve-agent-memory" description: "Retrieve Agent Memory" hints: readOnly: true destructive: false idempotent: true call: "letta-agents.retrieve_agent_memory" with: "agent_id": "tools.agent_id" outputParameters: - type: object mapping: "$." - name: "retrieve-block-agent" description: "Retrieve Block for Agent" hints: readOnly: true destructive: false idempotent: true call: "letta-agents.retrieve_core_memory_block" with: "block_label": "tools.block_label" "agent_id": "tools.agent_id" outputParameters: - type: object mapping: "$." - name: "modify-block-agent" description: "Modify Block for Agent" hints: readOnly: false destructive: false idempotent: true call: "letta-agents.modify_core_memory_block" with: "block_label": "tools.block_label" "agent_id": "tools.agent_id" "body": "tools.body" outputParameters: - type: object mapping: "$." - name: "list-blocks-agent" description: "List Blocks for Agent" hints: readOnly: true destructive: false idempotent: true call: "letta-agents.list_core_memory_blocks" with: "agent_id": "tools.agent_id" "before": "tools.before" "after": "tools.after" "limit": "tools.limit" "order": "tools.order" "order_by": "tools.order_by" outputParameters: - type: object mapping: "$." - name: "recompile-agent" description: "Recompile Agent" hints: readOnly: false destructive: false idempotent: false call: "letta-agents.recompile_agent" with: "agent_id": "tools.agent_id" "update_timestamp": "tools.update_timestamp" "dry_run": "tools.dry_run" outputParameters: - type: object mapping: "$." - name: "recompile-agent-system-prompt" description: "Recompile Agent System Prompt" hints: readOnly: false destructive: false idempotent: false call: "letta-agents.recompile_agent_system_prompt" with: "agent_id": "tools.agent_id" "update_timestamp": "tools.update_timestamp" "dry_run": "tools.dry_run" outputParameters: - type: object mapping: "$." - name: "attach-block-agent" description: "Attach Block to Agent" hints: readOnly: false destructive: false idempotent: true call: "letta-agents.attach_core_memory_block" with: "block_id": "tools.block_id" "agent_id": "tools.agent_id" outputParameters: - type: object mapping: "$." - name: "detach-block-agent" description: "Detach Block from Agent" hints: readOnly: false destructive: false idempotent: true call: "letta-agents.detach_core_memory_block" with: "block_id": "tools.block_id" "agent_id": "tools.agent_id" outputParameters: - type: object mapping: "$." - name: "attach-archive-agent" description: "Attach Archive to Agent" hints: readOnly: false destructive: false idempotent: true call: "letta-agents.attach_archive_to_agent" with: "archive_id": "tools.archive_id" "agent_id": "tools.agent_id" outputParameters: - type: object mapping: "$." - name: "detach-archive-agent" description: "Detach Archive from Agent" hints: readOnly: false destructive: false idempotent: true call: "letta-agents.detach_archive_from_agent" with: "archive_id": "tools.archive_id" "agent_id": "tools.agent_id" outputParameters: - type: object mapping: "$." - name: "attach-identity-agent" description: "Attach Identity to Agent" hints: readOnly: false destructive: false idempotent: true call: "letta-agents.attach_identity_to_agent" with: "identity_id": "tools.identity_id" "agent_id": "tools.agent_id" outputParameters: - type: object mapping: "$." - name: "detach-identity-agent" description: "Detach Identity from Agent" hints: readOnly: false destructive: false idempotent: true call: "letta-agents.detach_identity_from_agent" with: "identity_id": "tools.identity_id" "agent_id": "tools.agent_id" outputParameters: - type: object mapping: "$." - name: "list-passages" description: "List Passages" hints: readOnly: true destructive: false idempotent: true call: "letta-agents.list_passages" with: "agent_id": "tools.agent_id" "after": "tools.after" "before": "tools.before" "limit": "tools.limit" "search": "tools.search" "ascending": "tools.ascending" outputParameters: - type: object mapping: "$." - name: "create-passage" description: "Create Passage" hints: readOnly: false destructive: false idempotent: false call: "letta-agents.create_passage" with: "agent_id": "tools.agent_id" "body": "tools.body" outputParameters: - type: object mapping: "$." - name: "search-archival-memory" description: "Search Archival Memory" hints: readOnly: true destructive: false idempotent: true call: "letta-agents.search_archival_memory" with: "agent_id": "tools.agent_id" "query": "tools.query" "tags": "tools.tags" "tag_match_mode": "tools.tag_match_mode" "top_k": "tools.top_k" "start_datetime": "tools.start_datetime" "end_datetime": "tools.end_datetime" outputParameters: - type: object mapping: "$." - name: "delete-passage" description: "Delete Passage" hints: readOnly: false destructive: true idempotent: true call: "letta-agents.delete_passage" with: "memory_id": "tools.memory_id" "agent_id": "tools.agent_id" outputParameters: - type: object mapping: "$." - name: "list-messages" description: "List Messages" hints: readOnly: true destructive: false idempotent: true call: "letta-agents.list_messages" with: "agent_id": "tools.agent_id" "before": "tools.before" "after": "tools.after" "limit": "tools.limit" "order": "tools.order" "order_by": "tools.order_by" "group_id": "tools.group_id" "conversation_id": "tools.conversation_id" "use_assistant_message": "tools.use_assistant_message" "assistant_message_tool_name": "tools.assistant_message_tool_name" "assistant_message_tool_kwarg": "tools.assistant_message_tool_kwarg" "include_err": "tools.include_err" "include_return_message_types": "tools.include_return_message_types" outputParameters: - type: object mapping: "$." - name: "send-message" description: "Send Message" hints: readOnly: false destructive: false idempotent: false call: "letta-agents.send_message" with: "agent_id": "tools.agent_id" "body": "tools.body" outputParameters: - type: object mapping: "$." - name: "modify-message" description: "Modify Message" hints: readOnly: false destructive: false idempotent: true call: "letta-agents.modify_message" with: "agent_id": "tools.agent_id" "message_id": "tools.message_id" "body": "tools.body" outputParameters: - type: object mapping: "$." - name: "send-message-streaming" description: "Send Message Streaming" hints: readOnly: false destructive: false idempotent: false call: "letta-agents.create_agent_message_stream" with: "agent_id": "tools.agent_id" "body": "tools.body" outputParameters: - type: object mapping: "$." - name: "cancel-message" description: "Cancel Message" hints: readOnly: false destructive: false idempotent: false call: "letta-agents.cancel_message" with: "agent_id": "tools.agent_id" "body": "tools.body" outputParameters: - type: object mapping: "$." - name: "generate-completion" description: "Generate Completion" hints: readOnly: false destructive: false idempotent: false call: "letta-agents.generate_completion" with: "agent_id": "tools.agent_id" "body": "tools.body" outputParameters: - type: object mapping: "$." - name: "search-messages" description: "Search Messages" hints: readOnly: true destructive: false idempotent: false call: "letta-agents.search_messages" with: "body": "tools.body" outputParameters: - type: object mapping: "$." - name: "send-message-async" description: "Send Message Async" hints: readOnly: false destructive: false idempotent: false call: "letta-agents.create_agent_message_async" with: "agent_id": "tools.agent_id" "body": "tools.body" outputParameters: - type: object mapping: "$." - name: "reset-messages" description: "Reset Messages" hints: readOnly: false destructive: false idempotent: true call: "letta-agents.reset_messages" with: "agent_id": "tools.agent_id" "body": "tools.body" outputParameters: - type: object mapping: "$." - name: "list-groups-agent" description: "List Groups for Agent" hints: readOnly: true destructive: false idempotent: true call: "letta-agents.list_groups_for_agent" with: "agent_id": "tools.agent_id" "manager_type": "tools.manager_type" "before": "tools.before" "after": "tools.after" "limit": "tools.limit" "order": "tools.order" "order_by": "tools.order_by" outputParameters: - type: object mapping: "$." - name: "preview-model-request" description: "Preview Model Request" hints: readOnly: false destructive: false idempotent: false call: "letta-agents.preview_model_request" with: "agent_id": "tools.agent_id" "body": "tools.body" outputParameters: - type: object mapping: "$." - name: "summarize-messages" description: "Summarize Messages" hints: readOnly: false destructive: false idempotent: false call: "letta-agents.summarize_messages" with: "agent_id": "tools.agent_id" "body": "tools.body" outputParameters: - type: object mapping: "$." - name: "search-deployed-agents" description: "Search Deployed Agents" hints: readOnly: true destructive: false idempotent: false call: "letta-agents.agents_searchdeployedagents" with: "body": "tools.body" outputParameters: - type: object mapping: "$." - name: "count-deployed-agents" description: "Count Deployed Agents" hints: readOnly: true destructive: false idempotent: true call: "letta-agents.agents_countdeployedagents" with: "search": "tools.search" "project_id": "tools.project_id" "combinator": "tools.combinator" outputParameters: - type: object mapping: "$." - name: "retrieve-memory-variables" description: "Retrieve Memory Variables" hints: readOnly: true destructive: false idempotent: true call: "letta-agents.agents_getagentvariables" with: "agent_id": "tools.agent_id" outputParameters: - type: object mapping: "$."