@letta-ai/letta-client 0.1.32 → 0.1.33

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 (142) hide show
  1. package/Client.d.ts +3 -0
  2. package/Client.js +23 -18
  3. package/api/resources/agents/client/Client.js +20 -8
  4. package/api/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -1
  5. package/api/resources/agents/resources/archivalMemory/client/Client.js +3 -3
  6. package/api/resources/agents/resources/context/client/Client.js +1 -1
  7. package/api/resources/agents/resources/coreMemory/client/Client.js +6 -6
  8. package/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  9. package/api/resources/agents/resources/messages/client/Client.js +5 -5
  10. package/api/resources/agents/resources/sources/client/Client.js +3 -3
  11. package/api/resources/agents/resources/templates/client/Client.js +3 -3
  12. package/api/resources/agents/resources/tools/client/Client.js +3 -3
  13. package/api/resources/blocks/client/Client.js +6 -6
  14. package/api/resources/health/client/Client.js +1 -1
  15. package/api/resources/identities/client/Client.d.ts +44 -0
  16. package/api/resources/identities/client/Client.js +155 -0
  17. package/api/resources/identities/client/index.d.ts +1 -0
  18. package/api/resources/identities/client/index.js +17 -0
  19. package/api/resources/identities/client/requests/ListIdentitiesRequest.d.ts +16 -0
  20. package/api/resources/identities/client/requests/ListIdentitiesRequest.js +5 -0
  21. package/api/resources/identities/client/requests/index.d.ts +1 -0
  22. package/api/resources/identities/client/requests/index.js +2 -0
  23. package/api/resources/identities/index.d.ts +1 -0
  24. package/api/resources/identities/index.js +17 -0
  25. package/api/resources/index.d.ts +2 -0
  26. package/api/resources/index.js +3 -1
  27. package/api/resources/jobs/client/Client.js +4 -4
  28. package/api/resources/models/client/Client.js +2 -2
  29. package/api/resources/providers/client/Client.js +4 -4
  30. package/api/resources/runs/client/Client.js +6 -6
  31. package/api/resources/sources/client/Client.js +6 -6
  32. package/api/resources/sources/resources/files/client/Client.js +3 -3
  33. package/api/resources/sources/resources/passages/client/Client.js +1 -1
  34. package/api/resources/steps/client/Client.js +2 -2
  35. package/api/resources/tag/client/Client.js +1 -1
  36. package/api/resources/templates/client/Client.js +1 -1
  37. package/api/resources/tools/client/Client.js +11 -11
  38. package/api/types/ActionParametersModel.d.ts +1 -0
  39. package/api/types/ActionResponseModel.d.ts +1 -0
  40. package/api/types/AppAuthSchemeAuthMode.d.ts +2 -1
  41. package/api/types/AppAuthSchemeAuthMode.js +1 -0
  42. package/api/types/Identity.d.ts +18 -0
  43. package/api/types/Identity.js +5 -0
  44. package/api/types/IdentityType.d.ts +12 -0
  45. package/api/types/IdentityType.js +11 -0
  46. package/api/types/index.d.ts +2 -0
  47. package/api/types/index.js +2 -0
  48. package/dist/Client.d.ts +3 -0
  49. package/dist/Client.js +23 -18
  50. package/dist/api/resources/agents/client/Client.js +20 -8
  51. package/dist/api/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -1
  52. package/dist/api/resources/agents/resources/archivalMemory/client/Client.js +3 -3
  53. package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
  54. package/dist/api/resources/agents/resources/coreMemory/client/Client.js +6 -6
  55. package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  56. package/dist/api/resources/agents/resources/messages/client/Client.js +5 -5
  57. package/dist/api/resources/agents/resources/sources/client/Client.js +3 -3
  58. package/dist/api/resources/agents/resources/templates/client/Client.js +3 -3
  59. package/dist/api/resources/agents/resources/tools/client/Client.js +3 -3
  60. package/dist/api/resources/blocks/client/Client.js +6 -6
  61. package/dist/api/resources/health/client/Client.js +1 -1
  62. package/dist/api/resources/identities/client/Client.d.ts +44 -0
  63. package/dist/api/resources/identities/client/Client.js +155 -0
  64. package/dist/api/resources/identities/client/index.d.ts +1 -0
  65. package/dist/api/resources/identities/client/index.js +17 -0
  66. package/dist/api/resources/identities/client/requests/ListIdentitiesRequest.d.ts +16 -0
  67. package/dist/api/resources/identities/client/requests/ListIdentitiesRequest.js +5 -0
  68. package/dist/api/resources/identities/client/requests/index.d.ts +1 -0
  69. package/dist/api/resources/identities/client/requests/index.js +2 -0
  70. package/dist/api/resources/identities/index.d.ts +1 -0
  71. package/dist/api/resources/identities/index.js +17 -0
  72. package/dist/api/resources/index.d.ts +2 -0
  73. package/dist/api/resources/index.js +3 -1
  74. package/dist/api/resources/jobs/client/Client.js +4 -4
  75. package/dist/api/resources/models/client/Client.js +2 -2
  76. package/dist/api/resources/providers/client/Client.js +4 -4
  77. package/dist/api/resources/runs/client/Client.js +6 -6
  78. package/dist/api/resources/sources/client/Client.js +6 -6
  79. package/dist/api/resources/sources/resources/files/client/Client.js +3 -3
  80. package/dist/api/resources/sources/resources/passages/client/Client.js +1 -1
  81. package/dist/api/resources/steps/client/Client.js +2 -2
  82. package/dist/api/resources/tag/client/Client.js +1 -1
  83. package/dist/api/resources/templates/client/Client.js +1 -1
  84. package/dist/api/resources/tools/client/Client.js +11 -11
  85. package/dist/api/types/ActionParametersModel.d.ts +1 -0
  86. package/dist/api/types/ActionResponseModel.d.ts +1 -0
  87. package/dist/api/types/AppAuthSchemeAuthMode.d.ts +2 -1
  88. package/dist/api/types/AppAuthSchemeAuthMode.js +1 -0
  89. package/dist/api/types/Identity.d.ts +18 -0
  90. package/dist/api/types/Identity.js +5 -0
  91. package/dist/api/types/IdentityType.d.ts +12 -0
  92. package/dist/api/types/IdentityType.js +11 -0
  93. package/dist/api/types/index.d.ts +2 -0
  94. package/dist/api/types/index.js +2 -0
  95. package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -1
  96. package/dist/serialization/resources/identities/client/index.d.ts +1 -0
  97. package/dist/serialization/resources/identities/client/index.js +37 -0
  98. package/dist/serialization/resources/identities/client/listIdentities.d.ts +11 -0
  99. package/dist/serialization/resources/identities/client/listIdentities.js +42 -0
  100. package/dist/serialization/resources/identities/index.d.ts +1 -0
  101. package/dist/serialization/resources/identities/index.js +17 -0
  102. package/dist/serialization/resources/index.d.ts +1 -0
  103. package/dist/serialization/resources/index.js +2 -1
  104. package/dist/serialization/types/ActionParametersModel.d.ts +1 -0
  105. package/dist/serialization/types/ActionParametersModel.js +1 -0
  106. package/dist/serialization/types/ActionResponseModel.d.ts +1 -0
  107. package/dist/serialization/types/ActionResponseModel.js +1 -0
  108. package/dist/serialization/types/AppAuthSchemeAuthMode.d.ts +1 -1
  109. package/dist/serialization/types/AppAuthSchemeAuthMode.js +1 -1
  110. package/dist/serialization/types/Identity.d.ts +19 -0
  111. package/dist/serialization/types/Identity.js +50 -0
  112. package/dist/serialization/types/IdentityType.d.ts +10 -0
  113. package/dist/serialization/types/IdentityType.js +41 -0
  114. package/dist/serialization/types/index.d.ts +2 -0
  115. package/dist/serialization/types/index.js +2 -0
  116. package/dist/version.d.ts +1 -1
  117. package/dist/version.js +1 -1
  118. package/package.json +1 -1
  119. package/reference.md +65 -0
  120. package/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -1
  121. package/serialization/resources/identities/client/index.d.ts +1 -0
  122. package/serialization/resources/identities/client/index.js +37 -0
  123. package/serialization/resources/identities/client/listIdentities.d.ts +11 -0
  124. package/serialization/resources/identities/client/listIdentities.js +42 -0
  125. package/serialization/resources/identities/index.d.ts +1 -0
  126. package/serialization/resources/identities/index.js +17 -0
  127. package/serialization/resources/index.d.ts +1 -0
  128. package/serialization/resources/index.js +2 -1
  129. package/serialization/types/ActionParametersModel.d.ts +1 -0
  130. package/serialization/types/ActionParametersModel.js +1 -0
  131. package/serialization/types/ActionResponseModel.d.ts +1 -0
  132. package/serialization/types/ActionResponseModel.js +1 -0
  133. package/serialization/types/AppAuthSchemeAuthMode.d.ts +1 -1
  134. package/serialization/types/AppAuthSchemeAuthMode.js +1 -1
  135. package/serialization/types/Identity.d.ts +19 -0
  136. package/serialization/types/Identity.js +50 -0
  137. package/serialization/types/IdentityType.d.ts +10 -0
  138. package/serialization/types/IdentityType.js +41 -0
  139. package/serialization/types/index.d.ts +2 -0
  140. package/serialization/types/index.js +2 -0
  141. package/version.d.ts +1 -1
  142. package/version.js +1 -1
