@letta-ai/letta-client 0.1.137 → 0.1.139

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 (244) hide show
  1. package/api/resources/agents/client/Client.js +10 -10
  2. package/api/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -0
  3. package/api/resources/agents/resources/blocks/client/Client.js +5 -5
  4. package/api/resources/agents/resources/context/client/Client.js +1 -1
  5. package/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
  6. package/api/resources/agents/resources/groups/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 +6 -6
  9. package/api/resources/agents/resources/passages/client/Client.js +4 -4
  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/agents/types/AgentsSearchRequestSearchItem.d.ts +1 -1
  14. package/api/resources/agents/types/AgentsSearchRequestSearchItemField.d.ts +9 -0
  15. package/api/resources/agents/types/AgentsSearchRequestSearchItemFieldOperator.d.ts +8 -0
  16. package/api/resources/agents/types/AgentsSearchRequestSearchItemFieldOperator.js +10 -0
  17. package/api/resources/agents/types/{AgentsSearchRequestSearchItemOperator.d.ts → AgentsSearchRequestSearchItemThree.d.ts} +1 -1
  18. package/api/resources/agents/types/index.d.ts +3 -1
  19. package/api/resources/agents/types/index.js +3 -1
  20. package/api/resources/batches/client/Client.js +4 -4
  21. package/api/resources/blocks/client/Client.js +6 -6
  22. package/api/resources/blocks/resources/agents/client/Client.js +1 -1
  23. package/api/resources/clientSideAccessTokens/client/Client.js +2 -2
  24. package/api/resources/embeddingModels/client/Client.js +1 -1
  25. package/api/resources/groups/client/Client.js +6 -6
  26. package/api/resources/groups/resources/messages/client/Client.js +5 -5
  27. package/api/resources/health/client/Client.js +1 -1
  28. package/api/resources/identities/client/Client.js +7 -7
  29. package/api/resources/identities/resources/properties/client/Client.js +1 -1
  30. package/api/resources/index.d.ts +2 -1
  31. package/api/resources/index.js +3 -2
  32. package/api/resources/jobs/client/Client.js +4 -4
  33. package/api/resources/messages/client/Client.js +1 -1
  34. package/api/resources/models/client/Client.js +1 -1
  35. package/api/resources/projects/client/Client.js +1 -1
  36. package/api/resources/providers/client/Client.js +5 -5
  37. package/api/resources/runs/client/Client.js +4 -4
  38. package/api/resources/runs/resources/messages/client/Client.js +1 -1
  39. package/api/resources/runs/resources/steps/client/Client.js +1 -1
  40. package/api/resources/runs/resources/usage/client/Client.js +1 -1
  41. package/api/resources/sources/client/Client.js +8 -8
  42. package/api/resources/sources/resources/files/client/Client.js +3 -3
  43. package/api/resources/sources/resources/passages/client/Client.js +1 -1
  44. package/api/resources/steps/client/Client.d.ts +16 -0
  45. package/api/resources/steps/client/Client.js +91 -3
  46. package/api/resources/steps/client/requests/AddFeedbackRequest.d.ts +11 -0
  47. package/api/resources/steps/client/requests/AddFeedbackRequest.js +5 -0
  48. package/api/resources/steps/client/requests/StepsListRequest.d.ts +9 -0
  49. package/api/resources/steps/client/requests/index.d.ts +1 -0
  50. package/api/resources/steps/index.d.ts +2 -0
  51. package/api/resources/steps/index.js +2 -0
  52. package/api/resources/steps/resources/feedback/client/Client.d.ts +39 -0
  53. package/api/resources/steps/resources/feedback/client/Client.js +111 -0
  54. package/api/resources/steps/resources/feedback/client/index.d.ts +1 -0
  55. package/api/resources/steps/resources/feedback/client/index.js +2 -0
  56. package/api/resources/steps/resources/feedback/index.d.ts +1 -0
  57. package/api/resources/steps/resources/feedback/index.js +17 -0
  58. package/api/resources/steps/resources/index.d.ts +1 -0
  59. package/api/resources/steps/resources/index.js +37 -0
  60. package/api/resources/steps/types/AddFeedbackRequestFeedback.d.ts +8 -0
  61. package/api/resources/steps/types/AddFeedbackRequestFeedback.js +10 -0
  62. package/api/resources/steps/types/StepsListRequestFeedback.d.ts +8 -0
  63. package/api/resources/steps/types/StepsListRequestFeedback.js +10 -0
  64. package/api/resources/steps/types/index.d.ts +2 -0
  65. package/api/resources/steps/types/index.js +18 -0
  66. package/api/resources/tags/client/Client.js +1 -1
  67. package/api/resources/telemetry/client/Client.js +1 -1
  68. package/api/resources/templates/client/Client.js +1 -1
  69. package/api/resources/templates/resources/agents/client/Client.js +1 -1
  70. package/api/resources/tools/client/Client.d.ts +17 -0
  71. package/api/resources/tools/client/Client.js +89 -18
  72. package/api/resources/tools/types/TestMcpServerRequest.d.ts +5 -0
  73. package/api/resources/tools/types/TestMcpServerRequest.js +5 -0
  74. package/api/resources/tools/types/index.d.ts +1 -0
  75. package/api/resources/tools/types/index.js +1 -0
  76. package/api/resources/voice/client/Client.js +1 -1
  77. package/api/types/Step.d.ts +2 -0
  78. package/api/types/StepFeedback.d.ts +8 -0
  79. package/api/types/StepFeedback.js +10 -0
  80. package/api/types/index.d.ts +1 -0
  81. package/api/types/index.js +1 -0
  82. package/dist/api/resources/agents/client/Client.js +10 -10
  83. package/dist/api/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -0
  84. package/dist/api/resources/agents/resources/blocks/client/Client.js +5 -5
  85. package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
  86. package/dist/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
  87. package/dist/api/resources/agents/resources/groups/client/Client.js +1 -1
  88. package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  89. package/dist/api/resources/agents/resources/messages/client/Client.js +6 -6
  90. package/dist/api/resources/agents/resources/passages/client/Client.js +4 -4
  91. package/dist/api/resources/agents/resources/sources/client/Client.js +3 -3
  92. package/dist/api/resources/agents/resources/templates/client/Client.js +3 -3
  93. package/dist/api/resources/agents/resources/tools/client/Client.js +3 -3
  94. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +1 -1
  95. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemField.d.ts +9 -0
  96. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemField.js +5 -0
  97. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemFieldOperator.d.ts +8 -0
  98. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemFieldOperator.js +10 -0
  99. package/dist/api/resources/agents/types/{AgentsSearchRequestSearchItemOperator.d.ts → AgentsSearchRequestSearchItemThree.d.ts} +1 -1
  100. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemThree.js +5 -0
  101. package/dist/api/resources/agents/types/index.d.ts +3 -1
  102. package/dist/api/resources/agents/types/index.js +3 -1
  103. package/dist/api/resources/batches/client/Client.js +4 -4
  104. package/dist/api/resources/blocks/client/Client.js +6 -6
  105. package/dist/api/resources/blocks/resources/agents/client/Client.js +1 -1
  106. package/dist/api/resources/clientSideAccessTokens/client/Client.js +2 -2
  107. package/dist/api/resources/embeddingModels/client/Client.js +1 -1
  108. package/dist/api/resources/groups/client/Client.js +6 -6
  109. package/dist/api/resources/groups/resources/messages/client/Client.js +5 -5
  110. package/dist/api/resources/health/client/Client.js +1 -1
  111. package/dist/api/resources/identities/client/Client.js +7 -7
  112. package/dist/api/resources/identities/resources/properties/client/Client.js +1 -1
  113. package/dist/api/resources/index.d.ts +2 -1
  114. package/dist/api/resources/index.js +3 -2
  115. package/dist/api/resources/jobs/client/Client.js +4 -4
  116. package/dist/api/resources/messages/client/Client.js +1 -1
  117. package/dist/api/resources/models/client/Client.js +1 -1
  118. package/dist/api/resources/projects/client/Client.js +1 -1
  119. package/dist/api/resources/providers/client/Client.js +5 -5
  120. package/dist/api/resources/runs/client/Client.js +4 -4
  121. package/dist/api/resources/runs/resources/messages/client/Client.js +1 -1
  122. package/dist/api/resources/runs/resources/steps/client/Client.js +1 -1
  123. package/dist/api/resources/runs/resources/usage/client/Client.js +1 -1
  124. package/dist/api/resources/sources/client/Client.js +8 -8
  125. package/dist/api/resources/sources/resources/files/client/Client.js +3 -3
  126. package/dist/api/resources/sources/resources/passages/client/Client.js +1 -1
  127. package/dist/api/resources/steps/client/Client.d.ts +16 -0
  128. package/dist/api/resources/steps/client/Client.js +91 -3
  129. package/dist/api/resources/steps/client/requests/AddFeedbackRequest.d.ts +11 -0
  130. package/dist/api/resources/steps/client/requests/AddFeedbackRequest.js +5 -0
  131. package/dist/api/resources/steps/client/requests/StepsListRequest.d.ts +9 -0
  132. package/dist/api/resources/steps/client/requests/index.d.ts +1 -0
  133. package/dist/api/resources/steps/index.d.ts +2 -0
  134. package/dist/api/resources/steps/index.js +2 -0
  135. package/dist/api/resources/steps/resources/feedback/client/Client.d.ts +39 -0
  136. package/dist/api/resources/steps/resources/feedback/client/Client.js +111 -0
  137. package/dist/api/resources/steps/resources/feedback/client/index.d.ts +1 -0
  138. package/dist/api/resources/steps/resources/feedback/client/index.js +2 -0
  139. package/dist/api/resources/steps/resources/feedback/index.d.ts +1 -0
  140. package/dist/api/resources/steps/resources/feedback/index.js +17 -0
  141. package/dist/api/resources/steps/resources/index.d.ts +1 -0
  142. package/dist/api/resources/steps/resources/index.js +37 -0
  143. package/dist/api/resources/steps/types/AddFeedbackRequestFeedback.d.ts +8 -0
  144. package/dist/api/resources/steps/types/AddFeedbackRequestFeedback.js +10 -0
  145. package/dist/api/resources/steps/types/StepsListRequestFeedback.d.ts +8 -0
  146. package/dist/api/resources/steps/types/StepsListRequestFeedback.js +10 -0
  147. package/dist/api/resources/steps/types/index.d.ts +2 -0
  148. package/dist/api/resources/steps/types/index.js +18 -0
  149. package/dist/api/resources/tags/client/Client.js +1 -1
  150. package/dist/api/resources/telemetry/client/Client.js +1 -1
  151. package/dist/api/resources/templates/client/Client.js +1 -1
  152. package/dist/api/resources/templates/resources/agents/client/Client.js +1 -1
  153. package/dist/api/resources/tools/client/Client.d.ts +17 -0
  154. package/dist/api/resources/tools/client/Client.js +89 -18
  155. package/dist/api/resources/tools/types/TestMcpServerRequest.d.ts +5 -0
  156. package/dist/api/resources/tools/types/TestMcpServerRequest.js +5 -0
  157. package/dist/api/resources/tools/types/index.d.ts +1 -0
  158. package/dist/api/resources/tools/types/index.js +1 -0
  159. package/dist/api/resources/voice/client/Client.js +1 -1
  160. package/dist/api/types/Step.d.ts +2 -0
  161. package/dist/api/types/StepFeedback.d.ts +8 -0
  162. package/dist/api/types/StepFeedback.js +10 -0
  163. package/dist/api/types/index.d.ts +1 -0
  164. package/dist/api/types/index.js +1 -0
  165. package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -0
  166. package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.js +1 -0
  167. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +3 -2
  168. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItem.js +4 -2
  169. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemField.d.ts +15 -0
  170. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemField.js +46 -0
  171. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemFieldOperator.d.ts +10 -0
  172. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemFieldOperator.js +41 -0
  173. package/dist/serialization/resources/agents/types/{AgentsSearchRequestSearchItemOperator.d.ts → AgentsSearchRequestSearchItemThree.d.ts} +2 -2
  174. package/dist/serialization/resources/agents/types/{AgentsSearchRequestSearchItemOperator.js → AgentsSearchRequestSearchItemThree.js} +2 -2
  175. package/dist/serialization/resources/agents/types/index.d.ts +3 -1
  176. package/dist/serialization/resources/agents/types/index.js +3 -1
  177. package/dist/serialization/resources/index.d.ts +2 -1
  178. package/dist/serialization/resources/index.js +3 -2
  179. package/dist/serialization/resources/steps/index.d.ts +1 -0
  180. package/dist/serialization/resources/steps/index.js +1 -0
  181. package/dist/serialization/resources/steps/types/AddFeedbackRequestFeedback.d.ts +10 -0
  182. package/dist/serialization/resources/steps/types/AddFeedbackRequestFeedback.js +41 -0
  183. package/dist/serialization/resources/steps/types/StepsListRequestFeedback.d.ts +10 -0
  184. package/dist/serialization/resources/steps/types/StepsListRequestFeedback.js +41 -0
  185. package/dist/serialization/resources/steps/types/index.d.ts +2 -0
  186. package/dist/serialization/resources/steps/types/index.js +18 -0
  187. package/dist/serialization/resources/tools/client/index.d.ts +1 -0
  188. package/dist/serialization/resources/tools/client/index.js +2 -1
  189. package/dist/serialization/resources/tools/client/testMcpServer.d.ts +11 -0
  190. package/dist/serialization/resources/tools/client/testMcpServer.js +42 -0
  191. package/dist/serialization/resources/tools/types/TestMcpServerRequest.d.ts +13 -0
  192. package/dist/serialization/resources/tools/types/TestMcpServerRequest.js +44 -0
  193. package/dist/serialization/resources/tools/types/index.d.ts +1 -0
  194. package/dist/serialization/resources/tools/types/index.js +1 -0
  195. package/dist/serialization/types/Step.d.ts +2 -0
  196. package/dist/serialization/types/Step.js +2 -0
  197. package/dist/serialization/types/StepFeedback.d.ts +10 -0
  198. package/dist/serialization/types/StepFeedback.js +41 -0
  199. package/dist/serialization/types/index.d.ts +1 -0
  200. package/dist/serialization/types/index.js +1 -0
  201. package/dist/version.d.ts +1 -1
  202. package/dist/version.js +1 -1
  203. package/package.json +1 -1
  204. package/reference.md +189 -0
  205. package/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -0
  206. package/serialization/resources/agents/client/requests/CreateAgentRequest.js +1 -0
  207. package/serialization/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +3 -2
  208. package/serialization/resources/agents/types/AgentsSearchRequestSearchItem.js +4 -2
  209. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemField.d.ts +15 -0
  210. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemField.js +46 -0
  211. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemFieldOperator.d.ts +10 -0
  212. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemFieldOperator.js +41 -0
  213. package/serialization/resources/agents/types/{AgentsSearchRequestSearchItemOperator.d.ts → AgentsSearchRequestSearchItemThree.d.ts} +2 -2
  214. package/serialization/resources/agents/types/{AgentsSearchRequestSearchItemOperator.js → AgentsSearchRequestSearchItemThree.js} +2 -2
  215. package/serialization/resources/agents/types/index.d.ts +3 -1
  216. package/serialization/resources/agents/types/index.js +3 -1
  217. package/serialization/resources/index.d.ts +2 -1
  218. package/serialization/resources/index.js +3 -2
  219. package/serialization/resources/steps/index.d.ts +1 -0
  220. package/serialization/resources/steps/index.js +1 -0
  221. package/serialization/resources/steps/types/AddFeedbackRequestFeedback.d.ts +10 -0
  222. package/serialization/resources/steps/types/AddFeedbackRequestFeedback.js +41 -0
  223. package/serialization/resources/steps/types/StepsListRequestFeedback.d.ts +10 -0
  224. package/serialization/resources/steps/types/StepsListRequestFeedback.js +41 -0
  225. package/serialization/resources/steps/types/index.d.ts +2 -0
  226. package/serialization/resources/steps/types/index.js +18 -0
  227. package/serialization/resources/tools/client/index.d.ts +1 -0
  228. package/serialization/resources/tools/client/index.js +2 -1
  229. package/serialization/resources/tools/client/testMcpServer.d.ts +11 -0
  230. package/serialization/resources/tools/client/testMcpServer.js +42 -0
  231. package/serialization/resources/tools/types/TestMcpServerRequest.d.ts +13 -0
  232. package/serialization/resources/tools/types/TestMcpServerRequest.js +44 -0
  233. package/serialization/resources/tools/types/index.d.ts +1 -0
  234. package/serialization/resources/tools/types/index.js +1 -0
  235. package/serialization/types/Step.d.ts +2 -0
  236. package/serialization/types/Step.js +2 -0
  237. package/serialization/types/StepFeedback.d.ts +10 -0
  238. package/serialization/types/StepFeedback.js +41 -0
  239. package/serialization/types/index.d.ts +1 -0
  240. package/serialization/types/index.js +1 -0
  241. package/version.d.ts +1 -1
  242. package/version.js +1 -1
  243. /package/api/resources/agents/types/{AgentsSearchRequestSearchItemOperator.js → AgentsSearchRequestSearchItemField.js} +0 -0
  244. /package/{dist/api/resources/agents/types/AgentsSearchRequestSearchItemOperator.js → api/resources/agents/types/AgentsSearchRequestSearchItemThree.js} +0 -0
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.AddFeedbackRequestFeedback = void 0;
7
+ exports.AddFeedbackRequestFeedback = {
8
+ Positive: "positive",
9
+ Negative: "negative",
10
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export type StepsListRequestFeedback = "positive" | "negative";
5
+ export declare const StepsListRequestFeedback: {
6
+ readonly Positive: "positive";
7
+ readonly Negative: "negative";
8
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.StepsListRequestFeedback = void 0;
7
+ exports.StepsListRequestFeedback = {
8
+ Positive: "positive",
9
+ Negative: "negative",
10
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./StepsListRequestFeedback";
2
+ export * from "./AddFeedbackRequestFeedback";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./StepsListRequestFeedback"), exports);
18
+ __exportStar(require("./AddFeedbackRequestFeedback"), exports);
@@ -87,7 +87,7 @@ class Tags {
87
87
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
88
88
  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/tags/"),
89
89
  method: "GET",
90
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "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),
90
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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),
91
91
  contentType: "application/json",
92
92
  queryParameters: _queryParams,
93
93
  requestType: "json",
@@ -74,7 +74,7 @@ class Telemetry {
74
74
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
75
75
  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/telemetry/${encodeURIComponent(stepId)}`),
76
76
  method: "GET",
77
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "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),
77
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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),
78
78
  contentType: "application/json",
79
79
  requestType: "json",
80
80
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -92,7 +92,7 @@ class Templates {
92
92
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
93
93
  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/templates"),
94
94
  method: "GET",
95
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "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),
95
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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),
96
96
  contentType: "application/json",
97
97
  queryParameters: _queryParams,
98
98
  requestType: "json",
@@ -78,7 +78,7 @@ class Agents {
78
78
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
79
79
  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/templates/${encodeURIComponent(project)}/${encodeURIComponent(templateVersion)}/agents`),
80
80
  method: "POST",
81
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "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),
81
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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),
82
82
  contentType: "application/json",
83
83
  requestType: "json",
84
84
  body: serializers.templates.AgentsCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -257,6 +257,23 @@ export declare class Tools {
257
257
  * await client.tools.updateMcpServer("mcp_server_name", {})
258
258
  */
259
259
  updateMcpServer(mcpServerName: string, request: Letta.UpdateMcpServerRequest, requestOptions?: Tools.RequestOptions): Promise<Letta.UpdateMcpServerResponse>;
260
+ /**
261
+ * Test connection to an MCP server without adding it.
262
+ * Returns the list of available tools if successful.
263
+ *
264
+ * @param {Letta.TestMcpServerRequest} request
265
+ * @param {Tools.RequestOptions} requestOptions - Request-specific configuration.
266
+ *
267
+ * @throws {@link Letta.UnprocessableEntityError}
268
+ *
269
+ * @example
270
+ * await client.tools.testMcpServer({
271
+ * serverName: "server_name",
272
+ * command: "command",
273
+ * args: ["args"]
274
+ * })
275
+ */
276
+ testMcpServer(request: Letta.TestMcpServerRequest, requestOptions?: Tools.RequestOptions): Promise<Letta.McpTool[]>;
260
277
  protected _getCustomAuthorizationHeaders(): Promise<{
261
278
  Authorization: string;
262
279
  }>;
@@ -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.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "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.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "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.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "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.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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" }),
@@ -272,7 +272,7 @@ class Tools {
272
272
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
273
273
  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/count"),
274
274
  method: "GET",
275
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "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),
275
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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),
276
276
  contentType: "application/json",
277
277
  queryParameters: _queryParams,
278
278
  requestType: "json",
@@ -349,7 +349,7 @@ class Tools {
349
349
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
350
350
  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/"),
351
351
  method: "GET",
352
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "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),
352
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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),
353
353
  contentType: "application/json",
354
354
  queryParameters: _queryParams,
355
355
  requestType: "json",
@@ -417,7 +417,7 @@ class Tools {
417
417
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
418
418
  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/"),
419
419
  method: "POST",
420
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "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),
420
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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),
421
421
  contentType: "application/json",
422
422
  requestType: "json",
423
423
  body: serializers.ToolCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -485,7 +485,7 @@ class Tools {
485
485
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
486
486
  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/"),
487
487
  method: "PUT",
488
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "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),
488
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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),
489
489
  contentType: "application/json",
490
490
  requestType: "json",
491
491
  body: serializers.ToolCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -550,7 +550,7 @@ class Tools {
550
550
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
551
551
  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"),
552
552
  method: "POST",
553
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "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
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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),
554
554
  contentType: "application/json",
555
555
  requestType: "json",
556
556
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -620,7 +620,7 @@ class Tools {
620
620
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
621
621
  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"),
622
622
  method: "POST",
623
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "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),
623
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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),
624
624
  contentType: "application/json",
625
625
  requestType: "json",
626
626
  body: serializers.ToolRunFromSource.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -687,7 +687,7 @@ class Tools {
687
687
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
688
688
  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"),
689
689
  method: "GET",
690
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "user-id": userId != null ? userId : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
690
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "user-id": userId != null ? userId : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
691
691
  contentType: "application/json",
692
692
  requestType: "json",
693
693
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -752,7 +752,7 @@ class Tools {
752
752
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
753
753
  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`),
754
754
  method: "GET",
755
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "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),
755
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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),
756
756
  contentType: "application/json",
757
757
  requestType: "json",
758
758
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -817,7 +817,7 @@ class Tools {
817
817
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
818
818
  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)}`),
819
819
  method: "POST",
820
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "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),
820
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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),
821
821
  contentType: "application/json",
822
822
  requestType: "json",
823
823
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -883,7 +883,7 @@ class Tools {
883
883
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
884
884
  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"),
885
885
  method: "GET",
886
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "user-id": userId != null ? userId : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
886
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "user-id": userId != null ? userId : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
887
887
  contentType: "application/json",
888
888
  requestType: "json",
889
889
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -952,7 +952,7 @@ class Tools {
952
952
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
953
953
  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"),
954
954
  method: "PUT",
955
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "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),
955
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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),
956
956
  contentType: "application/json",
957
957
  requestType: "json",
958
958
  body: serializers.AddMcpServerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1018,7 +1018,7 @@ class Tools {
1018
1018
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1019
1019
  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`),
1020
1020
  method: "GET",
1021
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "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),
1021
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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),
1022
1022
  contentType: "application/json",
1023
1023
  requestType: "json",
1024
1024
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1084,7 +1084,7 @@ class Tools {
1084
1084
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1085
1085
  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)}`),
1086
1086
  method: "POST",
1087
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "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),
1087
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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),
1088
1088
  contentType: "application/json",
1089
1089
  requestType: "json",
1090
1090
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1149,7 +1149,7 @@ class Tools {
1149
1149
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1150
1150
  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)}`),
1151
1151
  method: "DELETE",
1152
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "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),
1152
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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),
1153
1153
  contentType: "application/json",
1154
1154
  requestType: "json",
1155
1155
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1215,7 +1215,7 @@ class Tools {
1215
1215
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1216
1216
  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)}`),
