ReMe/docs/zh/quick_start.md
jinliyl fd2894f939
Some checks failed
NPM Format / Website checks (push) Has been cancelled
GitHub Pages Check / test-and-build (push) Has been cancelled
Package Check / distributions (push) Has been cancelled
Deploy ReMe documentation / build (push) Has been cancelled
Windows Smoke / CLI smoke - py3.11 (push) Has been cancelled
Pre-commit / run (ubuntu-latest) (push) Has been cancelled
Tests ReMe / Unit Tests - py3.11 (push) Has been cancelled
Tests ReMe / Unit Tests - py3.12 (push) Has been cancelled
Tests ReMe / Unit Tests - py3.13 (push) Has been cancelled
Deploy ReMe documentation / deploy (push) Has been cancelled
fix: harden the 0.4.1.7 release configuration (#456)
* fix(packaging): harden the Studio release workflow

* chore(daily-paper): tune scheduled discovery defaults

* fix(docs): link the ReMe blog to GitHub Pages

* fix(docs): increase Chinese hero title spacing

* refactor(docs): share hero title line spacing

* fix(docs): keep desktop hero copy on two lines

* fix(docs): widen the home hero description

* style(docs): loosen hero title line height

* fix(docs): hide Markdown frontmatter in rendered pages

* docs(readme): simplify installation and remove standalone ReMe Studio instructions

- Remove references to separate ReMe Studio package and static build steps
- Clarify that `core` extra includes common integrations including Studio
- Update installation instructions to use `pip install -e ".[core]"`
- Remove detailed Studio usage and frontend development instructions
- Note that Studio is included with `core` and optional via `web` extra
- Simplify Quick Start guide by removing Studio usage step
- Remove mentions of serving Studio with HTTP service when using extras
- Update both English and Chinese README files accordingly

* docs(readme): streamline and clarify memory design and operations

- Remove redundant explanations about core extra installation
- Simplify memory processing flow description for clarity
- Clarify memory workspace directory default and customization
- Condense automatic memory flow to emphasize rebuildable metadata
- Refine search functionality explanation with RRF fusion details
- Shorten and clarify agent integration description, removing redundancy
- Update and simplify the operations command list, removing less common commands
- Revise community and support section for conciseness and clarity
- Maintain parallel updates in both English and Chinese README files

* test(bump_version): add tests for version bumping and consistency checks

- Add dynamic loading of bump_version and package_studio scripts for testing
- Test that studio package and dependencies have matching versions
- Implement fixtures to write temporary version files for testing
- Add test ensuring bump_version updates all relevant files and dependencies
- Add test to reject inconsistent version sources before writing
- Refactor tests to use common REPOSITORY path variable
- Include imports and setup for pytest in test file

feat(bump_version): create script to update ReMe and Studio versions

- Implement version reading from __init__.py and pyproject.toml files
- Validate current versions are consistent across files before updating
- Update version strings atomically to avoid partial writes
- Ensure exact pinning of studio dependency in main package extras
- Validate new version format against a safe pattern
- Provide CLI interface to bump versions from command line
- Raise errors if expected version declarations or pins are missing or duplicated

* fix(release): validate split package publishing

* fix(release): improve validation diagnostics

* fix(release): sync docs and workflow inputs

* fix(release): split PyPI publish jobs
2026-08-13 17:22:00 +08:00

5.4 KiB
Raw Blame History

快速开始

安装

ReMe 要求 Python 3.11+。

从 pip 安装:

pip install "reme-ai[core]"

从源码安装:

git clone https://github.com/agentscope-ai/ReMe.git
cd ReMe
pip install -e packages/reme_ai_studio -e ".[core]"
cd website
npm ci
npm run build:static
cd ..

静态构建步骤需要 Node.js 22.13 或更高版本,用于在从源码运行 ReMe 时提供 Studio。

core extra 建议安装:当前代码会导入 AgentScope wrapper自进化记忆也依赖它。

如果要使用 auto_memoryauto_resourceauto_dream 这类 Agent 流程,再配置 LLM

cat > .env <<'EOF'
LLM_BACKEND=openai
LLM_MODEL_NAME=qwen3.7-plus
LLM_API_KEY=your_api_key
LLM_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1
EOF

只跑基础文件读写和 BM25 检索,可以先不配。


启动

reme start

默认服务地址是 127.0.0.1:2333。如果端口被占用:

reme start service.port=8181
reme version
reme health_check
reme help

reme help 会列出服务端 action。普通命令会通过 HTTP 调用服务端 Job。

基础 reme-ai 包不包含前端资源。安装 reme-ai[web]reme-ai[core] 后,浏览器打开 http://127.0.0.1:2333/ 即可进入 ReMe Studio在同一服务中浏览、编辑和搜索 workspace并查看 digest Wikilink 图。可用 service.web_enabled=false 关闭,或通过 service.web_static_dir / REME_WEB_STATIC_DIR 指定自定义静态目录找不到构建产物时Job API 仍会正常启动。


Workspace 目录

默认 workspace 是当前目录下的 .reme/,启动时会自动创建:

.reme/
├── metadata/   # 索引、图谱、catalog 等持久状态
├── session/    # 对话来源记录
├── mem_session/ # Agent wrapper 生成的 session/配置
├── resource/        # 外部资料
├── daily/           # daily note
└── digest/          # 长期记忆

目录分层、Markdown frontmatter 和 wikilink 语义见 Memory as File

也可以启动时指定:

reme start workspace_dir=/tmp/reme-demo service.port=8181

写入、索引、检索

reme write \
  path=digest/wiki/quick-start-demo \
  name="Quick Start Demo" \
  description="快速开始示例记忆" \
  content="# Quick Start Demo

默认实时 watcher 会索引 daily 和 digest 目录中的 Markdown。

相关链接:[[digest/wiki/search-demo.md]]"

path 是 workspace 内路径;没有后缀时会自动补 .mdMarkdown 文件会写入 namedescription front matter。

后台 watcher 会自动建索引;也可以手动重建:

reme reindex

搜索:

reme search query="快速开始 示例 记忆" limit=5

读取:

reme read path=digest/wiki/quick-start-demo start_line=1 end_line=20

默认配置下,检索主要是 BM25 + wikilink 图谱扩展;向量检索能力在代码中支持,但默认未启用 embedding store。完整检索流程见 Memory Search


文件与 Daily Note

reme stat path=digest/wiki/quick-start-demo
reme edit path=digest/wiki/quick-start-demo old="会索引" new="会持续索引"
reme frontmatter_read path=digest/wiki/quick-start-demo
reme frontmatter_update path=digest/wiki/quick-start-demo metadata='{"tags":["demo"]}'

文件列表 Job 可以直接通过 CLI 调用:

reme list path=digest recursive=true limit=50

等价的 HTTP 调用是:

curl -s http://127.0.0.1:2333/list \
  -H 'Content-Type: application/json' \
  -d '{"path":"digest","recursive":true,"limit":50}'

Daily note

reme write path=daily/2026-06-20/demo-session.md name=demo-session description="Demo session" content="记录内容"
reme daily_list
reme daily_reindex

write 可直接创建 daily note需要刷新当天索引时运行 daily_reindex


自动记忆

reme auto_memory \
  session_id=chat-demo \
  messages='[{"role":"user","content":"我偏好把项目经验沉淀成 Markdown。"},{"role":"assistant","content":"已记录。"}]' \
  memory_hint="记录用户偏好"

外部资料放入 resource/YYYY-MM-DD/ 或直接放在 resource/ 下后,默认后台会监听 md/txt/json/jsonl/csv/yaml/html。 也可以手动触发:

reme auto_resource changes='[{"path":"resource/2026-06-20/report.md","change":"added"}]'

把 daily 整理到长期 digest

reme auto_dream date=2026-06-20
reme proactive date=2026-06-20

这些流程需要可用 LLM未配置 LLM 时请先使用 write/read/search 这类基础能力。

更多细节见 Auto MemoryAuto ResourceAuto DreamProactive


HTTP 与配置

每个可服务 Job 都暴露为 POST /<job>

curl -s http://127.0.0.1:2333/version \
  -H 'Content-Type: application/json' \
  -d '{}'

curl -s http://127.0.0.1:2333/search \
  -H 'Content-Type: application/json' \
  -d '{"query":"快速开始","limit":5}'

默认配置来自 reme/config/default.yaml。启动时可以用 dot notation 覆盖:

reme start \
  workspace_dir=/tmp/reme-demo \
  service.host=127.0.0.1 \
  service.port=8181 \
  enable_logo=false

也可以指定 YAML/JSON 配置文件:

reme start config=/path/to/custom.yaml