Skip to main content

memory.talk

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

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

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

没有数据库、没有索引:认知层在 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 现场由 tmuxd 建在 tmux 里;浏览器里的终端窗口是它自带的 ttyd,Linux 上 wheel 里带,不用另装)。

用起来

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 meta write issue memory.talk/配置/该走文件还是环境变量 --field question='配置该走文件还是环境变量?'
memory.talk meta act   issue position memory.talk/配置/该走文件还是环境变量 --field claim='只用环境变量'
memory.talk meta act   issue decide   memory.talk/配置/该走文件还是环境变量 \
    --field position=p1 --field card=memory.talk/配置/配置只来自环境变量
memory.talk work set $W --status archived

存储

~/.memory.talk/
├── metas/           分层 git 仓库:layer/origin、layer/issue、layer/card(+ 用户层)、stack
├── works.db         work 的现在(sqlite):works / work_columns / worklets / inbox
├── worktrace.db     work 的经过(sqlite):spans / points / rounds
├── users/           user 档案(MEMORY_TALK_STORE=fs 时)
└── auth/            登录态(MEMORY_TALK_STORE=fs 时)

work 固定是这两个 sqlite,路径可用 MEMORY_TALK_WORKS_DB / MEMORY_TALK_WORKTRACE_DB 改;MEMORY_TALK_STORE 只管 users / auth(fs 是上面的 users/ / auth/,sqlite 进 memory.sqlite);metas 永远是 git。全部环境变量见 docs/structure/v5/filesystem.md。

开发

pip install -e ".[dev]"
pytest                       # 每个场景在 fs 和 sqlite 两种 users / auth store 下各跑一遍(work 两种下都是 works.db + worktrace.db)
cd memorytalk/frontend && npm ci && 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 / meta 各一个文件
├── 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.2.0

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.2.0
File Size Uploaded Provenance
memorytalk-5.2.0.tar.gz 2.9 MB Without provenance Details

Built distribution (wheel)

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

Total release size: 5.2 MB

Release files / memorytalk-5.2.0.tar.gz

Download URL memorytalk-5.2.0.tar.gz
Size 2.9 MB
Tags Source
SHA-256 checksum
How to use checksums
49cf3f1ef569871795042ceae32514bffa26d5cd0d462f48f6d72ce5b8224a05
BLAKE2b-256 checksum
How to use checksums
422b35f3b04bf9be4bee00542e6ed38667d74a7fc89e3a2522044abd090541cc
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.2.0-py3-none-any.whl

Download URL memorytalk-5.2.0-py3-none-any.whl
Size 2.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
fee4fac272d88be8534ca10847557589dec63e48c3f760e0aca88d6aa97e4d42
BLAKE2b-256 checksum
How to use checksums
4c15d320ce25f7cc61ca2b834c00ec6cefccc71deec81d4a4839ddda3e958733
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.2.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.

Release history Release notifications | RSS feed

This release

5.2.0 This release

2 release files No provenance

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