Skip to main content

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 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 / 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.1.2

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.1.2
File Size Uploaded Provenance
memorytalk-5.1.2.tar.gz 810.4 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 1.2 MB

Release files / memorytalk-5.1.2.tar.gz

Download URL memorytalk-5.1.2.tar.gz
Size 810.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d596f9217bd78182ee512654b4a16c4e325448ccf9efffdccb85d3272a33bef8
BLAKE2b-256 checksum
How to use checksums
f00dbf13da71b90ad1445f23634624e2d37e3b582522f98ad64b1a5f6310b893
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.1.2-py3-none-any.whl

Download URL memorytalk-5.1.2-py3-none-any.whl
Size 344.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6bb8bf78f28a0c8c0ed08b5142309ac11f4aab8b5330a8a82a1a74710aac5ec6
BLAKE2b-256 checksum
How to use checksums
92b73c4a3b2f0976a4aa690114ae95ce4b31168e6b2ff1f19ddfb9dd2e700cbe
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.1.2

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.1.2 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