@letta-ai/letta-client 0.1.61 → 0.1.63

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.
Files changed (138) hide show
  1. package/api/resources/agents/client/Client.d.ts +3 -1
  2. package/api/resources/agents/client/Client.js +22 -12
  3. package/api/resources/agents/client/requests/AgentsListRequest.d.ts +9 -5
  4. package/api/resources/agents/resources/blocks/client/Client.js +5 -5
  5. package/api/resources/agents/resources/context/client/Client.js +1 -1
  6. package/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
  7. package/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  8. package/api/resources/agents/resources/messages/client/Client.js +5 -5
  9. package/api/resources/agents/resources/passages/client/Client.js +3 -3
  10. package/api/resources/agents/resources/sources/client/Client.js +3 -3
  11. package/api/resources/agents/resources/templates/client/Client.js +3 -3
  12. package/api/resources/agents/resources/tools/client/Client.js +3 -3
  13. package/api/resources/blocks/client/Client.js +6 -6
  14. package/api/resources/groups/client/Client.js +7 -7
  15. package/api/resources/health/client/Client.js +1 -1
  16. package/api/resources/identities/client/Client.js +6 -6
  17. package/api/resources/jobs/client/Client.js +4 -4
  18. package/api/resources/models/client/Client.js +2 -2
  19. package/api/resources/providers/client/Client.js +4 -4
  20. package/api/resources/runs/client/Client.js +7 -7
  21. package/api/resources/sources/client/Client.js +6 -6
  22. package/api/resources/sources/resources/files/client/Client.js +3 -3
  23. package/api/resources/sources/resources/passages/client/Client.js +1 -1
  24. package/api/resources/steps/client/Client.js +2 -2
  25. package/api/resources/tag/client/Client.js +1 -1
  26. package/api/resources/templates/client/Client.js +1 -1
  27. package/api/resources/tools/client/Client.d.ts +29 -1
  28. package/api/resources/tools/client/Client.js +150 -15
  29. package/api/resources/tools/types/AddMcpServerRequest.d.ts +5 -0
  30. package/api/resources/tools/types/AddMcpServerResponseItem.d.ts +5 -0
  31. package/api/resources/tools/types/DeleteMcpServerResponseItem.d.ts +5 -0
  32. package/api/resources/tools/types/DeleteMcpServerResponseItem.js +5 -0
  33. package/api/resources/tools/types/ListMcpServersResponseValue.d.ts +1 -1
  34. package/api/resources/tools/types/index.d.ts +3 -0
  35. package/api/resources/tools/types/index.js +3 -0
  36. package/api/resources/voice/client/Client.js +1 -1
  37. package/api/types/McpServerType.d.ts +2 -2
  38. package/api/types/McpServerType.js +1 -1
  39. package/api/types/{LocalServerConfig.d.ts → StdioServerConfig.d.ts} +3 -1
  40. package/api/types/StdioServerConfig.js +5 -0
  41. package/api/types/index.d.ts +1 -1
  42. package/api/types/index.js +1 -1
  43. package/dist/api/resources/agents/client/Client.d.ts +3 -1
  44. package/dist/api/resources/agents/client/Client.js +22 -12
  45. package/dist/api/resources/agents/client/requests/AgentsListRequest.d.ts +9 -5
  46. package/dist/api/resources/agents/resources/blocks/client/Client.js +5 -5
  47. package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
  48. package/dist/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
  49. package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  50. package/dist/api/resources/agents/resources/messages/client/Client.js +5 -5
  51. package/dist/api/resources/agents/resources/passages/client/Client.js +3 -3
  52. package/dist/api/resources/agents/resources/sources/client/Client.js +3 -3
  53. package/dist/api/resources/agents/resources/templates/client/Client.js +3 -3
  54. package/dist/api/resources/agents/resources/tools/client/Client.js +3 -3
  55. package/dist/api/resources/blocks/client/Client.js +6 -6
  56. package/dist/api/resources/groups/client/Client.js +7 -7
  57. package/dist/api/resources/health/client/Client.js +1 -1
  58. package/dist/api/resources/identities/client/Client.js +6 -6
  59. package/dist/api/resources/jobs/client/Client.js +4 -4
  60. package/dist/api/resources/models/client/Client.js +2 -2
  61. package/dist/api/resources/providers/client/Client.js +4 -4
  62. package/dist/api/resources/runs/client/Client.js +7 -7
  63. package/dist/api/resources/sources/client/Client.js +6 -6
  64. package/dist/api/resources/sources/resources/files/client/Client.js +3 -3
  65. package/dist/api/resources/sources/resources/passages/client/Client.js +1 -1
  66. package/dist/api/resources/steps/client/Client.js +2 -2
  67. package/dist/api/resources/tag/client/Client.js +1 -1
  68. package/dist/api/resources/templates/client/Client.js +1 -1
  69. package/dist/api/resources/tools/client/Client.d.ts +29 -1
  70. package/dist/api/resources/tools/client/Client.js +150 -15
  71. package/dist/api/resources/tools/types/AddMcpServerRequest.d.ts +5 -0
  72. package/dist/api/resources/tools/types/AddMcpServerRequest.js +5 -0
  73. package/dist/api/resources/tools/types/AddMcpServerResponseItem.d.ts +5 -0
  74. package/dist/api/resources/tools/types/AddMcpServerResponseItem.js +5 -0
  75. package/dist/api/resources/tools/types/DeleteMcpServerResponseItem.d.ts +5 -0
  76. package/dist/api/resources/tools/types/DeleteMcpServerResponseItem.js +5 -0
  77. package/dist/api/resources/tools/types/ListMcpServersResponseValue.d.ts +1 -1
  78. package/dist/api/resources/tools/types/index.d.ts +3 -0
  79. package/dist/api/resources/tools/types/index.js +3 -0
  80. package/dist/api/resources/voice/client/Client.js +1 -1
  81. package/dist/api/types/McpServerType.d.ts +2 -2
  82. package/dist/api/types/McpServerType.js +1 -1
  83. package/dist/api/types/{LocalServerConfig.d.ts → StdioServerConfig.d.ts} +3 -1
  84. package/dist/api/types/StdioServerConfig.js +5 -0
  85. package/dist/api/types/index.d.ts +1 -1
  86. package/dist/api/types/index.js +1 -1
  87. package/dist/serialization/resources/tools/client/addMcpServer.d.ts +11 -0
  88. package/dist/serialization/resources/tools/client/addMcpServer.js +42 -0
  89. package/dist/serialization/resources/tools/client/deleteMcpServer.d.ts +11 -0
  90. package/dist/serialization/resources/tools/client/deleteMcpServer.js +42 -0
  91. package/dist/serialization/resources/tools/client/index.d.ts +2 -0
  92. package/dist/serialization/resources/tools/client/index.js +3 -1
  93. package/dist/serialization/resources/tools/types/AddMcpServerRequest.d.ts +12 -0
  94. package/dist/serialization/resources/tools/types/AddMcpServerRequest.js +43 -0
  95. package/dist/serialization/resources/tools/types/AddMcpServerResponseItem.d.ts +12 -0
  96. package/dist/serialization/resources/tools/types/AddMcpServerResponseItem.js +43 -0
  97. package/dist/serialization/resources/tools/types/DeleteMcpServerResponseItem.d.ts +12 -0
  98. package/dist/serialization/resources/tools/types/DeleteMcpServerResponseItem.js +43 -0
  99. package/dist/serialization/resources/tools/types/ListMcpServersResponseValue.d.ts +2 -2
  100. package/dist/serialization/resources/tools/types/ListMcpServersResponseValue.js +2 -2
  101. package/dist/serialization/resources/tools/types/index.d.ts +3 -0
  102. package/dist/serialization/resources/tools/types/index.js +3 -0
  103. package/dist/serialization/types/McpServerType.d.ts +1 -1
  104. package/dist/serialization/types/McpServerType.js +1 -1
  105. package/dist/serialization/types/{LocalServerConfig.d.ts → StdioServerConfig.d.ts} +3 -2
  106. package/dist/serialization/types/{LocalServerConfig.js → StdioServerConfig.js} +3 -2
  107. package/dist/serialization/types/index.d.ts +1 -1
  108. package/dist/serialization/types/index.js +1 -1
  109. package/dist/version.d.ts +1 -1
  110. package/dist/version.js +1 -1
  111. package/package.json +1 -1
  112. package/reference.md +134 -2
  113. package/serialization/resources/tools/client/addMcpServer.d.ts +11 -0
  114. package/serialization/resources/tools/client/addMcpServer.js +42 -0
  115. package/serialization/resources/tools/client/deleteMcpServer.d.ts +11 -0
  116. package/serialization/resources/tools/client/deleteMcpServer.js +42 -0
  117. package/serialization/resources/tools/client/index.d.ts +2 -0
  118. package/serialization/resources/tools/client/index.js +3 -1
  119. package/serialization/resources/tools/types/AddMcpServerRequest.d.ts +12 -0
  120. package/serialization/resources/tools/types/AddMcpServerRequest.js +43 -0
  121. package/serialization/resources/tools/types/AddMcpServerResponseItem.d.ts +12 -0
  122. package/serialization/resources/tools/types/AddMcpServerResponseItem.js +43 -0
  123. package/serialization/resources/tools/types/DeleteMcpServerResponseItem.d.ts +12 -0
  124. package/serialization/resources/tools/types/DeleteMcpServerResponseItem.js +43 -0
  125. package/serialization/resources/tools/types/ListMcpServersResponseValue.d.ts +2 -2
  126. package/serialization/resources/tools/types/ListMcpServersResponseValue.js +2 -2
  127. package/serialization/resources/tools/types/index.d.ts +3 -0
  128. package/serialization/resources/tools/types/index.js +3 -0
  129. package/serialization/types/McpServerType.d.ts +1 -1
  130. package/serialization/types/McpServerType.js +1 -1
  131. package/serialization/types/{LocalServerConfig.d.ts → StdioServerConfig.d.ts} +3 -2
  132. package/serialization/types/{LocalServerConfig.js → StdioServerConfig.js} +3 -2
  133. package/serialization/types/index.d.ts +1 -1
  134. package/serialization/types/index.js +1 -1
  135. package/version.d.ts +1 -1
  136. package/version.js +1 -1
  137. /package/api/{types/LocalServerConfig.js → resources/tools/types/AddMcpServerRequest.js} +0 -0
  138. /package/{dist/api/types/LocalServerConfig.js → api/resources/tools/types/AddMcpServerResponseItem.js} +0 -0