1217
1217
  method: "PATCH",
1218
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "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),
1218
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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),
1219
1219
  contentType: "application/json",
1220
1220
  requestType: "json",
1221
1221
  body: serializers.UpdateMcpServerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1264,6 +1264,77 @@ class Tools {
1264
1264
  }
1265
1265
  });
1266
1266
  }
1267
+ /**
1268
+ * Test connection to an MCP server without adding it.
1269
+ * Returns the list of available tools if successful.
1270
+ *
1271
+ * @param {Letta.TestMcpServerRequest} request
1272
+ * @param {Tools.RequestOptions} requestOptions - Request-specific configuration.
1273
+ *
1274
+ * @throws {@link Letta.UnprocessableEntityError}
1275
+ *
1276
+ * @example
1277
+ * await client.tools.testMcpServer({
1278
+ * serverName: "server_name",
1279
+ * command: "command",
1280
+ * args: ["args"]
1281
+ * })
1282
+ */
1283
+ testMcpServer(request, requestOptions) {
1284
+ return __awaiter(this, void 0, void 0, function* () {
1285
+ var _a, _b, _c;
1286
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1287
+ 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/test"),
1288
+ method: "POST",
1289
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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),
1290
+ contentType: "application/json",
1291
+ requestType: "json",
1292
+ body: serializers.TestMcpServerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
1293
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1294
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1295
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1296
+ });
1297
+ if (_response.ok) {
1298
+ return serializers.tools.testMcpServer.Response.parseOrThrow(_response.body, {
1299
+ unrecognizedObjectKeys: "passthrough",
1300
+ allowUnrecognizedUnionMembers: true,
1301
+ allowUnrecognizedEnumValues: true,
1302
+ skipValidation: true,
1303
+ breadcrumbsPrefix: ["response"],
1304
+ });
1305
+ }
1306
+ if (_response.error.reason === "status-code") {
1307
+ switch (_response.error.statusCode) {
1308
+ case 422:
1309
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
1310
+ unrecognizedObjectKeys: "passthrough",
1311
+ allowUnrecognizedUnionMembers: true,
1312
+ allowUnrecognizedEnumValues: true,
1313
+ skipValidation: true,
1314
+ breadcrumbsPrefix: ["response"],
1315
+ }));
1316
+ default:
1317
+ throw new errors.LettaError({
1318
+ statusCode: _response.error.statusCode,
1319
+ body: _response.error.body,
1320
+ });
1321
+ }
1322
+ }
1323
+ switch (_response.error.reason) {
1324
+ case "non-json":
1325
+ throw new errors.LettaError({
1326
+ statusCode: _response.error.statusCode,
1327
+ body: _response.error.rawBody,
1328
+ });
1329
+ case "timeout":
1330
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/tools/mcp/servers/test.");
1331
+ case "unknown":
1332
+ throw new errors.LettaError({
1333
+ message: _response.error.errorMessage,
1334
+ });
1335
+ }
1336
+ });
1337
+ }
1267
1338
  _getCustomAuthorizationHeaders() {
1268
1339
  return __awaiter(this, void 0, void 0, function* () {
1269
1340
  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 TestMcpServerRequest = Letta.StdioServerConfig | Letta.SseServerConfig | Letta.StreamableHttpServerConfig;
@@ -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 });
@@ -4,3 +4,4 @@ export * from "./AddMcpServerResponseItem";
4
4
  export * from "./DeleteMcpServerResponseItem";
5
5
  export * from "./UpdateMcpServerRequest";
6
6
  export * from "./UpdateMcpServerResponse";
7
+ export * from "./TestMcpServerRequest";
@@ -20,3 +20,4 @@ __exportStar(require("./AddMcpServerResponseItem"), exports);
20
20
  __exportStar(require("./DeleteMcpServerResponseItem"), exports);
21
21
  __exportStar(require("./UpdateMcpServerRequest"), exports);
22
22
  __exportStar(require("./UpdateMcpServerResponse"), exports);
23
+ __exportStar(require("./TestMcpServerRequest"), exports);
@@ -80,7 +80,7 @@ class Voice {
80
80
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
81
81
  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-beta/${encodeURIComponent(agentId)}/chat/completions`),
82
82
  method: "POST",
83
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "user-id": userId != null ? userId : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
83
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "user-id": userId != null ? userId : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
84
84
  contentType: "application/json",
85
85
  requestType: "json",
86
86
  body: serializers.voice.createVoiceChatCompletions.Request.jsonOrThrow(_body, {
@@ -39,4 +39,6 @@ export interface Step {
39
39
  traceId?: string;
40
40
  /** The messages generated during this step. */
41
41
  messages?: Letta.Message[];
42
+ /** The feedback for this step. Must be either 'positive' or 'negative'. */
43
+ feedback?: Letta.StepFeedback;
42
44
  }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export type StepFeedback = "positive" | "negative";
5
+ export declare const StepFeedback: {
6
+ readonly Positive: "positive";
7
+ readonly Negative: "negative";
8
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.StepFeedback = void 0;
7
+ exports.StepFeedback = {
8
+ Positive: "positive",
9
+ Negative: "negative",
10
+ };
@@ -187,6 +187,7 @@ export * from "./SleeptimeManager";
187
187
  export * from "./SleeptimeManagerUpdate";
188
188
  export * from "./Source";
189
189
  export * from "./StdioServerConfig";
190
+ export * from "./StepFeedback";
190
191
  export * from "./Step";
191
192
  export * from "./StopReasonType";
192
193
  export * from "./StreamableHttpServerConfig";
@@ -203,6 +203,7 @@ __exportStar(require("./SleeptimeManager"), exports);
203
203
  __exportStar(require("./SleeptimeManagerUpdate"), exports);
204
204
  __exportStar(require("./Source"), exports);
205
205
  __exportStar(require("./StdioServerConfig"), exports);
206
+ __exportStar(require("./StepFeedback"), exports);
206
207
  __exportStar(require("./Step"), exports);
207
208
  __exportStar(require("./StopReasonType"), exports);
208
209
  __exportStar(require("./StreamableHttpServerConfig"), exports);
@@ -202,7 +202,7 @@ class Agents {
202
202
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
203
203
  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/"),
204
204
  method: "GET",
205
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "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
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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),
206
206
  contentType: "application/json",
207
207
  queryParameters: _queryParams,
208
208
  requestType: "json",
@@ -269,7 +269,7 @@ class Agents {
269
269
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
270
270
  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/"),
271
271
  method: "POST",
272
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "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),
272
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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),
273
273
  contentType: "application/json",
274
274
  requestType: "json",
275
275
  body: serializers.CreateAgentRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
@@ -334,7 +334,7 @@ class Agents {
334
334
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
335
335
  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/count"),
336
336
  method: "GET",
337
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "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),
337
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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),
338
338
  contentType: "application/json",
339
339
  requestType: "json",
340
340
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -399,7 +399,7 @@ class Agents {
399
399
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
400
400
  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)}/export`),
401
401
  method: "GET",
402
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "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),
402
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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),
403
403
  contentType: "application/json",