@@ -100,7 +100,7 @@ class Steps {
100
100
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
101
101
  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"),
102
102
  method: "GET",
103
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.32", "User-Agent": "@letta-ai/letta-client/0.1.32", "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),
103
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.33", "User-Agent": "@letta-ai/letta-client/0.1.33", "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),
104
104
  contentType: "application/json",
105
105
  queryParameters: _queryParams,
106
106
  requestType: "json",
@@ -166,7 +166,7 @@ class Steps {
166
166
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
167
167
  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)}`),
168
168
  method: "GET",
169
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.32", "User-Agent": "@letta-ai/letta-client/0.1.32", "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),
169
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.33", "User-Agent": "@letta-ai/letta-client/0.1.33", "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),
170
170
  contentType: "application/json",
171
171
  requestType: "json",
172
172
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -87,7 +87,7 @@ class Tag {
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.32", "User-Agent": "@letta-ai/letta-client/0.1.32", "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.33", "User-Agent": "@letta-ai/letta-client/0.1.33", "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",
@@ -75,7 +75,7 @@ class Templates {
75
75
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
76
76
  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`),
77
77
  method: "POST",
78
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.32", "User-Agent": "@letta-ai/letta-client/0.1.32", "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
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.33", "User-Agent": "@letta-ai/letta-client/0.1.33", "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
79
  contentType: "application/json",