@@ -76,7 +76,7 @@ class Tools {
76
76
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
77
77
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/tools/${encodeURIComponent(toolId)}`),
78
78
  method: "GET",
79
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.61", "User-Agent": "@letta-ai/letta-client/0.1.61", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
79
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.63", "User-Agent": "@letta-ai/letta-client/0.1.63", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
80
80
  contentType: "application/json",
81
81
  requestType: "json",
82
82
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -141,7 +141,7 @@ class Tools {
141
141
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
142
142
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/tools/${encodeURIComponent(toolId)}`),
143
143
  method: "DELETE",
144
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.61", "User-Agent": "@letta-ai/letta-client/0.1.61", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
144
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.63", "User-Agent": "@letta-ai/letta-client/0.1.63", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
145
145
  contentType: "application/json",
146
146
  requestType: "json",
147
147
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -201,7 +201,7 @@ class Tools {
201
201
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
202
202
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/tools/${encodeURIComponent(toolId)}`),
203
203
  method: "PATCH",
204
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.61", "User-Agent": "@letta-ai/letta-client/0.1.61", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
204
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.63", "User-Agent": "@letta-ai/letta-client/0.1.63", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
205
205
  contentType: "application/json",
206
206
  requestType: "json",
207
207
  body: serializers.ToolUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -278,7 +278,7 @@ class Tools {
278
278
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
279
279
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/tools/"),
280
280
  method: "GET",
281
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.61", "User-Agent": "@letta-ai/letta-client/0.1.61", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
281
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.63", "User-Agent": "@letta-ai/letta-client/0.1.63", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
282
282
  contentType: "application/json",
283
283
  queryParameters: _queryParams,
284
284
  requestType: "json",
@@ -346,7 +346,7 @@ class Tools {
346
346
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
347
347
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/tools/"),
348
348
  method: "POST",
349
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.61", "User-Agent": "@letta-ai/letta-client/0.1.61", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
349
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.63", "User-Agent": "@letta-ai/letta-client/0.1.63", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
350
350
  contentType: "application/json",
351
351
  requestType: "json",
352
352
  body: serializers.ToolCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -414,7 +414,7 @@ class Tools {
414
414
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
415
415
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/tools/"),
416
416
  method: "PUT",
417
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.61", "User-Agent": "@letta-ai/letta-client/0.1.61", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
417
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.63", "User-Agent": "@letta-ai/letta-client/0.1.63", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
418
418
  contentType: "application/json",
419
419
  requestType: "json",
420
420
  body: serializers.ToolCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -479,7 +479,7 @@ class Tools {
479
479
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
480
480
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/tools/add-base-tools"),
481
481
  method: "POST",
482
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.61", "User-Agent": "@letta-ai/letta-client/0.1.61", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
482
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.63", "User-Agent": "@letta-ai/letta-client/0.1.63", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
483
483
  contentType: "application/json",
484
484
  requestType: "json",
485
485
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -549,7 +549,7 @@ class Tools {
549
549
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
550
550
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/tools/run"),
551
551
  method: "POST",
552
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.61", "User-Agent": "@letta-ai/letta-client/0.1.61", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
552
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.63", "User-Agent": "@letta-ai/letta-client/0.1.63", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
553
553
  contentType: "application/json",
554
554
  requestType: "json",
555
555
  body: serializers.ToolRunFromSource.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -614,7 +614,7 @@ class Tools {
614
614
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
615
615
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/tools/composio/apps"),
616
616
  method: "GET",
617
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.61", "User-Agent": "@letta-ai/letta-client/0.1.61", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
617
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.63", "User-Agent": "@letta-ai/letta-client/0.1.63", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
618
618
  contentType: "application/json",
619
619
  requestType: "json",
620
620
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -679,7 +679,7 @@ class Tools {
679
679
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
680
680
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/tools/composio/apps/${encodeURIComponent(composioAppName)}/actions`),
681
681
  method: "GET",
