Skip to content

Commit 24e5370

Browse files
authored
Add complete memory module (#43)
* Add complete memory module Change-Id: Iea5dbdcf29c9ac1dd1b8d55f824f9e96e82cfb8d * Fix beta npm dist-tag Change-Id: I5e3e201d94cdbe7a239f23a7dbd4d8fd89726b80
1 parent 4d8a9be commit 24e5370

44 files changed

Lines changed: 1925 additions & 66 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
"@openagentpack/sdk": minor
3+
"@openagentpack/cli": minor
4+
---
5+
6+
Add a portable Memory Store and Memory lifecycle API across Qoder, Claude, and
7+
Volcengine Ark, including provider capability differences, CLI commands,
8+
declarative entry reconciliation, version history, and Ark batch creation.

.github/workflows/release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
outputs:
3434
channel: ${{ steps.release.outputs.channel }}
3535
version: ${{ steps.release.outputs.version }}
36+
dist-tag: ${{ steps.release.outputs.dist-tag }}
3637
permissions:
3738
contents: read
3839
steps:
@@ -113,7 +114,8 @@ jobs:
113114
- name: Publish packages with npm Trusted Publishing
114115
env:
115116
NPM_CONFIG_PROVENANCE: "true"
116-
run: bun run release:publish
117+
NPM_DIST_TAG: ${{ needs.preflight.outputs.dist-tag }}
118+
run: bun run release:publish -- --tag "$NPM_DIST_TAG"
117119

118120
- name: Create immutable Git tag
119121
env:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ Beta testers can install `@openagentpack/cli@beta`; see the [release guide](./do
145145
| Skill | native | native | native | native |
146146
| Agent | native | native | native | native |
147147
| MCP Server | native | native | native | native |
148-
| Memory Store | unsupported | native | unsupported | native |
148+
| Memory Store | unsupported | native | native | native |
149149
| Multi-Agent | unsupported | unsupported | native | native |
150150
| Deployment | emulated | native | native | emulated |
151151
| Session | native | native | native | native |

README.zh-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ Beta 用户可以安装 `@openagentpack/cli@beta`;固定版本及切回稳定
145145
| Skill | native | native | native | native |
146146
| Agent | native | native | native | native |
147147
| MCP Server | native | native | native | native |
148-
| Memory Store | unsupported | native | unsupported | native |
148+
| Memory Store | unsupported | native | native | native |
149149
| Multi-Agent | unsupported | unsupported | native | native |
150150
| Deployment | emulated | native | native | emulated |
151151
| Session | native | native | native | native |

docs/examples.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The [`examples/`](../examples) directory has runnable configs for every provider
1313
| Use an official MCP server | [`examples/bailian/with-mcp/`](../examples/bailian/with-mcp/) |
1414
| Use a vault | [`examples/bailian/with-vault/`](../examples/bailian/with-vault/) · [`examples/qoder/with-vault/`](../examples/qoder/with-vault/) |
1515
| Connect a credential-based IM Channel | [`examples/qoder/with-channel/`](../examples/qoder/with-channel/) |
16-
| Use memory stores | [`examples/qoder/with-memory/`](../examples/qoder/with-memory/) · [`examples/ark/full/`](../examples/ark/full/) |
16+
| Use memory stores | [`examples/qoder/with-memory/`](../examples/qoder/with-memory/) · [`examples/claude/with-memory/`](../examples/claude/with-memory/) · [`examples/ark/full/`](../examples/ark/full/) · [runtime lifecycle](../examples/memory/README.md) |
1717
| Upload local files (Files API) | [`examples/bailian/with-files/`](../examples/bailian/with-files/) · [`examples/ark/with-files/`](../examples/ark/with-files/) |
1818
| Coordinate multiple agents | [`examples/claude/multiagent/`](../examples/claude/multiagent/) · [`examples/ark/multiagent/`](../examples/ark/multiagent/) |
1919
| Deploy to multiple providers | [`examples/claude/multi-provider/`](../examples/claude/multi-provider/) · [`examples/qoder/multi-provider/`](../examples/qoder/multi-provider/) |
@@ -51,7 +51,7 @@ agents destroy
5151
| Skill | native | native | native | native |
5252
| Agent | native | native | native | native |
5353
| MCP Server | native | native | native | native |
54-
| Memory Store | unsupported | native | unsupported | native |
54+
| Memory Store | unsupported | native | native | native |
5555
| Multi-Agent | unsupported | unsupported | native | native |
5656
| Deployment | emulated | native | native | emulated |
5757
| Session | native | native | native | native |

docs/guides/configure-an-agent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ agents:
128128

129129
See [Use MCP and vaults](./use-mcp-and-vaults.md).
130130

131-
## Memory stores (Qoder, Ark)
131+
## Memory stores (Qoder, Claude beta, Ark)
132132

133133
```yaml
134134
memory_stores:

docs/guides/configure-an-agent.zh-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ agents:
307307

308308
Memory Store 为 Agent 提供持久化上下文,适合存储项目知识、约定规范等长期信息。
309309

310-
> 注意:Memory Store 目前由 Qoder 和 火山方舟 Provider 原生支持。
310+
> 注意:Memory Store 目前由 Qoder、Claude(beta)和火山方舟 Provider 原生支持。
311311

312312
```yaml
313313
memory_stores:

docs/guides/deploy-to-claude.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ providers:
2121
| Feature | Tier |
2222
|---------|:----:|
2323
| Environment, Vault, Skill, Agent, MCP Server, Multi-Agent, Deployment, Session | native |
24-
| Memory Store | unsupported |
24+
| Memory Store | native (beta) |
2525

26-
Use a **skill** or **MCP** for context persistence where Claude has no memory store.
26+
Memory stores require the Claude `agent-memory-2026-07-22` beta, enabled by the adapter by default.
2727

2828
## Minimal agent
2929

docs/reference/cli.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,35 @@ Manage scheduled / triggered deployments.
123123
| `deployment get <name>` | Show a deployment's status and resolved bindings. |
124124
| `deployment run <name>` | Trigger a deployment run (native on Qoder/Claude, emulated as a session on Bailian/Volcengine Ark). |
125125

126+
## `agents memory-store`
127+
128+
Manage persistent stores directly. Store creation through `agents apply` remains
129+
the recommended declarative workflow.
130+
131+
| Command | Description |
132+
|---------|-------------|
133+
| `create <name>` | Create a store (`--description`). |
134+
| `list` | List stores (`--limit`, `--cursor`, `--include-archived`). |
135+
| `get <store-id>` | Retrieve a store. |
136+
| `update <store-id>` | Update `--name` and/or `--description`. |
137+
| `archive <store-id>` | Archive a store (Qoder/Claude). |
138+
| `delete <store-id>` | Permanently delete a store and its memories. |
139+
140+
## `agents memory`
141+
142+
Manage individual text memories. Content can be passed with `--content` or
143+
`--content-file`. Portable paths are relative; adapters handle wire-format differences.
144+
145+
| Command | Description |
146+
|---------|-------------|
147+
| `create <store-id> <path>` | Create one memory. |
148+
| `batch-create <store-id> <json-file>` | Ark batch create; supports `--on-conflict overwrite\|fail`. |
149+
| `list <store-id>` | List memories; supports pagination, prefix/depth and `--full`. |
150+
| `get <store-id> <memory-id>` | Retrieve full content. |
151+
| `update <store-id> <memory-id>` | Update content/path; `--expected-sha256` enables optimistic concurrency where supported. |
152+
| `delete <store-id> <memory-id>` | Delete one memory. |
153+
| `version list|get|redact` | Immutable history operations (Qoder/Claude). |
154+
126155
## `agents models`
127156

128157
| Subcommand | Description |

docs/reference/configuration.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,10 +197,15 @@ memory_stores:
197197
<name>:
198198
description: <string>
199199
provider: <string> # optional
200+
metadata: { <string>: <string> } # optional
200201
entries: [ { key: <string>, content: <string> } ]
201202
```
202203

203-
Supported on **Qoder** and **Volcengine Ark** (**Bailian** and **Claude**: `unsupported`).
204+
Supported on **Qoder**, **Claude (beta)**, and **Volcengine Ark** (**Bailian**: `unsupported`).
205+
206+
Declarative `entries` are managed seeds: apply creates or updates those paths but
207+
preserves additional memories written by agents. Runtime CRUD and version commands
208+
are documented in [`examples/memory/`](../../examples/memory/README.md).
204209

205210
## Skill
206211

0 commit comments

Comments
 (0)