404
404
  requestType: "json",
405
405
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -481,7 +481,7 @@ class Agents {
481
481
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
482
482
  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/import"),
483
483
  method: "POST",
484
- 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.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "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),
484
+ 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.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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),
485
485
  queryParameters: _queryParams,
486
486
  requestType: "file",
487
487
  duplex: _maybeEncodedRequest.duplex,
@@ -559,7 +559,7 @@ class Agents {
559
559
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
560
560
  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)}`),
561
561
  method: "GET",
562
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "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),
562
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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),
563
563
  contentType: "application/json",
564
564
  queryParameters: _queryParams,
565
565
  requestType: "json",
@@ -625,7 +625,7 @@ class Agents {
625
625
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
626
626
  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)}`),
627
627
  method: "DELETE",
628
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "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),
628
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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),
629
629
  contentType: "application/json",
630
630
  requestType: "json",
631
631
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -685,7 +685,7 @@ class Agents {
685
685
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
686
686
  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)}`),
687
687
  method: "PATCH",
688
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "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),
688
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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),
689
689
  contentType: "application/json",
690
690
  requestType: "json",
691
691
  body: serializers.UpdateAgent.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -760,7 +760,7 @@ class Agents {
760
760
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
761
761
  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)}/summarize`),
762
762
  method: "POST",
763
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "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),
763
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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),
764
764
  contentType: "application/json",
765
765
  queryParameters: _queryParams,
766
766
  requestType: "json",
@@ -826,7 +826,7 @@ class Agents {
826
826
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
827
827
  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"),
828
828
  method: "POST",
829
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.137", "User-Agent": "@letta-ai/letta-client/0.1.137", "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),
829
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.139", "User-Agent": "@letta-ai/letta-client/0.1.139", "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),
830
830
  contentType: "application/json",
831
831
  requestType: "json",
832
832
  body: serializers.AgentsSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),