682
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.61", "User-Agent": "@letta-ai/letta-client/0.1.61", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
682
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.63", "User-Agent": "@letta-ai/letta-client/0.1.63", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
683
683
  contentType: "application/json",
684
684
  requestType: "json",
685
685
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -744,7 +744,7 @@ class Tools {
744
744
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
745
745
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/tools/composio/${encodeURIComponent(composioActionName)}`),
746
746
  method: "POST",
747
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.61", "User-Agent": "@letta-ai/letta-client/0.1.61", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
747
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.63", "User-Agent": "@letta-ai/letta-client/0.1.63", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
748
748
  contentType: "application/json",
749
749
  requestType: "json",
750
750
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -808,7 +808,7 @@ class Tools {
808
808
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
809
809
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/tools/mcp/servers"),
810
810
  method: "GET",
811
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.61", "User-Agent": "@letta-ai/letta-client/0.1.61", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
811
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.63", "User-Agent": "@letta-ai/letta-client/0.1.63", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
812
812
  contentType: "application/json",
813
813
  requestType: "json",
814
814
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -856,6 +856,76 @@ class Tools {
856
856
  }
857
857
  });
858
858
  }
859
+ /**
860
+ * Add a new MCP server to the Letta MCP server config
861
+ *
862
+ * @param {Letta.AddMcpServerRequest} request
863
+ * @param {Tools.RequestOptions} requestOptions - Request-specific configuration.
864
+ *
865
+ * @throws {@link Letta.UnprocessableEntityError}
866
+ *
867
+ * @example
868
+ * await client.tools.addMcpServer({
869
+ * serverName: "server_name",
870
+ * command: "command",
871
+ * args: ["args"]
872
+ * })
873
+ */
874
+ addMcpServer(request, requestOptions) {
875
+ return __awaiter(this, void 0, void 0, function* () {
876
+ var _a, _b, _c;
877
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
878
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/tools/mcp/servers"),
879
+ method: "PUT",
880
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.63", "User-Agent": "@letta-ai/letta-client/0.1.63", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
881
+ contentType: "application/json",
882
+ requestType: "json",
883
+ body: serializers.AddMcpServerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
884
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
885
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
886
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
887
+ });
888
+ if (_response.ok) {
889
+ return serializers.tools.addMcpServer.Response.parseOrThrow(_response.body, {
890
+ unrecognizedObjectKeys: "passthrough",
891
+ allowUnrecognizedUnionMembers: true,
892
+ allowUnrecognizedEnumValues: true,
893
+ skipValidation: true,
894
+ breadcrumbsPrefix: ["response"],
895
+ });
896
+ }
897
+ if (_response.error.reason === "status-code") {
898
+ switch (_response.error.statusCode) {
899
+ case 422:
900
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
901
+ unrecognizedObjectKeys: "passthrough",
902
+ allowUnrecognizedUnionMembers: true,
903
+ allowUnrecognizedEnumValues: true,
904
+ skipValidation: true,
905
+ breadcrumbsPrefix: ["response"],
906
+ }));
907
+ default:
908
+ throw new errors.LettaError({
909
+ statusCode: _response.error.statusCode,
910
+ body: _response.error.body,
911
+ });
912
+ }
913
+ }
914
+ switch (_response.error.reason) {
915
+ case "non-json":
916
+ throw new errors.LettaError({
917
+ statusCode: _response.error.statusCode,
918
+ body: _response.error.rawBody,
919
+ });
920
+ case "timeout":
921
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling PUT /v1/tools/mcp/servers.");
922
+ case "unknown":
923
+ throw new errors.LettaError({
924
+ message: _response.error.errorMessage,
925
+ });
926
+ }
927
+ });
928
+ }
859
929
  /**
860
930
  * Get a list of all tools for a specific MCP server
861
931
  *
@@ -873,7 +943,7 @@ class Tools {
873
943
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
874
944
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/tools/mcp/servers/${encodeURIComponent(mcpServerName)}/tools`),
875
945
  method: "GET",
