@letta-ai/letta-client 1.3.2 → 1.3.3

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 (48) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/internal/detect-platform.d.mts +1 -0
  3. package/internal/detect-platform.d.mts.map +1 -1
  4. package/internal/detect-platform.d.ts +1 -0
  5. package/internal/detect-platform.d.ts.map +1 -1
  6. package/internal/detect-platform.js +5 -0
  7. package/internal/detect-platform.js.map +1 -1
  8. package/internal/detect-platform.mjs +5 -0
  9. package/internal/detect-platform.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/agents/agents.d.mts +4 -0
  12. package/resources/agents/agents.d.mts.map +1 -1
  13. package/resources/agents/agents.d.ts +4 -0
  14. package/resources/agents/agents.d.ts.map +1 -1
  15. package/resources/agents/agents.js +4 -0
  16. package/resources/agents/agents.js.map +1 -1
  17. package/resources/agents/agents.mjs +4 -0
  18. package/resources/agents/agents.mjs.map +1 -1
  19. package/resources/agents/index.d.mts +1 -0
  20. package/resources/agents/index.d.mts.map +1 -1
  21. package/resources/agents/index.d.ts +1 -0
  22. package/resources/agents/index.d.ts.map +1 -1
  23. package/resources/agents/index.js +3 -1
  24. package/resources/agents/index.js.map +1 -1
  25. package/resources/agents/index.mjs +1 -0
  26. package/resources/agents/index.mjs.map +1 -1
  27. package/resources/agents/passages.d.mts +139 -0
  28. package/resources/agents/passages.d.mts.map +1 -0
  29. package/resources/agents/passages.d.ts +139 -0
  30. package/resources/agents/passages.d.ts.map +1 -0
  31. package/resources/agents/passages.js +49 -0
  32. package/resources/agents/passages.js.map +1 -0
  33. package/resources/agents/passages.mjs +45 -0
  34. package/resources/agents/passages.mjs.map +1 -0
  35. package/resources/tools.d.mts +4 -0
  36. package/resources/tools.d.mts.map +1 -1
  37. package/resources/tools.d.ts +4 -0
  38. package/resources/tools.d.ts.map +1 -1
  39. package/src/internal/detect-platform.ts +6 -0
  40. package/src/resources/agents/agents.ts +26 -0
  41. package/src/resources/agents/index.ts +11 -0
  42. package/src/resources/agents/passages.ts +199 -0
  43. package/src/resources/tools.ts +5 -0
  44. package/src/version.ts +1 -1
  45. package/version.d.mts +1 -1
  46. package/version.d.ts +1 -1
  47. package/version.js +1 -1
  48. package/version.mjs +1 -1
@@ -106,6 +106,18 @@ import {
106
106
  UpdateUserMessage,
107
107
  UserMessage,
108
108
  } from './messages';
109
+ import * as PassagesAPI from './passages';
110
+ import {
111
+ PassageCreateParams,
112
+ PassageCreateResponse,
113
+ PassageDeleteParams,
114
+ PassageDeleteResponse,
115
+ PassageListParams,
116
+ PassageListResponse,
117
+ PassageSearchParams,
118
+ PassageSearchResponse,
119
+ Passages,
120
+ } from './passages';
109
121
  import * as AgentsToolsAPI from './tools';
