sovant 1.3.1__tar.gz → 1.3.2__tar.gz
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.
- {sovant-1.3.1/src/sovant.egg-info → sovant-1.3.2}/PKG-INFO +37 -1
- {sovant-1.3.1 → sovant-1.3.2}/README.md +36 -0
- {sovant-1.3.1 → sovant-1.3.2}/pyproject.toml +1 -1
- {sovant-1.3.1 → sovant-1.3.2}/src/sovant/__init__.py +1 -1
- {sovant-1.3.1 → sovant-1.3.2}/src/sovant/client.py +55 -0
- {sovant-1.3.1 → sovant-1.3.2/src/sovant.egg-info}/PKG-INFO +37 -1
- {sovant-1.3.1 → sovant-1.3.2}/LICENSE +0 -0
- {sovant-1.3.1 → sovant-1.3.2}/MANIFEST.in +0 -0
- {sovant-1.3.1 → sovant-1.3.2}/setup.cfg +0 -0
- {sovant-1.3.1 → sovant-1.3.2}/src/sovant/base_client.py +0 -0
- {sovant-1.3.1 → sovant-1.3.2}/src/sovant/exceptions.py +0 -0
- {sovant-1.3.1 → sovant-1.3.2}/src/sovant/models.py +0 -0
- {sovant-1.3.1 → sovant-1.3.2}/src/sovant/resources/__init__.py +0 -0
- {sovant-1.3.1 → sovant-1.3.2}/src/sovant/resources/memories.py +0 -0
- {sovant-1.3.1 → sovant-1.3.2}/src/sovant/resources/threads.py +0 -0
- {sovant-1.3.1 → sovant-1.3.2}/src/sovant/types.py +0 -0
- {sovant-1.3.1 → sovant-1.3.2}/src/sovant.egg-info/SOURCES.txt +0 -0
- {sovant-1.3.1 → sovant-1.3.2}/src/sovant.egg-info/dependency_links.txt +0 -0
- {sovant-1.3.1 → sovant-1.3.2}/src/sovant.egg-info/requires.txt +0 -0
- {sovant-1.3.1 → sovant-1.3.2}/src/sovant.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sovant
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.2
|
|
4
4
|
Summary: Sovant Python SDK — governed AI memory layer for AI agents and applications
|
|
5
5
|
Author: Sovant
|
|
6
6
|
License-Expression: MIT
|
|
@@ -251,6 +251,42 @@ results = client.memory_create_batch([
|
|
|
251
251
|
])
|
|
252
252
|
```
|
|
253
253
|
|
|
254
|
+
#### List Memories
|
|
255
|
+
|
|
256
|
+
Fetch memories with filtering and pagination. Use `memory_list()` to retrieve recent memories or filter by criteria — it's more efficient than `memory_search()` when you don't need vector similarity.
|
|
257
|
+
|
|
258
|
+
```python
|
|
259
|
+
# List recent memories
|
|
260
|
+
result = client.memory_list(limit=20, offset=0)
|
|
261
|
+
for mem in result["memories"]:
|
|
262
|
+
print(mem["content"])
|
|
263
|
+
|
|
264
|
+
# Filter by thread
|
|
265
|
+
thread_mems = client.memory_list(thread_id="thread-uuid", limit=50)
|
|
266
|
+
|
|
267
|
+
# Filter by type and tags
|
|
268
|
+
prefs = client.memory_list(
|
|
269
|
+
type="preference",
|
|
270
|
+
tags=["settings"],
|
|
271
|
+
sort_by="updated_at",
|
|
272
|
+
sort_order="desc",
|
|
273
|
+
)
|
|
274
|
+
|
|
275
|
+
# Pinned memories only
|
|
276
|
+
pinned = client.memory_list(is_pinned=True)
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
**Available parameters:**
|
|
280
|
+
- `limit` — max results (default: 20, max: 100)
|
|
281
|
+
- `offset` — pagination offset
|
|
282
|
+
- `thread_id` — filter by thread
|
|
283
|
+
- `type` — filter by memory type
|
|
284
|
+
- `tags` — filter by tags (must have all)
|
|
285
|
+
- `is_pinned` — filter by pinned status
|
|
286
|
+
- `is_archived` — filter by archived status
|
|
287
|
+
- `sort_by` — `created_at`, `updated_at`, `importance`, or `type`
|
|
288
|
+
- `sort_order` — `asc` or `desc`
|
|
289
|
+
|
|
254
290
|
### Thread Management
|
|
255
291
|
|
|
256
292
|
```python
|
|
@@ -235,6 +235,42 @@ results = client.memory_create_batch([
|
|
|
235
235
|
])
|
|
236
236
|
```
|
|
237
237
|
|
|
238
|
+
#### List Memories
|
|
239
|
+
|
|
240
|
+
Fetch memories with filtering and pagination. Use `memory_list()` to retrieve recent memories or filter by criteria — it's more efficient than `memory_search()` when you don't need vector similarity.
|
|
241
|
+
|
|
242
|
+
```python
|
|
243
|
+
# List recent memories
|
|
244
|
+
result = client.memory_list(limit=20, offset=0)
|
|
245
|
+
for mem in result["memories"]:
|
|
246
|
+
print(mem["content"])
|
|
247
|
+
|
|
248
|
+
# Filter by thread
|
|
249
|
+
thread_mems = client.memory_list(thread_id="thread-uuid", limit=50)
|
|
250
|
+
|
|
251
|
+
# Filter by type and tags
|
|
252
|
+
prefs = client.memory_list(
|
|
253
|
+
type="preference",
|
|
254
|
+
tags=["settings"],
|
|
255
|
+
sort_by="updated_at",
|
|
256
|
+
sort_order="desc",
|
|
257
|
+
)
|
|
258
|
+
|
|
259
|
+
# Pinned memories only
|
|
260
|
+
pinned = client.memory_list(is_pinned=True)
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
**Available parameters:**
|
|
264
|
+
- `limit` — max results (default: 20, max: 100)
|
|
265
|
+
- `offset` — pagination offset
|
|
266
|
+
- `thread_id` — filter by thread
|
|
267
|
+
- `type` — filter by memory type
|
|
268
|
+
- `tags` — filter by tags (must have all)
|
|
269
|
+
- `is_pinned` — filter by pinned status
|
|
270
|
+
- `is_archived` — filter by archived status
|
|
271
|
+
- `sort_by` — `created_at`, `updated_at`, `importance`, or `type`
|
|
272
|
+
- `sort_order` — `asc` or `desc`
|
|
273
|
+
|
|
238
274
|
### Thread Management
|
|
239
275
|
|
|
240
276
|
```python
|
|
@@ -193,6 +193,61 @@ class Sovant:
|
|
|
193
193
|
def memory_delete(self, id: str):
|
|
194
194
|
return self._request("DELETE", f"{self.base_url}/api/v1/memories/{id}")
|
|
195
195
|
|
|
196
|
+
def memory_list(
|
|
197
|
+
self,
|
|
198
|
+
limit: int | None = None,
|
|
199
|
+
offset: int | None = None,
|
|
200
|
+
thread_id: str | None = None,
|
|
201
|
+
type: str | None = None,
|
|
202
|
+
tags: list[str] | None = None,
|
|
203
|
+
is_pinned: bool | None = None,
|
|
204
|
+
is_archived: bool | None = None,
|
|
205
|
+
sort_by: str | None = None,
|
|
206
|
+
sort_order: str | None = None,
|
|
207
|
+
):
|
|
208
|
+
"""
|
|
209
|
+
List memories with filtering and pagination
|
|
210
|
+
|
|
211
|
+
Returns memories ordered by sort criteria (default: created_at desc).
|
|
212
|
+
Use list() to fetch recent memories or filter by criteria.
|
|
213
|
+
Use memory_search() for semantic/vector-based queries.
|
|
214
|
+
Use memory_recall() for conversational AI queries.
|
|
215
|
+
|
|
216
|
+
Args:
|
|
217
|
+
limit: Maximum memories to return (default: 20, max: 100)
|
|
218
|
+
offset: Number of memories to skip for pagination (default: 0)
|
|
219
|
+
thread_id: Filter by thread ID
|
|
220
|
+
type: Filter by memory type ('journal', 'insight', 'observation', 'task', 'preference')
|
|
221
|
+
tags: Filter by tags (memories must have all specified tags)
|
|
222
|
+
is_pinned: Filter by pinned status
|
|
223
|
+
is_archived: Filter by archived status
|
|
224
|
+
sort_by: Sort field ('created_at', 'updated_at', 'importance', 'type')
|
|
225
|
+
sort_order: Sort direction ('asc' or 'desc')
|
|
226
|
+
|
|
227
|
+
Returns:
|
|
228
|
+
Dict with 'memories', 'total', 'limit', 'offset', 'has_more'
|
|
229
|
+
"""
|
|
230
|
+
params = {}
|
|
231
|
+
if limit is not None:
|
|
232
|
+
params['limit'] = str(limit)
|
|
233
|
+
if offset is not None:
|
|
234
|
+
params['offset'] = str(offset)
|
|
235
|
+
if thread_id:
|
|
236
|
+
params['thread_id'] = thread_id
|
|
237
|
+
if type:
|
|
238
|
+
params['type'] = type
|
|
239
|
+
if tags:
|
|
240
|
+
params['tags'] = ','.join(tags)
|
|
241
|
+
if is_pinned is not None:
|
|
242
|
+
params['is_pinned'] = str(is_pinned).lower()
|
|
243
|
+
if is_archived is not None:
|
|
244
|
+
params['is_archived'] = str(is_archived).lower()
|
|
245
|
+
if sort_by:
|
|
246
|
+
params['sort_by'] = sort_by
|
|
247
|
+
if sort_order:
|
|
248
|
+
params['sort_order'] = sort_order
|
|
249
|
+
return self._request("GET", f"{self.base_url}/api/v1/memory", params=params)
|
|
250
|
+
|
|
196
251
|
def memory_create_batch(self, memories: list[Dict[str, Any]]):
|
|
197
252
|
"""
|
|
198
253
|
Batch create multiple memories in a single request
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sovant
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.2
|
|
4
4
|
Summary: Sovant Python SDK — governed AI memory layer for AI agents and applications
|
|
5
5
|
Author: Sovant
|
|
6
6
|
License-Expression: MIT
|
|
@@ -251,6 +251,42 @@ results = client.memory_create_batch([
|
|
|
251
251
|
])
|
|
252
252
|
```
|
|
253
253
|
|
|
254
|
+
#### List Memories
|
|
255
|
+
|
|
256
|
+
Fetch memories with filtering and pagination. Use `memory_list()` to retrieve recent memories or filter by criteria — it's more efficient than `memory_search()` when you don't need vector similarity.
|
|
257
|
+
|
|
258
|
+
```python
|
|
259
|
+
# List recent memories
|
|
260
|
+
result = client.memory_list(limit=20, offset=0)
|
|
261
|
+
for mem in result["memories"]:
|
|
262
|
+
print(mem["content"])
|
|
263
|
+
|
|
264
|
+
# Filter by thread
|
|
265
|
+
thread_mems = client.memory_list(thread_id="thread-uuid", limit=50)
|
|
266
|
+
|
|
267
|
+
# Filter by type and tags
|
|
268
|
+
prefs = client.memory_list(
|
|
269
|
+
type="preference",
|
|
270
|
+
tags=["settings"],
|
|
271
|
+
sort_by="updated_at",
|
|
272
|
+
sort_order="desc",
|
|
273
|
+
)
|
|
274
|
+
|
|
275
|
+
# Pinned memories only
|
|
276
|
+
pinned = client.memory_list(is_pinned=True)
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
**Available parameters:**
|
|
280
|
+
- `limit` — max results (default: 20, max: 100)
|
|
281
|
+
- `offset` — pagination offset
|
|
282
|
+
- `thread_id` — filter by thread
|
|
283
|
+
- `type` — filter by memory type
|
|
284
|
+
- `tags` — filter by tags (must have all)
|
|
285
|
+
- `is_pinned` — filter by pinned status
|
|
286
|
+
- `is_archived` — filter by archived status
|
|
287
|
+
- `sort_by` — `created_at`, `updated_at`, `importance`, or `type`
|
|
288
|
+
- `sort_order` — `asc` or `desc`
|
|
289
|
+
|
|
254
290
|
### Thread Management
|
|
255
291
|
|
|
256
292
|
```python
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|