80
80
  requestType: "json",
81
81
  body: serializers.TemplatesCreateAgentsFromTemplateRequest.jsonOrThrow(request, {
@@ -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.32", "User-Agent": "@letta-ai/letta-client/0.1.32", "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.33", "User-Agent": "@letta-ai/letta-client/0.1.33", "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.32", "User-Agent": "@letta-ai/letta-client/0.1.32", "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.33", "User-Agent": "@letta-ai/letta-client/0.1.33", "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.32", "User-Agent": "@letta-ai/letta-client/0.1.32", "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.33", "User-Agent": "@letta-ai/letta-client/0.1.33", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
205
205
  contentType: "application/json",
206
206
  requestType: "json",
207
207
  body: serializers.ToolUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -278,7 +278,7 @@ class Tools {
278
278
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
279
279
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/tools/"),
280
280
  method: "GET",
281
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.32", "User-Agent": "@letta-ai/letta-client/0.1.32", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
281
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.33", "User-Agent": "@letta-ai/letta-client/0.1.33", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
282
282
  contentType: "application/json",
283
283
  queryParameters: _queryParams,
284
284
  requestType: "json",
@@ -346,7 +346,7 @@ class Tools {
346
346
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
347
347
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/tools/"),
348
348
  method: "POST",
349
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.32", "User-Agent": "@letta-ai/letta-client/0.1.32", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
349
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.33", "User-Agent": "@letta-ai/letta-client/0.1.33", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
350
350
  contentType: "application/json",
351
351
  requestType: "json",
352
352
  body: serializers.ToolCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -414,7 +414,7 @@ class Tools {
414
414
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
415
415
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/tools/"),
416
416
  method: "PUT",
417
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.32", "User-Agent": "@letta-ai/letta-client/0.1.32", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
417
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.33", "User-Agent": "@letta-ai/letta-client/0.1.33", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
418
418
  contentType: "application/json",
419
419
  requestType: "json",
420
420
  body: serializers.ToolCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -479,7 +479,7 @@ class Tools {
479
479
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
480
480
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/tools/add-base-tools"),
481
481
  method: "POST",
482
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.32", "User-Agent": "@letta-ai/letta-client/0.1.32", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
482
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.33", "User-Agent": "@letta-ai/letta-client/0.1.33", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
483
483
  contentType: "application/json",
484
484
  requestType: "json",
485
485
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -549,7 +549,7 @@ class Tools {
549
549
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
550
550
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/tools/run"),
551
551
  method: "POST",
552
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.32", "User-Agent": "@letta-ai/letta-client/0.1.32", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
552
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.33", "User-Agent": "@letta-ai/letta-client/0.1.33", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
553
553
  contentType: "application/json",
554
554
  requestType: "json",
555
555
  body: serializers.ToolRunFromSource.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -614,7 +614,7 @@ class Tools {
614
614
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
615
615
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/tools/composio/apps"),
616
616
  method: "GET",
617
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.32", "User-Agent": "@letta-ai/letta-client/0.1.32", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
617
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.33", "User-Agent": "@letta-ai/letta-client/0.1.33", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
618
618
  contentType: "application/json",
619
619
  requestType: "json",
620
620
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -679,7 +679,7 @@ class Tools {
679
679
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
680
680
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/tools/composio/apps/${encodeURIComponent(composioAppName)}/actions`),
681
681
  method: "GET",
682
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.32", "User-Agent": "@letta-ai/letta-client/0.1.32", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
682
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.33", "User-Agent": "@letta-ai/letta-client/0.1.33", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
683
683
  contentType: "application/json",
684
684
  requestType: "json",
685
685
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -744,7 +744,7 @@ class Tools {
744
744
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
745
745
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/tools/composio/${encodeURIComponent(composioActionName)}`),
746
746
  method: "POST",
747
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.32", "User-Agent": "@letta-ai/letta-client/0.1.32", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
747
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.33", "User-Agent": "@letta-ai/letta-client/0.1.33", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
748
748
  contentType: "application/json",
749
749
  requestType: "json",
750
750
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -9,4 +9,5 @@ export interface ActionParametersModel {
9
9
  title: string;
10
10
  type: string;
11
11
  required?: string[];
12
+ examples?: unknown[];
12
13
  }
@@ -9,4 +9,5 @@ export interface ActionResponseModel {
9
9
  title: string;
10
10
  type: string;
11
11
  required?: string[];
12
+ examples?: unknown[];
12
13
  }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export type AppAuthSchemeAuthMode = "OAUTH2" | "OAUTH1" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BASIC_WITH_JWT";
4
+ export type AppAuthSchemeAuthMode = "OAUTH2" | "OAUTH1" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BASIC_WITH_JWT" | "NO_AUTH";
5
5
  export declare const AppAuthSchemeAuthMode: {
6
6
  readonly Oauth2: "OAUTH2";
7
7
  readonly Oauth1: "OAUTH1";
@@ -9,4 +9,5 @@ export declare const AppAuthSchemeAuthMode: {
9
9
  readonly Basic: "BASIC";
10
10
  readonly BearerToken: "BEARER_TOKEN";
11
11
  readonly BasicWithJwt: "BASIC_WITH_JWT";
12
+ readonly NoAuth: "NO_AUTH";
12
13
  };
@@ -11,4 +11,5 @@ exports.AppAuthSchemeAuthMode = {
11
11
  Basic: "BASIC",
12
12
  BearerToken: "BEARER_TOKEN",
13
13
  BasicWithJwt: "BASIC_WITH_JWT",
14
+ NoAuth: "NO_AUTH",
14
15
  };
@@ -0,0 +1,18 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Letta from "../index";
5
+ export interface Identity {
6
+ /** The internal id of the identity. */
7
+ id: string;
8
+ /** External, user-generated identifier key of the identity. */
9
+ identifierKey: string;
10
+ /** The name of the identity. */
11
+ name: string;
12
+ /** The type of the identity. */
13
+ identityType: Letta.IdentityType;
14
+ /** The project id of the identity, if applicable. */
15
+ projectId?: string;
16
+ /** The ids of the agents associated with the identity. */
17
+ agents: Letta.AgentState[];
18
+ }
@@ -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 });
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * Enum to represent the type of the identity.
6
+ */
7
+ export type IdentityType = "org" | "user" | "other";
8
+ export declare const IdentityType: {
9
+ readonly Org: "org";
10
+ readonly User: "user";
11
+ readonly Other: "other";
12
+ };
@@ -0,0 +1,11 @@
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.IdentityType = void 0;
7
+ exports.IdentityType = {
8
+ Org: "org",
9
+ User: "user",
10
+ Other: "other",
11
+ };
@@ -84,6 +84,8 @@ export * from "./FunctionDefinitionOutput";
84
84
  export * from "./FunctionTool";
85
85
  export * from "./HttpValidationError";
86
86
  export * from "./Health";
87
+ export * from "./Identity";
88
+ export * from "./IdentityType";
87
89
  export * from "./ImageUrlDetail";
88
90
  export * from "./ImageUrl";
89
91
  export * from "./InitToolRule";
@@ -100,6 +100,8 @@ __exportStar(require("./FunctionDefinitionOutput"), exports);
100
100
  __exportStar(require("./FunctionTool"), exports);
101
101
  __exportStar(require("./HttpValidationError"), exports);
102
102
  __exportStar(require("./Health"), exports);
103
+ __exportStar(require("./Identity"), exports);
104
+ __exportStar(require("./IdentityType"), exports);
103
105
  __exportStar(require("./ImageUrlDetail"), exports);
104
106
  __exportStar(require("./ImageUrl"), exports);
105
107
  __exportStar(require("./InitToolRule"), exports);
package/dist/Client.d.ts CHANGED
@@ -6,6 +6,7 @@ import * as core from "./core";
6
6
  import { Tools } from "./api/resources/tools/client/Client";
7
7
  import { Sources } from "./api/resources/sources/client/Client";
8
8
  import { Agents } from "./api/resources/agents/client/Client";
9
+ import { Identities } from "./api/resources/identities/client/Client";
9
10
  import { Models } from "./api/resources/models/client/Client";
10
11
  import { Blocks } from "./api/resources/blocks/client/Client";
11
12
  import { Jobs } from "./api/resources/jobs/client/Client";
@@ -39,6 +40,7 @@ export declare class LettaClient {
39
40
  protected _tools: Tools | undefined;
40
41
  protected _sources: Sources | undefined;
41
42
  protected _agents: Agents | undefined;
43
+ protected _identities: Identities | undefined;
42
44
  protected _models: Models | undefined;
43
45
  protected _blocks: Blocks | undefined;
44
46
  protected _jobs: Jobs | undefined;
@@ -52,6 +54,7 @@ export declare class LettaClient {
52
54
  get tools(): Tools;
53
55
  get sources(): Sources;
54
56
  get agents(): Agents;
57
+ get identities(): Identities;
55
58
  get models(): Models;
56
59
  get blocks(): Blocks;
57
60
  get jobs(): Jobs;
package/dist/Client.js CHANGED
@@ -7,15 +7,16 @@ exports.LettaClient = void 0;
7
7
  const Client_1 = require("./api/resources/tools/client/Client");
8
8
  const Client_2 = require("./api/resources/sources/client/Client");
9
9
  const Client_3 = require("./api/resources/agents/client/Client");
10
- const Client_4 = require("./api/resources/models/client/Client");
11
- const Client_5 = require("./api/resources/blocks/client/Client");
12
- const Client_6 = require("./api/resources/jobs/client/Client");
13
- const Client_7 = require("./api/resources/health/client/Client");
14
- const Client_8 = require("./api/resources/providers/client/Client");
15
- const Client_9 = require("./api/resources/runs/client/Client");
16
- const Client_10 = require("./api/resources/steps/client/Client");
17
- const Client_11 = require("./api/resources/tag/client/Client");
18
- const Client_12 = require("./api/resources/templates/client/Client");
10
+ const Client_4 = require("./api/resources/identities/client/Client");
11
+ const Client_5 = require("./api/resources/models/client/Client");
12
+ const Client_6 = require("./api/resources/blocks/client/Client");
13
+ const Client_7 = require("./api/resources/jobs/client/Client");
14
+ const Client_8 = require("./api/resources/health/client/Client");
15
+ const Client_9 = require("./api/resources/providers/client/Client");
16
+ const Client_10 = require("./api/resources/runs/client/Client");
17
+ const Client_11 = require("./api/resources/steps/client/Client");
18
+ const Client_12 = require("./api/resources/tag/client/Client");
19
+ const Client_13 = require("./api/resources/templates/client/Client");
19
20
  class LettaClient {
20
21
  constructor(_options = {}) {
21
22
  this._options = _options;
@@ -32,41 +33,45 @@ class LettaClient {
32
33
  var _a;
33
34
  return ((_a = this._agents) !== null && _a !== void 0 ? _a : (this._agents = new Client_3.Agents(this._options)));
34
35
  }
36
+ get identities() {
37
+ var _a;
38
+ return ((_a = this._identities) !== null && _a !== void 0 ? _a : (this._identities = new Client_4.Identities(this._options)));
39
+ }
35
40
  get models() {
36
41
  var _a;
37
- return ((_a = this._models) !== null && _a !== void 0 ? _a : (this._models = new Client_4.Models(this._options)));
42
+ return ((_a = this._models) !== null && _a !== void 0 ? _a : (this._models = new Client_5.Models(this._options)));
38
43
  }
39
44
  get blocks() {
40
45
  var _a;
41
- return ((_a = this._blocks) !== null && _a !== void 0 ? _a : (this._blocks = new Client_5.Blocks(this._options)));
46
+ return ((_a = this._blocks) !== null && _a !== void 0 ? _a : (this._blocks = new Client_6.Blocks(this._options)));
42
47
  }
43
48
  get jobs() {
44
49
  var _a;
45
- return ((_a = this._jobs) !== null && _a !== void 0 ? _a : (this._jobs = new Client_6.Jobs(this._options)));
50
+ return ((_a = this._jobs) !== null && _a !== void 0 ? _a : (this._jobs = new Client_7.Jobs(this._options)));
46
51
  }
47
52
  get health() {
48
53
  var _a;
49
- return ((_a = this._health) !== null && _a !== void 0 ? _a : (this._health = new Client_7.Health(this._options)));
54
+ return ((_a = this._health) !== null && _a !== void 0 ? _a : (this._health = new Client_8.Health(this._options)));
50
55
  }
51
56
  get providers() {
52
57
  var _a;
53
- return ((_a = this._providers) !== null && _a !== void 0 ? _a : (this._providers = new Client_8.Providers(this._options)));
58
+ return ((_a = this._providers) !== null && _a !== void 0 ? _a : (this._providers = new Client_9.Providers(this._options)));
54
59
  }
55
60
  get runs() {
56
61
  var _a;
57
- return ((_a = this._runs) !== null && _a !== void 0 ? _a : (this._runs = new Client_9.Runs(this._options)));
62
+ return ((_a = this._runs) !== null && _a !== void 0 ? _a : (this._runs = new Client_10.Runs(this._options)));
58
63
  }
59
64
  get steps() {
60
65
  var _a;
61
- return ((_a = this._steps) !== null && _a !== void 0 ? _a : (this._steps = new Client_10.Steps(this._options)));
66
+ return ((_a = this._steps) !== null && _a !== void 0 ? _a : (this._steps = new Client_11.Steps(this._options)));
62
67
  }
63
68
  get tag() {
64
69
  var _a;
65
- return ((_a = this._tag) !== null && _a !== void 0 ? _a : (this._tag = new Client_11.Tag(this._options)));
70
+ return ((_a = this._tag) !== null && _a !== void 0 ? _a : (this._tag = new Client_12.Tag(this._options)));
66
71
  }
67
72
  get templates() {
68
73
  var _a;
69
- return ((_a = this._templates) !== null && _a !== void 0 ? _a : (this._templates = new Client_12.Templates(this._options)));
74
+ return ((_a = this._templates) !== null && _a !== void 0 ? _a : (this._templates = new Client_13.Templates(this._options)));
70
75
  }
71
76
  }
72
77
  exports.LettaClient = LettaClient;
@@ -44,6 +44,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
44
44
  step((generator = generator.apply(thisArg, _arguments || [])).next());
45
45
  });
46
46
  };
47
+ var __rest = (this && this.__rest) || function (s, e) {
48
+ var t = {};
49
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
50
+ t[p] = s[p];
51
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
52
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
53
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
54
+ t[p[i]] = s[p[i]];
55
+ }
56
+ return t;
57
+ };
47
58
  var __importDefault = (this && this.__importDefault) || function (mod) {
48
59
  return (mod && mod.__esModule) ? mod : { "default": mod };
49
60
  };
@@ -157,7 +168,7 @@ class Agents {
157
168
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
158
169
  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/"),
159
170
  method: "GET",
160
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.32", "User-Agent": "@letta-ai/letta-client/0.1.32", "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),
171
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.33", "User-Agent": "@letta-ai/letta-client/0.1.33", "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),
161
172
  contentType: "application/json",
162
173
  queryParameters: _queryParams,
163
174
  requestType: "json",
@@ -220,13 +231,14 @@ class Agents {
220
231
  create() {
221
232
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
222
233
  var _a, _b, _c;
234
+ const { projectSlug } = request, _body = __rest(request, ["projectSlug"]);
223
235
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
224
236
  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/"),
225
237
  method: "POST",
226
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.32", "User-Agent": "@letta-ai/letta-client/0.1.32", "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),
238
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.33", "User-Agent": "@letta-ai/letta-client/0.1.33", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "project-slug": projectSlug != null ? projectSlug : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
227
239
  contentType: "application/json",
228
240
  requestType: "json",
229
- body: serializers.CreateAgentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
241
+ body: serializers.CreateAgentRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
230
242
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
231
243
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
232
244
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -289,7 +301,7 @@ class Agents {
289
301
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
290
302
  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)}`),
291
303
  method: "GET",
292
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.32", "User-Agent": "@letta-ai/letta-client/0.1.32", "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),
304
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.33", "User-Agent": "@letta-ai/letta-client/0.1.33", "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),
293
305
  contentType: "application/json",
294
306
  requestType: "json",
295
307
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -354,7 +366,7 @@ class Agents {
354
366
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
355
367
  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)}`),
356
368
  method: "DELETE",
357
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.32", "User-Agent": "@letta-ai/letta-client/0.1.32", "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),
369
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.33", "User-Agent": "@letta-ai/letta-client/0.1.33", "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),
358
370
  contentType: "application/json",
359
371
  requestType: "json",
360
372
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -414,7 +426,7 @@ class Agents {
414
426
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
415
427
  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)}`),
416
428
  method: "PATCH",
417
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.32", "User-Agent": "@letta-ai/letta-client/0.1.32", "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),
429
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.33", "User-Agent": "@letta-ai/letta-client/0.1.33", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
418
430
  contentType: "application/json",
419
431
  requestType: "json",
420
432
  body: serializers.UpdateAgent.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -486,7 +498,7 @@ class Agents {
486
498
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
487
499
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/reset-messages`),
488
500
  method: "PATCH",
