@letta-ai/letta-client 0.1.137 → 0.1.138

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 (206) 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/batches/client/Client.js +4 -4
  14. package/api/resources/blocks/client/Client.js +6 -6
  15. package/api/resources/blocks/resources/agents/client/Client.js +1 -1
  16. package/api/resources/clientSideAccessTokens/client/Client.js +2 -2
  17. package/api/resources/embeddingModels/client/Client.js +1 -1
  18. package/api/resources/groups/client/Client.js +6 -6
  19. package/api/resources/groups/resources/messages/client/Client.js +5 -5
  20. package/api/resources/health/client/Client.js +1 -1
  21. package/api/resources/identities/client/Client.js +7 -7
  22. package/api/resources/identities/resources/properties/client/Client.js +1 -1
  23. package/api/resources/index.d.ts +2 -1
  24. package/api/resources/index.js +3 -2
  25. package/api/resources/jobs/client/Client.js +4 -4
  26. package/api/resources/messages/client/Client.js +1 -1
  27. package/api/resources/models/client/Client.js +1 -1
  28. package/api/resources/projects/client/Client.js +1 -1
  29. package/api/resources/providers/client/Client.js +5 -5
  30. package/api/resources/runs/client/Client.js +4 -4
  31. package/api/resources/runs/resources/messages/client/Client.js +1 -1
  32. package/api/resources/runs/resources/steps/client/Client.js +1 -1
  33. package/api/resources/runs/resources/usage/client/Client.js +1 -1
  34. package/api/resources/sources/client/Client.js +8 -8
  35. package/api/resources/sources/resources/files/client/Client.js +3 -3
  36. package/api/resources/sources/resources/passages/client/Client.js +1 -1
  37. package/api/resources/steps/client/Client.d.ts +16 -0
  38. package/api/resources/steps/client/Client.js +91 -3
  39. package/api/resources/steps/client/requests/AddFeedbackRequest.d.ts +11 -0
  40. package/api/resources/steps/client/requests/AddFeedbackRequest.js +5 -0
  41. package/api/resources/steps/client/requests/StepsListRequest.d.ts +9 -0
  42. package/api/resources/steps/client/requests/index.d.ts +1 -0
  43. package/api/resources/steps/index.d.ts +2 -0
  44. package/api/resources/steps/index.js +2 -0
  45. package/api/resources/steps/resources/feedback/client/Client.d.ts +39 -0
  46. package/api/resources/steps/resources/feedback/client/Client.js +111 -0
  47. package/api/resources/steps/resources/feedback/client/index.d.ts +1 -0
  48. package/api/resources/steps/resources/feedback/client/index.js +2 -0
  49. package/api/resources/steps/resources/feedback/index.d.ts +1 -0
  50. package/api/resources/steps/resources/feedback/index.js +17 -0
  51. package/api/resources/steps/resources/index.d.ts +1 -0
  52. package/api/resources/steps/resources/index.js +37 -0
  53. package/api/resources/steps/types/AddFeedbackRequestFeedback.d.ts +8 -0
  54. package/api/resources/steps/types/AddFeedbackRequestFeedback.js +10 -0
  55. package/api/resources/steps/types/StepsListRequestFeedback.d.ts +8 -0
  56. package/api/resources/steps/types/StepsListRequestFeedback.js +10 -0
  57. package/api/resources/steps/types/index.d.ts +2 -0
  58. package/api/resources/steps/types/index.js +18 -0
  59. package/api/resources/tags/client/Client.js +1 -1
  60. package/api/resources/telemetry/client/Client.js +1 -1
  61. package/api/resources/templates/client/Client.js +1 -1
  62. package/api/resources/templates/resources/agents/client/Client.js +1 -1
  63. package/api/resources/tools/client/Client.d.ts +17 -0
  64. package/api/resources/tools/client/Client.js +89 -18
  65. package/api/resources/tools/types/TestMcpServerRequest.d.ts +5 -0
  66. package/api/resources/tools/types/TestMcpServerRequest.js +5 -0
  67. package/api/resources/tools/types/index.d.ts +1 -0
  68. package/api/resources/tools/types/index.js +1 -0
  69. package/api/resources/voice/client/Client.js +1 -1
  70. package/api/types/Step.d.ts +2 -0
  71. package/api/types/StepFeedback.d.ts +8 -0
  72. package/api/types/StepFeedback.js +10 -0
  73. package/api/types/index.d.ts +1 -0
  74. package/api/types/index.js +1 -0
  75. package/dist/api/resources/agents/client/Client.js +10 -10
  76. package/dist/api/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -0
  77. package/dist/api/resources/agents/resources/blocks/client/Client.js +5 -5
  78. package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
  79. package/dist/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
  80. package/dist/api/resources/agents/resources/groups/client/Client.js +1 -1
  81. package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  82. package/dist/api/resources/agents/resources/messages/client/Client.js +6 -6
  83. package/dist/api/resources/agents/resources/passages/client/Client.js +4 -4
  84. package/dist/api/resources/agents/resources/sources/client/Client.js +3 -3
  85. package/dist/api/resources/agents/resources/templates/client/Client.js +3 -3
  86. package/dist/api/resources/agents/resources/tools/client/Client.js +3 -3
  87. package/dist/api/resources/batches/client/Client.js +4 -4
  88. package/dist/api/resources/blocks/client/Client.js +6 -6
  89. package/dist/api/resources/blocks/resources/agents/client/Client.js +1 -1
  90. package/dist/api/resources/clientSideAccessTokens/client/Client.js +2 -2
  91. package/dist/api/resources/embeddingModels/client/Client.js +1 -1
  92. package/dist/api/resources/groups/client/Client.js +6 -6
  93. package/dist/api/resources/groups/resources/messages/client/Client.js +5 -5
  94. package/dist/api/resources/health/client/Client.js +1 -1
  95. package/dist/api/resources/identities/client/Client.js +7 -7
  96. package/dist/api/resources/identities/resources/properties/client/Client.js +1 -1
  97. package/dist/api/resources/index.d.ts +2 -1
  98. package/dist/api/resources/index.js +3 -2
  99. package/dist/api/resources/jobs/client/Client.js +4 -4
  100. package/dist/api/resources/messages/client/Client.js +1 -1
  101. package/dist/api/resources/models/client/Client.js +1 -1
  102. package/dist/api/resources/projects/client/Client.js +1 -1
  103. package/dist/api/resources/providers/client/Client.js +5 -5
  104. package/dist/api/resources/runs/client/Client.js +4 -4
  105. package/dist/api/resources/runs/resources/messages/client/Client.js +1 -1
  106. package/dist/api/resources/runs/resources/steps/client/Client.js +1 -1
  107. package/dist/api/resources/runs/resources/usage/client/Client.js +1 -1
  108. package/dist/api/resources/sources/client/Client.js +8 -8
  109. package/dist/api/resources/sources/resources/files/client/Client.js +3 -3
  110. package/dist/api/resources/sources/resources/passages/client/Client.js +1 -1
  111. package/dist/api/resources/steps/client/Client.d.ts +16 -0
  112. package/dist/api/resources/steps/client/Client.js +91 -3
  113. package/dist/api/resources/steps/client/requests/AddFeedbackRequest.d.ts +11 -0
  114. package/dist/api/resources/steps/client/requests/AddFeedbackRequest.js +5 -0
  115. package/dist/api/resources/steps/client/requests/StepsListRequest.d.ts +9 -0
  116. package/dist/api/resources/steps/client/requests/index.d.ts +1 -0
  117. package/dist/api/resources/steps/index.d.ts +2 -0
  118. package/dist/api/resources/steps/index.js +2 -0
  119. package/dist/api/resources/steps/resources/feedback/client/Client.d.ts +39 -0
  120. package/dist/api/resources/steps/resources/feedback/client/Client.js +111 -0
  121. package/dist/api/resources/steps/resources/feedback/client/index.d.ts +1 -0
  122. package/dist/api/resources/steps/resources/feedback/client/index.js +2 -0
  123. package/dist/api/resources/steps/resources/feedback/index.d.ts +1 -0
  124. package/dist/api/resources/steps/resources/feedback/index.js +17 -0
  125. package/dist/api/resources/steps/resources/index.d.ts +1 -0
  126. package/dist/api/resources/steps/resources/index.js +37 -0
  127. package/dist/api/resources/steps/types/AddFeedbackRequestFeedback.d.ts +8 -0
  128. package/dist/api/resources/steps/types/AddFeedbackRequestFeedback.js +10 -0
  129. package/dist/api/resources/steps/types/StepsListRequestFeedback.d.ts +8 -0
  130. package/dist/api/resources/steps/types/StepsListRequestFeedback.js +10 -0
  131. package/dist/api/resources/steps/types/index.d.ts +2 -0
  132. package/dist/api/resources/steps/types/index.js +18 -0
  133. package/dist/api/resources/tags/client/Client.js +1 -1
  134. package/dist/api/resources/telemetry/client/Client.js +1 -1
  135. package/dist/api/resources/templates/client/Client.js +1 -1
  136. package/dist/api/resources/templates/resources/agents/client/Client.js +1 -1
  137. package/dist/api/resources/tools/client/Client.d.ts +17 -0
  138. package/dist/api/resources/tools/client/Client.js +89 -18
  139. package/dist/api/resources/tools/types/TestMcpServerRequest.d.ts +5 -0
  140. package/dist/api/resources/tools/types/TestMcpServerRequest.js +5 -0
  141. package/dist/api/resources/tools/types/index.d.ts +1 -0
  142. package/dist/api/resources/tools/types/index.js +1 -0
  143. package/dist/api/resources/voice/client/Client.js +1 -1
  144. package/dist/api/types/Step.d.ts +2 -0
  145. package/dist/api/types/StepFeedback.d.ts +8 -0
  146. package/dist/api/types/StepFeedback.js +10 -0
  147. package/dist/api/types/index.d.ts +1 -0
  148. package/dist/api/types/index.js +1 -0
  149. package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -0
  150. package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.js +1 -0
  151. package/dist/serialization/resources/index.d.ts +2 -1
  152. package/dist/serialization/resources/index.js +3 -2
  153. package/dist/serialization/resources/steps/index.d.ts +1 -0
  154. package/dist/serialization/resources/steps/index.js +1 -0
  155. package/dist/serialization/resources/steps/types/AddFeedbackRequestFeedback.d.ts +10 -0
  156. package/dist/serialization/resources/steps/types/AddFeedbackRequestFeedback.js +41 -0
  157. package/dist/serialization/resources/steps/types/StepsListRequestFeedback.d.ts +10 -0
  158. package/dist/serialization/resources/steps/types/StepsListRequestFeedback.js +41 -0
  159. package/dist/serialization/resources/steps/types/index.d.ts +2 -0
  160. package/dist/serialization/resources/steps/types/index.js +18 -0
  161. package/dist/serialization/resources/tools/client/index.d.ts +1 -0
  162. package/dist/serialization/resources/tools/client/index.js +2 -1
  163. package/dist/serialization/resources/tools/client/testMcpServer.d.ts +11 -0
  164. package/dist/serialization/resources/tools/client/testMcpServer.js +42 -0
  165. package/dist/serialization/resources/tools/types/TestMcpServerRequest.d.ts +13 -0
  166. package/dist/serialization/resources/tools/types/TestMcpServerRequest.js +44 -0
  167. package/dist/serialization/resources/tools/types/index.d.ts +1 -0
  168. package/dist/serialization/resources/tools/types/index.js +1 -0
  169. package/dist/serialization/types/Step.d.ts +2 -0
  170. package/dist/serialization/types/Step.js +2 -0
  171. package/dist/serialization/types/StepFeedback.d.ts +10 -0
  172. package/dist/serialization/types/StepFeedback.js +41 -0
  173. package/dist/serialization/types/index.d.ts +1 -0
  174. package/dist/serialization/types/index.js +1 -0
  175. package/dist/version.d.ts +1 -1
  176. package/dist/version.js +1 -1
  177. package/package.json +1 -1
  178. package/reference.md +189 -0
  179. package/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -0
  180. package/serialization/resources/agents/client/requests/CreateAgentRequest.js +1 -0
  181. package/serialization/resources/index.d.ts +2 -1
  182. package/serialization/resources/index.js +3 -2
  183. package/serialization/resources/steps/index.d.ts +1 -0
  184. package/serialization/resources/steps/index.js +1 -0
  185. package/serialization/resources/steps/types/AddFeedbackRequestFeedback.d.ts +10 -0
  186. package/serialization/resources/steps/types/AddFeedbackRequestFeedback.js +41 -0
  187. package/serialization/resources/steps/types/StepsListRequestFeedback.d.ts +10 -0
  188. package/serialization/resources/steps/types/StepsListRequestFeedback.js +41 -0
  189. package/serialization/resources/steps/types/index.d.ts +2 -0
  190. package/serialization/resources/steps/types/index.js +18 -0
  191. package/serialization/resources/tools/client/index.d.ts +1 -0
  192. package/serialization/resources/tools/client/index.js +2 -1
  193. package/serialization/resources/tools/client/testMcpServer.d.ts +11 -0
  194. package/serialization/resources/tools/client/testMcpServer.js +42 -0
  195. package/serialization/resources/tools/types/TestMcpServerRequest.d.ts +13 -0
  196. package/serialization/resources/tools/types/TestMcpServerRequest.js +44 -0
  197. package/serialization/resources/tools/types/index.d.ts +1 -0
  198. package/serialization/resources/tools/types/index.js +1 -0
  199. package/serialization/types/Step.d.ts +2 -0
  200. package/serialization/types/Step.js +2 -0
  201. package/serialization/types/StepFeedback.d.ts +10 -0
  202. package/serialization/types/StepFeedback.js +41 -0
  203. package/serialization/types/index.d.ts +1 -0
  204. package/serialization/types/index.js +1 -0
  205. package/version.d.ts +1 -1
  206. package/version.js +1 -1
