chatdev-memorysync
MemorySync memory store for ChatDev 2.0 (DevAll) — OpenBMB's zero-code multi-agent platform.
One pip install adds type: memorysync to ChatDev's memory registry: usable
from workflow YAML and the web console's store-type dropdown, no code
changes to ChatDev required.
# inside your ChatDev checkout's environment
uv pip install chatdev-memorysync # or: pip install chatdev-memorysync
Activation is automatic (a .pth hook registers the store whenever ChatDev's
modules are importable, and silently no-ops anywhere else). The explicit
alternative:
import chatdev_memorysync
chatdev_memorysync.register()
Workflow YAML
graph:
nodes:
- id: writer
type: agent
config:
# ... model config ...
memories:
- name: user_memory
top_k: 5
retrieve_stage: [gen]
read: true
write: true
memory:
- name: user_memory
type: memorysync
config:
api_key: ${MEMORYSYNC_API_KEY}
user_id: customer-42 # REQUIRED — who these memories belong to
session_id: support # optional session label
Retrieved memories arrive in the standard ===== Related Memories =====
block ChatDev injects into agent prompts.
What gets stored
After each agent node that writes to the store (write: true, ChatDev's
default) runs, the store sends that node's input — the request it received,
with ChatDev's === INPUT FROM … === pipeline headers stripped — to
MemorySync as the user's turn. MemorySync extracts the durable facts in it
(preferences, constraints, details about the user) and only those facts
become memories. The input text itself is not stored.
- Agent outputs are not stored as memories, so they are never sent.
store_outputsis still accepted in workflow YAML and has no effect. - A retry or re-run of the same input in the same session is recognised server-side and extracted once.
- Facts carry
surface: chatdev, yoursession_id, androle: input. The input's attachment overview travels with the request, but facts keep only plain (scalar) metadata, so attachment lists are not stored on them. - Inputs under 3 characters are skipped; inputs over 16,000 characters are truncated before they are sent.
A downstream node's input is what the upstream nodes produced, and it is sent
the same way. To learn only from the user's own words, keep write: true on
the node that receives the user's request and set write: false on the
others (they can still read).
Why this instead of the in-tree Mem0 store?
ChatDev ships a mem0 store in its repo. Verified against its source:
| Behavior | Mem0 (in-tree store) | memorysync |
|---|---|---|
| User scoping | ✗ demo YAML hardcodes user_id: project-user-123 — every operator shares one partition |
user_id is a REQUIRED config field |
| Slow/down backend | ✗ SDK call with no timeout — the whole agent turn stalls | hard recall_timeout budget (1.2 s), fails open to no memories |
| Timestamps | ✗ every retrieved item stamped time.time() — corrupts ChatDev's own time-decay scorer (0.7 of ranking weight) and unfairly outranks honest stores |
the row's real created_at |
| Retries / re-runs | ✗ duplicate extractions on every re-send | deterministic speaker seeds — a re-sent input is recognised server-side and extracted once |
| Failure diagnosis | ✗ bare logger.error + [] — quota, auth, and network all look like "no memories" |
fail-open logs carry the HTTP status code |
Facts extracted here are recallable from every other MemorySync surface (LangChain, the CLI, voice agents, Dify…) and vice versa.
Configuration
| Field | Default | Meaning |
|---|---|---|
api_key |
${MEMORYSYNC_API_KEY} |
MemorySync API key |
user_id |
— (required) | End user the memories belong to |
session_id |
chatdev |
Session label, recorded on the extracted facts as session_id |
base_url |
https://api.memorysync.io |
Override for staging |
recall_timeout |
1.2 |
Hard recall budget in seconds |
store_outputs |
false |
Accepted for existing workflows; has no effect (agent outputs are not stored as memories) |
source |
chatdev |
Source label on the extracted facts |
Per-agent knobs (top_k, similarity_threshold, read, write,
retrieve_stage) come from ChatDev's own memories: attachment config and
are honored — including similarity_threshold filtering on real scores.
Tests
git clone --depth 1 https://github.com/OpenBMB/ChatDev.git chatdev
pip install -e . pytest pydantic openai pyyaml tenacity numpy faiss-cpu fastmcp jinja2
pytest tests -q # 38 checks against the real ChatDev 2.0 modules
The suite drives ChatDev's real config parser, registry, MemoryFactory,
and MemoryManager — and reproduces each in-tree Mem0 store bug as a
regression test.
License
MIT © MemorySync.
Metadata
Release files for chatdev-memorysync 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| chatdev_memorysync-1.1.0.tar.gz | 10.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| chatdev_memorysync-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.9 kB
Release files / chatdev_memorysync-1.1.0.tar.gz
| Download URL | chatdev_memorysync-1.1.0.tar.gz |
|---|---|
| Size | 10.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
245d0d91757befbb75e2fb171b370b3668b7a124b1aa82bb5d32c6c535857fc5
|
|
BLAKE2b-256 checksum How to use checksums |
e25dd1d7a564c7f3eb90e6987fe9c4a4c8d4a16d428f55231fa498c07d520b27
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.5
|
Release files / chatdev_memorysync-1.1.0-py3-none-any.whl
| Download URL | chatdev_memorysync-1.1.0-py3-none-any.whl |
|---|---|
| Size | 13.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f20b0dc626d75da108f4b27efb0fe7bf09840914d3d1ed811baca05944b6db45
|
|
BLAKE2b-256 checksum How to use checksums |
ba6063fc3211f2d758849da8bda232abe2d9c03367408fd57c3266632d85b7f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.5
|
Security for chatdev-memorysync 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.