489
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.32", "User-Agent": "@letta-ai/letta-client/0.1.32", "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),
501
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.33", "User-Agent": "@letta-ai/letta-client/0.1.33", "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),
490
502
  contentType: "application/json",
491
503
  queryParameters: _queryParams,
492
504
  requestType: "json",
@@ -552,7 +564,7 @@ class Agents {
552
564
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
553
565
  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"),
554
566
  method: "POST",
555
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.32", "User-Agent": "@letta-ai/letta-client/0.1.32", "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),
567
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.33", "User-Agent": "@letta-ai/letta-client/0.1.33", "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),
556
568
  contentType: "application/json",
557
569
  requestType: "json",
558
570
  body: serializers.AgentsSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -7,6 +7,7 @@ import * as Letta from "../../../../index";
7
7
  * {}
8
8
  */
9
9
  export interface CreateAgentRequest {
10
+ projectSlug?: string;
10
11
  /** The name of the agent. */
11
12
  name?: string;
12
13
  /** The blocks to create in the agent's in-context memory. */
@@ -53,7 +54,7 @@ export interface CreateAgentRequest {
53
54
  fromTemplate?: string;
54
55
  /** Whether the agent is a template */
55
56
  template?: boolean;
56
- /** The project slug that the agent will be associated with. */
57
+ /** Deprecated: Project should now be passed via the project-slug header instead of in the request body. If using the sdk, this can be done via the new project_slug field below. */
57
58
  project?: string;
58
59
  /** The environment variables for tool execution specific to this agent. */
59
60
  toolExecEnvironmentVariables?: Record<string, string | undefined>;
@@ -88,7 +88,7 @@ class ArchivalMemory {
88
88
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
89
89
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/archival-memory`),
90
90
  method: "GET",
91
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.32", "User-Agent": "@letta-ai/letta-client/0.1.32", "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
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.33", "User-Agent": "@letta-ai/letta-client/0.1.33", "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),
92
92
  contentType: "application/json",
93
93
  queryParameters: _queryParams,
94
94
  requestType: "json",
@@ -157,7 +157,7 @@ class ArchivalMemory {
157
157
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
158
158
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/archival-memory`),
159
159
  method: "POST",
160
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.32", "User-Agent": "@letta-ai/letta-client/0.1.32", "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),
160
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.33", "User-Agent": "@letta-ai/letta-client/0.1.33", "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),
161
161
  contentType: "application/json",
162
162
  requestType: "json",
163
163
  body: serializers.agents.CreateArchivalMemory.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -224,7 +224,7 @@ class ArchivalMemory {
224
224
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
225
225
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/archival-memory/${encodeURIComponent(memoryId)}`),
226
226
  method: "DELETE",
227
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.32", "User-Agent": "@letta-ai/letta-client/0.1.32", "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),
227
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.33", "User-Agent": "@letta-ai/letta-client/0.1.33", "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),
228
228
  contentType: "application/json",
229
229
  requestType: "json",
230
230
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -76,7 +76,7 @@ class Context {
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/agents/${encodeURIComponent(agentId)}/context`),
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.32", "User-Agent": "@letta-ai/letta-client/0.1.32", "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.33", "User-Agent": "@letta-ai/letta-client/0.1.33", "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,