876
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.61", "User-Agent": "@letta-ai/letta-client/0.1.61", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
946
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.63", "User-Agent": "@letta-ai/letta-client/0.1.63", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
877
947
  contentType: "application/json",
878
948
  requestType: "json",
879
949
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -922,7 +992,7 @@ class Tools {
922
992
  });
923
993
  }
924
994
  /**
925
- * Add a new MCP tool by server + tool name
995
+ * Register a new MCP tool as a Letta server by MCP server + tool name
926
996
  *
927
997
  * @param {string} mcpServerName
928
998
  * @param {string} mcpToolName
@@ -939,7 +1009,7 @@ class Tools {
939
1009
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
940
1010
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/tools/mcp/servers/${encodeURIComponent(mcpServerName)}/${encodeURIComponent(mcpToolName)}`),
941
1011
  method: "POST",
942
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.61", "User-Agent": "@letta-ai/letta-client/0.1.61", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1012
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.63", "User-Agent": "@letta-ai/letta-client/0.1.63", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
943
1013
  contentType: "application/json",
944
1014
  requestType: "json",
945
1015
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -987,6 +1057,71 @@ class Tools {
987
1057
  }
988
1058
  });
989
1059
  }
1060
+ /**
1061
+ * Add a new MCP server to the Letta MCP server config
1062
+ *
1063
+ * @param {string} mcpServerName
1064
+ * @param {Tools.RequestOptions} requestOptions - Request-specific configuration.
1065
+ *
1066
+ * @throws {@link Letta.UnprocessableEntityError}
1067
+ *
1068
+ * @example
1069
+ * await client.tools.deleteMcpServer("mcp_server_name")
1070
+ */
1071
+ deleteMcpServer(mcpServerName, requestOptions) {
1072
+ return __awaiter(this, void 0, void 0, function* () {
1073
+ var _a, _b, _c;
1074
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1075
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/tools/mcp/servers/${encodeURIComponent(mcpServerName)}`),
1076
+ method: "DELETE",
1077
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.63", "User-Agent": "@letta-ai/letta-client/0.1.63", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1078
+ contentType: "application/json",
1079
+ requestType: "json",
1080
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1081
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1082
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1083
+ });
1084
+ if (_response.ok) {
1085
+ return serializers.tools.deleteMcpServer.Response.parseOrThrow(_response.body, {
1086
+ unrecognizedObjectKeys: "passthrough",
1087
+ allowUnrecognizedUnionMembers: true,
1088
+ allowUnrecognizedEnumValues: true,
1089
+ skipValidation: true,
1090
+ breadcrumbsPrefix: ["response"],
1091
+ });
1092
+ }
1093
+ if (_response.error.reason === "status-code") {
1094
+ switch (_response.error.statusCode) {
1095
+ case 422:
1096
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
1097
+ unrecognizedObjectKeys: "passthrough",
1098
+ allowUnrecognizedUnionMembers: true,
1099
+ allowUnrecognizedEnumValues: true,
1100
+ skipValidation: true,
1101
+ breadcrumbsPrefix: ["response"],
1102
+ }));
1103
+ default:
1104
+ throw new errors.LettaError({
1105
+ statusCode: _response.error.statusCode,
1106
+ body: _response.error.body,
1107
+ });
1108
+ }
1109
+ }
1110
+ switch (_response.error.reason) {
1111
+ case "non-json":
1112
+ throw new errors.LettaError({
1113
+ statusCode: _response.error.statusCode,
1114
+ body: _response.error.rawBody,
1115
+ });
1116
+ case "timeout":
1117
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling DELETE /v1/tools/mcp/servers/{mcp_server_name}.");
1118
+ case "unknown":
1119
+ throw new errors.LettaError({
1120
+ message: _response.error.errorMessage,
1121
+ });
1122
+ }
1123
+ });
1124
+ }
990
1125
  _getCustomAuthorizationHeaders() {
991
1126
  return __awaiter(this, void 0, void 0, function* () {
992
1127
  const tokenValue = yield core.Supplier.get(this._options.token);
@@ -0,0 +1,5 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Letta from "../../../index";
5
+ export type AddMcpServerRequest = Letta.StdioServerConfig | Letta.SseServerConfig;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Letta from "../../../index";
5
+ export type AddMcpServerResponseItem = Letta.StdioServerConfig | Letta.SseServerConfig;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Letta from "../../../index";
5
+ export type DeleteMcpServerResponseItem = Letta.StdioServerConfig | Letta.SseServerConfig;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -2,4 +2,4 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as Letta from "../../../index";
5
- export type ListMcpServersResponseValue = Letta.SseServerConfig | Letta.LocalServerConfig;
5
+ export type ListMcpServersResponseValue = Letta.SseServerConfig | Letta.StdioServerConfig;
@@ -1 +1,4 @@
1
1
  export * from "./ListMcpServersResponseValue";
2
+ export * from "./AddMcpServerRequest";
3
+ export * from "./AddMcpServerResponseItem";
4
+ export * from "./DeleteMcpServerResponseItem";
@@ -15,3 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./ListMcpServersResponseValue"), exports);
18
+ __exportStar(require("./AddMcpServerRequest"), exports);
19
+ __exportStar(require("./AddMcpServerResponseItem"), exports);
20
+ __exportStar(require("./DeleteMcpServerResponseItem"), exports);
@@ -81,7 +81,7 @@ class Voice {
81
81
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
82
82
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/voice/${encodeURIComponent(agentId)}/chat/completions`),
83
83
  method: "POST",
84
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.61", "User-Agent": "@letta-ai/letta-client/0.1.61", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
84
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.63", "User-Agent": "@letta-ai/letta-client/0.1.63", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
85
85
  contentType: "application/json",
86
86
  requestType: "json",
87
87
  body: serializers.CreateVoiceChatCompletionsRequest.jsonOrThrow(request, {
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export type McpServerType = "sse" | "local";
4
+ export type McpServerType = "sse" | "stdio";
5
5
  export declare const McpServerType: {
6
6
  readonly Sse: "sse";
7
- readonly Local: "local";
7
+ readonly Stdio: "stdio";
8
8
  };
@@ -6,5 +6,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.McpServerType = void 0;
7
7
  exports.McpServerType = {
8
8
  Sse: "sse",
9
- Local: "local",
9
+ Stdio: "stdio",
10
10
  };
@@ -2,7 +2,7 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as Letta from "../index";
5
- export interface LocalServerConfig {
5
+ export interface StdioServerConfig {
6
6
  /** The name of the server */
7
7
  serverName: string;
8
8
  type?: Letta.McpServerType;
@@ -10,4 +10,6 @@ export interface LocalServerConfig {
10
10
  command: string;
11
11
  /** The arguments to pass to the command */
12
12
  args: string[];
13
+ /** Environment variables to set */
14
+ env?: Record<string, string | undefined>;
13
15
  }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -113,7 +113,6 @@ export * from "./LettaResponse";
113
113
  export * from "./LettaStreamingRequest";
114
114
  export * from "./LettaUsageStatistics";
115
115
  export * from "./LocalSandboxConfig";
116
- export * from "./LocalServerConfig";
117
116
  export * from "./McpServerType";
118
117
  export * from "./McpTool";
119
118
  export * from "./ManagerType";
@@ -145,6 +144,7 @@ export * from "./SandboxEnvironmentVariableCreate";
145
144
  export * from "./SandboxEnvironmentVariableUpdate";
146
145
  export * from "./SandboxType";
147
146
  export * from "./Source";
147
+ export * from "./StdioServerConfig";
148
148
  export * from "./Step";
149
149
  export * from "./SupervisorManager";
150
150
  export * from "./SystemMessageContent";
@@ -129,7 +129,6 @@ __exportStar(require("./LettaResponse"), exports);
129
129
  __exportStar(require("./LettaStreamingRequest"), exports);
130
130
  __exportStar(require("./LettaUsageStatistics"), exports);
131
131
  __exportStar(require("./LocalSandboxConfig"), exports);
132
- __exportStar(require("./LocalServerConfig"), exports);
133
132
  __exportStar(require("./McpServerType"), exports);
134
133
  __exportStar(require("./McpTool"), exports);
135
134
  __exportStar(require("./ManagerType"), exports);
@@ -161,6 +160,7 @@ __exportStar(require("./SandboxEnvironmentVariableCreate"), exports);
161
160
  __exportStar(require("./SandboxEnvironmentVariableUpdate"), exports);
162
161
  __exportStar(require("./SandboxType"), exports);
163
162
  __exportStar(require("./Source"), exports);
163
+ __exportStar(require("./StdioServerConfig"), exports);
164
164
  __exportStar(require("./Step"), exports);
165
165
  __exportStar(require("./SupervisorManager"), exports);
166
166
  __exportStar(require("./SystemMessageContent"), exports);
@@ -57,7 +57,9 @@ export declare class Agents {
57
57
  get memoryVariables(): MemoryVariables;
58
58
  /**
59
59
  * List all agents associated with a given user.
60
- * This endpoint retrieves a list of all agents and their configurations associated with the specified user ID.
60
+ *
61
+ * This endpoint retrieves a list of all agents and their configurations
62
+ * associated with the specified user ID.
61
63
  *
62
64
  * @param {Letta.AgentsListRequest} request
63
65
  * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
@@ -117,7 +117,9 @@ class Agents {
117
117
  }
118
118
  /**
119
119
  * List all agents associated with a given user.
120
- * This endpoint retrieves a list of all agents and their configurations associated with the specified user ID.
120
+ *
121
+ * This endpoint retrieves a list of all agents and their configurations
122
+ * associated with the specified user ID.
121
123
  *
122
124
  * @param {Letta.AgentsListRequest} request
123
125
  * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
@@ -130,7 +132,7 @@ class Agents {
130
132
  list() {
131
133
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
132
134
  var _a, _b, _c;
133
- const { name, tags, matchAllTags, before, after, limit, queryText, projectId, templateId, baseTemplateId, identityId, identifierKeys, } = request;
135
+ const { name, tags, matchAllTags, before, after, limit, queryText, projectId, templateId, baseTemplateId, identityId, identifierKeys, includeRelationships, } = request;
134
136
  const _queryParams = {};
135
137
  if (name != null) {
136
138
  _queryParams["name"] = name;
@@ -178,10 +180,18 @@ class Agents {
178
180
  _queryParams["identifier_keys"] = identifierKeys;
179
181
  }
180
182
  }
183
+ if (includeRelationships != null) {
184
+ if (Array.isArray(includeRelationships)) {
185
+ _queryParams["include_relationships"] = includeRelationships.map((item) => item);
186
+ }
187
+ else {
188
+ _queryParams["include_relationships"] = includeRelationships;
189
+ }
190
+ }
181
191
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
182
192
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/agents/"),
183
193
  method: "GET",
184
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.61", "User-Agent": "@letta-ai/letta-client/0.1.61", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
194
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.63", "User-Agent": "@letta-ai/letta-client/0.1.63", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
185
195
  contentType: "application/json",
186
196
  queryParameters: _queryParams,
187
197
  requestType: "json",
@@ -248,7 +258,7 @@ class Agents {
248
258
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
249
259
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/agents/"),
250
260
  method: "POST",
251
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.61", "User-Agent": "@letta-ai/letta-client/0.1.61", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "X-Project": project != null ? project : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
261
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.63", "User-Agent": "@letta-ai/letta-client/0.1.63", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "X-Project": project != null ? project : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
252
262
  contentType: "application/json",
253
263
  requestType: "json",
254
264
  body: serializers.CreateAgentRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
@@ -314,7 +324,7 @@ class Agents {
314
324
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
315
325
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/download`),
316
326
  method: "GET",
317
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.61", "User-Agent": "@letta-ai/letta-client/0.1.61", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
327
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.63", "User-Agent": "@letta-ai/letta-client/0.1.63", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
318
328
  contentType: "application/json",
319
329
  requestType: "json",
320
330
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -387,7 +397,7 @@ class Agents {
387
397
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
388
398
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/agents/upload"),
389
399
  method: "POST",
390
- headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.61", "User-Agent": "@letta-ai/letta-client/0.1.61", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
400
+ headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.63", "User-Agent": "@letta-ai/letta-client/0.1.63", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
391
401
  queryParameters: _queryParams,
392
402
  requestType: "file",
393
403
  duplex: _maybeEncodedRequest.duplex,
@@ -454,7 +464,7 @@ class Agents {
454
464
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
455
465
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}`),
456
466
  method: "GET",
457
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.61", "User-Agent": "@letta-ai/letta-client/0.1.61", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
467
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.63", "User-Agent": "@letta-ai/letta-client/0.1.63", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
458
468
  contentType: "application/json",
459
469
  requestType: "json",
460
470
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -519,7 +529,7 @@ class Agents {
519
529
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
520
530
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}`),
521
531
  method: "DELETE",
522
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.61", "User-Agent": "@letta-ai/letta-client/0.1.61", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
532
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.63", "User-Agent": "@letta-ai/letta-client/0.1.63", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
523
533
  contentType: "application/json",
524
534
  requestType: "json",
525
535
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -579,7 +589,7 @@ class Agents {
579
589
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
580
590
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}`),
581
591
  method: "PATCH",
582
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.61", "User-Agent": "@letta-ai/letta-client/0.1.61", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
592
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.63", "User-Agent": "@letta-ai/letta-client/0.1.63", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
583
593
  contentType: "application/json",
584
594
  requestType: "json",
585
595
  body: serializers.UpdateAgent.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -649,7 +659,7 @@ class Agents {
649
659
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
650
660
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/archival-memory/${encodeURIComponent(memoryId)}`),
651
661
  method: "PATCH",
652
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.61", "User-Agent": "@letta-ai/letta-client/0.1.61", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
662
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.63", "User-Agent": "@letta-ai/letta-client/0.1.63", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
653
663
  contentType: "application/json",
654
664
  requestType: "json",
655
665
  body: serializers.PassageUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -721,7 +731,7 @@ class Agents {
721
731
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
722
732
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/reset-messages`),
723
733
  method: "PATCH",
724
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.61", "User-Agent": "@letta-ai/letta-client/0.1.61", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
734
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.63", "User-Agent": "@letta-ai/letta-client/0.1.63", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
725
735
  contentType: "application/json",
726
736
  queryParameters: _queryParams,
727
737
  requestType: "json",
@@ -787,7 +797,7 @@ class Agents {
787
797
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
788
798
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/agents/search"),
789
799
  method: "POST",
790
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.61", "User-Agent": "@letta-ai/letta-client/0.1.61", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
800
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.63", "User-Agent": "@letta-ai/letta-client/0.1.63", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
791
801
  contentType: "application/json",
792
802
  requestType: "json",
793
803
  body: serializers.AgentsSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),