@letta-ai/letta-client 1.0.0-alpha.6 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +271 -0
- package/LICENSE +1 -1
- package/README.md +46 -46
- package/client.d.mts +82 -80
- package/client.d.mts.map +1 -1
- package/client.d.ts +82 -80
- package/client.d.ts.map +1 -1
- package/client.js +110 -104
- package/client.js.map +1 -1
- package/client.mjs +108 -102
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts +2 -2
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts +2 -2
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.js.map +1 -1
- package/core/api-promise.mjs.map +1 -1
- package/core/error.d.mts +2 -2
- package/core/error.d.mts.map +1 -1
- package/core/error.d.ts +2 -2
- package/core/error.d.ts.map +1 -1
- package/core/error.js +4 -4
- package/core/error.js.map +1 -1
- package/core/error.mjs +2 -2
- package/core/error.mjs.map +1 -1
- package/core/pagination.d.mts +96 -0
- package/core/pagination.d.mts.map +1 -0
- package/core/pagination.d.ts +96 -0
- package/core/pagination.d.ts.map +1 -0
- package/core/pagination.js +199 -0
- package/core/pagination.js.map +1 -0
- package/core/pagination.mjs +191 -0
- package/core/pagination.mjs.map +1 -0
- package/core/resource.d.mts +3 -3
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts +3 -3
- package/core/resource.d.ts.map +1 -1
- package/core/resource.js.map +1 -1
- package/core/resource.mjs.map +1 -1
- package/core/streaming.d.mts +33 -0
- package/core/streaming.d.mts.map +1 -0
- package/core/streaming.d.ts +33 -0
- package/core/streaming.d.ts.map +1 -0
- package/core/streaming.js +276 -0
- package/core/streaming.js.map +1 -0
- package/core/streaming.mjs +271 -0
- package/core/streaming.mjs.map +1 -0
- package/index.d.mts +4 -3
- package/index.d.mts.map +1 -1
- package/index.d.ts +4 -3
- package/index.d.ts.map +1 -1
- package/index.js +6 -4
- package/index.js.map +1 -1
- package/index.mjs +4 -3
- package/index.mjs.map +1 -1
- package/internal/decoders/line.d.mts +17 -0
- package/internal/decoders/line.d.mts.map +1 -0
- package/internal/decoders/line.d.ts +17 -0
- package/internal/decoders/line.d.ts.map +1 -0
- package/internal/decoders/line.js +113 -0
- package/internal/decoders/line.js.map +1 -0
- package/internal/decoders/line.mjs +108 -0
- package/internal/decoders/line.mjs.map +1 -0
- package/internal/parse.d.mts +2 -2
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts +2 -2
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +10 -0
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +10 -0
- package/internal/parse.mjs.map +1 -1
- package/internal/request-options.d.mts +2 -0
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts +2 -0
- package/internal/request-options.d.ts.map +1 -1
- package/internal/request-options.js.map +1 -1
- package/internal/request-options.mjs.map +1 -1
- package/internal/shims.js +1 -1
- package/internal/shims.js.map +1 -1
- package/internal/shims.mjs +1 -1
- package/internal/shims.mjs.map +1 -1
- package/internal/tslib.js +17 -17
- package/internal/uploads.d.mts +4 -4
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts +4 -4
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.js.map +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.js +2 -2
- package/internal/utils/base64.js.map +1 -1
- package/internal/utils/base64.mjs +3 -3
- package/internal/utils/base64.mjs.map +1 -1
- package/internal/utils/log.d.mts +3 -3
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts +3 -3
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.js +1 -1
- package/internal/utils/path.js.map +1 -1
- package/internal/utils/path.mjs +2 -2
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/values.js +5 -5
- package/internal/utils/values.js.map +1 -1
- package/internal/utils/values.mjs +6 -6
- package/internal/utils/values.mjs.map +1 -1
- package/package.json +23 -3
- package/pagination.d.mts +2 -0
- package/pagination.d.mts.map +1 -0
- package/pagination.d.ts +2 -0
- package/pagination.d.ts.map +1 -0
- package/pagination.js +6 -0
- package/pagination.js.map +1 -0
- package/pagination.mjs +2 -0
- package/pagination.mjs.map +1 -0
- package/resources/access-tokens.d.mts +105 -0
- package/resources/access-tokens.d.mts.map +1 -0
- package/resources/access-tokens.d.ts +105 -0
- package/resources/access-tokens.d.ts.map +1 -0
- package/resources/access-tokens.js +30 -0
- package/resources/access-tokens.js.map +1 -0
- package/resources/access-tokens.mjs +26 -0
- package/resources/access-tokens.mjs.map +1 -0
- package/resources/agents/agents.d.mts +770 -346
- package/resources/agents/agents.d.mts.map +1 -1
- package/resources/agents/agents.d.ts +770 -346
- package/resources/agents/agents.d.ts.map +1 -1
- package/resources/agents/agents.js +26 -90
- package/resources/agents/agents.js.map +1 -1
- package/resources/agents/agents.mjs +28 -92
- package/resources/agents/agents.mjs.map +1 -1
- package/resources/agents/archives.d.mts +31 -0
- package/resources/agents/archives.d.mts.map +1 -0
- package/resources/agents/archives.d.ts +31 -0
- package/resources/agents/archives.d.ts.map +1 -0
- package/resources/agents/archives.js +24 -0
- package/resources/agents/archives.js.map +1 -0
- package/resources/agents/archives.mjs +20 -0
- package/resources/agents/archives.mjs.map +1 -0
- package/resources/agents/blocks.d.mts +268 -0
- package/resources/agents/blocks.d.mts.map +1 -0
- package/resources/agents/blocks.d.ts +268 -0
- package/resources/agents/blocks.d.ts.map +1 -0
- package/resources/agents/blocks.js +48 -0
- package/resources/agents/blocks.js.map +1 -0
- package/resources/agents/blocks.mjs +44 -0
- package/resources/agents/blocks.mjs.map +1 -0
- package/resources/agents/files.d.mts +49 -63
- package/resources/agents/files.d.mts.map +1 -1
- package/resources/agents/files.d.ts +49 -63
- package/resources/agents/files.d.ts.map +1 -1
- package/resources/agents/files.js +6 -2
- package/resources/agents/files.js.map +1 -1
- package/resources/agents/files.mjs +6 -2
- package/resources/agents/files.mjs.map +1 -1
- package/resources/agents/folders.d.mts +68 -6
- package/resources/agents/folders.d.mts.map +1 -1
- package/resources/agents/folders.d.ts +68 -6
- package/resources/agents/folders.d.ts.map +1 -1
- package/resources/agents/folders.js +6 -2
- package/resources/agents/folders.js.map +1 -1
- package/resources/agents/folders.mjs +6 -2
- package/resources/agents/folders.mjs.map +1 -1
- package/resources/agents/groups.d.mts +22 -0
- package/resources/agents/groups.d.mts.map +1 -0
- package/resources/agents/groups.d.ts +22 -0
- package/resources/agents/groups.d.ts.map +1 -0
- package/resources/agents/groups.js +20 -0
- package/resources/agents/groups.js.map +1 -0
- package/resources/agents/groups.mjs +16 -0
- package/resources/agents/groups.mjs.map +1 -0
- package/resources/agents/identities.d.mts +31 -0
- package/resources/agents/identities.d.mts.map +1 -0
- package/resources/agents/identities.d.ts +31 -0
- package/resources/agents/identities.d.ts.map +1 -0
- package/resources/agents/identities.js +24 -0
- package/resources/agents/identities.js.map +1 -0
- package/resources/agents/identities.mjs +20 -0
- package/resources/agents/identities.mjs.map +1 -0
- package/resources/agents/index.d.mts +9 -8
- package/resources/agents/index.d.mts.map +1 -1
- package/resources/agents/index.d.ts +9 -8
- package/resources/agents/index.d.ts.map +1 -1
- package/resources/agents/index.js +9 -7
- package/resources/agents/index.js.map +1 -1
- package/resources/agents/index.mjs +4 -3
- package/resources/agents/index.mjs.map +1 -1
- package/resources/agents/messages.d.mts +782 -490
- package/resources/agents/messages.d.mts.map +1 -1
- package/resources/agents/messages.d.ts +782 -490
- package/resources/agents/messages.d.ts.map +1 -1
- package/resources/agents/messages.js +33 -35
- package/resources/agents/messages.js.map +1 -1
- package/resources/agents/messages.mjs +33 -35
- package/resources/agents/messages.mjs.map +1 -1
- package/resources/agents/tools.d.mts +30 -13
- package/resources/agents/tools.d.mts.map +1 -1
- package/resources/agents/tools.d.ts +30 -13
- package/resources/agents/tools.d.ts.map +1 -1
- package/resources/agents/tools.js +15 -7
- package/resources/agents/tools.js.map +1 -1
- package/resources/agents/tools.mjs +15 -7
- package/resources/agents/tools.mjs.map +1 -1
- package/resources/archives/archives.d.mts +115 -0
- package/resources/archives/archives.d.mts.map +1 -0
- package/resources/archives/archives.d.ts +115 -0
- package/resources/archives/archives.d.ts.map +1 -0
- package/resources/archives/archives.js +50 -0
- package/resources/archives/archives.js.map +1 -0
- package/resources/archives/archives.mjs +45 -0
- package/resources/archives/archives.mjs.map +1 -0
- package/resources/archives/index.d.mts +3 -0
- package/resources/archives/index.d.mts.map +1 -0
- package/resources/archives/index.d.ts +3 -0
- package/resources/archives/index.d.ts.map +1 -0
- package/resources/archives/index.js +9 -0
- package/resources/archives/index.js.map +1 -0
- package/resources/archives/index.mjs +4 -0
- package/resources/archives/index.mjs.map +1 -0
- package/resources/archives/passages.d.mts +113 -0
- package/resources/archives/passages.d.mts.map +1 -0
- package/resources/archives/passages.d.ts +113 -0
- package/resources/archives/passages.d.ts.map +1 -0
- package/resources/archives/passages.js +32 -0
- package/resources/archives/passages.js.map +1 -0
- package/resources/archives/passages.mjs +28 -0
- package/resources/archives/passages.mjs.map +1 -0
- package/resources/archives.d.mts +1 -105
- package/resources/archives.d.mts.map +1 -1
- package/resources/archives.d.ts +1 -105
- package/resources/archives.d.ts.map +1 -1
- package/resources/archives.js +2 -18
- package/resources/archives.js.map +1 -1
- package/resources/archives.mjs +1 -16
- package/resources/archives.mjs.map +1 -1
- package/resources/batches/batches.d.mts +211 -0
- package/resources/batches/batches.d.mts.map +1 -0
- package/resources/batches/batches.d.ts +211 -0
- package/resources/batches/batches.d.ts.map +1 -0
- package/resources/batches/batches.js +46 -0
- package/resources/batches/batches.js.map +1 -0
- package/resources/batches/batches.mjs +41 -0
- package/resources/batches/batches.mjs.map +1 -0
- package/resources/batches/index.d.mts +3 -0
- package/resources/batches/index.d.mts.map +1 -0
- package/resources/batches/index.d.ts +3 -0
- package/resources/batches/index.d.ts.map +1 -0
- package/resources/batches/index.js.map +1 -0
- package/resources/batches/index.mjs.map +1 -0
- package/resources/batches/messages.d.mts +22 -0
- package/resources/batches/messages.d.mts.map +1 -0
- package/resources/batches/messages.d.ts +22 -0
- package/resources/batches/messages.d.ts.map +1 -0
- package/resources/batches/messages.js +17 -0
- package/resources/batches/messages.js.map +1 -0
- package/resources/batches/messages.mjs +13 -0
- package/resources/batches/messages.mjs.map +1 -0
- package/resources/batches.d.mts +2 -0
- package/resources/batches.d.mts.map +1 -0
- package/resources/batches.d.ts +2 -0
- package/resources/batches.d.ts.map +1 -0
- package/resources/batches.js +6 -0
- package/resources/batches.js.map +1 -0
- package/resources/batches.mjs +3 -0
- package/resources/batches.mjs.map +1 -0
- package/resources/blocks/agents.d.mts +31 -0
- package/resources/blocks/agents.d.mts.map +1 -0
- package/resources/blocks/agents.d.ts +31 -0
- package/resources/blocks/agents.d.ts.map +1 -0
- package/resources/blocks/agents.js +21 -0
- package/resources/blocks/agents.js.map +1 -0
- package/resources/blocks/agents.mjs +17 -0
- package/resources/blocks/agents.mjs.map +1 -0
- package/resources/blocks/blocks.d.mts +356 -0
- package/resources/blocks/blocks.d.mts.map +1 -0
- package/resources/blocks/blocks.d.ts +356 -0
- package/resources/blocks/blocks.d.ts.map +1 -0
- package/resources/blocks/blocks.js +49 -0
- package/resources/blocks/blocks.js.map +1 -0
- package/resources/blocks/blocks.mjs +44 -0
- package/resources/blocks/blocks.mjs.map +1 -0
- package/resources/blocks/index.d.mts +3 -0
- package/resources/blocks/index.d.mts.map +1 -0
- package/resources/blocks/index.d.ts +3 -0
- package/resources/blocks/index.d.ts.map +1 -0
- package/resources/blocks/index.js +9 -0
- package/resources/blocks/index.js.map +1 -0
- package/resources/blocks/index.mjs +4 -0
- package/resources/blocks/index.mjs.map +1 -0
- package/resources/blocks.d.mts +1 -329
- package/resources/blocks.d.mts.map +1 -1
- package/resources/blocks.d.ts +1 -329
- package/resources/blocks.d.ts.map +1 -1
- package/resources/blocks.js +2 -49
- package/resources/blocks.js.map +1 -1
- package/resources/blocks.mjs +1 -47
- package/resources/blocks.mjs.map +1 -1
- package/resources/folders/agents.d.mts +39 -0
- package/resources/folders/agents.d.mts.map +1 -0
- package/resources/folders/agents.d.ts +39 -0
- package/resources/folders/agents.d.ts.map +1 -0
- package/resources/folders/agents.js +16 -0
- package/resources/folders/agents.js.map +1 -0
- package/resources/folders/agents.mjs +12 -0
- package/resources/folders/agents.mjs.map +1 -0
- package/resources/folders/files.d.mts +194 -0
- package/resources/folders/files.d.mts.map +1 -0
- package/resources/folders/files.d.ts +194 -0
- package/resources/folders/files.d.ts.map +1 -0
- package/resources/folders/files.js +39 -0
- package/resources/folders/files.js.map +1 -0
- package/resources/folders/files.mjs +35 -0
- package/resources/folders/files.mjs.map +1 -0
- package/resources/folders/folders.d.mts +150 -0
- package/resources/folders/folders.d.mts.map +1 -0
- package/resources/folders/folders.d.ts +150 -0
- package/resources/folders/folders.d.ts.map +1 -0
- package/resources/folders/folders.js +53 -0
- package/resources/folders/folders.js.map +1 -0
- package/resources/folders/folders.mjs +48 -0
- package/resources/folders/folders.mjs.map +1 -0
- package/resources/folders/index.d.mts +4 -0
- package/resources/folders/index.d.mts.map +1 -0
- package/resources/folders/index.d.ts +4 -0
- package/resources/folders/index.d.ts.map +1 -0
- package/resources/folders/index.js +11 -0
- package/resources/folders/index.js.map +1 -0
- package/resources/folders/index.mjs +5 -0
- package/resources/folders/index.mjs.map +1 -0
- package/resources/folders.d.mts +1 -319
- package/resources/folders.d.mts.map +1 -1
- package/resources/folders.d.ts +1 -319
- package/resources/folders.d.ts.map +1 -1
- package/resources/folders.js +2 -103
- package/resources/folders.js.map +1 -1
- package/resources/folders.mjs +1 -101
- package/resources/folders.mjs.map +1 -1
- package/resources/groups/groups.d.mts +17 -72
- package/resources/groups/groups.d.mts.map +1 -1
- package/resources/groups/groups.d.ts +17 -72
- package/resources/groups/groups.d.ts.map +1 -1
- package/resources/groups/groups.js +6 -34
- package/resources/groups/groups.js.map +1 -1
- package/resources/groups/groups.mjs +6 -34
- package/resources/groups/groups.mjs.map +1 -1
- package/resources/groups/index.d.mts +2 -2
- package/resources/groups/index.d.mts.map +1 -1
- package/resources/groups/index.d.ts +2 -2
- package/resources/groups/index.d.ts.map +1 -1
- package/resources/groups/index.js.map +1 -1
- package/resources/groups/index.mjs.map +1 -1
- package/resources/groups/messages.d.mts +168 -87
- package/resources/groups/messages.d.mts.map +1 -1
- package/resources/groups/messages.d.ts +168 -87
- package/resources/groups/messages.d.ts.map +1 -1
- package/resources/groups/messages.js +22 -8
- package/resources/groups/messages.js.map +1 -1
- package/resources/groups/messages.mjs +22 -8
- package/resources/groups/messages.mjs.map +1 -1
- package/resources/identities/agents.d.mts +23 -0
- package/resources/identities/agents.d.mts.map +1 -0
- package/resources/identities/agents.d.ts +23 -0
- package/resources/identities/agents.d.ts.map +1 -0
- package/resources/identities/agents.js +17 -0
- package/resources/identities/agents.js.map +1 -0
- package/resources/identities/agents.mjs +13 -0
- package/resources/identities/agents.mjs.map +1 -0
- package/resources/identities/blocks.d.mts +18 -0
- package/resources/identities/blocks.d.mts.map +1 -0
- package/resources/identities/blocks.d.ts +18 -0
- package/resources/identities/blocks.d.ts.map +1 -0
- package/resources/identities/blocks.js +17 -0
- package/resources/identities/blocks.js.map +1 -0
- package/resources/identities/blocks.mjs +13 -0
- package/resources/identities/blocks.mjs.map +1 -0
- package/resources/identities/identities.d.mts +200 -0
- package/resources/identities/identities.d.mts.map +1 -0
- package/resources/identities/identities.d.ts +200 -0
- package/resources/identities/identities.d.ts.map +1 -0
- package/resources/identities/identities.js +63 -0
- package/resources/identities/identities.js.map +1 -0
- package/resources/identities/identities.mjs +58 -0
- package/resources/identities/identities.mjs.map +1 -0
- package/resources/identities/index.d.mts +5 -0
- package/resources/identities/index.d.mts.map +1 -0
- package/resources/identities/index.d.ts +5 -0
- package/resources/identities/index.d.ts.map +1 -0
- package/resources/identities/index.js +13 -0
- package/resources/identities/index.js.map +1 -0
- package/resources/identities/index.mjs +6 -0
- package/resources/identities/index.mjs.map +1 -0
- package/resources/identities/properties.d.mts +18 -0
- package/resources/identities/properties.d.mts.map +1 -0
- package/resources/identities/properties.d.ts +18 -0
- package/resources/identities/properties.d.ts.map +1 -0
- package/resources/identities/properties.js +17 -0
- package/resources/identities/properties.js.map +1 -0
- package/resources/identities/properties.mjs +13 -0
- package/resources/identities/properties.mjs.map +1 -0
- package/resources/identities.d.mts +1 -292
- package/resources/identities.d.mts.map +1 -1
- package/resources/identities.d.ts +1 -292
- package/resources/identities.d.ts.map +1 -1
- package/resources/identities.js +2 -84
- package/resources/identities.js.map +1 -1
- package/resources/identities.mjs +1 -82
- package/resources/identities.mjs.map +1 -1
- package/resources/index.d.mts +15 -22
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +15 -22
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +16 -32
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +12 -20
- package/resources/index.mjs.map +1 -1
- package/resources/mcp-servers/index.d.mts +3 -0
- package/resources/mcp-servers/index.d.mts.map +1 -0
- package/resources/mcp-servers/index.d.ts +3 -0
- package/resources/mcp-servers/index.d.ts.map +1 -0
- package/resources/mcp-servers/index.js +9 -0
- package/resources/mcp-servers/index.js.map +1 -0
- package/resources/mcp-servers/index.mjs +4 -0
- package/resources/mcp-servers/index.mjs.map +1 -0
- package/resources/mcp-servers/mcp-servers.d.mts +349 -0
- package/resources/mcp-servers/mcp-servers.d.mts.map +1 -0
- package/resources/mcp-servers/mcp-servers.d.ts +349 -0
- package/resources/mcp-servers/mcp-servers.d.ts.map +1 -0
- package/resources/mcp-servers/mcp-servers.js +69 -0
- package/resources/mcp-servers/mcp-servers.js.map +1 -0
- package/resources/mcp-servers/mcp-servers.mjs +64 -0
- package/resources/mcp-servers/mcp-servers.mjs.map +1 -0
- package/resources/mcp-servers/tools.d.mts +42 -0
- package/resources/mcp-servers/tools.d.mts.map +1 -0
- package/resources/mcp-servers/tools.d.ts +42 -0
- package/resources/mcp-servers/tools.d.ts.map +1 -0
- package/resources/mcp-servers/tools.js +36 -0
- package/resources/mcp-servers/tools.js.map +1 -0
- package/resources/mcp-servers/tools.mjs +32 -0
- package/resources/mcp-servers/tools.mjs.map +1 -0
- package/resources/mcp-servers.d.mts +2 -0
- package/resources/mcp-servers.d.mts.map +1 -0
- package/resources/mcp-servers.d.ts +2 -0
- package/resources/mcp-servers.d.ts.map +1 -0
- package/resources/mcp-servers.js +6 -0
- package/resources/mcp-servers.js.map +1 -0
- package/resources/mcp-servers.mjs +3 -0
- package/resources/mcp-servers.mjs.map +1 -0
- package/resources/models/embeddings.d.mts +20 -0
- package/resources/models/embeddings.d.mts.map +1 -0
- package/resources/models/embeddings.d.ts +20 -0
- package/resources/models/embeddings.d.ts.map +1 -0
- package/resources/models/embeddings.js +20 -0
- package/resources/models/embeddings.js.map +1 -0
- package/resources/models/embeddings.mjs +16 -0
- package/resources/models/embeddings.mjs.map +1 -0
- package/resources/models/index.d.mts +3 -0
- package/resources/models/index.d.mts.map +1 -0
- package/resources/models/index.d.ts +3 -0
- package/resources/models/index.d.ts.map +1 -0
- package/resources/models/index.js +9 -0
- package/resources/models/index.js.map +1 -0
- package/resources/models/index.mjs +4 -0
- package/resources/models/index.mjs.map +1 -0
- package/resources/models/models.d.mts +341 -0
- package/resources/models/models.d.mts.map +1 -0
- package/resources/models/models.d.ts +341 -0
- package/resources/models/models.d.ts.map +1 -0
- package/resources/models/models.js +28 -0
- package/resources/models/models.js.map +1 -0
- package/resources/models/models.mjs +23 -0
- package/resources/models/models.mjs.map +1 -0
- package/resources/models.d.mts +1 -159
- package/resources/models.d.mts.map +1 -1
- package/resources/models.d.ts +1 -159
- package/resources/models.d.ts.map +1 -1
- package/resources/models.js +2 -26
- package/resources/models.js.map +1 -1
- package/resources/models.mjs +1 -24
- package/resources/models.mjs.map +1 -1
- package/resources/runs/index.d.mts +5 -0
- package/resources/runs/index.d.mts.map +1 -0
- package/resources/runs/index.d.ts +5 -0
- package/resources/runs/index.d.ts.map +1 -0
- package/resources/runs/index.js +13 -0
- package/resources/runs/index.js.map +1 -0
- package/resources/runs/index.mjs +6 -0
- package/resources/runs/index.mjs.map +1 -0
- package/resources/runs/messages.d.mts +45 -0
- package/resources/runs/messages.d.mts.map +1 -0
- package/resources/runs/messages.d.ts +45 -0
- package/resources/runs/messages.d.ts.map +1 -0
- package/resources/runs/messages.js +30 -0
- package/resources/runs/messages.js.map +1 -0
- package/resources/runs/messages.mjs +26 -0
- package/resources/runs/messages.mjs.map +1 -0
- package/resources/runs/runs.d.mts +146 -0
- package/resources/runs/runs.d.mts.map +1 -0
- package/resources/runs/runs.d.ts +146 -0
- package/resources/runs/runs.d.ts.map +1 -0
- package/resources/runs/runs.js +39 -0
- package/resources/runs/runs.js.map +1 -0
- package/resources/runs/runs.mjs +34 -0
- package/resources/runs/runs.mjs.map +1 -0
- package/resources/runs/steps.d.mts +18 -0
- package/resources/runs/steps.d.mts.map +1 -0
- package/resources/runs/steps.d.ts +18 -0
- package/resources/runs/steps.d.ts.map +1 -0
- package/resources/runs/steps.js +20 -0
- package/resources/runs/steps.js.map +1 -0
- package/resources/runs/steps.mjs +16 -0
- package/resources/runs/steps.mjs.map +1 -0
- package/resources/runs/usage.d.mts +28 -0
- package/resources/runs/usage.d.mts.map +1 -0
- package/resources/runs/usage.d.ts +28 -0
- package/resources/runs/usage.d.ts.map +1 -0
- package/resources/runs/usage.js +16 -0
- package/resources/runs/usage.js.map +1 -0
- package/resources/runs/usage.mjs +12 -0
- package/resources/runs/usage.mjs.map +1 -0
- package/resources/runs.d.mts +1 -183
- package/resources/runs.d.mts.map +1 -1
- package/resources/runs.d.ts +1 -183
- package/resources/runs.d.ts.map +1 -1
- package/resources/runs.js +2 -69
- package/resources/runs.js.map +1 -1
- package/resources/runs.mjs +1 -67
- package/resources/runs.mjs.map +1 -1
- package/resources/steps/feedback.d.mts +24 -0
- package/resources/steps/feedback.d.mts.map +1 -0
- package/resources/steps/feedback.d.ts +24 -0
- package/resources/steps/feedback.d.ts.map +1 -0
- package/resources/steps/feedback.js +16 -0
- package/resources/steps/feedback.js.map +1 -0
- package/resources/steps/feedback.mjs +12 -0
- package/resources/steps/feedback.mjs.map +1 -0
- package/resources/steps/index.d.mts +6 -0
- package/resources/steps/index.d.mts.map +1 -0
- package/resources/steps/index.d.ts +6 -0
- package/resources/steps/index.d.ts.map +1 -0
- package/resources/steps/index.js +15 -0
- package/resources/steps/index.js.map +1 -0
- package/resources/steps/index.mjs +7 -0
- package/resources/steps/index.mjs.map +1 -0
- package/resources/steps/messages.d.mts +27 -0
- package/resources/steps/messages.d.mts.map +1 -0
- package/resources/steps/messages.d.ts +27 -0
- package/resources/steps/messages.d.ts.map +1 -0
- package/resources/steps/messages.js +20 -0
- package/resources/steps/messages.js.map +1 -0
- package/resources/steps/messages.mjs +16 -0
- package/resources/steps/messages.mjs.map +1 -0
- package/resources/steps/metrics.d.mts +63 -0
- package/resources/steps/metrics.d.mts.map +1 -0
- package/resources/steps/metrics.d.ts +63 -0
- package/resources/steps/metrics.d.ts.map +1 -0
- package/resources/steps/metrics.js +16 -0
- package/resources/steps/metrics.js.map +1 -0
- package/resources/steps/metrics.mjs +12 -0
- package/resources/steps/metrics.mjs.map +1 -0
- package/resources/steps/steps.d.mts +227 -0
- package/resources/steps/steps.d.mts.map +1 -0
- package/resources/steps/steps.d.ts +227 -0
- package/resources/steps/steps.d.ts.map +1 -0
- package/resources/steps/steps.js +43 -0
- package/resources/steps/steps.js.map +1 -0
- package/resources/steps/steps.mjs +38 -0
- package/resources/steps/steps.mjs.map +1 -0
- package/resources/steps/trace.d.mts +11 -0
- package/resources/steps/trace.d.mts.map +1 -0
- package/resources/steps/trace.d.ts +11 -0
- package/resources/steps/trace.d.ts.map +1 -0
- package/resources/steps/trace.js +16 -0
- package/resources/steps/trace.js.map +1 -0
- package/resources/steps/trace.mjs +12 -0
- package/resources/steps/trace.mjs.map +1 -0
- package/resources/steps.d.mts +1 -340
- package/resources/steps.d.mts.map +1 -1
- package/resources/steps.d.ts +1 -340
- package/resources/steps.d.ts.map +1 -1
- package/resources/steps.js +2 -51
- package/resources/steps.js.map +1 -1
- package/resources/steps.mjs +1 -49
- package/resources/steps.mjs.map +1 -1
- package/resources/templates/agents.d.mts +56 -0
- package/resources/templates/agents.d.mts.map +1 -0
- package/resources/templates/agents.d.ts +56 -0
- package/resources/templates/agents.d.ts.map +1 -0
- package/resources/templates/agents.js +21 -0
- package/resources/templates/agents.js.map +1 -0
- package/resources/templates/agents.mjs +17 -0
- package/resources/templates/agents.mjs.map +1 -0
- package/resources/templates/index.d.mts +3 -0
- package/resources/templates/index.d.mts.map +1 -0
- package/resources/templates/index.d.ts +3 -0
- package/resources/templates/index.d.ts.map +1 -0
- package/resources/templates/index.js +9 -0
- package/resources/templates/index.js.map +1 -0
- package/resources/templates/index.mjs +4 -0
- package/resources/templates/index.mjs.map +1 -0
- package/resources/templates/templates.d.mts +10 -0
- package/resources/templates/templates.d.mts.map +1 -0
- package/resources/templates/templates.d.ts +10 -0
- package/resources/templates/templates.d.ts.map +1 -0
- package/resources/templates/templates.js +17 -0
- package/resources/templates/templates.js.map +1 -0
- package/resources/templates/templates.mjs +12 -0
- package/resources/templates/templates.mjs.map +1 -0
- package/resources/templates.d.mts +1 -493
- package/resources/templates.d.mts.map +1 -1
- package/resources/templates.d.ts +1 -493
- package/resources/templates.d.ts.map +1 -1
- package/resources/templates.js +2 -81
- package/resources/templates.js.map +1 -1
- package/resources/templates.mjs +1 -79
- package/resources/templates.mjs.map +1 -1
- package/resources/tools.d.mts +437 -1
- package/resources/tools.d.mts.map +1 -1
- package/resources/tools.d.ts +437 -1
- package/resources/tools.d.ts.map +1 -1
- package/resources/tools.js +49 -2
- package/resources/tools.js.map +1 -1
- package/resources/tools.mjs +47 -1
- package/resources/tools.mjs.map +1 -1
- package/resources/top-level.d.mts +11 -0
- package/resources/top-level.d.mts.map +1 -0
- package/resources/top-level.d.ts +11 -0
- package/resources/top-level.d.ts.map +1 -0
- package/resources/top-level.js +4 -0
- package/resources/top-level.js.map +1 -0
- package/resources/top-level.mjs +3 -0
- package/resources/top-level.mjs.map +1 -0
- package/src/client.ts +370 -502
- package/src/core/api-promise.ts +4 -4
- package/src/core/error.ts +2 -2
- package/src/core/pagination.ts +334 -0
- package/src/core/resource.ts +3 -3
- package/src/core/streaming.ts +331 -0
- package/src/index.ts +4 -3
- package/src/internal/decoders/line.ts +135 -0
- package/src/internal/parse.ts +16 -2
- package/src/internal/request-options.ts +2 -0
- package/src/internal/shims.ts +1 -1
- package/src/internal/uploads.ts +5 -5
- package/src/internal/utils/base64.ts +3 -3
- package/src/internal/utils/log.ts +3 -3
- package/src/internal/utils/path.ts +2 -2
- package/src/internal/utils/values.ts +6 -6
- package/src/pagination.ts +2 -0
- package/src/resources/access-tokens.ts +163 -0
- package/src/resources/agents/agents.ts +1070 -578
- package/src/resources/agents/archives.ts +51 -0
- package/src/resources/agents/blocks.ts +372 -0
- package/src/resources/agents/files.ts +60 -73
- package/src/resources/agents/folders.ts +86 -6
- package/src/resources/agents/groups.ts +37 -0
- package/src/resources/agents/identities.ts +51 -0
- package/src/resources/agents/index.ts +58 -46
- package/src/resources/agents/messages.ts +1109 -667
- package/src/resources/agents/tools.ts +45 -19
- package/src/resources/archives/archives.ts +170 -0
- package/src/resources/archives/index.ts +17 -0
- package/src/resources/archives/passages.ts +150 -0
- package/src/resources/archives.ts +1 -138
- package/src/resources/batches/batches.ts +286 -0
- package/src/resources/batches/index.ts +11 -0
- package/src/resources/batches/messages.ts +38 -0
- package/src/resources/batches.ts +3 -0
- package/src/resources/blocks/agents.ts +55 -0
- package/src/resources/blocks/blocks.ts +458 -0
- package/src/resources/blocks/index.ts +13 -0
- package/src/resources/blocks.ts +1 -436
- package/src/resources/folders/agents.ts +55 -0
- package/src/resources/folders/files.ts +272 -0
- package/src/resources/folders/folders.ts +223 -0
- package/src/resources/folders/index.ts +21 -0
- package/src/resources/folders.ts +1 -460
- package/src/resources/groups/groups.ts +27 -116
- package/src/resources/groups/index.ts +5 -7
- package/src/resources/groups/messages.ts +238 -106
- package/src/resources/identities/agents.ts +47 -0
- package/src/resources/identities/blocks.ts +33 -0
- package/src/resources/identities/identities.ts +282 -0
- package/src/resources/identities/index.ts +17 -0
- package/src/resources/identities/properties.ts +30 -0
- package/src/resources/identities.ts +1 -432
- package/src/resources/index.ts +79 -169
- package/src/resources/mcp-servers/index.ts +25 -0
- package/src/resources/mcp-servers/mcp-servers.ts +460 -0
- package/src/resources/mcp-servers/tools.ts +69 -0
- package/src/resources/mcp-servers.ts +3 -0
- package/src/resources/models/embeddings.ts +26 -0
- package/src/resources/models/index.ts +14 -0
- package/src/resources/models/models.ts +534 -0
- package/src/resources/models.ts +1 -276
- package/src/resources/runs/index.ts +11 -0
- package/src/resources/runs/messages.ts +79 -0
- package/src/resources/runs/runs.ts +206 -0
- package/src/resources/runs/steps.ts +32 -0
- package/src/resources/runs/usage.ts +41 -0
- package/src/resources/runs.ts +1 -282
- package/src/resources/steps/feedback.ts +32 -0
- package/src/resources/steps/index.ts +12 -0
- package/src/resources/steps/messages.ts +57 -0
- package/src/resources/steps/metrics.ts +81 -0
- package/src/resources/steps/steps.ts +293 -0
- package/src/resources/steps/trace.ts +16 -0
- package/src/resources/steps.ts +1 -455
- package/src/resources/templates/agents.ts +80 -0
- package/src/resources/templates/index.ts +4 -0
- package/src/resources/templates/templates.ts +15 -0
- package/src/resources/templates.ts +1 -783
- package/src/resources/tools.ts +557 -1
- package/src/resources/top-level.ts +14 -0
- package/src/streaming.ts +2 -0
- package/src/version.ts +1 -1
- package/streaming.d.mts +2 -0
- package/streaming.d.mts.map +1 -0
- package/streaming.d.ts +2 -0
- package/streaming.d.ts.map +1 -0
- package/streaming.js +6 -0
- package/streaming.js.map +1 -0
- package/streaming.mjs +2 -0
- package/streaming.mjs.map +1 -0
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
- package/resources/-internal-templates/-internal-templates.d.mts +0 -324
- package/resources/-internal-templates/-internal-templates.d.mts.map +0 -1
- package/resources/-internal-templates/-internal-templates.d.ts +0 -324
- package/resources/-internal-templates/-internal-templates.d.ts.map +0 -1
- package/resources/-internal-templates/-internal-templates.js +0 -35
- package/resources/-internal-templates/-internal-templates.js.map +0 -1
- package/resources/-internal-templates/-internal-templates.mjs +0 -30
- package/resources/-internal-templates/-internal-templates.mjs.map +0 -1
- package/resources/-internal-templates/deployment.d.mts +0 -56
- package/resources/-internal-templates/deployment.d.mts.map +0 -1
- package/resources/-internal-templates/deployment.d.ts +0 -56
- package/resources/-internal-templates/deployment.d.ts.map +0 -1
- package/resources/-internal-templates/deployment.js +0 -24
- package/resources/-internal-templates/deployment.js.map +0 -1
- package/resources/-internal-templates/deployment.mjs +0 -20
- package/resources/-internal-templates/deployment.mjs.map +0 -1
- package/resources/-internal-templates/index.d.mts +0 -3
- package/resources/-internal-templates/index.d.mts.map +0 -1
- package/resources/-internal-templates/index.d.ts +0 -3
- package/resources/-internal-templates/index.d.ts.map +0 -1
- package/resources/-internal-templates/index.js +0 -9
- package/resources/-internal-templates/index.js.map +0 -1
- package/resources/-internal-templates/index.mjs +0 -4
- package/resources/-internal-templates/index.mjs.map +0 -1
- package/resources/-internal-templates.d.mts +0 -2
- package/resources/-internal-templates.d.mts.map +0 -1
- package/resources/-internal-templates.d.ts +0 -2
- package/resources/-internal-templates.d.ts.map +0 -1
- package/resources/-internal-templates.js +0 -6
- package/resources/-internal-templates.js.map +0 -1
- package/resources/-internal-templates.mjs +0 -3
- package/resources/-internal-templates.mjs.map +0 -1
- package/resources/agents/archival-memory.d.mts +0 -128
- package/resources/agents/archival-memory.d.mts.map +0 -1
- package/resources/agents/archival-memory.d.ts +0 -128
- package/resources/agents/archival-memory.d.ts.map +0 -1
- package/resources/agents/archival-memory.js +0 -41
- package/resources/agents/archival-memory.js.map +0 -1
- package/resources/agents/archival-memory.mjs +0 -37
- package/resources/agents/archival-memory.mjs.map +0 -1
- package/resources/agents/core-memory/blocks.d.mts +0 -256
- package/resources/agents/core-memory/blocks.d.mts.map +0 -1
- package/resources/agents/core-memory/blocks.d.ts +0 -256
- package/resources/agents/core-memory/blocks.d.ts.map +0 -1
- package/resources/agents/core-memory/blocks.js +0 -47
- package/resources/agents/core-memory/blocks.js.map +0 -1
- package/resources/agents/core-memory/blocks.mjs +0 -43
- package/resources/agents/core-memory/blocks.mjs.map +0 -1
- package/resources/agents/core-memory/core-memory.d.mts +0 -142
- package/resources/agents/core-memory/core-memory.d.mts.map +0 -1
- package/resources/agents/core-memory/core-memory.d.ts +0 -142
- package/resources/agents/core-memory/core-memory.d.ts.map +0 -1
- package/resources/agents/core-memory/core-memory.js +0 -31
- package/resources/agents/core-memory/core-memory.js.map +0 -1
- package/resources/agents/core-memory/core-memory.mjs +0 -26
- package/resources/agents/core-memory/core-memory.mjs.map +0 -1
- package/resources/agents/core-memory/index.d.mts +0 -3
- package/resources/agents/core-memory/index.d.mts.map +0 -1
- package/resources/agents/core-memory/index.d.ts +0 -3
- package/resources/agents/core-memory/index.d.ts.map +0 -1
- package/resources/agents/core-memory/index.js +0 -9
- package/resources/agents/core-memory/index.js.map +0 -1
- package/resources/agents/core-memory/index.mjs +0 -4
- package/resources/agents/core-memory/index.mjs.map +0 -1
- package/resources/agents/core-memory.d.mts +0 -2
- package/resources/agents/core-memory.d.mts.map +0 -1
- package/resources/agents/core-memory.d.ts +0 -2
- package/resources/agents/core-memory.d.ts.map +0 -1
- package/resources/agents/core-memory.js +0 -6
- package/resources/agents/core-memory.js.map +0 -1
- package/resources/agents/core-memory.mjs +0 -3
- package/resources/agents/core-memory.mjs.map +0 -1
- package/resources/agents/sources.d.mts +0 -30
- package/resources/agents/sources.d.mts.map +0 -1
- package/resources/agents/sources.d.ts +0 -30
- package/resources/agents/sources.d.ts.map +0 -1
- package/resources/agents/sources.js +0 -30
- package/resources/agents/sources.js.map +0 -1
- package/resources/agents/sources.mjs +0 -26
- package/resources/agents/sources.mjs.map +0 -1
- package/resources/client-side-access-tokens.d.mts +0 -105
- package/resources/client-side-access-tokens.d.mts.map +0 -1
- package/resources/client-side-access-tokens.d.ts +0 -105
- package/resources/client-side-access-tokens.d.ts.map +0 -1
- package/resources/client-side-access-tokens.js +0 -30
- package/resources/client-side-access-tokens.js.map +0 -1
- package/resources/client-side-access-tokens.mjs +0 -26
- package/resources/client-side-access-tokens.mjs.map +0 -1
- package/resources/embeddings.d.mts +0 -18
- package/resources/embeddings.d.mts.map +0 -1
- package/resources/embeddings.d.ts +0 -18
- package/resources/embeddings.d.ts.map +0 -1
- package/resources/embeddings.js +0 -24
- package/resources/embeddings.js.map +0 -1
- package/resources/embeddings.mjs +0 -20
- package/resources/embeddings.mjs.map +0 -1
- package/resources/health.d.mts +0 -20
- package/resources/health.d.mts.map +0 -1
- package/resources/health.d.ts +0 -20
- package/resources/health.d.ts.map +0 -1
- package/resources/health.js +0 -15
- package/resources/health.js.map +0 -1
- package/resources/health.mjs +0 -11
- package/resources/health.mjs.map +0 -1
- package/resources/jobs.d.mts +0 -165
- package/resources/jobs.d.mts.map +0 -1
- package/resources/jobs.d.ts +0 -165
- package/resources/jobs.d.ts.map +0 -1
- package/resources/jobs.js +0 -45
- package/resources/jobs.js.map +0 -1
- package/resources/jobs.mjs +0 -41
- package/resources/jobs.mjs.map +0 -1
- package/resources/messages/batches.d.mts +0 -212
- package/resources/messages/batches.d.mts.map +0 -1
- package/resources/messages/batches.d.ts +0 -212
- package/resources/messages/batches.d.ts.map +0 -1
- package/resources/messages/batches.js +0 -43
- package/resources/messages/batches.js.map +0 -1
- package/resources/messages/batches.mjs +0 -39
- package/resources/messages/batches.mjs.map +0 -1
- package/resources/messages/index.d.mts +0 -3
- package/resources/messages/index.d.mts.map +0 -1
- package/resources/messages/index.d.ts +0 -3
- package/resources/messages/index.d.ts.map +0 -1
- package/resources/messages/index.js.map +0 -1
- package/resources/messages/index.mjs.map +0 -1
- package/resources/messages/messages.d.mts +0 -10
- package/resources/messages/messages.d.mts.map +0 -1
- package/resources/messages/messages.d.ts +0 -10
- package/resources/messages/messages.d.ts.map +0 -1
- package/resources/messages/messages.js +0 -17
- package/resources/messages/messages.js.map +0 -1
- package/resources/messages/messages.mjs +0 -12
- package/resources/messages/messages.mjs.map +0 -1
- package/resources/messages.d.mts +0 -2
- package/resources/messages.d.mts.map +0 -1
- package/resources/messages.d.ts +0 -2
- package/resources/messages.d.ts.map +0 -1
- package/resources/messages.js +0 -6
- package/resources/messages.js.map +0 -1
- package/resources/messages.mjs +0 -3
- package/resources/messages.mjs.map +0 -1
- package/resources/projects.d.mts +0 -29
- package/resources/projects.d.mts.map +0 -1
- package/resources/projects.d.ts +0 -29
- package/resources/projects.d.ts.map +0 -1
- package/resources/projects.js +0 -15
- package/resources/projects.js.map +0 -1
- package/resources/projects.mjs +0 -11
- package/resources/projects.mjs.map +0 -1
- package/resources/providers.d.mts +0 -190
- package/resources/providers.d.mts.map +0 -1
- package/resources/providers.d.ts +0 -190
- package/resources/providers.d.ts.map +0 -1
- package/resources/providers.js +0 -46
- package/resources/providers.js.map +0 -1
- package/resources/providers.mjs +0 -42
- package/resources/providers.mjs.map +0 -1
- package/resources/sources/files.d.mts +0 -53
- package/resources/sources/files.d.mts.map +0 -1
- package/resources/sources/files.d.ts +0 -53
- package/resources/sources/files.d.ts.map +0 -1
- package/resources/sources/files.js +0 -27
- package/resources/sources/files.js.map +0 -1
- package/resources/sources/files.mjs +0 -23
- package/resources/sources/files.mjs.map +0 -1
- package/resources/sources/index.d.mts +0 -3
- package/resources/sources/index.d.mts.map +0 -1
- package/resources/sources/index.d.ts +0 -3
- package/resources/sources/index.d.ts.map +0 -1
- package/resources/sources/index.js +0 -9
- package/resources/sources/index.js.map +0 -1
- package/resources/sources/index.mjs +0 -4
- package/resources/sources/index.mjs.map +0 -1
- package/resources/sources/sources.d.mts +0 -530
- package/resources/sources/sources.d.mts.map +0 -1
- package/resources/sources/sources.d.ts +0 -530
- package/resources/sources/sources.d.ts.map +0 -1
- package/resources/sources/sources.js +0 -129
- package/resources/sources/sources.js.map +0 -1
- package/resources/sources/sources.mjs +0 -124
- package/resources/sources/sources.mjs.map +0 -1
- package/resources/sources.d.mts +0 -2
- package/resources/sources.d.mts.map +0 -1
- package/resources/sources.d.ts +0 -2
- package/resources/sources.d.ts.map +0 -1
- package/resources/sources.js +0 -6
- package/resources/sources.js.map +0 -1
- package/resources/sources.mjs +0 -3
- package/resources/sources.mjs.map +0 -1
- package/resources/telemetry.d.mts +0 -15
- package/resources/telemetry.d.mts.map +0 -1
- package/resources/telemetry.d.ts +0 -15
- package/resources/telemetry.d.ts.map +0 -1
- package/resources/telemetry.js +0 -20
- package/resources/telemetry.js.map +0 -1
- package/resources/telemetry.mjs +0 -16
- package/resources/telemetry.mjs.map +0 -1
- package/resources/tools/composio/apps.d.mts +0 -131
- package/resources/tools/composio/apps.d.mts.map +0 -1
- package/resources/tools/composio/apps.d.ts +0 -131
- package/resources/tools/composio/apps.d.ts.map +0 -1
- package/resources/tools/composio/apps.js +0 -22
- package/resources/tools/composio/apps.js.map +0 -1
- package/resources/tools/composio/apps.mjs +0 -18
- package/resources/tools/composio/apps.mjs.map +0 -1
- package/resources/tools/composio/composio.d.mts +0 -18
- package/resources/tools/composio/composio.d.mts.map +0 -1
- package/resources/tools/composio/composio.d.ts +0 -18
- package/resources/tools/composio/composio.d.ts.map +0 -1
- package/resources/tools/composio/composio.js +0 -25
- package/resources/tools/composio/composio.js.map +0 -1
- package/resources/tools/composio/composio.mjs +0 -20
- package/resources/tools/composio/composio.mjs.map +0 -1
- package/resources/tools/composio/index.d.mts +0 -3
- package/resources/tools/composio/index.d.mts.map +0 -1
- package/resources/tools/composio/index.d.ts +0 -3
- package/resources/tools/composio/index.d.ts.map +0 -1
- package/resources/tools/composio/index.js +0 -9
- package/resources/tools/composio/index.js.map +0 -1
- package/resources/tools/composio/index.mjs +0 -4
- package/resources/tools/composio/index.mjs.map +0 -1
- package/resources/tools/composio.d.mts +0 -2
- package/resources/tools/composio.d.mts.map +0 -1
- package/resources/tools/composio.d.ts +0 -2
- package/resources/tools/composio.d.ts.map +0 -1
- package/resources/tools/composio.js +0 -6
- package/resources/tools/composio.js.map +0 -1
- package/resources/tools/composio.mjs +0 -3
- package/resources/tools/composio.mjs.map +0 -1
- package/resources/tools/index.d.mts +0 -4
- package/resources/tools/index.d.mts.map +0 -1
- package/resources/tools/index.d.ts +0 -4
- package/resources/tools/index.d.ts.map +0 -1
- package/resources/tools/index.js +0 -11
- package/resources/tools/index.js.map +0 -1
- package/resources/tools/index.mjs +0 -5
- package/resources/tools/index.mjs.map +0 -1
- package/resources/tools/mcp/index.d.mts +0 -4
- package/resources/tools/mcp/index.d.mts.map +0 -1
- package/resources/tools/mcp/index.d.ts +0 -4
- package/resources/tools/mcp/index.d.ts.map +0 -1
- package/resources/tools/mcp/index.js +0 -11
- package/resources/tools/mcp/index.js.map +0 -1
- package/resources/tools/mcp/index.mjs +0 -5
- package/resources/tools/mcp/index.mjs.map +0 -1
- package/resources/tools/mcp/mcp.d.mts +0 -14
- package/resources/tools/mcp/mcp.d.mts.map +0 -1
- package/resources/tools/mcp/mcp.d.ts +0 -14
- package/resources/tools/mcp/mcp.d.ts.map +0 -1
- package/resources/tools/mcp/mcp.js +0 -21
- package/resources/tools/mcp/mcp.js.map +0 -1
- package/resources/tools/mcp/mcp.mjs +0 -16
- package/resources/tools/mcp/mcp.mjs.map +0 -1
- package/resources/tools/mcp/oauth.d.mts +0 -32
- package/resources/tools/mcp/oauth.d.mts.map +0 -1
- package/resources/tools/mcp/oauth.d.ts +0 -32
- package/resources/tools/mcp/oauth.d.ts.map +0 -1
- package/resources/tools/mcp/oauth.js +0 -16
- package/resources/tools/mcp/oauth.js.map +0 -1
- package/resources/tools/mcp/oauth.mjs +0 -12
- package/resources/tools/mcp/oauth.mjs.map +0 -1
- package/resources/tools/mcp/servers/index.d.mts +0 -3
- package/resources/tools/mcp/servers/index.d.mts.map +0 -1
- package/resources/tools/mcp/servers/index.d.ts +0 -3
- package/resources/tools/mcp/servers/index.d.ts.map +0 -1
- package/resources/tools/mcp/servers/index.js +0 -9
- package/resources/tools/mcp/servers/index.js.map +0 -1
- package/resources/tools/mcp/servers/index.mjs +0 -4
- package/resources/tools/mcp/servers/index.mjs.map +0 -1
- package/resources/tools/mcp/servers/servers.d.mts +0 -442
- package/resources/tools/mcp/servers/servers.d.mts.map +0 -1
- package/resources/tools/mcp/servers/servers.d.ts +0 -442
- package/resources/tools/mcp/servers/servers.d.ts.map +0 -1
- package/resources/tools/mcp/servers/servers.js +0 -80
- package/resources/tools/mcp/servers/servers.js.map +0 -1
- package/resources/tools/mcp/servers/servers.mjs +0 -75
- package/resources/tools/mcp/servers/servers.mjs.map +0 -1
- package/resources/tools/mcp/servers/tools.d.mts +0 -100
- package/resources/tools/mcp/servers/tools.d.mts.map +0 -1
- package/resources/tools/mcp/servers/tools.d.ts +0 -100
- package/resources/tools/mcp/servers/tools.d.ts.map +0 -1
- package/resources/tools/mcp/servers/tools.js +0 -27
- package/resources/tools/mcp/servers/tools.js.map +0 -1
- package/resources/tools/mcp/servers/tools.mjs +0 -23
- package/resources/tools/mcp/servers/tools.mjs.map +0 -1
- package/resources/tools/mcp/servers.d.mts +0 -2
- package/resources/tools/mcp/servers.d.mts.map +0 -1
- package/resources/tools/mcp/servers.d.ts +0 -2
- package/resources/tools/mcp/servers.d.ts.map +0 -1
- package/resources/tools/mcp/servers.js +0 -6
- package/resources/tools/mcp/servers.js.map +0 -1
- package/resources/tools/mcp/servers.mjs +0 -3
- package/resources/tools/mcp/servers.mjs.map +0 -1
- package/resources/tools/mcp.d.mts +0 -2
- package/resources/tools/mcp.d.mts.map +0 -1
- package/resources/tools/mcp.d.ts +0 -2
- package/resources/tools/mcp.d.ts.map +0 -1
- package/resources/tools/mcp.js +0 -6
- package/resources/tools/mcp.js.map +0 -1
- package/resources/tools/mcp.mjs +0 -3
- package/resources/tools/mcp.mjs.map +0 -1
- package/resources/tools/tools.d.mts +0 -515
- package/resources/tools/tools.d.mts.map +0 -1
- package/resources/tools/tools.d.ts +0 -515
- package/resources/tools/tools.d.ts.map +0 -1
- package/resources/tools/tools.js +0 -76
- package/resources/tools/tools.js.map +0 -1
- package/resources/tools/tools.mjs +0 -71
- package/resources/tools/tools.mjs.map +0 -1
- package/resources/voice-beta/chat.d.mts +0 -19
- package/resources/voice-beta/chat.d.mts.map +0 -1
- package/resources/voice-beta/chat.d.ts +0 -19
- package/resources/voice-beta/chat.d.ts.map +0 -1
- package/resources/voice-beta/chat.js +0 -17
- package/resources/voice-beta/chat.js.map +0 -1
- package/resources/voice-beta/chat.mjs +0 -13
- package/resources/voice-beta/chat.mjs.map +0 -1
- package/resources/voice-beta/index.d.mts +0 -3
- package/resources/voice-beta/index.d.mts.map +0 -1
- package/resources/voice-beta/index.d.ts +0 -3
- package/resources/voice-beta/index.d.ts.map +0 -1
- package/resources/voice-beta/index.js +0 -9
- package/resources/voice-beta/index.js.map +0 -1
- package/resources/voice-beta/index.mjs +0 -4
- package/resources/voice-beta/index.mjs.map +0 -1
- package/resources/voice-beta/voice-beta.d.mts +0 -10
- package/resources/voice-beta/voice-beta.d.mts.map +0 -1
- package/resources/voice-beta/voice-beta.d.ts +0 -10
- package/resources/voice-beta/voice-beta.d.ts.map +0 -1
- package/resources/voice-beta/voice-beta.js +0 -17
- package/resources/voice-beta/voice-beta.js.map +0 -1
- package/resources/voice-beta/voice-beta.mjs +0 -12
- package/resources/voice-beta/voice-beta.mjs.map +0 -1
- package/resources/voice-beta.d.mts +0 -2
- package/resources/voice-beta.d.mts.map +0 -1
- package/resources/voice-beta.d.ts +0 -2
- package/resources/voice-beta.d.ts.map +0 -1
- package/resources/voice-beta.js +0 -6
- package/resources/voice-beta.js.map +0 -1
- package/resources/voice-beta.mjs +0 -3
- package/resources/voice-beta.mjs.map +0 -1
- package/src/resources/-internal-templates/-internal-templates.ts +0 -441
- package/src/resources/-internal-templates/deployment.ts +0 -88
- package/src/resources/-internal-templates/index.ts +0 -14
- package/src/resources/-internal-templates.ts +0 -3
- package/src/resources/agents/archival-memory.ts +0 -192
- package/src/resources/agents/core-memory/blocks.ts +0 -341
- package/src/resources/agents/core-memory/core-memory.ts +0 -201
- package/src/resources/agents/core-memory/index.ts +0 -13
- package/src/resources/agents/core-memory.ts +0 -3
- package/src/resources/agents/sources.ts +0 -59
- package/src/resources/client-side-access-tokens.ts +0 -166
- package/src/resources/embeddings.ts +0 -39
- package/src/resources/health.ts +0 -27
- package/src/resources/jobs.ts +0 -219
- package/src/resources/messages/batches.ts +0 -283
- package/src/resources/messages/index.ts +0 -13
- package/src/resources/messages/messages.ts +0 -33
- package/src/resources/messages.ts +0 -3
- package/src/resources/projects.ts +0 -45
- package/src/resources/providers.ts +0 -261
- package/src/resources/sources/files.ts +0 -82
- package/src/resources/sources/index.ts +0 -26
- package/src/resources/sources/sources.ts +0 -702
- package/src/resources/sources.ts +0 -3
- package/src/resources/telemetry.ts +0 -20
- package/src/resources/tools/composio/apps.ts +0 -198
- package/src/resources/tools/composio/composio.ts +0 -31
- package/src/resources/tools/composio/index.ts +0 -4
- package/src/resources/tools/composio.ts +0 -3
- package/src/resources/tools/index.ts +0 -23
- package/src/resources/tools/mcp/index.ts +0 -24
- package/src/resources/tools/mcp/mcp.ts +0 -63
- package/src/resources/tools/mcp/oauth.ts +0 -50
- package/src/resources/tools/mcp/servers/index.ts +0 -23
- package/src/resources/tools/mcp/servers/servers.ts +0 -587
- package/src/resources/tools/mcp/servers/tools.ts +0 -130
- package/src/resources/tools/mcp/servers.ts +0 -3
- package/src/resources/tools/mcp.ts +0 -3
- package/src/resources/tools/tools.ts +0 -663
- package/src/resources/voice-beta/chat.ts +0 -33
- package/src/resources/voice-beta/index.ts +0 -4
- package/src/resources/voice-beta/voice-beta.ts +0 -19
- package/src/resources/voice-beta.ts +0 -3
- /package/resources/{messages → batches}/index.js +0 -0
- /package/resources/{messages → batches}/index.mjs +0 -0
|
@@ -2,24 +2,58 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
4
|
import * as MessagesAPI from './messages';
|
|
5
|
-
import * as
|
|
5
|
+
import * as ToolsAPI from '../tools';
|
|
6
6
|
import * as AgentsAPI from './agents';
|
|
7
|
-
import * as
|
|
7
|
+
import * as RunsAPI from '../runs/runs';
|
|
8
8
|
import { APIPromise } from '../../core/api-promise';
|
|
9
|
+
import { ArrayPage, type ArrayPageParams, ObjectPage, PagePromise } from '../../core/pagination';
|
|
10
|
+
import { Stream } from '../../core/streaming';
|
|
11
|
+
import { buildHeaders } from '../../internal/headers';
|
|
9
12
|
import { RequestOptions } from '../../internal/request-options';
|
|
10
13
|
import { path } from '../../internal/utils/path';
|
|
11
14
|
|
|
12
15
|
export class Messages extends APIResource {
|
|
13
16
|
/**
|
|
14
|
-
*
|
|
17
|
+
* Process a user message and return the agent's response. This endpoint accepts a
|
|
18
|
+
* message from a user and processes it through the agent.
|
|
19
|
+
*
|
|
20
|
+
* The response format is controlled by the `streaming` field in the request body:
|
|
21
|
+
*
|
|
22
|
+
* - If `streaming=false` (default): Returns a complete LettaResponse with all
|
|
23
|
+
* messages
|
|
24
|
+
* - If `streaming=true`: Returns a Server-Sent Events (SSE) stream
|
|
25
|
+
*
|
|
26
|
+
* Additional streaming options (only used when streaming=true):
|
|
27
|
+
*
|
|
28
|
+
* - `stream_tokens`: Stream individual tokens instead of complete steps
|
|
29
|
+
* - `include_pings`: Include keepalive pings to prevent connection timeouts
|
|
30
|
+
* - `background`: Process the request in the background
|
|
15
31
|
*/
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
32
|
+
create(
|
|
33
|
+
agentID: string,
|
|
34
|
+
body: MessageCreateParamsNonStreaming,
|
|
35
|
+
options?: RequestOptions,
|
|
36
|
+
): APIPromise<LettaResponse>;
|
|
37
|
+
create(
|
|
38
|
+
agentID: string,
|
|
39
|
+
body: MessageCreateParamsStreaming,
|
|
40
|
+
options?: RequestOptions,
|
|
41
|
+
): APIPromise<Stream<LettaStreamingResponse>>;
|
|
42
|
+
create(
|
|
43
|
+
agentID: string,
|
|
44
|
+
body: MessageCreateParamsBase,
|
|
45
|
+
options?: RequestOptions,
|
|
46
|
+
): APIPromise<Stream<LettaStreamingResponse> | LettaResponse>;
|
|
47
|
+
create(
|
|
48
|
+
agentID: string,
|
|
49
|
+
body: MessageCreateParams,
|
|
19
50
|
options?: RequestOptions,
|
|
20
|
-
): APIPromise<
|
|
21
|
-
|
|
22
|
-
|
|
51
|
+
): APIPromise<LettaResponse> | APIPromise<Stream<LettaStreamingResponse>> {
|
|
52
|
+
return this._client.post(path`/v1/agents/${agentID}/messages`, {
|
|
53
|
+
body,
|
|
54
|
+
...options,
|
|
55
|
+
stream: body.streaming ?? false,
|
|
56
|
+
}) as APIPromise<LettaResponse> | APIPromise<Stream<LettaStreamingResponse>>;
|
|
23
57
|
}
|
|
24
58
|
|
|
25
59
|
/**
|
|
@@ -29,8 +63,11 @@ export class Messages extends APIResource {
|
|
|
29
63
|
agentID: string,
|
|
30
64
|
query: MessageListParams | null | undefined = {},
|
|
31
65
|
options?: RequestOptions,
|
|
32
|
-
):
|
|
33
|
-
return this._client.
|
|
66
|
+
): PagePromise<MessagesArrayPage, Message> {
|
|
67
|
+
return this._client.getAPIList(path`/v1/agents/${agentID}/messages`, ArrayPage<Message>, {
|
|
68
|
+
query,
|
|
69
|
+
...options,
|
|
70
|
+
});
|
|
34
71
|
}
|
|
35
72
|
|
|
36
73
|
/**
|
|
@@ -48,36 +85,13 @@ export class Messages extends APIResource {
|
|
|
48
85
|
}
|
|
49
86
|
|
|
50
87
|
/**
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
* This endpoint processes the message through the agent loop up until the LLM
|
|
54
|
-
* request, then returns the raw request payload that would be sent to the LLM
|
|
55
|
-
* provider. Useful for debugging and inspection.
|
|
56
|
-
*/
|
|
57
|
-
previewRawPayload(
|
|
58
|
-
agentID: string,
|
|
59
|
-
body: MessagePreviewRawPayloadParams,
|
|
60
|
-
options?: RequestOptions,
|
|
61
|
-
): APIPromise<MessagePreviewRawPayloadResponse> {
|
|
62
|
-
return this._client.post(path`/v1/agents/${agentID}/messages/preview-raw-payload`, { body, ...options });
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Search messages across the entire organization with optional project and
|
|
67
|
-
* template filtering. Returns messages with FTS/vector ranks and total RRF score.
|
|
68
|
-
*
|
|
69
|
-
* This is a cloud-only feature.
|
|
70
|
-
*/
|
|
71
|
-
search(body: MessageSearchParams, options?: RequestOptions): APIPromise<MessageSearchResponse> {
|
|
72
|
-
return this._client.post('/v1/agents/messages/search', { body, ...options });
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Process a user message and return the agent's response. This endpoint accepts a
|
|
77
|
-
* message from a user and processes it through the agent.
|
|
88
|
+
* Summarize an agent's conversation history.
|
|
78
89
|
*/
|
|
79
|
-
|
|
80
|
-
return this._client.post(path`/v1/agents/${agentID}/
|
|
90
|
+
compact(agentID: string, options?: RequestOptions): APIPromise<void> {
|
|
91
|
+
return this._client.post(path`/v1/agents/${agentID}/summarize`, {
|
|
92
|
+
...options,
|
|
93
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
94
|
+
});
|
|
81
95
|
}
|
|
82
96
|
|
|
83
97
|
/**
|
|
@@ -85,39 +99,74 @@ export class Messages extends APIResource {
|
|
|
85
99
|
* processing happens in the background, and the status can be checked using the
|
|
86
100
|
* run ID.
|
|
87
101
|
*
|
|
88
|
-
* This is "asynchronous" in the sense that it's a background
|
|
89
|
-
* must be fetched by the run ID.
|
|
102
|
+
* This is "asynchronous" in the sense that it's a background run and explicitly
|
|
103
|
+
* must be fetched by the run ID.
|
|
90
104
|
*/
|
|
91
|
-
|
|
105
|
+
createAsync(agentID: string, body: MessageCreateAsyncParams, options?: RequestOptions): APIPromise<Run> {
|
|
92
106
|
return this._client.post(path`/v1/agents/${agentID}/messages/async`, { body, ...options });
|
|
93
107
|
}
|
|
94
108
|
|
|
109
|
+
/**
|
|
110
|
+
* Resets the messages for an agent
|
|
111
|
+
*/
|
|
112
|
+
reset(
|
|
113
|
+
agentID: string,
|
|
114
|
+
body: MessageResetParams,
|
|
115
|
+
options?: RequestOptions,
|
|
116
|
+
): APIPromise<AgentsAPI.AgentState | null> {
|
|
117
|
+
return this._client.patch(path`/v1/agents/${agentID}/reset-messages`, { body, ...options });
|
|
118
|
+
}
|
|
119
|
+
|
|
95
120
|
/**
|
|
96
121
|
* Process a user message and return the agent's response. This endpoint accepts a
|
|
97
122
|
* message from a user and processes it through the agent. It will stream the steps
|
|
98
123
|
* of the response always, and stream the tokens if 'stream_tokens' is set to True.
|
|
99
124
|
*/
|
|
100
|
-
|
|
101
|
-
|
|
125
|
+
stream(
|
|
126
|
+
agentID: string,
|
|
127
|
+
body: MessageStreamParams,
|
|
128
|
+
options?: RequestOptions,
|
|
129
|
+
): APIPromise<Stream<LettaStreamingResponse>> {
|
|
130
|
+
return this._client.post(path`/v1/agents/${agentID}/messages/stream`, {
|
|
131
|
+
body,
|
|
132
|
+
...options,
|
|
133
|
+
stream: true,
|
|
134
|
+
}) as APIPromise<Stream<LettaStreamingResponse>>;
|
|
102
135
|
}
|
|
103
136
|
}
|
|
104
137
|
|
|
138
|
+
export type MessagesArrayPage = ArrayPage<Message>;
|
|
139
|
+
|
|
140
|
+
export type RunsArrayPage = ArrayPage<Run>;
|
|
141
|
+
|
|
142
|
+
export type InternalMessagesObjectPage = ObjectPage<InternalMessage>;
|
|
143
|
+
|
|
105
144
|
/**
|
|
106
145
|
* Input to approve or deny a tool call request
|
|
107
146
|
*/
|
|
108
147
|
export interface ApprovalCreate {
|
|
109
148
|
/**
|
|
110
|
-
* The message ID of the approval request
|
|
149
|
+
* @deprecated The message ID of the approval request
|
|
111
150
|
*/
|
|
112
|
-
approval_request_id
|
|
151
|
+
approval_request_id?: string | null;
|
|
113
152
|
|
|
114
153
|
/**
|
|
115
|
-
*
|
|
154
|
+
* The list of approval responses
|
|
116
155
|
*/
|
|
117
|
-
|
|
156
|
+
approvals?: Array<ApprovalReturn | ToolReturn> | null;
|
|
118
157
|
|
|
119
158
|
/**
|
|
120
|
-
*
|
|
159
|
+
* @deprecated Whether the tool has been approved
|
|
160
|
+
*/
|
|
161
|
+
approve?: boolean | null;
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* The multi-agent group that the message was sent in
|
|
165
|
+
*/
|
|
166
|
+
group_id?: string | null;
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* @deprecated An optional explanation for the provided approval status
|
|
121
170
|
*/
|
|
122
171
|
reason?: string | null;
|
|
123
172
|
|
|
@@ -141,7 +190,7 @@ export interface ApprovalRequestMessage {
|
|
|
141
190
|
date: string;
|
|
142
191
|
|
|
143
192
|
/**
|
|
144
|
-
* The tool call that has been requested by the llm to run
|
|
193
|
+
* @deprecated The tool call that has been requested by the llm to run
|
|
145
194
|
*/
|
|
146
195
|
tool_call: ToolCall | ToolCallDelta;
|
|
147
196
|
|
|
@@ -163,6 +212,12 @@ export interface ApprovalRequestMessage {
|
|
|
163
212
|
seq_id?: number | null;
|
|
164
213
|
|
|
165
214
|
step_id?: string | null;
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* The tool calls that have been requested by the llm to run, which are pending
|
|
218
|
+
* approval
|
|
219
|
+
*/
|
|
220
|
+
tool_calls?: Array<ToolCall> | ToolCallDelta | null;
|
|
166
221
|
}
|
|
167
222
|
|
|
168
223
|
/**
|
|
@@ -178,17 +233,22 @@ export interface ApprovalRequestMessage {
|
|
|
178
233
|
export interface ApprovalResponseMessage {
|
|
179
234
|
id: string;
|
|
180
235
|
|
|
236
|
+
date: string;
|
|
237
|
+
|
|
181
238
|
/**
|
|
182
|
-
* The message ID of the approval request
|
|
239
|
+
* @deprecated The message ID of the approval request
|
|
183
240
|
*/
|
|
184
|
-
approval_request_id
|
|
241
|
+
approval_request_id?: string | null;
|
|
185
242
|
|
|
186
243
|
/**
|
|
187
|
-
*
|
|
244
|
+
* The list of approval responses
|
|
188
245
|
*/
|
|
189
|
-
|
|
246
|
+
approvals?: Array<ApprovalReturn | ToolReturn> | null;
|
|
190
247
|
|
|
191
|
-
|
|
248
|
+
/**
|
|
249
|
+
* @deprecated Whether the tool has been approved
|
|
250
|
+
*/
|
|
251
|
+
approve?: boolean | null;
|
|
192
252
|
|
|
193
253
|
is_err?: boolean | null;
|
|
194
254
|
|
|
@@ -202,7 +262,7 @@ export interface ApprovalResponseMessage {
|
|
|
202
262
|
otid?: string | null;
|
|
203
263
|
|
|
204
264
|
/**
|
|
205
|
-
* An optional explanation for the provided approval status
|
|
265
|
+
* @deprecated An optional explanation for the provided approval status
|
|
206
266
|
*/
|
|
207
267
|
reason?: string | null;
|
|
208
268
|
|
|
@@ -215,6 +275,28 @@ export interface ApprovalResponseMessage {
|
|
|
215
275
|
step_id?: string | null;
|
|
216
276
|
}
|
|
217
277
|
|
|
278
|
+
export interface ApprovalReturn {
|
|
279
|
+
/**
|
|
280
|
+
* Whether the tool has been approved
|
|
281
|
+
*/
|
|
282
|
+
approve: boolean;
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* The ID of the tool call that corresponds to this approval
|
|
286
|
+
*/
|
|
287
|
+
tool_call_id: string;
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* An optional explanation for the provided approval status
|
|
291
|
+
*/
|
|
292
|
+
reason?: string | null;
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* The message type to be created.
|
|
296
|
+
*/
|
|
297
|
+
type?: 'approval';
|
|
298
|
+
}
|
|
299
|
+
|
|
218
300
|
/**
|
|
219
301
|
* A message sent by the LLM in response to user input. Used in the LLM context.
|
|
220
302
|
*
|
|
@@ -254,6 +336,36 @@ export interface AssistantMessage {
|
|
|
254
336
|
step_id?: string | null;
|
|
255
337
|
}
|
|
256
338
|
|
|
339
|
+
/**
|
|
340
|
+
* A message for notifying the developer that an event that has occured (e.g. a
|
|
341
|
+
* compaction). Events are NOT part of the context window.
|
|
342
|
+
*/
|
|
343
|
+
export interface EventMessage {
|
|
344
|
+
id: string;
|
|
345
|
+
|
|
346
|
+
date: string;
|
|
347
|
+
|
|
348
|
+
event_data: { [key: string]: unknown };
|
|
349
|
+
|
|
350
|
+
event_type: 'compaction';
|
|
351
|
+
|
|
352
|
+
is_err?: boolean | null;
|
|
353
|
+
|
|
354
|
+
message_type?: 'event';
|
|
355
|
+
|
|
356
|
+
name?: string | null;
|
|
357
|
+
|
|
358
|
+
otid?: string | null;
|
|
359
|
+
|
|
360
|
+
run_id?: string | null;
|
|
361
|
+
|
|
362
|
+
sender_id?: string | null;
|
|
363
|
+
|
|
364
|
+
seq_id?: number | null;
|
|
365
|
+
|
|
366
|
+
step_id?: string | null;
|
|
367
|
+
}
|
|
368
|
+
|
|
257
369
|
/**
|
|
258
370
|
* Representation of an agent's internal reasoning where reasoning content has been
|
|
259
371
|
* hidden from the response.
|
|
@@ -371,193 +483,318 @@ export namespace ImageContent {
|
|
|
371
483
|
}
|
|
372
484
|
|
|
373
485
|
/**
|
|
374
|
-
*
|
|
486
|
+
* Letta's internal representation of a message. Includes methods to convert to/from LLM provider formats.
|
|
487
|
+
*
|
|
488
|
+
* Attributes:
|
|
489
|
+
* id (str): The unique identifier of the message.
|
|
490
|
+
* role (MessageRole): The role of the participant.
|
|
491
|
+
* text (str): The text of the message.
|
|
492
|
+
* user_id (str): The unique identifier of the user.
|
|
493
|
+
* agent_id (str): The unique identifier of the agent.
|
|
494
|
+
* model (str): The model used to make the function call.
|
|
495
|
+
* name (str): The name of the participant.
|
|
496
|
+
* created_at (datetime): The time the message was created.
|
|
497
|
+
* tool_calls (List[OpenAIToolCall,]): The list of tool calls requested.
|
|
498
|
+
* tool_call_id (str): The id of the tool call.
|
|
499
|
+
* step_id (str): The id of the step that this message was created in.
|
|
500
|
+
* otid (str): The offline threading id associated with this message.
|
|
501
|
+
* tool_returns (List[ToolReturn]): The list of tool returns requested.
|
|
502
|
+
* group_id (str): The multi-agent group that the message was sent in.
|
|
503
|
+
* sender_id (str): The id of the sender of the message, can be an identity id or agent id.
|
|
504
|
+
*
|
|
505
|
+
* t
|
|
375
506
|
*/
|
|
376
|
-
export
|
|
507
|
+
export interface InternalMessage {
|
|
508
|
+
/**
|
|
509
|
+
* The human-friendly ID of the Message
|
|
510
|
+
*/
|
|
511
|
+
id: string;
|
|
377
512
|
|
|
378
|
-
|
|
513
|
+
/**
|
|
514
|
+
* The role of the participant.
|
|
515
|
+
*/
|
|
516
|
+
role: MessageRole;
|
|
379
517
|
|
|
380
|
-
export interface LettaAssistantMessageContentUnion {
|
|
381
518
|
/**
|
|
382
|
-
* The
|
|
519
|
+
* The unique identifier of the agent.
|
|
383
520
|
*/
|
|
384
|
-
|
|
521
|
+
agent_id?: string | null;
|
|
385
522
|
|
|
386
523
|
/**
|
|
387
|
-
* The
|
|
524
|
+
* The id of the approval request if this message is associated with a tool call
|
|
525
|
+
* request.
|
|
388
526
|
*/
|
|
389
|
-
|
|
390
|
-
}
|
|
527
|
+
approval_request_id?: string | null;
|
|
391
528
|
|
|
392
|
-
/**
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
* Args: id (str): The ID of the message date (datetime): The date the message was
|
|
397
|
-
* created in ISO format name (Optional[str]): The name of the sender of the
|
|
398
|
-
* message content (str): The message content sent by the system
|
|
399
|
-
*/
|
|
400
|
-
export type LettaMessageUnion =
|
|
401
|
-
| SystemMessage
|
|
402
|
-
| UserMessage
|
|
403
|
-
| ReasoningMessage
|
|
404
|
-
| HiddenReasoningMessage
|
|
405
|
-
| ToolCallMessage
|
|
406
|
-
| ToolsAPI.ToolReturnMessage
|
|
407
|
-
| AssistantMessage
|
|
408
|
-
| ApprovalRequestMessage
|
|
409
|
-
| ApprovalResponseMessage;
|
|
529
|
+
/**
|
|
530
|
+
* The list of approvals for this message.
|
|
531
|
+
*/
|
|
532
|
+
approvals?: Array<ApprovalReturn | InternalMessage.LettaSchemasMessageToolReturn> | null;
|
|
410
533
|
|
|
411
|
-
export interface LettaRequest {
|
|
412
534
|
/**
|
|
413
|
-
*
|
|
535
|
+
* Whether tool call is approved.
|
|
414
536
|
*/
|
|
415
|
-
|
|
537
|
+
approve?: boolean | null;
|
|
416
538
|
|
|
417
539
|
/**
|
|
418
|
-
* The
|
|
540
|
+
* The id of the LLMBatchItem that this message is associated with
|
|
419
541
|
*/
|
|
420
|
-
|
|
542
|
+
batch_item_id?: string | null;
|
|
421
543
|
|
|
422
544
|
/**
|
|
423
|
-
* The
|
|
545
|
+
* The content of the message.
|
|
424
546
|
*/
|
|
425
|
-
|
|
547
|
+
content?: Array<
|
|
548
|
+
| TextContent
|
|
549
|
+
| ImageContent
|
|
550
|
+
| ToolCallContent
|
|
551
|
+
| ToolReturnContent
|
|
552
|
+
| ReasoningContent
|
|
553
|
+
| RedactedReasoningContent
|
|
554
|
+
| OmittedReasoningContent
|
|
555
|
+
| InternalMessage.SummarizedReasoningContent
|
|
556
|
+
> | null;
|
|
426
557
|
|
|
427
558
|
/**
|
|
428
|
-
*
|
|
559
|
+
* The timestamp when the object was created.
|
|
429
560
|
*/
|
|
430
|
-
|
|
561
|
+
created_at?: string;
|
|
431
562
|
|
|
432
563
|
/**
|
|
433
|
-
*
|
|
434
|
-
* all messages.
|
|
564
|
+
* The id of the user that made this object.
|
|
435
565
|
*/
|
|
436
|
-
|
|
566
|
+
created_by_id?: string | null;
|
|
437
567
|
|
|
438
568
|
/**
|
|
439
|
-
*
|
|
569
|
+
* The reason the tool call request was denied.
|
|
440
570
|
*/
|
|
441
|
-
|
|
571
|
+
denial_reason?: string | null;
|
|
442
572
|
|
|
443
573
|
/**
|
|
444
|
-
*
|
|
445
|
-
* `send_message`) as `AssistantMessage` objects.
|
|
574
|
+
* The multi-agent group that the message was sent in
|
|
446
575
|
*/
|
|
447
|
-
|
|
448
|
-
}
|
|
576
|
+
group_id?: string | null;
|
|
449
577
|
|
|
450
|
-
/**
|
|
451
|
-
* Response object from an agent interaction, consisting of the new messages
|
|
452
|
-
* generated by the agent and usage statistics. The type of the returned messages
|
|
453
|
-
* can be either `Message` or `LettaMessage`, depending on what was specified in
|
|
454
|
-
* the request.
|
|
455
|
-
*
|
|
456
|
-
* Attributes: messages (List[Union[Message, LettaMessage]]): The messages returned
|
|
457
|
-
* by the agent. usage (LettaUsageStatistics): The usage statistics
|
|
458
|
-
*/
|
|
459
|
-
export interface LettaResponse {
|
|
460
578
|
/**
|
|
461
|
-
*
|
|
579
|
+
* Whether this message is part of an error step. Used only for debugging purposes.
|
|
462
580
|
*/
|
|
463
|
-
|
|
581
|
+
is_err?: boolean | null;
|
|
464
582
|
|
|
465
583
|
/**
|
|
466
|
-
* The
|
|
584
|
+
* The id of the user that made this object.
|
|
467
585
|
*/
|
|
468
|
-
|
|
586
|
+
last_updated_by_id?: string | null;
|
|
469
587
|
|
|
470
588
|
/**
|
|
471
|
-
* The
|
|
589
|
+
* The model used to make the function call.
|
|
472
590
|
*/
|
|
473
|
-
|
|
474
|
-
}
|
|
591
|
+
model?: string | null;
|
|
475
592
|
|
|
476
|
-
export namespace LettaResponse {
|
|
477
593
|
/**
|
|
478
|
-
*
|
|
594
|
+
* For role user/assistant: the (optional) name of the participant. For role
|
|
595
|
+
* tool/function: the name of the function called.
|
|
479
596
|
*/
|
|
480
|
-
|
|
481
|
-
/**
|
|
482
|
-
* The reason why execution stopped.
|
|
483
|
-
*/
|
|
484
|
-
stop_reason: RunsAPI.StopReasonType;
|
|
597
|
+
name?: string | null;
|
|
485
598
|
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
}
|
|
599
|
+
/**
|
|
600
|
+
* The offline threading id associated with this message
|
|
601
|
+
*/
|
|
602
|
+
otid?: string | null;
|
|
491
603
|
|
|
492
604
|
/**
|
|
493
|
-
* The
|
|
605
|
+
* The id of the run that this message was created in.
|
|
494
606
|
*/
|
|
495
|
-
|
|
496
|
-
/**
|
|
497
|
-
* The number of tokens generated by the agent.
|
|
498
|
-
*/
|
|
499
|
-
completion_tokens?: number;
|
|
607
|
+
run_id?: string | null;
|
|
500
608
|
|
|
501
|
-
|
|
609
|
+
/**
|
|
610
|
+
* The id of the sender of the message, can be an identity id or agent id
|
|
611
|
+
*/
|
|
612
|
+
sender_id?: string | null;
|
|
502
613
|
|
|
503
|
-
|
|
504
|
-
|
|
614
|
+
/**
|
|
615
|
+
* The id of the step that this message was created in.
|
|
616
|
+
*/
|
|
617
|
+
step_id?: string | null;
|
|
618
|
+
|
|
619
|
+
/**
|
|
620
|
+
* The ID of the tool call. Only applicable for role tool.
|
|
621
|
+
*/
|
|
622
|
+
tool_call_id?: string | null;
|
|
623
|
+
|
|
624
|
+
/**
|
|
625
|
+
* The list of tool calls requested. Only applicable for role assistant.
|
|
626
|
+
*/
|
|
627
|
+
tool_calls?: Array<InternalMessage.ToolCall> | null;
|
|
628
|
+
|
|
629
|
+
/**
|
|
630
|
+
* Tool execution return information for prior tool calls
|
|
631
|
+
*/
|
|
632
|
+
tool_returns?: Array<InternalMessage.ToolReturn> | null;
|
|
633
|
+
|
|
634
|
+
/**
|
|
635
|
+
* The timestamp when the object was last updated.
|
|
636
|
+
*/
|
|
637
|
+
updated_at?: string | null;
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
export namespace InternalMessage {
|
|
641
|
+
export interface LettaSchemasMessageToolReturn {
|
|
642
|
+
/**
|
|
643
|
+
* The status of the tool call
|
|
505
644
|
*/
|
|
506
|
-
|
|
645
|
+
status: 'success' | 'error';
|
|
507
646
|
|
|
508
647
|
/**
|
|
509
|
-
* The
|
|
648
|
+
* The function response string
|
|
510
649
|
*/
|
|
511
|
-
|
|
650
|
+
func_response?: string | null;
|
|
512
651
|
|
|
513
652
|
/**
|
|
514
|
-
*
|
|
653
|
+
* Captured stderr from the tool invocation
|
|
515
654
|
*/
|
|
516
|
-
|
|
655
|
+
stderr?: Array<string> | null;
|
|
517
656
|
|
|
518
657
|
/**
|
|
519
|
-
*
|
|
658
|
+
* Captured stdout (e.g. prints, logs) from the tool invocation
|
|
520
659
|
*/
|
|
521
|
-
|
|
660
|
+
stdout?: Array<string> | null;
|
|
522
661
|
|
|
523
662
|
/**
|
|
524
|
-
* The
|
|
663
|
+
* The ID for the tool call
|
|
525
664
|
*/
|
|
526
|
-
|
|
665
|
+
tool_call_id?: unknown;
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
/**
|
|
669
|
+
* The style of reasoning content returned by the OpenAI Responses API
|
|
670
|
+
*/
|
|
671
|
+
export interface SummarizedReasoningContent {
|
|
672
|
+
/**
|
|
673
|
+
* The unique identifier for this reasoning step.
|
|
674
|
+
*/
|
|
675
|
+
id: string;
|
|
676
|
+
|
|
677
|
+
/**
|
|
678
|
+
* Summaries of the reasoning content.
|
|
679
|
+
*/
|
|
680
|
+
summary: Array<SummarizedReasoningContent.Summary>;
|
|
681
|
+
|
|
682
|
+
/**
|
|
683
|
+
* The encrypted reasoning content.
|
|
684
|
+
*/
|
|
685
|
+
encrypted_content?: string;
|
|
686
|
+
|
|
687
|
+
/**
|
|
688
|
+
* Indicates this is a summarized reasoning step.
|
|
689
|
+
*/
|
|
690
|
+
type?: 'summarized_reasoning';
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
export namespace SummarizedReasoningContent {
|
|
694
|
+
export interface Summary {
|
|
695
|
+
/**
|
|
696
|
+
* The index of the summary part.
|
|
697
|
+
*/
|
|
698
|
+
index: number;
|
|
699
|
+
|
|
700
|
+
/**
|
|
701
|
+
* The text of the summary part.
|
|
702
|
+
*/
|
|
703
|
+
text: string;
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
export interface ToolCall {
|
|
708
|
+
id: string;
|
|
709
|
+
|
|
710
|
+
function: ToolCall.Function;
|
|
711
|
+
|
|
712
|
+
type: 'function';
|
|
713
|
+
|
|
714
|
+
[k: string]: unknown;
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
export namespace ToolCall {
|
|
718
|
+
export interface Function {
|
|
719
|
+
arguments: string;
|
|
720
|
+
|
|
721
|
+
name: string;
|
|
722
|
+
|
|
723
|
+
[k: string]: unknown;
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
export interface ToolReturn {
|
|
728
|
+
/**
|
|
729
|
+
* The status of the tool call
|
|
730
|
+
*/
|
|
731
|
+
status: 'success' | 'error';
|
|
732
|
+
|
|
733
|
+
/**
|
|
734
|
+
* The function response string
|
|
735
|
+
*/
|
|
736
|
+
func_response?: string | null;
|
|
737
|
+
|
|
738
|
+
/**
|
|
739
|
+
* Captured stderr from the tool invocation
|
|
740
|
+
*/
|
|
741
|
+
stderr?: Array<string> | null;
|
|
742
|
+
|
|
743
|
+
/**
|
|
744
|
+
* Captured stdout (e.g. prints, logs) from the tool invocation
|
|
745
|
+
*/
|
|
746
|
+
stdout?: Array<string> | null;
|
|
747
|
+
|
|
748
|
+
/**
|
|
749
|
+
* The ID for the tool call
|
|
750
|
+
*/
|
|
751
|
+
tool_call_id?: unknown;
|
|
527
752
|
}
|
|
528
753
|
}
|
|
529
754
|
|
|
530
|
-
|
|
755
|
+
/**
|
|
756
|
+
* Status of the job.
|
|
757
|
+
*/
|
|
758
|
+
export type JobStatus = 'created' | 'running' | 'completed' | 'failed' | 'pending' | 'cancelled' | 'expired';
|
|
759
|
+
|
|
760
|
+
export type JobType = 'job' | 'run' | 'batch';
|
|
761
|
+
|
|
762
|
+
export interface LettaAssistantMessageContentUnion {
|
|
531
763
|
/**
|
|
532
|
-
* The
|
|
764
|
+
* The text content of the message.
|
|
533
765
|
*/
|
|
534
|
-
|
|
766
|
+
text: string;
|
|
535
767
|
|
|
536
768
|
/**
|
|
537
|
-
*
|
|
769
|
+
* Stores a unique identifier for any reasoning associated with this text content.
|
|
538
770
|
*/
|
|
539
|
-
|
|
771
|
+
signature?: string | null;
|
|
540
772
|
|
|
541
773
|
/**
|
|
542
|
-
* The
|
|
774
|
+
* The type of the message.
|
|
543
775
|
*/
|
|
544
|
-
|
|
776
|
+
type?: 'text';
|
|
777
|
+
}
|
|
545
778
|
|
|
779
|
+
export interface LettaRequest {
|
|
546
780
|
/**
|
|
547
|
-
*
|
|
781
|
+
* @deprecated The name of the message argument in the designated message tool.
|
|
782
|
+
* Still supported for legacy agent types, but deprecated for letta_v1_agent
|
|
783
|
+
* onward.
|
|
548
784
|
*/
|
|
549
|
-
|
|
785
|
+
assistant_message_tool_kwarg?: string;
|
|
550
786
|
|
|
551
787
|
/**
|
|
552
|
-
*
|
|
788
|
+
* @deprecated The name of the designated message tool. Still supported for legacy
|
|
789
|
+
* agent types, but deprecated for letta_v1_agent onward.
|
|
553
790
|
*/
|
|
554
|
-
|
|
791
|
+
assistant_message_tool_name?: string;
|
|
555
792
|
|
|
556
793
|
/**
|
|
557
|
-
*
|
|
558
|
-
*
|
|
794
|
+
* @deprecated If set to True, enables reasoning before responses or tool calls
|
|
795
|
+
* from the agent.
|
|
559
796
|
*/
|
|
560
|
-
|
|
797
|
+
enable_thinking?: string;
|
|
561
798
|
|
|
562
799
|
/**
|
|
563
800
|
* Only return specified message types in the response. If `None` (default) returns
|
|
@@ -565,191 +802,390 @@ export interface LettaStreamingRequest {
|
|
|
565
802
|
*/
|
|
566
803
|
include_return_message_types?: Array<MessageType> | null;
|
|
567
804
|
|
|
805
|
+
/**
|
|
806
|
+
* Syntactic sugar for a single user message. Equivalent to messages=[{'role':
|
|
807
|
+
* 'user', 'content': input}].
|
|
808
|
+
*/
|
|
809
|
+
input?:
|
|
810
|
+
| string
|
|
811
|
+
| Array<
|
|
812
|
+
| TextContent
|
|
813
|
+
| ImageContent
|
|
814
|
+
| ToolCallContent
|
|
815
|
+
| ToolReturnContent
|
|
816
|
+
| ReasoningContent
|
|
817
|
+
| RedactedReasoningContent
|
|
818
|
+
| OmittedReasoningContent
|
|
819
|
+
| LettaRequest.SummarizedReasoningContent
|
|
820
|
+
>
|
|
821
|
+
| null;
|
|
822
|
+
|
|
568
823
|
/**
|
|
569
824
|
* Maximum number of steps the agent should take to process the request.
|
|
570
825
|
*/
|
|
571
826
|
max_steps?: number;
|
|
572
827
|
|
|
573
828
|
/**
|
|
574
|
-
*
|
|
575
|
-
* per step.
|
|
829
|
+
* The messages to be sent to the agent.
|
|
576
830
|
*/
|
|
577
|
-
|
|
831
|
+
messages?: Array<AgentsAPI.MessageCreate | ApprovalCreate> | null;
|
|
578
832
|
|
|
579
833
|
/**
|
|
580
|
-
* Whether the server should parse specific tool call arguments
|
|
581
|
-
* `send_message`) as `AssistantMessage` objects.
|
|
834
|
+
* @deprecated Whether the server should parse specific tool call arguments
|
|
835
|
+
* (default `send_message`) as `AssistantMessage` objects. Still supported for
|
|
836
|
+
* legacy agent types, but deprecated for letta_v1_agent onward.
|
|
582
837
|
*/
|
|
583
838
|
use_assistant_message?: boolean;
|
|
584
839
|
}
|
|
585
840
|
|
|
586
|
-
export
|
|
841
|
+
export namespace LettaRequest {
|
|
842
|
+
/**
|
|
843
|
+
* The style of reasoning content returned by the OpenAI Responses API
|
|
844
|
+
*/
|
|
845
|
+
export interface SummarizedReasoningContent {
|
|
846
|
+
/**
|
|
847
|
+
* The unique identifier for this reasoning step.
|
|
848
|
+
*/
|
|
849
|
+
id: string;
|
|
850
|
+
|
|
851
|
+
/**
|
|
852
|
+
* Summaries of the reasoning content.
|
|
853
|
+
*/
|
|
854
|
+
summary: Array<SummarizedReasoningContent.Summary>;
|
|
855
|
+
|
|
856
|
+
/**
|
|
857
|
+
* The encrypted reasoning content.
|
|
858
|
+
*/
|
|
859
|
+
encrypted_content?: string;
|
|
860
|
+
|
|
861
|
+
/**
|
|
862
|
+
* Indicates this is a summarized reasoning step.
|
|
863
|
+
*/
|
|
864
|
+
type?: 'summarized_reasoning';
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
export namespace SummarizedReasoningContent {
|
|
868
|
+
export interface Summary {
|
|
869
|
+
/**
|
|
870
|
+
* The index of the summary part.
|
|
871
|
+
*/
|
|
872
|
+
index: number;
|
|
873
|
+
|
|
874
|
+
/**
|
|
875
|
+
* The text of the summary part.
|
|
876
|
+
*/
|
|
877
|
+
text: string;
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
}
|
|
587
881
|
|
|
588
882
|
/**
|
|
589
|
-
*
|
|
590
|
-
*
|
|
591
|
-
*
|
|
592
|
-
*
|
|
593
|
-
* role (MessageRole): The role of the participant.
|
|
594
|
-
* text (str): The text of the message.
|
|
595
|
-
* user_id (str): The unique identifier of the user.
|
|
596
|
-
* agent_id (str): The unique identifier of the agent.
|
|
597
|
-
* model (str): The model used to make the function call.
|
|
598
|
-
* name (str): The name of the participant.
|
|
599
|
-
* created_at (datetime): The time the message was created.
|
|
600
|
-
* tool_calls (List[OpenAIToolCall,]): The list of tool calls requested.
|
|
601
|
-
* tool_call_id (str): The id of the tool call.
|
|
602
|
-
* step_id (str): The id of the step that this message was created in.
|
|
603
|
-
* otid (str): The offline threading id associated with this message.
|
|
604
|
-
* tool_returns (List[ToolReturn]): The list of tool returns requested.
|
|
605
|
-
* group_id (str): The multi-agent group that the message was sent in.
|
|
606
|
-
* sender_id (str): The id of the sender of the message, can be an identity id or agent id.
|
|
883
|
+
* Response object from an agent interaction, consisting of the new messages
|
|
884
|
+
* generated by the agent and usage statistics. The type of the returned messages
|
|
885
|
+
* can be either `Message` or `LettaMessage`, depending on what was specified in
|
|
886
|
+
* the request.
|
|
607
887
|
*
|
|
608
|
-
*
|
|
888
|
+
* Attributes: messages (List[Union[Message, LettaMessage]]): The messages returned
|
|
889
|
+
* by the agent. usage (LettaUsageStatistics): The usage statistics
|
|
609
890
|
*/
|
|
610
|
-
export interface
|
|
891
|
+
export interface LettaResponse {
|
|
611
892
|
/**
|
|
612
|
-
* The
|
|
893
|
+
* The messages returned by the agent.
|
|
613
894
|
*/
|
|
614
|
-
|
|
895
|
+
messages: Array<Message>;
|
|
615
896
|
|
|
616
897
|
/**
|
|
617
|
-
* The
|
|
898
|
+
* The stop reason from Letta indicating why agent loop stopped execution.
|
|
618
899
|
*/
|
|
619
|
-
|
|
900
|
+
stop_reason: LettaResponse.StopReason;
|
|
620
901
|
|
|
621
902
|
/**
|
|
622
|
-
* The
|
|
903
|
+
* The usage statistics of the agent.
|
|
623
904
|
*/
|
|
624
|
-
|
|
905
|
+
usage: LettaResponse.Usage;
|
|
906
|
+
}
|
|
625
907
|
|
|
908
|
+
export namespace LettaResponse {
|
|
626
909
|
/**
|
|
627
|
-
* The
|
|
628
|
-
* request.
|
|
910
|
+
* The stop reason from Letta indicating why agent loop stopped execution.
|
|
629
911
|
*/
|
|
630
|
-
|
|
912
|
+
export interface StopReason {
|
|
913
|
+
/**
|
|
914
|
+
* The reason why execution stopped.
|
|
915
|
+
*/
|
|
916
|
+
stop_reason: RunsAPI.StopReasonType;
|
|
917
|
+
|
|
918
|
+
/**
|
|
919
|
+
* The type of the message.
|
|
920
|
+
*/
|
|
921
|
+
message_type?: 'stop_reason';
|
|
922
|
+
}
|
|
631
923
|
|
|
632
924
|
/**
|
|
633
|
-
*
|
|
925
|
+
* The usage statistics of the agent.
|
|
634
926
|
*/
|
|
635
|
-
|
|
927
|
+
export interface Usage {
|
|
928
|
+
/**
|
|
929
|
+
* The number of tokens generated by the agent.
|
|
930
|
+
*/
|
|
931
|
+
completion_tokens?: number;
|
|
932
|
+
|
|
933
|
+
message_type?: 'usage_statistics';
|
|
934
|
+
|
|
935
|
+
/**
|
|
936
|
+
* The number of tokens in the prompt.
|
|
937
|
+
*/
|
|
938
|
+
prompt_tokens?: number;
|
|
939
|
+
|
|
940
|
+
/**
|
|
941
|
+
* The background task run IDs associated with the agent interaction
|
|
942
|
+
*/
|
|
943
|
+
run_ids?: Array<string> | null;
|
|
944
|
+
|
|
945
|
+
/**
|
|
946
|
+
* The number of steps taken by the agent.
|
|
947
|
+
*/
|
|
948
|
+
step_count?: number;
|
|
636
949
|
|
|
950
|
+
/**
|
|
951
|
+
* The total number of tokens processed by the agent.
|
|
952
|
+
*/
|
|
953
|
+
total_tokens?: number;
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
export interface LettaStreamingRequest {
|
|
637
958
|
/**
|
|
638
|
-
* The
|
|
959
|
+
* @deprecated The name of the message argument in the designated message tool.
|
|
960
|
+
* Still supported for legacy agent types, but deprecated for letta_v1_agent
|
|
961
|
+
* onward.
|
|
639
962
|
*/
|
|
640
|
-
|
|
963
|
+
assistant_message_tool_kwarg?: string;
|
|
641
964
|
|
|
642
965
|
/**
|
|
643
|
-
* The
|
|
966
|
+
* @deprecated The name of the designated message tool. Still supported for legacy
|
|
967
|
+
* agent types, but deprecated for letta_v1_agent onward.
|
|
644
968
|
*/
|
|
645
|
-
|
|
646
|
-
| TextContent
|
|
647
|
-
| ImageContent
|
|
648
|
-
| ToolCallContent
|
|
649
|
-
| ToolReturnContent
|
|
650
|
-
| ReasoningContent
|
|
651
|
-
| RedactedReasoningContent
|
|
652
|
-
| OmittedReasoningContent
|
|
653
|
-
> | null;
|
|
969
|
+
assistant_message_tool_name?: string;
|
|
654
970
|
|
|
655
971
|
/**
|
|
656
|
-
*
|
|
972
|
+
* Whether to process the request in the background (only used when
|
|
973
|
+
* streaming=true).
|
|
657
974
|
*/
|
|
658
|
-
|
|
975
|
+
background?: boolean;
|
|
659
976
|
|
|
660
977
|
/**
|
|
661
|
-
*
|
|
978
|
+
* @deprecated If set to True, enables reasoning before responses or tool calls
|
|
979
|
+
* from the agent.
|
|
662
980
|
*/
|
|
663
|
-
|
|
981
|
+
enable_thinking?: string;
|
|
664
982
|
|
|
665
983
|
/**
|
|
666
|
-
*
|
|
984
|
+
* Whether to include periodic keepalive ping messages in the stream to prevent
|
|
985
|
+
* connection timeouts (only used when streaming=true).
|
|
667
986
|
*/
|
|
668
|
-
|
|
987
|
+
include_pings?: boolean;
|
|
669
988
|
|
|
670
989
|
/**
|
|
671
|
-
*
|
|
990
|
+
* Only return specified message types in the response. If `None` (default) returns
|
|
991
|
+
* all messages.
|
|
672
992
|
*/
|
|
673
|
-
|
|
993
|
+
include_return_message_types?: Array<MessageType> | null;
|
|
674
994
|
|
|
675
995
|
/**
|
|
676
|
-
*
|
|
996
|
+
* Syntactic sugar for a single user message. Equivalent to messages=[{'role':
|
|
997
|
+
* 'user', 'content': input}].
|
|
677
998
|
*/
|
|
678
|
-
|
|
999
|
+
input?:
|
|
1000
|
+
| string
|
|
1001
|
+
| Array<
|
|
1002
|
+
| TextContent
|
|
1003
|
+
| ImageContent
|
|
1004
|
+
| ToolCallContent
|
|
1005
|
+
| ToolReturnContent
|
|
1006
|
+
| ReasoningContent
|
|
1007
|
+
| RedactedReasoningContent
|
|
1008
|
+
| OmittedReasoningContent
|
|
1009
|
+
| LettaStreamingRequest.SummarizedReasoningContent
|
|
1010
|
+
>
|
|
1011
|
+
| null;
|
|
679
1012
|
|
|
680
1013
|
/**
|
|
681
|
-
*
|
|
1014
|
+
* Maximum number of steps the agent should take to process the request.
|
|
682
1015
|
*/
|
|
683
|
-
|
|
1016
|
+
max_steps?: number;
|
|
684
1017
|
|
|
685
1018
|
/**
|
|
686
|
-
* The
|
|
1019
|
+
* The messages to be sent to the agent.
|
|
687
1020
|
*/
|
|
688
|
-
|
|
1021
|
+
messages?: Array<AgentsAPI.MessageCreate | ApprovalCreate> | null;
|
|
689
1022
|
|
|
690
1023
|
/**
|
|
691
|
-
*
|
|
692
|
-
*
|
|
1024
|
+
* Flag to determine if individual tokens should be streamed, rather than streaming
|
|
1025
|
+
* per step (only used when streaming=true).
|
|
693
1026
|
*/
|
|
694
|
-
|
|
1027
|
+
stream_tokens?: boolean;
|
|
695
1028
|
|
|
696
1029
|
/**
|
|
697
|
-
*
|
|
1030
|
+
* If True, returns a streaming response (Server-Sent Events). If False (default),
|
|
1031
|
+
* returns a complete response.
|
|
698
1032
|
*/
|
|
699
|
-
|
|
1033
|
+
streaming?: boolean;
|
|
700
1034
|
|
|
701
1035
|
/**
|
|
702
|
-
*
|
|
1036
|
+
* @deprecated Whether the server should parse specific tool call arguments
|
|
1037
|
+
* (default `send_message`) as `AssistantMessage` objects. Still supported for
|
|
1038
|
+
* legacy agent types, but deprecated for letta_v1_agent onward.
|
|
703
1039
|
*/
|
|
704
|
-
|
|
1040
|
+
use_assistant_message?: boolean;
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
export namespace LettaStreamingRequest {
|
|
1044
|
+
/**
|
|
1045
|
+
* The style of reasoning content returned by the OpenAI Responses API
|
|
1046
|
+
*/
|
|
1047
|
+
export interface SummarizedReasoningContent {
|
|
1048
|
+
/**
|
|
1049
|
+
* The unique identifier for this reasoning step.
|
|
1050
|
+
*/
|
|
1051
|
+
id: string;
|
|
1052
|
+
|
|
1053
|
+
/**
|
|
1054
|
+
* Summaries of the reasoning content.
|
|
1055
|
+
*/
|
|
1056
|
+
summary: Array<SummarizedReasoningContent.Summary>;
|
|
1057
|
+
|
|
1058
|
+
/**
|
|
1059
|
+
* The encrypted reasoning content.
|
|
1060
|
+
*/
|
|
1061
|
+
encrypted_content?: string;
|
|
1062
|
+
|
|
1063
|
+
/**
|
|
1064
|
+
* Indicates this is a summarized reasoning step.
|
|
1065
|
+
*/
|
|
1066
|
+
type?: 'summarized_reasoning';
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
export namespace SummarizedReasoningContent {
|
|
1070
|
+
export interface Summary {
|
|
1071
|
+
/**
|
|
1072
|
+
* The index of the summary part.
|
|
1073
|
+
*/
|
|
1074
|
+
index: number;
|
|
1075
|
+
|
|
1076
|
+
/**
|
|
1077
|
+
* The text of the summary part.
|
|
1078
|
+
*/
|
|
1079
|
+
text: string;
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
/**
|
|
1085
|
+
* Streaming response type for Server-Sent Events (SSE) endpoints. Each event in
|
|
1086
|
+
* the stream will be one of these types.
|
|
1087
|
+
*/
|
|
1088
|
+
export type LettaStreamingResponse =
|
|
1089
|
+
| SystemMessage
|
|
1090
|
+
| UserMessage
|
|
1091
|
+
| ReasoningMessage
|
|
1092
|
+
| HiddenReasoningMessage
|
|
1093
|
+
| ToolCallMessage
|
|
1094
|
+
| ToolsAPI.ToolReturnMessage
|
|
1095
|
+
| AssistantMessage
|
|
1096
|
+
| ApprovalRequestMessage
|
|
1097
|
+
| ApprovalResponseMessage
|
|
1098
|
+
| LettaStreamingResponse.LettaPing
|
|
1099
|
+
| LettaStreamingResponse.LettaStopReason
|
|
1100
|
+
| LettaStreamingResponse.LettaUsageStatistics;
|
|
705
1101
|
|
|
1102
|
+
export namespace LettaStreamingResponse {
|
|
706
1103
|
/**
|
|
707
|
-
*
|
|
1104
|
+
* Ping messages are a keep-alive to prevent SSE streams from timing out during
|
|
1105
|
+
* long running requests.
|
|
708
1106
|
*/
|
|
709
|
-
|
|
1107
|
+
export interface LettaPing {
|
|
1108
|
+
/**
|
|
1109
|
+
* The type of the message.
|
|
1110
|
+
*/
|
|
1111
|
+
message_type: 'ping';
|
|
1112
|
+
}
|
|
710
1113
|
|
|
711
1114
|
/**
|
|
712
|
-
* The
|
|
1115
|
+
* The stop reason from Letta indicating why agent loop stopped execution.
|
|
713
1116
|
*/
|
|
714
|
-
|
|
1117
|
+
export interface LettaStopReason {
|
|
1118
|
+
/**
|
|
1119
|
+
* The reason why execution stopped.
|
|
1120
|
+
*/
|
|
1121
|
+
stop_reason: RunsAPI.StopReasonType;
|
|
715
1122
|
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
1123
|
+
/**
|
|
1124
|
+
* The type of the message.
|
|
1125
|
+
*/
|
|
1126
|
+
message_type?: 'stop_reason';
|
|
1127
|
+
}
|
|
720
1128
|
|
|
721
1129
|
/**
|
|
722
|
-
*
|
|
1130
|
+
* Usage statistics for the agent interaction.
|
|
1131
|
+
*
|
|
1132
|
+
* Attributes: completion_tokens (int): The number of tokens generated by the
|
|
1133
|
+
* agent. prompt_tokens (int): The number of tokens in the prompt. total_tokens
|
|
1134
|
+
* (int): The total number of tokens processed by the agent. step_count (int): The
|
|
1135
|
+
* number of steps taken by the agent.
|
|
723
1136
|
*/
|
|
724
|
-
|
|
1137
|
+
export interface LettaUsageStatistics {
|
|
1138
|
+
/**
|
|
1139
|
+
* The number of tokens generated by the agent.
|
|
1140
|
+
*/
|
|
1141
|
+
completion_tokens?: number;
|
|
725
1142
|
|
|
726
|
-
|
|
727
|
-
* The timestamp when the object was last updated.
|
|
728
|
-
*/
|
|
729
|
-
updated_at?: string | null;
|
|
730
|
-
}
|
|
1143
|
+
message_type?: 'usage_statistics';
|
|
731
1144
|
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
1145
|
+
/**
|
|
1146
|
+
* The number of tokens in the prompt.
|
|
1147
|
+
*/
|
|
1148
|
+
prompt_tokens?: number;
|
|
735
1149
|
|
|
736
|
-
|
|
1150
|
+
/**
|
|
1151
|
+
* The background task run IDs associated with the agent interaction
|
|
1152
|
+
*/
|
|
1153
|
+
run_ids?: Array<string> | null;
|
|
737
1154
|
|
|
738
|
-
|
|
1155
|
+
/**
|
|
1156
|
+
* The number of steps taken by the agent.
|
|
1157
|
+
*/
|
|
1158
|
+
step_count?: number;
|
|
739
1159
|
|
|
740
|
-
|
|
1160
|
+
/**
|
|
1161
|
+
* The total number of tokens processed by the agent.
|
|
1162
|
+
*/
|
|
1163
|
+
total_tokens?: number;
|
|
741
1164
|
}
|
|
1165
|
+
}
|
|
742
1166
|
|
|
743
|
-
|
|
744
|
-
export interface Function {
|
|
745
|
-
arguments: string;
|
|
746
|
-
|
|
747
|
-
name: string;
|
|
1167
|
+
export type LettaUserMessageContentUnion = TextContent | ImageContent;
|
|
748
1168
|
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
1169
|
+
/**
|
|
1170
|
+
* A message generated by the system. Never streamed back on a response, only used
|
|
1171
|
+
* for cursor pagination.
|
|
1172
|
+
*
|
|
1173
|
+
* Args: id (str): The ID of the message date (datetime): The date the message was
|
|
1174
|
+
* created in ISO format name (Optional[str]): The name of the sender of the
|
|
1175
|
+
* message content (str): The message content sent by the system
|
|
1176
|
+
*/
|
|
1177
|
+
export type Message =
|
|
1178
|
+
| SystemMessage
|
|
1179
|
+
| UserMessage
|
|
1180
|
+
| ReasoningMessage
|
|
1181
|
+
| HiddenReasoningMessage
|
|
1182
|
+
| ToolCallMessage
|
|
1183
|
+
| ToolsAPI.ToolReturnMessage
|
|
1184
|
+
| AssistantMessage
|
|
1185
|
+
| ApprovalRequestMessage
|
|
1186
|
+
| ApprovalResponseMessage
|
|
1187
|
+
| SummaryMessage
|
|
1188
|
+
| EventMessage;
|
|
753
1189
|
|
|
754
1190
|
export type MessageRole = 'assistant' | 'user' | 'tool' | 'function' | 'system' | 'approval';
|
|
755
1191
|
|
|
@@ -764,13 +1200,25 @@ export type MessageType =
|
|
|
764
1200
|
| 'approval_request_message'
|
|
765
1201
|
| 'approval_response_message';
|
|
766
1202
|
|
|
1203
|
+
/**
|
|
1204
|
+
* A placeholder for reasoning content we know is present, but isn't returned by
|
|
1205
|
+
* the provider (e.g. OpenAI GPT-5 on ChatCompletions)
|
|
1206
|
+
*/
|
|
767
1207
|
export interface OmittedReasoningContent {
|
|
1208
|
+
/**
|
|
1209
|
+
* A unique identifier for this reasoning step.
|
|
1210
|
+
*/
|
|
1211
|
+
signature?: string | null;
|
|
1212
|
+
|
|
768
1213
|
/**
|
|
769
1214
|
* Indicates this is an omitted reasoning step.
|
|
770
1215
|
*/
|
|
771
1216
|
type?: 'omitted_reasoning';
|
|
772
1217
|
}
|
|
773
1218
|
|
|
1219
|
+
/**
|
|
1220
|
+
* Sent via the Anthropic Messages API
|
|
1221
|
+
*/
|
|
774
1222
|
export interface ReasoningContent {
|
|
775
1223
|
/**
|
|
776
1224
|
* Whether the reasoning content was generated by a reasoner model that processed
|
|
@@ -835,6 +1283,9 @@ export interface ReasoningMessage {
|
|
|
835
1283
|
step_id?: string | null;
|
|
836
1284
|
}
|
|
837
1285
|
|
|
1286
|
+
/**
|
|
1287
|
+
* Sent via the Anthropic Messages API
|
|
1288
|
+
*/
|
|
838
1289
|
export interface RedactedReasoningContent {
|
|
839
1290
|
/**
|
|
840
1291
|
* The redacted or filtered intermediate reasoning content.
|
|
@@ -848,20 +1299,30 @@ export interface RedactedReasoningContent {
|
|
|
848
1299
|
}
|
|
849
1300
|
|
|
850
1301
|
/**
|
|
851
|
-
* Representation of a run
|
|
852
|
-
*
|
|
853
|
-
*
|
|
854
|
-
* Parameters: id (str): The unique identifier of the run (prefixed with 'run-').
|
|
855
|
-
* status (JobStatus): The status of the run. created_at (datetime): The unix
|
|
856
|
-
* timestamp of when the run was created. completed_at (datetime): The unix
|
|
857
|
-
* timestamp of when the run was completed. user_id (str): The unique identifier of
|
|
858
|
-
* the user associated with the run.
|
|
1302
|
+
* Representation of a run - a conversation or processing session for an agent.
|
|
1303
|
+
* Runs track when agents process messages and maintain the relationship between
|
|
1304
|
+
* agents, steps, and messages.
|
|
859
1305
|
*/
|
|
860
1306
|
export interface Run {
|
|
861
1307
|
/**
|
|
862
1308
|
* The human-friendly ID of the Run
|
|
863
1309
|
*/
|
|
864
|
-
id
|
|
1310
|
+
id: string;
|
|
1311
|
+
|
|
1312
|
+
/**
|
|
1313
|
+
* The unique identifier of the agent associated with the run.
|
|
1314
|
+
*/
|
|
1315
|
+
agent_id: string;
|
|
1316
|
+
|
|
1317
|
+
/**
|
|
1318
|
+
* Whether the run was created in background mode.
|
|
1319
|
+
*/
|
|
1320
|
+
background?: boolean | null;
|
|
1321
|
+
|
|
1322
|
+
/**
|
|
1323
|
+
* The base template ID that the run belongs to.
|
|
1324
|
+
*/
|
|
1325
|
+
base_template_id?: string | null;
|
|
865
1326
|
|
|
866
1327
|
/**
|
|
867
1328
|
* Optional error message from attempting to POST the callback endpoint.
|
|
@@ -879,34 +1340,22 @@ export interface Run {
|
|
|
879
1340
|
callback_status_code?: number | null;
|
|
880
1341
|
|
|
881
1342
|
/**
|
|
882
|
-
* If set, POST to this URL when the
|
|
1343
|
+
* If set, POST to this URL when the run completes.
|
|
883
1344
|
*/
|
|
884
1345
|
callback_url?: string | null;
|
|
885
1346
|
|
|
886
1347
|
/**
|
|
887
|
-
* The
|
|
1348
|
+
* The timestamp when the run was completed.
|
|
888
1349
|
*/
|
|
889
1350
|
completed_at?: string | null;
|
|
890
1351
|
|
|
891
1352
|
/**
|
|
892
|
-
* The
|
|
1353
|
+
* The timestamp when the run was created.
|
|
893
1354
|
*/
|
|
894
1355
|
created_at?: string;
|
|
895
1356
|
|
|
896
1357
|
/**
|
|
897
|
-
*
|
|
898
|
-
*/
|
|
899
|
-
created_by_id?: string | null;
|
|
900
|
-
|
|
901
|
-
job_type?: JobType;
|
|
902
|
-
|
|
903
|
-
/**
|
|
904
|
-
* The id of the user that made this object.
|
|
905
|
-
*/
|
|
906
|
-
last_updated_by_id?: string | null;
|
|
907
|
-
|
|
908
|
-
/**
|
|
909
|
-
* The metadata of the job.
|
|
1358
|
+
* Additional metadata for the run.
|
|
910
1359
|
*/
|
|
911
1360
|
metadata?: { [key: string]: unknown } | null;
|
|
912
1361
|
|
|
@@ -916,9 +1365,9 @@ export interface Run {
|
|
|
916
1365
|
request_config?: Run.RequestConfig | null;
|
|
917
1366
|
|
|
918
1367
|
/**
|
|
919
|
-
* The status of the
|
|
1368
|
+
* The current status of the run.
|
|
920
1369
|
*/
|
|
921
|
-
status?:
|
|
1370
|
+
status?: 'created' | 'running' | 'completed' | 'failed' | 'cancelled';
|
|
922
1371
|
|
|
923
1372
|
/**
|
|
924
1373
|
* The reason why the run was stopped.
|
|
@@ -934,11 +1383,6 @@ export interface Run {
|
|
|
934
1383
|
* Time to first token for a run in nanoseconds
|
|
935
1384
|
*/
|
|
936
1385
|
ttft_ns?: number | null;
|
|
937
|
-
|
|
938
|
-
/**
|
|
939
|
-
* The timestamp when the object was last updated.
|
|
940
|
-
*/
|
|
941
|
-
updated_at?: string | null;
|
|
942
1386
|
}
|
|
943
1387
|
|
|
944
1388
|
export namespace Run {
|
|
@@ -970,6 +1414,34 @@ export namespace Run {
|
|
|
970
1414
|
}
|
|
971
1415
|
}
|
|
972
1416
|
|
|
1417
|
+
/**
|
|
1418
|
+
* A message representing a summary of the conversation. Sent to the LLM as a user
|
|
1419
|
+
* or system message depending on the provider.
|
|
1420
|
+
*/
|
|
1421
|
+
export interface SummaryMessage {
|
|
1422
|
+
id: string;
|
|
1423
|
+
|
|
1424
|
+
date: string;
|
|
1425
|
+
|
|
1426
|
+
summary: string;
|
|
1427
|
+
|
|
1428
|
+
is_err?: boolean | null;
|
|
1429
|
+
|
|
1430
|
+
message_type?: 'summary';
|
|
1431
|
+
|
|
1432
|
+
name?: string | null;
|
|
1433
|
+
|
|
1434
|
+
otid?: string | null;
|
|
1435
|
+
|
|
1436
|
+
run_id?: string | null;
|
|
1437
|
+
|
|
1438
|
+
sender_id?: string | null;
|
|
1439
|
+
|
|
1440
|
+
seq_id?: number | null;
|
|
1441
|
+
|
|
1442
|
+
step_id?: string | null;
|
|
1443
|
+
}
|
|
1444
|
+
|
|
973
1445
|
/**
|
|
974
1446
|
* A message generated by the system. Never streamed back on a response, only used
|
|
975
1447
|
* for cursor pagination.
|
|
@@ -1014,6 +1486,11 @@ export interface TextContent {
|
|
|
1014
1486
|
*/
|
|
1015
1487
|
text: string;
|
|
1016
1488
|
|
|
1489
|
+
/**
|
|
1490
|
+
* Stores a unique identifier for any reasoning associated with this text content.
|
|
1491
|
+
*/
|
|
1492
|
+
signature?: string | null;
|
|
1493
|
+
|
|
1017
1494
|
/**
|
|
1018
1495
|
* The type of the message.
|
|
1019
1496
|
*/
|
|
@@ -1045,6 +1522,11 @@ export interface ToolCallContent {
|
|
|
1045
1522
|
*/
|
|
1046
1523
|
name: string;
|
|
1047
1524
|
|
|
1525
|
+
/**
|
|
1526
|
+
* Stores a unique identifier for any reasoning associated with this tool call.
|
|
1527
|
+
*/
|
|
1528
|
+
signature?: string | null;
|
|
1529
|
+
|
|
1048
1530
|
/**
|
|
1049
1531
|
* Indicates this content represents a tool call event.
|
|
1050
1532
|
*/
|
|
@@ -1072,6 +1554,9 @@ export interface ToolCallMessage {
|
|
|
1072
1554
|
|
|
1073
1555
|
date: string;
|
|
1074
1556
|
|
|
1557
|
+
/**
|
|
1558
|
+
* @deprecated
|
|
1559
|
+
*/
|
|
1075
1560
|
tool_call: ToolCall | ToolCallDelta;
|
|
1076
1561
|
|
|
1077
1562
|
is_err?: boolean | null;
|
|
@@ -1092,23 +1577,25 @@ export interface ToolCallMessage {
|
|
|
1092
1577
|
seq_id?: number | null;
|
|
1093
1578
|
|
|
1094
1579
|
step_id?: string | null;
|
|
1580
|
+
|
|
1581
|
+
tool_calls?: Array<ToolCall> | ToolCallDelta | null;
|
|
1095
1582
|
}
|
|
1096
1583
|
|
|
1097
1584
|
export interface ToolReturn {
|
|
1098
|
-
/**
|
|
1099
|
-
* The status of the tool call
|
|
1100
|
-
*/
|
|
1101
1585
|
status: 'success' | 'error';
|
|
1102
1586
|
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1587
|
+
tool_call_id: string;
|
|
1588
|
+
|
|
1589
|
+
tool_return: string;
|
|
1590
|
+
|
|
1106
1591
|
stderr?: Array<string> | null;
|
|
1107
1592
|
|
|
1593
|
+
stdout?: Array<string> | null;
|
|
1594
|
+
|
|
1108
1595
|
/**
|
|
1109
|
-
*
|
|
1596
|
+
* The message type to be created.
|
|
1110
1597
|
*/
|
|
1111
|
-
|
|
1598
|
+
type?: 'tool';
|
|
1112
1599
|
}
|
|
1113
1600
|
|
|
1114
1601
|
export interface ToolReturnContent {
|
|
@@ -1159,408 +1646,264 @@ export interface UpdateSystemMessage {
|
|
|
1159
1646
|
message_type?: 'system_message';
|
|
1160
1647
|
}
|
|
1161
1648
|
|
|
1162
|
-
export interface UpdateUserMessage {
|
|
1163
|
-
/**
|
|
1164
|
-
* The message content sent by the user (can be a string or an array of multi-modal
|
|
1165
|
-
* content parts)
|
|
1166
|
-
*/
|
|
1167
|
-
content: Array<LettaUserMessageContentUnion> | string;
|
|
1168
|
-
|
|
1169
|
-
message_type?: 'user_message';
|
|
1170
|
-
}
|
|
1171
|
-
|
|
1172
|
-
/**
|
|
1173
|
-
* A message sent by the user. Never streamed back on a response, only used for
|
|
1174
|
-
* cursor pagination.
|
|
1175
|
-
*
|
|
1176
|
-
* Args: id (str): The ID of the message date (datetime): The date the message was
|
|
1177
|
-
* created in ISO format name (Optional[str]): The name of the sender of the
|
|
1178
|
-
* message content (Union[str, List[LettaUserMessageContentUnion]]): The message
|
|
1179
|
-
* content sent by the user (can be a string or an array of multi-modal content
|
|
1180
|
-
* parts)
|
|
1181
|
-
*/
|
|
1182
|
-
export interface UserMessage {
|
|
1183
|
-
id: string;
|
|
1184
|
-
|
|
1185
|
-
/**
|
|
1186
|
-
* The message content sent by the user (can be a string or an array of multi-modal
|
|
1187
|
-
* content parts)
|
|
1188
|
-
*/
|
|
1189
|
-
content: Array<LettaUserMessageContentUnion> | string;
|
|
1190
|
-
|
|
1191
|
-
date: string;
|
|
1192
|
-
|
|
1193
|
-
is_err?: boolean | null;
|
|
1194
|
-
|
|
1195
|
-
/**
|
|
1196
|
-
* The type of the message.
|
|
1197
|
-
*/
|
|
1198
|
-
message_type?: 'user_message';
|
|
1199
|
-
|
|
1200
|
-
name?: string | null;
|
|
1201
|
-
|
|
1202
|
-
otid?: string | null;
|
|
1203
|
-
|
|
1204
|
-
run_id?: string | null;
|
|
1205
|
-
|
|
1206
|
-
sender_id?: string | null;
|
|
1207
|
-
|
|
1208
|
-
seq_id?: number | null;
|
|
1209
|
-
|
|
1210
|
-
step_id?: string | null;
|
|
1211
|
-
}
|
|
1212
|
-
|
|
1213
|
-
/**
|
|
1214
|
-
* A message generated by the system. Never streamed back on a response, only used
|
|
1215
|
-
* for cursor pagination.
|
|
1216
|
-
*
|
|
1217
|
-
* Args: id (str): The ID of the message date (datetime): The date the message was
|
|
1218
|
-
* created in ISO format name (Optional[str]): The name of the sender of the
|
|
1219
|
-
* message content (str): The message content sent by the system
|
|
1220
|
-
*/
|
|
1221
|
-
export type MessageUpdateResponse =
|
|
1222
|
-
| SystemMessage
|
|
1223
|
-
| UserMessage
|
|
1224
|
-
| ReasoningMessage
|
|
1225
|
-
| HiddenReasoningMessage
|
|
1226
|
-
| ToolCallMessage
|
|
1227
|
-
| ToolsAPI.ToolReturnMessage
|
|
1228
|
-
| AssistantMessage
|
|
1229
|
-
| ApprovalRequestMessage
|
|
1230
|
-
| ApprovalResponseMessage;
|
|
1231
|
-
|
|
1232
|
-
export type MessageListResponse = Array<LettaMessageUnion>;
|
|
1233
|
-
|
|
1234
|
-
export type MessageCancelResponse = { [key: string]: unknown };
|
|
1235
|
-
|
|
1236
|
-
export type MessagePreviewRawPayloadResponse = { [key: string]: unknown };
|
|
1237
|
-
|
|
1238
|
-
export type MessageSearchResponse = Array<MessageSearchResponse.MessageSearchResponseItem>;
|
|
1239
|
-
|
|
1240
|
-
export namespace MessageSearchResponse {
|
|
1241
|
-
/**
|
|
1242
|
-
* Result from a message search operation with scoring details.
|
|
1243
|
-
*/
|
|
1244
|
-
export interface MessageSearchResponseItem {
|
|
1245
|
-
/**
|
|
1246
|
-
* The embedded content (LLM-friendly)
|
|
1247
|
-
*/
|
|
1248
|
-
embedded_text: string;
|
|
1249
|
-
|
|
1250
|
-
/**
|
|
1251
|
-
* The raw message object
|
|
1252
|
-
*/
|
|
1253
|
-
message: MessagesAPI.Message;
|
|
1254
|
-
|
|
1255
|
-
/**
|
|
1256
|
-
* Reciprocal Rank Fusion combined score
|
|
1257
|
-
*/
|
|
1258
|
-
rrf_score: number;
|
|
1259
|
-
|
|
1260
|
-
/**
|
|
1261
|
-
* Full-text search rank position if FTS was used
|
|
1262
|
-
*/
|
|
1263
|
-
fts_rank?: number | null;
|
|
1264
|
-
|
|
1265
|
-
/**
|
|
1266
|
-
* Vector search rank position if vector search was used
|
|
1267
|
-
*/
|
|
1268
|
-
vector_rank?: number | null;
|
|
1269
|
-
}
|
|
1270
|
-
}
|
|
1271
|
-
|
|
1272
|
-
export type MessageSendStreamResponse = unknown;
|
|
1273
|
-
|
|
1274
|
-
export type MessageUpdateParams =
|
|
1275
|
-
| MessageUpdateParams.UpdateSystemMessage
|
|
1276
|
-
| MessageUpdateParams.UpdateUserMessage
|
|
1277
|
-
| MessageUpdateParams.UpdateReasoningMessage
|
|
1278
|
-
| MessageUpdateParams.UpdateAssistantMessage;
|
|
1649
|
+
export interface UpdateUserMessage {
|
|
1650
|
+
/**
|
|
1651
|
+
* The message content sent by the user (can be a string or an array of multi-modal
|
|
1652
|
+
* content parts)
|
|
1653
|
+
*/
|
|
1654
|
+
content: Array<LettaUserMessageContentUnion> | string;
|
|
1279
1655
|
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
/**
|
|
1283
|
-
* Path param:
|
|
1284
|
-
*/
|
|
1285
|
-
agent_id: string;
|
|
1656
|
+
message_type?: 'user_message';
|
|
1657
|
+
}
|
|
1286
1658
|
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1659
|
+
/**
|
|
1660
|
+
* A message sent by the user. Never streamed back on a response, only used for
|
|
1661
|
+
* cursor pagination.
|
|
1662
|
+
*
|
|
1663
|
+
* Args: id (str): The ID of the message date (datetime): The date the message was
|
|
1664
|
+
* created in ISO format name (Optional[str]): The name of the sender of the
|
|
1665
|
+
* message content (Union[str, List[LettaUserMessageContentUnion]]): The message
|
|
1666
|
+
* content sent by the user (can be a string or an array of multi-modal content
|
|
1667
|
+
* parts)
|
|
1668
|
+
*/
|
|
1669
|
+
export interface UserMessage {
|
|
1670
|
+
id: string;
|
|
1292
1671
|
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1672
|
+
/**
|
|
1673
|
+
* The message content sent by the user (can be a string or an array of multi-modal
|
|
1674
|
+
* content parts)
|
|
1675
|
+
*/
|
|
1676
|
+
content: Array<LettaUserMessageContentUnion> | string;
|
|
1298
1677
|
|
|
1299
|
-
|
|
1300
|
-
/**
|
|
1301
|
-
* Path param:
|
|
1302
|
-
*/
|
|
1303
|
-
agent_id: string;
|
|
1678
|
+
date: string;
|
|
1304
1679
|
|
|
1305
|
-
|
|
1306
|
-
* Body param: The message content sent by the user (can be a string or an array of
|
|
1307
|
-
* multi-modal content parts)
|
|
1308
|
-
*/
|
|
1309
|
-
content: Array<LettaUserMessageContentUnion> | string;
|
|
1680
|
+
is_err?: boolean | null;
|
|
1310
1681
|
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
}
|
|
1682
|
+
/**
|
|
1683
|
+
* The type of the message.
|
|
1684
|
+
*/
|
|
1685
|
+
message_type?: 'user_message';
|
|
1316
1686
|
|
|
1317
|
-
|
|
1318
|
-
/**
|
|
1319
|
-
* Path param:
|
|
1320
|
-
*/
|
|
1321
|
-
agent_id: string;
|
|
1687
|
+
name?: string | null;
|
|
1322
1688
|
|
|
1323
|
-
|
|
1324
|
-
* Body param:
|
|
1325
|
-
*/
|
|
1326
|
-
reasoning: string;
|
|
1689
|
+
otid?: string | null;
|
|
1327
1690
|
|
|
1328
|
-
|
|
1329
|
-
* Body param:
|
|
1330
|
-
*/
|
|
1331
|
-
message_type?: 'reasoning_message';
|
|
1332
|
-
}
|
|
1691
|
+
run_id?: string | null;
|
|
1333
1692
|
|
|
1334
|
-
|
|
1335
|
-
/**
|
|
1336
|
-
* Path param:
|
|
1337
|
-
*/
|
|
1338
|
-
agent_id: string;
|
|
1693
|
+
sender_id?: string | null;
|
|
1339
1694
|
|
|
1340
|
-
|
|
1341
|
-
* Body param: The message content sent by the assistant (can be a string or an
|
|
1342
|
-
* array of content parts)
|
|
1343
|
-
*/
|
|
1344
|
-
content: Array<LettaAssistantMessageContentUnion> | string;
|
|
1695
|
+
seq_id?: number | null;
|
|
1345
1696
|
|
|
1346
|
-
|
|
1347
|
-
* Body param:
|
|
1348
|
-
*/
|
|
1349
|
-
message_type?: 'assistant_message';
|
|
1350
|
-
}
|
|
1697
|
+
step_id?: string | null;
|
|
1351
1698
|
}
|
|
1352
1699
|
|
|
1353
|
-
export
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
*/
|
|
1357
|
-
after?: string | null;
|
|
1700
|
+
export type MessageCancelResponse = { [key: string]: unknown };
|
|
1701
|
+
|
|
1702
|
+
export type MessageCreateParams = MessageCreateParamsNonStreaming | MessageCreateParamsStreaming;
|
|
1358
1703
|
|
|
1704
|
+
export interface MessageCreateParamsBase {
|
|
1359
1705
|
/**
|
|
1360
|
-
* The name of the message argument.
|
|
1706
|
+
* @deprecated The name of the message argument in the designated message tool.
|
|
1707
|
+
* Still supported for legacy agent types, but deprecated for letta_v1_agent
|
|
1708
|
+
* onward.
|
|
1361
1709
|
*/
|
|
1362
1710
|
assistant_message_tool_kwarg?: string;
|
|
1363
1711
|
|
|
1364
1712
|
/**
|
|
1365
|
-
* The name of the designated message tool.
|
|
1713
|
+
* @deprecated The name of the designated message tool. Still supported for legacy
|
|
1714
|
+
* agent types, but deprecated for letta_v1_agent onward.
|
|
1366
1715
|
*/
|
|
1367
1716
|
assistant_message_tool_name?: string;
|
|
1368
1717
|
|
|
1369
1718
|
/**
|
|
1370
|
-
*
|
|
1719
|
+
* Whether to process the request in the background (only used when
|
|
1720
|
+
* streaming=true).
|
|
1371
1721
|
*/
|
|
1372
|
-
|
|
1722
|
+
background?: boolean;
|
|
1373
1723
|
|
|
1374
1724
|
/**
|
|
1375
|
-
*
|
|
1725
|
+
* @deprecated If set to True, enables reasoning before responses or tool calls
|
|
1726
|
+
* from the agent.
|
|
1376
1727
|
*/
|
|
1377
|
-
|
|
1728
|
+
enable_thinking?: string;
|
|
1378
1729
|
|
|
1379
1730
|
/**
|
|
1380
|
-
* Whether to include
|
|
1381
|
-
* only.
|
|
1731
|
+
* Whether to include periodic keepalive ping messages in the stream to prevent
|
|
1732
|
+
* connection timeouts (only used when streaming=true).
|
|
1382
1733
|
*/
|
|
1383
|
-
|
|
1734
|
+
include_pings?: boolean;
|
|
1384
1735
|
|
|
1385
1736
|
/**
|
|
1386
|
-
*
|
|
1737
|
+
* Only return specified message types in the response. If `None` (default) returns
|
|
1738
|
+
* all messages.
|
|
1387
1739
|
*/
|
|
1388
|
-
|
|
1740
|
+
include_return_message_types?: Array<MessageType> | null;
|
|
1389
1741
|
|
|
1390
1742
|
/**
|
|
1391
|
-
*
|
|
1743
|
+
* Syntactic sugar for a single user message. Equivalent to messages=[{'role':
|
|
1744
|
+
* 'user', 'content': input}].
|
|
1392
1745
|
*/
|
|
1393
|
-
|
|
1394
|
-
|
|
1746
|
+
input?:
|
|
1747
|
+
| string
|
|
1748
|
+
| Array<
|
|
1749
|
+
| TextContent
|
|
1750
|
+
| ImageContent
|
|
1751
|
+
| ToolCallContent
|
|
1752
|
+
| ToolReturnContent
|
|
1753
|
+
| ReasoningContent
|
|
1754
|
+
| RedactedReasoningContent
|
|
1755
|
+
| OmittedReasoningContent
|
|
1756
|
+
| MessageCreateParams.SummarizedReasoningContent
|
|
1757
|
+
>
|
|
1758
|
+
| null;
|
|
1395
1759
|
|
|
1396
|
-
export interface MessageCancelParams {
|
|
1397
1760
|
/**
|
|
1398
|
-
*
|
|
1761
|
+
* Maximum number of steps the agent should take to process the request.
|
|
1399
1762
|
*/
|
|
1400
|
-
|
|
1401
|
-
}
|
|
1763
|
+
max_steps?: number;
|
|
1402
1764
|
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1765
|
+
/**
|
|
1766
|
+
* The messages to be sent to the agent.
|
|
1767
|
+
*/
|
|
1768
|
+
messages?: Array<AgentsAPI.MessageCreate | ApprovalCreate> | null;
|
|
1406
1769
|
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
messages: Array<AgentsAPI.MessageCreate | ApprovalCreate>;
|
|
1770
|
+
/**
|
|
1771
|
+
* Flag to determine if individual tokens should be streamed, rather than streaming
|
|
1772
|
+
* per step (only used when streaming=true).
|
|
1773
|
+
*/
|
|
1774
|
+
stream_tokens?: boolean;
|
|
1413
1775
|
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1776
|
+
/**
|
|
1777
|
+
* If True, returns a streaming response (Server-Sent Events). If False (default),
|
|
1778
|
+
* returns a complete response.
|
|
1779
|
+
*/
|
|
1780
|
+
streaming?: boolean;
|
|
1418
1781
|
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1782
|
+
/**
|
|
1783
|
+
* @deprecated Whether the server should parse specific tool call arguments
|
|
1784
|
+
* (default `send_message`) as `AssistantMessage` objects. Still supported for
|
|
1785
|
+
* legacy agent types, but deprecated for letta_v1_agent onward.
|
|
1786
|
+
*/
|
|
1787
|
+
use_assistant_message?: boolean;
|
|
1788
|
+
}
|
|
1423
1789
|
|
|
1790
|
+
export namespace MessageCreateParams {
|
|
1791
|
+
/**
|
|
1792
|
+
* The style of reasoning content returned by the OpenAI Responses API
|
|
1793
|
+
*/
|
|
1794
|
+
export interface SummarizedReasoningContent {
|
|
1424
1795
|
/**
|
|
1425
|
-
*
|
|
1796
|
+
* The unique identifier for this reasoning step.
|
|
1426
1797
|
*/
|
|
1427
|
-
|
|
1798
|
+
id: string;
|
|
1428
1799
|
|
|
1429
1800
|
/**
|
|
1430
|
-
*
|
|
1431
|
-
* all messages.
|
|
1801
|
+
* Summaries of the reasoning content.
|
|
1432
1802
|
*/
|
|
1433
|
-
|
|
1803
|
+
summary: Array<SummarizedReasoningContent.Summary>;
|
|
1434
1804
|
|
|
1435
1805
|
/**
|
|
1436
|
-
*
|
|
1806
|
+
* The encrypted reasoning content.
|
|
1437
1807
|
*/
|
|
1438
|
-
|
|
1808
|
+
encrypted_content?: string;
|
|
1439
1809
|
|
|
1440
1810
|
/**
|
|
1441
|
-
*
|
|
1442
|
-
* `send_message`) as `AssistantMessage` objects.
|
|
1811
|
+
* Indicates this is a summarized reasoning step.
|
|
1443
1812
|
*/
|
|
1444
|
-
|
|
1813
|
+
type?: 'summarized_reasoning';
|
|
1445
1814
|
}
|
|
1446
1815
|
|
|
1447
|
-
export
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
* The name of the designated message tool.
|
|
1460
|
-
*/
|
|
1461
|
-
assistant_message_tool_name?: string;
|
|
1462
|
-
|
|
1463
|
-
/**
|
|
1464
|
-
* Whether to process the request in the background.
|
|
1465
|
-
*/
|
|
1466
|
-
background?: boolean;
|
|
1467
|
-
|
|
1468
|
-
/**
|
|
1469
|
-
* If set to True, enables reasoning before responses or tool calls from the agent.
|
|
1470
|
-
*/
|
|
1471
|
-
enable_thinking?: string;
|
|
1472
|
-
|
|
1473
|
-
/**
|
|
1474
|
-
* Whether to include periodic keepalive ping messages in the stream to prevent
|
|
1475
|
-
* connection timeouts.
|
|
1476
|
-
*/
|
|
1477
|
-
include_pings?: boolean;
|
|
1478
|
-
|
|
1479
|
-
/**
|
|
1480
|
-
* Only return specified message types in the response. If `None` (default) returns
|
|
1481
|
-
* all messages.
|
|
1482
|
-
*/
|
|
1483
|
-
include_return_message_types?: Array<MessageType> | null;
|
|
1484
|
-
|
|
1485
|
-
/**
|
|
1486
|
-
* Maximum number of steps the agent should take to process the request.
|
|
1487
|
-
*/
|
|
1488
|
-
max_steps?: number;
|
|
1489
|
-
|
|
1490
|
-
/**
|
|
1491
|
-
* Flag to determine if individual tokens should be streamed, rather than streaming
|
|
1492
|
-
* per step.
|
|
1493
|
-
*/
|
|
1494
|
-
stream_tokens?: boolean;
|
|
1495
|
-
|
|
1496
|
-
/**
|
|
1497
|
-
* Whether the server should parse specific tool call arguments (default
|
|
1498
|
-
* `send_message`) as `AssistantMessage` objects.
|
|
1499
|
-
*/
|
|
1500
|
-
use_assistant_message?: boolean;
|
|
1816
|
+
export namespace SummarizedReasoningContent {
|
|
1817
|
+
export interface Summary {
|
|
1818
|
+
/**
|
|
1819
|
+
* The index of the summary part.
|
|
1820
|
+
*/
|
|
1821
|
+
index: number;
|
|
1822
|
+
|
|
1823
|
+
/**
|
|
1824
|
+
* The text of the summary part.
|
|
1825
|
+
*/
|
|
1826
|
+
text: string;
|
|
1827
|
+
}
|
|
1501
1828
|
}
|
|
1829
|
+
|
|
1830
|
+
export type MessageCreateParamsNonStreaming = MessagesAPI.MessageCreateParamsNonStreaming;
|
|
1831
|
+
export type MessageCreateParamsStreaming = MessagesAPI.MessageCreateParamsStreaming;
|
|
1502
1832
|
}
|
|
1503
1833
|
|
|
1504
|
-
export interface
|
|
1834
|
+
export interface MessageCreateParamsNonStreaming extends MessageCreateParamsBase {
|
|
1505
1835
|
/**
|
|
1506
|
-
*
|
|
1836
|
+
* If True, returns a streaming response (Server-Sent Events). If False (default),
|
|
1837
|
+
* returns a complete response.
|
|
1507
1838
|
*/
|
|
1508
|
-
|
|
1839
|
+
streaming?: false;
|
|
1840
|
+
}
|
|
1509
1841
|
|
|
1842
|
+
export interface MessageCreateParamsStreaming extends MessageCreateParamsBase {
|
|
1510
1843
|
/**
|
|
1511
|
-
*
|
|
1844
|
+
* If True, returns a streaming response (Server-Sent Events). If False (default),
|
|
1845
|
+
* returns a complete response.
|
|
1512
1846
|
*/
|
|
1513
|
-
|
|
1847
|
+
streaming: true;
|
|
1848
|
+
}
|
|
1514
1849
|
|
|
1850
|
+
export interface MessageListParams extends ArrayPageParams {
|
|
1515
1851
|
/**
|
|
1516
|
-
*
|
|
1852
|
+
* @deprecated The name of the message argument.
|
|
1517
1853
|
*/
|
|
1518
|
-
|
|
1854
|
+
assistant_message_tool_kwarg?: string;
|
|
1519
1855
|
|
|
1520
1856
|
/**
|
|
1521
|
-
*
|
|
1857
|
+
* @deprecated The name of the designated message tool.
|
|
1522
1858
|
*/
|
|
1523
|
-
|
|
1859
|
+
assistant_message_tool_name?: string;
|
|
1524
1860
|
|
|
1525
1861
|
/**
|
|
1526
|
-
*
|
|
1862
|
+
* Group ID to filter messages by.
|
|
1527
1863
|
*/
|
|
1528
|
-
|
|
1864
|
+
group_id?: string | null;
|
|
1529
1865
|
|
|
1530
1866
|
/**
|
|
1531
|
-
*
|
|
1867
|
+
* Whether to include error messages and error statuses. For debugging purposes
|
|
1868
|
+
* only.
|
|
1532
1869
|
*/
|
|
1533
|
-
|
|
1870
|
+
include_err?: boolean | null;
|
|
1534
1871
|
|
|
1535
1872
|
/**
|
|
1536
|
-
*
|
|
1873
|
+
* @deprecated Whether to use assistant messages
|
|
1537
1874
|
*/
|
|
1538
|
-
|
|
1875
|
+
use_assistant_message?: boolean;
|
|
1876
|
+
}
|
|
1539
1877
|
|
|
1878
|
+
export interface MessageCancelParams {
|
|
1540
1879
|
/**
|
|
1541
|
-
*
|
|
1880
|
+
* Optional list of run IDs to cancel
|
|
1542
1881
|
*/
|
|
1543
|
-
|
|
1882
|
+
run_ids?: Array<string> | null;
|
|
1544
1883
|
}
|
|
1545
1884
|
|
|
1546
|
-
export interface
|
|
1885
|
+
export interface MessageCreateAsyncParams {
|
|
1547
1886
|
/**
|
|
1548
|
-
* The
|
|
1887
|
+
* @deprecated The name of the message argument in the designated message tool.
|
|
1888
|
+
* Still supported for legacy agent types, but deprecated for letta_v1_agent
|
|
1889
|
+
* onward.
|
|
1549
1890
|
*/
|
|
1550
|
-
|
|
1891
|
+
assistant_message_tool_kwarg?: string;
|
|
1551
1892
|
|
|
1552
1893
|
/**
|
|
1553
|
-
* The name of the message
|
|
1894
|
+
* @deprecated The name of the designated message tool. Still supported for legacy
|
|
1895
|
+
* agent types, but deprecated for letta_v1_agent onward.
|
|
1554
1896
|
*/
|
|
1555
|
-
|
|
1897
|
+
assistant_message_tool_name?: string;
|
|
1556
1898
|
|
|
1557
1899
|
/**
|
|
1558
|
-
*
|
|
1900
|
+
* Optional callback URL to POST to when the job completes
|
|
1559
1901
|
*/
|
|
1560
|
-
|
|
1902
|
+
callback_url?: string | null;
|
|
1561
1903
|
|
|
1562
1904
|
/**
|
|
1563
|
-
* If set to True, enables reasoning before responses or tool calls
|
|
1905
|
+
* @deprecated If set to True, enables reasoning before responses or tool calls
|
|
1906
|
+
* from the agent.
|
|
1564
1907
|
*/
|
|
1565
1908
|
enable_thinking?: string;
|
|
1566
1909
|
|
|
@@ -1571,90 +1914,118 @@ export interface MessageSendParams {
|
|
|
1571
1914
|
include_return_message_types?: Array<MessageType> | null;
|
|
1572
1915
|
|
|
1573
1916
|
/**
|
|
1574
|
-
*
|
|
1917
|
+
* Syntactic sugar for a single user message. Equivalent to messages=[{'role':
|
|
1918
|
+
* 'user', 'content': input}].
|
|
1575
1919
|
*/
|
|
1576
|
-
|
|
1920
|
+
input?:
|
|
1921
|
+
| string
|
|
1922
|
+
| Array<
|
|
1923
|
+
| TextContent
|
|
1924
|
+
| ImageContent
|
|
1925
|
+
| ToolCallContent
|
|
1926
|
+
| ToolReturnContent
|
|
1927
|
+
| ReasoningContent
|
|
1928
|
+
| RedactedReasoningContent
|
|
1929
|
+
| OmittedReasoningContent
|
|
1930
|
+
| MessageCreateAsyncParams.SummarizedReasoningContent
|
|
1931
|
+
>
|
|
1932
|
+
| null;
|
|
1577
1933
|
|
|
1578
1934
|
/**
|
|
1579
|
-
*
|
|
1580
|
-
* `send_message`) as `AssistantMessage` objects.
|
|
1935
|
+
* Maximum number of steps the agent should take to process the request.
|
|
1581
1936
|
*/
|
|
1582
|
-
|
|
1583
|
-
}
|
|
1937
|
+
max_steps?: number;
|
|
1584
1938
|
|
|
1585
|
-
export interface MessageSendAsyncParams {
|
|
1586
1939
|
/**
|
|
1587
1940
|
* The messages to be sent to the agent.
|
|
1588
1941
|
*/
|
|
1589
|
-
messages
|
|
1590
|
-
|
|
1591
|
-
/**
|
|
1592
|
-
* The name of the message argument in the designated message tool.
|
|
1593
|
-
*/
|
|
1594
|
-
assistant_message_tool_kwarg?: string;
|
|
1942
|
+
messages?: Array<AgentsAPI.MessageCreate | ApprovalCreate> | null;
|
|
1595
1943
|
|
|
1596
1944
|
/**
|
|
1597
|
-
*
|
|
1945
|
+
* @deprecated Whether the server should parse specific tool call arguments
|
|
1946
|
+
* (default `send_message`) as `AssistantMessage` objects. Still supported for
|
|
1947
|
+
* legacy agent types, but deprecated for letta_v1_agent onward.
|
|
1598
1948
|
*/
|
|
1599
|
-
|
|
1949
|
+
use_assistant_message?: boolean;
|
|
1950
|
+
}
|
|
1600
1951
|
|
|
1952
|
+
export namespace MessageCreateAsyncParams {
|
|
1601
1953
|
/**
|
|
1602
|
-
*
|
|
1954
|
+
* The style of reasoning content returned by the OpenAI Responses API
|
|
1603
1955
|
*/
|
|
1604
|
-
|
|
1956
|
+
export interface SummarizedReasoningContent {
|
|
1957
|
+
/**
|
|
1958
|
+
* The unique identifier for this reasoning step.
|
|
1959
|
+
*/
|
|
1960
|
+
id: string;
|
|
1605
1961
|
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1962
|
+
/**
|
|
1963
|
+
* Summaries of the reasoning content.
|
|
1964
|
+
*/
|
|
1965
|
+
summary: Array<SummarizedReasoningContent.Summary>;
|
|
1610
1966
|
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
include_return_message_types?: Array<MessageType> | null;
|
|
1967
|
+
/**
|
|
1968
|
+
* The encrypted reasoning content.
|
|
1969
|
+
*/
|
|
1970
|
+
encrypted_content?: string;
|
|
1616
1971
|
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1972
|
+
/**
|
|
1973
|
+
* Indicates this is a summarized reasoning step.
|
|
1974
|
+
*/
|
|
1975
|
+
type?: 'summarized_reasoning';
|
|
1976
|
+
}
|
|
1621
1977
|
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1978
|
+
export namespace SummarizedReasoningContent {
|
|
1979
|
+
export interface Summary {
|
|
1980
|
+
/**
|
|
1981
|
+
* The index of the summary part.
|
|
1982
|
+
*/
|
|
1983
|
+
index: number;
|
|
1984
|
+
|
|
1985
|
+
/**
|
|
1986
|
+
* The text of the summary part.
|
|
1987
|
+
*/
|
|
1988
|
+
text: string;
|
|
1989
|
+
}
|
|
1990
|
+
}
|
|
1627
1991
|
}
|
|
1628
1992
|
|
|
1629
|
-
export interface
|
|
1993
|
+
export interface MessageResetParams {
|
|
1630
1994
|
/**
|
|
1631
|
-
*
|
|
1995
|
+
* If true, adds the default initial messages after resetting.
|
|
1632
1996
|
*/
|
|
1633
|
-
|
|
1997
|
+
add_default_initial_messages?: boolean;
|
|
1998
|
+
}
|
|
1634
1999
|
|
|
2000
|
+
export interface MessageStreamParams {
|
|
1635
2001
|
/**
|
|
1636
|
-
* The name of the message argument in the designated message tool.
|
|
2002
|
+
* @deprecated The name of the message argument in the designated message tool.
|
|
2003
|
+
* Still supported for legacy agent types, but deprecated for letta_v1_agent
|
|
2004
|
+
* onward.
|
|
1637
2005
|
*/
|
|
1638
2006
|
assistant_message_tool_kwarg?: string;
|
|
1639
2007
|
|
|
1640
2008
|
/**
|
|
1641
|
-
* The name of the designated message tool.
|
|
2009
|
+
* @deprecated The name of the designated message tool. Still supported for legacy
|
|
2010
|
+
* agent types, but deprecated for letta_v1_agent onward.
|
|
1642
2011
|
*/
|
|
1643
2012
|
assistant_message_tool_name?: string;
|
|
1644
2013
|
|
|
1645
2014
|
/**
|
|
1646
|
-
* Whether to process the request in the background
|
|
2015
|
+
* Whether to process the request in the background (only used when
|
|
2016
|
+
* streaming=true).
|
|
1647
2017
|
*/
|
|
1648
2018
|
background?: boolean;
|
|
1649
2019
|
|
|
1650
2020
|
/**
|
|
1651
|
-
* If set to True, enables reasoning before responses or tool calls
|
|
2021
|
+
* @deprecated If set to True, enables reasoning before responses or tool calls
|
|
2022
|
+
* from the agent.
|
|
1652
2023
|
*/
|
|
1653
2024
|
enable_thinking?: string;
|
|
1654
2025
|
|
|
1655
2026
|
/**
|
|
1656
2027
|
* Whether to include periodic keepalive ping messages in the stream to prevent
|
|
1657
|
-
* connection timeouts.
|
|
2028
|
+
* connection timeouts (only used when streaming=true).
|
|
1658
2029
|
*/
|
|
1659
2030
|
include_pings?: boolean;
|
|
1660
2031
|
|
|
@@ -1664,39 +2035,113 @@ export interface MessageSendStreamParams {
|
|
|
1664
2035
|
*/
|
|
1665
2036
|
include_return_message_types?: Array<MessageType> | null;
|
|
1666
2037
|
|
|
2038
|
+
/**
|
|
2039
|
+
* Syntactic sugar for a single user message. Equivalent to messages=[{'role':
|
|
2040
|
+
* 'user', 'content': input}].
|
|
2041
|
+
*/
|
|
2042
|
+
input?:
|
|
2043
|
+
| string
|
|
2044
|
+
| Array<
|
|
2045
|
+
| TextContent
|
|
2046
|
+
| ImageContent
|
|
2047
|
+
| ToolCallContent
|
|
2048
|
+
| ToolReturnContent
|
|
2049
|
+
| ReasoningContent
|
|
2050
|
+
| RedactedReasoningContent
|
|
2051
|
+
| OmittedReasoningContent
|
|
2052
|
+
| MessageStreamParams.SummarizedReasoningContent
|
|
2053
|
+
>
|
|
2054
|
+
| null;
|
|
2055
|
+
|
|
1667
2056
|
/**
|
|
1668
2057
|
* Maximum number of steps the agent should take to process the request.
|
|
1669
2058
|
*/
|
|
1670
2059
|
max_steps?: number;
|
|
1671
2060
|
|
|
2061
|
+
/**
|
|
2062
|
+
* The messages to be sent to the agent.
|
|
2063
|
+
*/
|
|
2064
|
+
messages?: Array<AgentsAPI.MessageCreate | ApprovalCreate> | null;
|
|
2065
|
+
|
|
1672
2066
|
/**
|
|
1673
2067
|
* Flag to determine if individual tokens should be streamed, rather than streaming
|
|
1674
|
-
* per step.
|
|
2068
|
+
* per step (only used when streaming=true).
|
|
1675
2069
|
*/
|
|
1676
2070
|
stream_tokens?: boolean;
|
|
1677
2071
|
|
|
1678
2072
|
/**
|
|
1679
|
-
*
|
|
1680
|
-
*
|
|
2073
|
+
* If True, returns a streaming response (Server-Sent Events). If False (default),
|
|
2074
|
+
* returns a complete response.
|
|
2075
|
+
*/
|
|
2076
|
+
streaming?: boolean;
|
|
2077
|
+
|
|
2078
|
+
/**
|
|
2079
|
+
* @deprecated Whether the server should parse specific tool call arguments
|
|
2080
|
+
* (default `send_message`) as `AssistantMessage` objects. Still supported for
|
|
2081
|
+
* legacy agent types, but deprecated for letta_v1_agent onward.
|
|
1681
2082
|
*/
|
|
1682
2083
|
use_assistant_message?: boolean;
|
|
1683
2084
|
}
|
|
1684
2085
|
|
|
2086
|
+
export namespace MessageStreamParams {
|
|
2087
|
+
/**
|
|
2088
|
+
* The style of reasoning content returned by the OpenAI Responses API
|
|
2089
|
+
*/
|
|
2090
|
+
export interface SummarizedReasoningContent {
|
|
2091
|
+
/**
|
|
2092
|
+
* The unique identifier for this reasoning step.
|
|
2093
|
+
*/
|
|
2094
|
+
id: string;
|
|
2095
|
+
|
|
2096
|
+
/**
|
|
2097
|
+
* Summaries of the reasoning content.
|
|
2098
|
+
*/
|
|
2099
|
+
summary: Array<SummarizedReasoningContent.Summary>;
|
|
2100
|
+
|
|
2101
|
+
/**
|
|
2102
|
+
* The encrypted reasoning content.
|
|
2103
|
+
*/
|
|
2104
|
+
encrypted_content?: string;
|
|
2105
|
+
|
|
2106
|
+
/**
|
|
2107
|
+
* Indicates this is a summarized reasoning step.
|
|
2108
|
+
*/
|
|
2109
|
+
type?: 'summarized_reasoning';
|
|
2110
|
+
}
|
|
2111
|
+
|
|
2112
|
+
export namespace SummarizedReasoningContent {
|
|
2113
|
+
export interface Summary {
|
|
2114
|
+
/**
|
|
2115
|
+
* The index of the summary part.
|
|
2116
|
+
*/
|
|
2117
|
+
index: number;
|
|
2118
|
+
|
|
2119
|
+
/**
|
|
2120
|
+
* The text of the summary part.
|
|
2121
|
+
*/
|
|
2122
|
+
text: string;
|
|
2123
|
+
}
|
|
2124
|
+
}
|
|
2125
|
+
}
|
|
2126
|
+
|
|
1685
2127
|
export declare namespace Messages {
|
|
1686
2128
|
export {
|
|
1687
2129
|
type ApprovalCreate as ApprovalCreate,
|
|
1688
2130
|
type ApprovalRequestMessage as ApprovalRequestMessage,
|
|
1689
2131
|
type ApprovalResponseMessage as ApprovalResponseMessage,
|
|
2132
|
+
type ApprovalReturn as ApprovalReturn,
|
|
1690
2133
|
type AssistantMessage as AssistantMessage,
|
|
2134
|
+
type EventMessage as EventMessage,
|
|
1691
2135
|
type HiddenReasoningMessage as HiddenReasoningMessage,
|
|
1692
2136
|
type ImageContent as ImageContent,
|
|
2137
|
+
type InternalMessage as InternalMessage,
|
|
1693
2138
|
type JobStatus as JobStatus,
|
|
1694
2139
|
type JobType as JobType,
|
|
1695
2140
|
type LettaAssistantMessageContentUnion as LettaAssistantMessageContentUnion,
|
|
1696
|
-
type LettaMessageUnion as LettaMessageUnion,
|
|
1697
2141
|
type LettaRequest as LettaRequest,
|
|
1698
2142
|
type LettaResponse as LettaResponse,
|
|
1699
2143
|
type LettaStreamingRequest as LettaStreamingRequest,
|
|
2144
|
+
type LettaStreamingResponse as LettaStreamingResponse,
|
|
1700
2145
|
type LettaUserMessageContentUnion as LettaUserMessageContentUnion,
|
|
1701
2146
|
type Message as Message,
|
|
1702
2147
|
type MessageRole as MessageRole,
|
|
@@ -1706,6 +2151,7 @@ export declare namespace Messages {
|
|
|
1706
2151
|
type ReasoningMessage as ReasoningMessage,
|
|
1707
2152
|
type RedactedReasoningContent as RedactedReasoningContent,
|
|
1708
2153
|
type Run as Run,
|
|
2154
|
+
type SummaryMessage as SummaryMessage,
|
|
1709
2155
|
type SystemMessage as SystemMessage,
|
|
1710
2156
|
type TextContent as TextContent,
|
|
1711
2157
|
type ToolCall as ToolCall,
|
|
@@ -1719,19 +2165,15 @@ export declare namespace Messages {
|
|
|
1719
2165
|
type UpdateSystemMessage as UpdateSystemMessage,
|
|
1720
2166
|
type UpdateUserMessage as UpdateUserMessage,
|
|
1721
2167
|
type UserMessage as UserMessage,
|
|
1722
|
-
type MessageUpdateResponse as MessageUpdateResponse,
|
|
1723
|
-
type MessageListResponse as MessageListResponse,
|
|
1724
2168
|
type MessageCancelResponse as MessageCancelResponse,
|
|
1725
|
-
type
|
|
1726
|
-
type
|
|
1727
|
-
type
|
|
1728
|
-
type
|
|
2169
|
+
type MessagesArrayPage as MessagesArrayPage,
|
|
2170
|
+
type MessageCreateParams as MessageCreateParams,
|
|
2171
|
+
type MessageCreateParamsNonStreaming as MessageCreateParamsNonStreaming,
|
|
2172
|
+
type MessageCreateParamsStreaming as MessageCreateParamsStreaming,
|
|
1729
2173
|
type MessageListParams as MessageListParams,
|
|
1730
2174
|
type MessageCancelParams as MessageCancelParams,
|
|
1731
|
-
type
|
|
1732
|
-
type
|
|
1733
|
-
type
|
|
1734
|
-
type MessageSendAsyncParams as MessageSendAsyncParams,
|
|
1735
|
-
type MessageSendStreamParams as MessageSendStreamParams,
|
|
2175
|
+
type MessageCreateAsyncParams as MessageCreateAsyncParams,
|
|
2176
|
+
type MessageResetParams as MessageResetParams,
|
|
2177
|
+
type MessageStreamParams as MessageStreamParams,
|
|
1736
2178
|
};
|
|
1737
2179
|
}
|