@@ -4,6 +4,7 @@
4
4
  import * as environments from "../../../../environments";
5
5
  import * as core from "../../../../core";
6
6
  import * as Letta from "../../../index";
7
+ import { Feedback } from "../resources/feedback/client/Client";
7
8
  export declare namespace Steps {
8
9
  interface Options {
9
10
  environment?: core.Supplier<environments.LettaEnvironment | string>;
@@ -25,7 +26,9 @@ export declare namespace Steps {
25
26
  }
26
27
  export declare class Steps {
27
28
  protected readonly _options: Steps.Options;
29
+ protected _feedback: Feedback | undefined;
28
30
  constructor(_options?: Steps.Options);
31
+ get feedback(): Feedback;
29
32
  /**
30
33
  * List steps with optional pagination and date filters.
31
34
  * Dates should be provided in ISO 8601 format (e.g. 2025-01-29T15:01:19-08:00)
@@ -51,6 +54,19 @@ export declare class Steps {
51
54
  * await client.steps.retrieve("step_id")
52
55
  */
53
56
  retrieve(stepId: string, requestOptions?: Steps.RequestOptions): Promise<Letta.Step>;
57
+ /**
58
+ * Add feedback to a step.
59
+ *
60
+ * @param {string} stepId
61
+ * @param {Letta.AddFeedbackRequest} request
62
+ * @param {Steps.RequestOptions} requestOptions - Request-specific configuration.
63
+ *
64
+ * @throws {@link Letta.UnprocessableEntityError}
65
+ *
66
+ * @example
67
+ * await client.steps.addFeedback("step_id")
68
+ */
69
+ addFeedback(stepId: string, request?: Letta.AddFeedbackRequest, requestOptions?: Steps.RequestOptions): Promise<Letta.Step>;
54
70
  protected _getCustomAuthorizationHeaders(): Promise<{
55
71
  Authorization: string;
56
72
  }>;
@@ -55,10 +55,15 @@ const Letta = __importStar(require("../../../index"));
55
55
  const url_join_1 = __importDefault(require("url-join"));
56
56
  const serializers = __importStar(require("../../../../serialization/index"));
57
57
  const errors = __importStar(require("../../../../errors/index"));
58
+ const Client_1 = require("../resources/feedback/client/Client");
58
59
  class Steps {
59
60
  constructor(_options = {}) {
60
61
  this._options = _options;
61
62
  }
63
+ get feedback() {
64
+ var _a;
65
+ return ((_a = this._feedback) !== null && _a !== void 0 ? _a : (this._feedback = new Client_1.Feedback(this._options)));
66
+ }
62
67
  /**
63
68
  * List steps with optional pagination and date filters.
64
69
  * Dates should be provided in ISO 8601 format (e.g. 2025-01-29T15:01:19-08:00)
@@ -74,7 +79,7 @@ class Steps {
74
79
  list() {
75
80
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
76
81
  var _a, _b, _c;
77
- const { before, after, limit, order, startDate, endDate, model, agentId, traceIds } = request;
82
+ const { before, after, limit, order, startDate, endDate, model, agentId, traceIds, feedback, tags } = request;
78
83
  const _queryParams = {};
79
84
  if (before != null) {
80
85
  _queryParams["before"] = before;
@@ -108,10 +113,21 @@ class Steps {
108
113
  _queryParams["trace_ids"] = traceIds;
109
114
  }
110
115
  }
116
+ if (feedback != null) {
117
+ _queryParams["feedback"] = feedback;
118
+ }
119
+ if (tags != null) {
120
+ if (Array.isArray(tags)) {
121
+ _queryParams["tags"] = tags.map((item) => item);
122
+ }
123
+ else {
124
+ _queryParams["tags"] = tags;
125
+ }
126
+ }
111
127
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
112
128
  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/steps/"),
113
129
  method: "GET",
114
- 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),
130
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.138", "User-Agent": "@letta-ai/letta-client/0.1.138", "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),
115
131
  contentType: "application/json",
116
132
  queryParameters: _queryParams,
117
133
  requestType: "json",
@@ -177,7 +193,7 @@ class Steps {
177
193
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
178
194
  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/steps/${encodeURIComponent(stepId)}`),
179
195
  method: "GET",
180
- 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),
196
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.138", "User-Agent": "@letta-ai/letta-client/0.1.138", "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),
181
197
  contentType: "application/json",
182
198
  requestType: "json",
183
199
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -225,6 +241,78 @@ class Steps {
225
241
  }
226
242
  });
227
243
  }
244
+ /**
245
+ * Add feedback to a step.
246
+ *
247
+ * @param {string} stepId
248
+ * @param {Letta.AddFeedbackRequest} request
249
+ * @param {Steps.RequestOptions} requestOptions - Request-specific configuration.
250
+ *
251
+ * @throws {@link Letta.UnprocessableEntityError}
252
+ *
253
+ * @example
254
+ * await client.steps.addFeedback("step_id")
255
+ */
256
+ addFeedback(stepId_1) {
257
+ return __awaiter(this, arguments, void 0, function* (stepId, request = {}, requestOptions) {
258
+ var _a, _b, _c;
259
+ const { feedback } = request;
260
+ const _queryParams = {};
261
+ if (feedback != null) {
262
+ _queryParams["feedback"] = feedback;
263
+ }
264
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
265
+ 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/steps/${encodeURIComponent(stepId)}/feedback`),
266
+ method: "PATCH",
267
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.138", "User-Agent": "@letta-ai/letta-client/0.1.138", "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),
268
+ contentType: "application/json",
269
+ queryParameters: _queryParams,
270
+ requestType: "json",
271
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
272
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
273
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
274
+ });
275
+ if (_response.ok) {
276
+ return serializers.Step.parseOrThrow(_response.body, {
277
+ unrecognizedObjectKeys: "passthrough",
278
+ allowUnrecognizedUnionMembers: true,
279
+ allowUnrecognizedEnumValues: true,
280
+ skipValidation: true,
281
+ breadcrumbsPrefix: ["response"],
282
+ });
283
+ }
284
+ if (_response.error.reason === "status-code") {
285
+ switch (_response.error.statusCode) {
286
+ case 422:
287
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
288
+ unrecognizedObjectKeys: "passthrough",
289
+ allowUnrecognizedUnionMembers: true,
290
+ allowUnrecognizedEnumValues: true,
291
+ skipValidation: true,
292
+ breadcrumbsPrefix: ["response"],
293
+ }));
294
+ default:
295
+ throw new errors.LettaError({
296
+ statusCode: _response.error.statusCode,
297
+ body: _response.error.body,
298
+ });
299
+ }
300
+ }
301
+ switch (_response.error.reason) {
302
+ case "non-json":
303
+ throw new errors.LettaError({
304
+ statusCode: _response.error.statusCode,
305
+ body: _response.error.rawBody,
306
+ });
307
+ case "timeout":
308
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/steps/{step_id}/feedback.");
309
+ case "unknown":
310
+ throw new errors.LettaError({
311
+ message: _response.error.errorMessage,
312
+ });
313
+ }
314
+ });
315
+ }
228
316
  _getCustomAuthorizationHeaders() {
229
317
  return __awaiter(this, void 0, void 0, function* () {
230
318
  const tokenValue = yield core.Supplier.get(this._options.token);
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Letta from "../../../../index";
5
+ /**
6
+ * @example
7
+ * {}
8
+ */
9
+ export interface AddFeedbackRequest {
10
+ feedback?: Letta.AddFeedbackRequestFeedback;
11
+ }
@@ -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 });
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
+ import * as Letta from "../../../../index";
4
5
  /**
5
6
  * @example
6
7
  * {}
@@ -42,4 +43,12 @@ export interface StepsListRequest {
42
43
  * Filter by trace ids returned by the server
43
44
  */
44
45
  traceIds?: string | string[];
46
+ /**
47
+ * Filter by feedback
48
+ */
49
+ feedback?: Letta.StepsListRequestFeedback;
50
+ /**
51
+ * Filter by tags
52
+ */
53
+ tags?: string | string[];
45
54
  }
@@ -1 +1,2 @@
1
1
  export { type StepsListRequest } from "./StepsListRequest";
2
+ export { type AddFeedbackRequest } from "./AddFeedbackRequest";
@@ -1 +1,3 @@
1
+ export * from "./types";
1
2
  export * from "./client";
3
+ export * from "./resources";
@@ -14,4 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./types"), exports);
17
18
  __exportStar(require("./client"), exports);
19
+ __exportStar(require("./resources"), exports);
@@ -0,0 +1,39 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as environments from "../../../../../../environments";
5
+ import * as core from "../../../../../../core";
6
+ export declare namespace Feedback {
7
+ interface Options {
8
+ environment?: core.Supplier<environments.LettaEnvironment | string>;
9
+ /** Specify a custom URL to connect the client to. */
10
+ baseUrl?: core.Supplier<string>;
11
+ token?: core.Supplier<string | undefined>;
12
+ fetcher?: core.FetchFunction;
13
+ }
14
+ interface RequestOptions {
15
+ /** The maximum time to wait for a response in seconds. */
16
+ timeoutInSeconds?: number;
17
+ /** The number of times to retry the request. Defaults to 2. */
18
+ maxRetries?: number;
19
+ /** A hook to abort the request. */
20
+ abortSignal?: AbortSignal;
21
+ /** Additional headers to include in the request. */
22
+ headers?: Record<string, string>;
23
+ }
24
+ }
25
+ export declare class Feedback {
26
+ protected readonly _options: Feedback.Options;
27
+ constructor(_options?: Feedback.Options);
28
+ /**
29
+ * @param {string} stepId
30
+ * @param {Feedback.RequestOptions} requestOptions - Request-specific configuration.
31
+ *
32
+ * @example
33
+ * await client.steps.feedback.add("step_id")
34
+ */
35
+ add(stepId: string, requestOptions?: Feedback.RequestOptions): Promise<void>;
36
+ protected _getCustomAuthorizationHeaders(): Promise<{
37
+ Authorization: string;
38
+ }>;
39
+ }
@@ -0,0 +1,111 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
39
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
40
+ return new (P || (P = Promise))(function (resolve, reject) {
41
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
42
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
43
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
44
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
45
+ });
46
+ };
47
+ var __importDefault = (this && this.__importDefault) || function (mod) {
48
+ return (mod && mod.__esModule) ? mod : { "default": mod };
49
+ };
50
+ Object.defineProperty(exports, "__esModule", { value: true });
51
+ exports.Feedback = void 0;
52
+ const environments = __importStar(require("../../../../../../environments"));
53
+ const core = __importStar(require("../../../../../../core"));
54
+ const url_join_1 = __importDefault(require("url-join"));
55
+ const errors = __importStar(require("../../../../../../errors/index"));
56
+ class Feedback {
57
+ constructor(_options = {}) {
58
+ this._options = _options;
59
+ }
60
+ /**
61
+ * @param {string} stepId
62
+ * @param {Feedback.RequestOptions} requestOptions - Request-specific configuration.
63
+ *
64
+ * @example
65
+ * await client.steps.feedback.add("step_id")
66
+ */
67
+ add(stepId, requestOptions) {
68
+ return __awaiter(this, void 0, void 0, function* () {
69
+ var _a, _b, _c;
70
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
71
+ 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/steps/${encodeURIComponent(stepId)}/feedback`),
72
+ method: "POST",
73
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.138", "User-Agent": "@letta-ai/letta-client/0.1.138", "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),
74
+ contentType: "application/json",
75
+ requestType: "json",
76
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
77
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
78
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
79
+ });
80
+ if (_response.ok) {
81
+ return;
82
+ }
83
+ if (_response.error.reason === "status-code") {
84
+ throw new errors.LettaError({
85
+ statusCode: _response.error.statusCode,
86
+ body: _response.error.body,
87
+ });
88
+ }
89
+ switch (_response.error.reason) {
90
+ case "non-json":
91
+ throw new errors.LettaError({
92
+ statusCode: _response.error.statusCode,
93
+ body: _response.error.rawBody,
94
+ });
95
+ case "timeout":
96
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/steps/{step_id}/feedback.");
97
+ case "unknown":
98
+ throw new errors.LettaError({
99
+ message: _response.error.errorMessage,
100
+ });
101
+ }
102
+ });
103
+ }
104
+ _getCustomAuthorizationHeaders() {
105
+ return __awaiter(this, void 0, void 0, function* () {
106
+ const tokenValue = yield core.Supplier.get(this._options.token);
107
+ return { Authorization: `Bearer ${tokenValue}` };
108
+ });
109
+ }
110
+ }
111
+ exports.Feedback = Feedback;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from "./client";
@@ -0,0 +1,17 @@
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("./client"), exports);
@@ -0,0 +1 @@
1
+ export * as feedback from "./feedback";
@@ -0,0 +1,37 @@
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.feedback = void 0;
37
+ exports.feedback = __importStar(require("./feedback"));
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export type AddFeedbackRequestFeedback = "positive" | "negative";
5
+ export declare const AddFeedbackRequestFeedback: {
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.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.138", "User-Agent": "@letta-ai/letta-client/0.1.138", "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.138", "User-Agent": "@letta-ai/letta-client/0.1.138", "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.138", "User-Agent": "@letta-ai/letta-client/0.1.138", "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.138", "User-Agent": "@letta-ai/letta-client/0.1.138", "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
  }>;