110
122
  import {
111
123
  ToolAttachParams,
@@ -139,6 +151,7 @@ export class Agents extends APIResource {
139
151
  files: FilesAPI.Files = new FilesAPI.Files(this._client);
140
152
  groups: GroupsAPI.Groups = new GroupsAPI.Groups(this._client);
141
153
  archives: ArchivesAPI.Archives = new ArchivesAPI.Archives(this._client);
154
+ passages: PassagesAPI.Passages = new PassagesAPI.Passages(this._client);
142
155
  identities: IdentitiesAPI.Identities = new IdentitiesAPI.Identities(this._client);
143
156
 
144
157
  /**
@@ -2169,6 +2182,7 @@ Agents.Folders = Folders;
2169
2182
  Agents.Files = Files;
2170
2183
  Agents.Groups = Groups;
2171
2184
  Agents.Archives = Archives;
2185
+ Agents.Passages = Passages;
2172
2186
  Agents.Identities = Identities;
2173
2187
 
2174
2188
  export declare namespace Agents {
@@ -2318,6 +2332,18 @@ export declare namespace Agents {
2318
2332
  type ArchiveDetachParams as ArchiveDetachParams,
2319
2333
  };
2320
2334
 
2335
+ export {
2336
+ Passages as Passages,
2337
+ type PassageCreateResponse as PassageCreateResponse,
2338
+ type PassageListResponse as PassageListResponse,
2339
+ type PassageDeleteResponse as PassageDeleteResponse,
2340
+ type PassageSearchResponse as PassageSearchResponse,
2341
+ type PassageCreateParams as PassageCreateParams,
2342
+ type PassageListParams as PassageListParams,
2343
+ type PassageDeleteParams as PassageDeleteParams,
2344
+ type PassageSearchParams as PassageSearchParams,
2345
+ };
2346
+
2321
2347
  export {
2322
2348
  Identities as Identities,
2323
2349
  type IdentityAttachResponse as IdentityAttachResponse,
@@ -138,6 +138,17 @@ export {
138
138
  type MessagesArrayPage,
139
139
  type InternalMessagesObjectPage,
140
140
  } from './messages';
141
+ export {
142
+ Passages,
143
+ type PassageCreateResponse,
144
+ type PassageListResponse,
145
+ type PassageDeleteResponse,
146
+ type PassageSearchResponse,
147
+ type PassageCreateParams,
148
+ type PassageListParams,
149
+ type PassageDeleteParams,
150
+ type PassageSearchParams,
151
+ } from './passages';
141
152
  export {
142
153
  Tools,
143
154
  type ToolExecuteRequest,
@@ -0,0 +1,199 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import * as PassagesAPI from '../passages';
5
+ import { APIPromise } from '../../core/api-promise';
6
+ import { RequestOptions } from '../../internal/request-options';
7
+ import { path } from '../../internal/utils/path';
8
+
9
+ export class Passages extends APIResource {
10
+ /**
11
+ * Insert a memory into an agent's archival memory store.
12
+ *
13
+ * @deprecated
14
+ */
15
+ create(
16
+ agentID: string,
17
+ body: PassageCreateParams,
18
+ options?: RequestOptions,
19
+ ): APIPromise<PassageCreateResponse> {
20
+ return this._client.post(path`/v1/agents/${agentID}/archival-memory`, { body, ...options });
21
+ }
22
+
23
+ /**
24
+ * Retrieve the memories in an agent's archival memory store (paginated query).
25
+ *
26
+ * @deprecated
27
+ */
28
+ list(
29
+ agentID: string,
30
+ query: PassageListParams | null | undefined = {},
31
+ options?: RequestOptions,
32
+ ): APIPromise<PassageListResponse> {
33
+ return this._client.get(path`/v1/agents/${agentID}/archival-memory`, { query, ...options });
34
+ }
35
+
36
+ /**
37
+ * Delete a memory from an agent's archival memory store.
38
+ *
39
+ * @deprecated
40
+ */
41
+ delete(memoryID: string, params: PassageDeleteParams, options?: RequestOptions): APIPromise<unknown> {
42
+ const { agent_id } = params;
43
+ return this._client.delete(path`/v1/agents/${agent_id}/archival-memory/${memoryID}`, options);
44
+ }
45
+
46
+ /**
47
+ * Search archival memory using semantic (embedding-based) search with optional
48
+ * temporal filtering.
49
+ *
50
+ * This endpoint allows manual triggering of archival memory searches, enabling
51
+ * users to query an agent's archival memory store directly via the API. The search
52
+ * uses the same functionality as the agent's archival_memory_search tool but is
53
+ * accessible for external API usage.
54
+ *
55
+ * @deprecated
56
+ */
57
+ search(
58
+ agentID: string,
59
+ query: PassageSearchParams,
60
+ options?: RequestOptions,
61
+ ): APIPromise<PassageSearchResponse> {
62
+ return this._client.get(path`/v1/agents/${agentID}/archival-memory/search`, { query, ...options });
63
+ }
64
+ }
65
+
66
+ export type PassageCreateResponse = Array<PassagesAPI.Passage>;
67
+
68
+ export type PassageListResponse = Array<PassagesAPI.Passage>;
69
+
70
+ export type PassageDeleteResponse = unknown;
71
+
72
+ export interface PassageSearchResponse {
73
+ /**
74
+ * Total number of results returned
75
+ */
76
+ count: number;
77
+
78
+ /**
79
+ * List of search results matching the query
80
+ */
81
+ results: Array<PassageSearchResponse.Result>;
82
+ }
83
+
84
+ export namespace PassageSearchResponse {
85
+ export interface Result {
86
+ /**
87
+ * Text content of the archival memory passage
88
+ */
89
+ content: string;
90
+
91
+ /**
92
+ * Timestamp of when the memory was created, formatted in agent's timezone
93
+ */
94
+ timestamp: string;
95
+
96
+ /**
97
+ * List of tags associated with this memory
98
+ */
99
+ tags?: Array<string>;
100
+ }
101
+ }
102
+
103
+ export interface PassageCreateParams {
104
+ /**
105
+ * Text to write to archival memory.
106
+ */
107
+ text: string;
108
+
109
+ /**
110
+ * Optional timestamp for the memory (defaults to current UTC time).
111
+ */
112
+ created_at?: string | null;
113
+
114
+ /**
115
+ * Optional list of tags to attach to the memory.
116
+ */
117
+ tags?: Array<string> | null;
118
+ }
119
+
120
+ export interface PassageListParams {
121
+ /**
122
+ * Unique ID of the memory to start the query range at.
123
+ */
124
+ after?: string | null;
125
+
126
+ /**
127
+ * Whether to sort passages oldest to newest (True, default) or newest to oldest
128
+ * (False)
129
+ */
130
+ ascending?: boolean | null;
131
+
132
+ /**
133
+ * Unique ID of the memory to end the query range at.
134
+ */
135
+ before?: string | null;
136
+
137
+ /**
138
+ * How many results to include in the response.
139
+ */
140
+ limit?: number | null;
141
+
142
+ /**
143
+ * Search passages by text
144
+ */
145
+ search?: string | null;
146
+ }
147
+
148
+ export interface PassageDeleteParams {
149
+ /**
150
+ * The ID of the agent in the format 'agent-<uuid4>'
151
+ */
152
+ agent_id: string;
153
+ }
154
+
155
+ export interface PassageSearchParams {
156
+ /**
157
+ * String to search for using semantic similarity
158
+ */
159
+ query: string;
160
+
161
+ /**
162
+ * Filter results to passages created before this datetime
163
+ */
164
+ end_datetime?: string | null;
165
+
166
+ /**
167
+ * Filter results to passages created after this datetime
168
+ */
169
+ start_datetime?: string | null;
170
+
171
+ /**
172
+ * How to match tags - 'any' to match passages with any of the tags, 'all' to match
173
+ * only passages with all tags
174
+ */
175
+ tag_match_mode?: 'any' | 'all';
176
+
177
+ /**
178
+ * Optional list of tags to filter search results
179
+ */
180
+ tags?: Array<string> | null;
181
+
182
+ /**
183
+ * Maximum number of results to return. Uses system default if not specified
184
+ */
185
+ top_k?: number | null;
186
+ }
187
+
188
+ export declare namespace Passages {
189
+ export {
190
+ type PassageCreateResponse as PassageCreateResponse,
191
+ type PassageListResponse as PassageListResponse,
192
+ type PassageDeleteResponse as PassageDeleteResponse,
193
+ type PassageSearchResponse as PassageSearchResponse,
194
+ type PassageCreateParams as PassageCreateParams,
195
+ type PassageListParams as PassageListParams,
196
+ type PassageDeleteParams as PassageDeleteParams,
197
+ type PassageSearchParams as PassageSearchParams,
198
+ };
199
+ }
@@ -157,6 +157,11 @@ export interface Tool {
157
157
  */
158
158
  pip_requirements?: Array<PipRequirement> | null;
159
159
 
160
+ /**
161
+ * The project id of the tool.
162
+ */
163
+ project_id?: string | null;
164
+
160
165
  /**
161
166
  * The maximum number of characters in the response.
162
167
  */
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '1.3.2'; // x-release-please-version
1
+ export const VERSION = '1.3.3'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.3.2";
1
+ export declare const VERSION = "1.3.3";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.3.2";
1
+ export declare const VERSION = "1.3.3";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '1.3.2'; // x-release-please-version
4
+ exports.VERSION = '1.3.3'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '1.3.2'; // x-release-please-version
1
+ export const VERSION = '1.3.3'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map