mirror of
https://github.com/TencentCloud/TencentDB-Agent-Memory
synced 2026-07-10 20:34:30 +00:00
feat: release v1.0.0
This commit is contained in:
@@ -63,6 +63,23 @@ print(core["content"])
|
||||
# L3: write core memory
|
||||
client.write_core("# User Profile\n...")
|
||||
|
||||
# Offload v2: send tool pairs for server-side L1 async processing (fire-and-forget)
|
||||
client.offload_ingest(
|
||||
session_id="agent_sess_123",
|
||||
tool_pairs=[
|
||||
{"tool_name": "search", "tool_call_id": "call_1", "params": {"q": "..."}, "result": "...", "timestamp": "..."},
|
||||
],
|
||||
)
|
||||
|
||||
# Offload v2: server-side context compaction (sync wait for result)
|
||||
compacted = client.offload_compact(
|
||||
session_id="agent_sess_123",
|
||||
messages=[...],
|
||||
ratio=0.7,
|
||||
context_window=128000,
|
||||
)
|
||||
print(compacted["messages"], compacted["report"])
|
||||
|
||||
# Read memory pipeline artifacts (e.g. persona.md, scene_blocks/*.md)
|
||||
raw = client.read_file("scene_blocks/工作.md")
|
||||
```
|
||||
@@ -103,6 +120,9 @@ asyncio.run(main())
|
||||
| L2 | `rm_scenario()` | `POST /v2/scenario/rm` |
|
||||
| L3 | `read_core()` | `POST /v2/core/read` |
|
||||
| L3 | `write_core()` | `POST /v2/core/write` |
|
||||
| Offload | `offload_ingest()` | `POST /v2/offload/ingest` |
|
||||
| Offload | `offload_compact()` | `POST /v2/offload/compact` |
|
||||
| Offload | `offload_query_mmd()` | `POST /v2/offload/query-mmd` |
|
||||
|
||||
## Error Handling
|
||||
|
||||
|
||||
Reference in New Issue
Block a user