Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

memory.talk

跑 code agent 的工作台,记忆是它的副产物。

memory.talk v5 有三个顶层对象:

  • work —— 做事。一件事是一个 work,复杂的事是一棵 work 树;每个 work 里盛放若干个现场(session):Claude Code / Codex / Kimi 会话、终端、网页,按 URI 打开,由对应的 work server 建出来,活得比连接久。
  • collections —— 认知。一个分层的 git 仓库:origin(外部来的原文,只读)/ issue(问题 + 立场 + 论证,IBIS)/ card(争完的事实,维基式词条),还可以用一份 YAML schema 加自己的层。每个动作一个 [层] 提交,跨层被守卫拒绝;目录下的 manager.json 把变动打给某个 work 的收件箱。
  • user —— 人。注册的实体,和 work 平级;work 谁建的、谁在动,collections 的提交谁做的。不做权限:一个实例给一个团队用。

没有数据库、没有索引:认知层在 git 里,work / user 的记录走可换的存储 provider(本地文件系统或 SQLite,将来 S3 / MySQL)。

设计文档见 docs/designs/v5/;数据结构 docs/structure/v5/;HTTP API docs/api/v5/;CLI docs/cli/v5/。

安装

pip install memorytalk
memory.talk server start          # 本地 API:http://127.0.0.1:8000/docs

需要 git 和 tmux(终端 / agent 现场跑在 tmux 里);要在浏览器里看终端再装 ttyd,并设 MEMORY_TALK_TTYD_URL。

用起来

memory.talk user add alice                                    # 注册(一次)
export MEMORY_TALK_USER=alice

W=$(memory.talk work create --goal '把配置改成环境变量' --json | jq -r .id)
memory.talk work attach $W codex:///home/alice/memory.talk    # 在 work 里开一个 Codex 会话
memory.talk work recall $W                                    # 开工注入:card 目录

memory.talk collection write issue memory.talk/配置/该走文件还是环境变量 --field question='配置该走文件还是环境变量?'
memory.talk collection act   issue position memory.talk/配置/该走文件还是环境变量 --field claim='只用环境变量'
memory.talk collection act   issue decide   memory.talk/配置/该走文件还是环境变量 \
    --field position=p1 --field card=memory.talk/配置/配置只来自环境变量
memory.talk work set $W --status done

存储

~/.memory.talk/
├── collections/     分层 git 仓库:layer/origin、layer/issue、layer/card(+ 用户层)、stack
├── works/           work 树、画布、会话、收件箱、round(MEMORY_TALK_STORE=fs 时)
└── users/           user 档案

MEMORY_TALK_STORE=sqlite 时 works / users 进 memory.sqlite;collections 永远是 git。全部环境变量见 docs/structure/v5/filesystem.md。

开发

pip install -e ".[dev]"
pytest                       # 每个场景在 fs 和 sqlite 两种 store 下各跑一遍
cd memorytalk/frontend && npm install && npm run dev     # 前端(Vite + React;骨架,未实现)

发布前先 cd memorytalk/frontend && npm run build(产物 dist/ 随 wheel 分发),再 python -m build && twine upload dist/*。

布局

memorytalk/              ← Python 包(pip: memorytalk;命令 memory.talk)
├── cli/                 ← 命令行(本地 API 的客户端):server / work / user / collection 各一个文件
├── backend/             ← 服务:main.py config.py gateway.py
│   ├── models/ services/ controllers/     ← 三层
│   ├── providers/       ← 存储介质:FileSystemProvider(LocalFS)/ DatabaseProvider(SQLite)
│   ├── layers/          ← 内置 layer:origin / issue / card
│   └── work_servers/    ← 每个协议一个 work server:bash / claude / codex / kimi / http / default
└── frontend/            ← Vite + React(骨架)
tests/                   ← 按场景组织
docs/                    ← designs / structure / api / cli

License

Apache License 2.0

Metadata

Release files for memorytalk 5.0.0a0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for memorytalk 5.0.0a0
File Size Uploaded Provenance
memorytalk-5.0.0a0.tar.gz 461.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for memorytalk 5.0.0a0
File Interpreter ABI Platform
memorytalk-5.0.0a0-py3-none-any.whl Python 3 none any Details

Total release size: 550.8 kB

Release files / memorytalk-5.0.0a0.tar.gz

Download URL memorytalk-5.0.0a0.tar.gz
Size 461.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8715c4c9666098380f02acc3c5e5492de7cfe78fb2f4cc85e85e4ef91ac47192
BLAKE2b-256 checksum
How to use checksums
4069cf53323d3a5e28e6b0f98ce49cba84ce5b76193397157654062e250f16b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.2

Release files / memorytalk-5.0.0a0-py3-none-any.whl

Download URL memorytalk-5.0.0a0-py3-none-any.whl
Size 89.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6b0c4577bdfd241c6a80804c3caff76dc7864cd21bbce580670dac9088a73987
BLAKE2b-256 checksum
How to use checksums
c6d674194c0e66e68833aab19a06466fefba0cf2075e7884f76ec4ab35998f34
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.2

Security for memorytalk 5.0.0a0

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.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page