From 9ff7f93c86b7689bb5a7dd634ae6c5b7c8fcfde9 Mon Sep 17 00:00:00 2001 From: Inference1 <3617237115@qq.com> Date: Sat, 17 Oct 2026 19:39:17 +0800 Subject: [PATCH] Move the content of the Quick Start section to a suitable later position Signed-off-by: Inference1 <3617237115@qq.com> --- README.md | 228 +++++++++++++++++++++++++-------------------------- README_CN.md | 192 +++++++++++++++++++++---------------------- README_JP.md | 184 ++++++++++++++++++++--------------------- 3 files changed, 302 insertions(+), 302 deletions(-) diff --git a/README.md b/README.md index aa344e1b5d..57a9d536a9 100644 --- a/README.md +++ b/README.md @@ -11,120 +11,6 @@ [Website](https://powercontext.oceanbase.io/) · [Quickstart](https://powercontext.oceanbase.io/en/docs/get-started/quickstart/) · [Integrations](https://powercontext.oceanbase.io/en/docs/integrations/) · [Benchmarks](https://powercontext.oceanbase.io/en/benchmarks/) · [Interfaces](https://powercontext.oceanbase.io/en/docs/develop/interfaces/) -## Quick start - -PowerContext keeps durable project context outside any single chat. A first run follows this path: - -```text -Agent input → Source evidence → Memory / Topic Memory → PreparedContext → next session or Agent -``` - -PowerContext 1.3.0 includes an interactive setup wizard. You need Python 3.11+, Git, and -[uv](https://docs.astral.sh/uv/getting-started/installation/); uv can provision Python when needed. To connect an Agent, -also install its CLI. In the wizard, choose Basic memory for explicit saves and recall without model APIs; Full memory -requires separate Generation and Embedding API credentials. For a local Server without model APIs, see -[Install and run](docs/en/docs/get-started/install-and-run.md). -macOS and Linux are supported; Windows support is `experimental`. - -Choose the path that matches your goal: - -| Goal | Choose | What you need | -| --- | --- | --- | -| Try explicit saves and recall | **Basic memory** | CLI and Server; no model API | -| Process Sources automatically and use Topic Memory or semantic retrieval | **Full memory** | Separate Generation and Embedding API credentials; schedules and Scope policies still apply | -| Learn the core workflows in Python | The first seven Jupyter tutorials | A repository checkout and `uv`; no model or API key | - -### 1. Install and run the wizard - -```bash -uv tool install --force "powercontext[cli,server]==1.3.0" -mkdir -p powercontext-config && cd powercontext-config -powercontext config init --language en --output .env -powercontext config validate --env-file .env -powercontext server run --env-file .env # keep this terminal open -``` - -The wizard asks about storage, local or remote usage, memory capabilities, Dashboard/access, and Agent connections. SQLite is the simplest first storage choice; choose embedded seekdb only when you need it and can approve its dependency install. - -The wizard writes one `.env` environment file and `.env.next-steps.md`. These files can contain credentials; do not -commit them. Keep Server running; in another terminal, return to `powercontext-config`, reload the generated environment -file, and check the connection: - -```bash -set -a -. ./.env -set +a -powercontext ready -powercontext capabilities -``` - -Continue with `.env.next-steps.md` to create and bind the selected Scopes. Use the real `scope_id` returned by the -creation request; a planned `codex-...` title is not an ID. Changing directories does not create isolation; use the -same Server and Scope in the Dashboard and Agent. Then install the matching plugins and launch a new Agent session. -The [complete walkthrough](https://powercontext.oceanbase.io/en/docs/get-started/quickstart/) covers Codex and Claude -Code, Dashboard login, SSH forwarding, HTTPS prerequisites, and observable acceptance checks. For example, the matching -Codex installation is: - -```bash -powercontext setup codex --ref powercontext-v1.3.0 -powercontext doctor codex -``` - -### 2. Verify the first end-to-end result - -This checks the path that makes PowerContext useful: Source capture → background processing → cross-session recall. In -the new Agent session bound to the same Scope, send a concrete decision such as: - -```text -We are designing the Aurora acceptance project. Use uv for Python dependencies and .env for configuration. -The first deployment runs on one Linux server, with a Mac connecting through an SSH tunnel. -Restate these constraints without changing any code. -``` - -If you enabled Dashboard, open the URL printed by the wizard; an empty Dashboard before capture is expected. Then: - -1. Confirm that the prompt appears as a Source. -2. After the configured inspection interval and model processing, confirm that a related Topic Memory appears. -3. Send a related update and confirm that the new Source arrives and the topic content or revision history reflects it. -4. Start a new Agent session with the same Scope and ask for the Aurora decisions with citations. - -`doctor codex` checks installation and connectivity only. Source capture does not by itself create Memory or Topic -Memory, and processing can wait for configured schedules and model work. In Basic memory mode, explicitly ask the Agent -to save a decision, then search for it in a new session; that does not test automatic extraction. - -### 3. Explore Python first — no API key - -The tutorials run from a repository checkout and take their dependencies from a `uv` dependency group, so they are not -part of the `powercontext` package. From the repository root: - -```bash -uv sync --locked --group notebooks -uv run --locked --group notebooks jupyter lab --notebook-dir=examples/jupyter -``` - -Start with [01 · Memory across sessions](examples/jupyter/01_memory_across_sessions.ipynb), then work through the -[22 Chinese Jupyter tutorials and a complete team workflow](examples/jupyter/README.md) to run Memory, context -preparation, Handoff, Experience, Skill, and a real Agent step by step. The first seven tutorials need no model or API -key. - -### Common issues - -- `doctor codex` verifies Codex installation and connectivity. To verify automatic memory, check that a real prompt - becomes a Source, produces a Topic, evolves after a related prompt, and can be recalled in a new session using the - same Scope. -- If Python dependency downloads are slow or fail, configure a package index for - [uv](https://docs.astral.sh/uv/configuration/indexes/) and retry. -- Choose **Full memory capabilities** to test automatic Memory and Topic Memory; this requires separate Generation and - Embedding API credentials. An Agent subscription does not provide those Server credentials. Choose **Basic memory** to - save and retrieve memories explicitly without additional model APIs. -- If seekdb needs installing, the wizard asks once and installs the dependency in the background. -- The optional recall-sufficiency gate records scope-local daily search effort and budget omissions for later policy - evaluation. See the [configuration reference](docs/en/docs/operate/configuration.md) for its recording and failure - behavior. -- For a Server on another machine, use HTTPS or follow the - [remote connection guide](docs/en/docs/operate/connect-remote-server.md). Setup recognizes remote HTTP URLs from flags - or environment variables and asks for explicit consent; automated setup uses `--allow-insecure-http`. - ## What is PowerContext? **PowerContext is an open-source context service for AI agents.** It keeps the durable part of your work — decisions, @@ -259,6 +145,120 @@ would rather state than bury: the six LoCoMo Plus scores above were supplied by artifacts are not publicly available for verification — the published instructions reproduce the harness, not those scores. Windows support is `experimental`. +## Quick start + +PowerContext keeps durable project context outside any single chat. A first run follows this path: + +```text +Agent input → Source evidence → Memory / Topic Memory → PreparedContext → next session or Agent +``` + +PowerContext 1.3.0 includes an interactive setup wizard. You need Python 3.11+, Git, and +[uv](https://docs.astral.sh/uv/getting-started/installation/); uv can provision Python when needed. To connect an Agent, +also install its CLI. In the wizard, choose Basic memory for explicit saves and recall without model APIs; Full memory +requires separate Generation and Embedding API credentials. For a local Server without model APIs, see +[Install and run](docs/en/docs/get-started/install-and-run.md). +macOS and Linux are supported; Windows support is `experimental`. + +Choose the path that matches your goal: + +| Goal | Choose | What you need | +| --- | --- | --- | +| Try explicit saves and recall | **Basic memory** | CLI and Server; no model API | +| Process Sources automatically and use Topic Memory or semantic retrieval | **Full memory** | Separate Generation and Embedding API credentials; schedules and Scope policies still apply | +| Learn the core workflows in Python | The first seven Jupyter tutorials | A repository checkout and `uv`; no model or API key | + +### 1. Install and run the wizard + +```bash +uv tool install --force "powercontext[cli,server]==1.3.0" +mkdir -p powercontext-config && cd powercontext-config +powercontext config init --language en --output .env +powercontext config validate --env-file .env +powercontext server run --env-file .env # keep this terminal open +``` + +The wizard asks about storage, local or remote usage, memory capabilities, Dashboard/access, and Agent connections. SQLite is the simplest first storage choice; choose embedded seekdb only when you need it and can approve its dependency install. + +The wizard writes one `.env` environment file and `.env.next-steps.md`. These files can contain credentials; do not +commit them. Keep Server running; in another terminal, return to `powercontext-config`, reload the generated environment +file, and check the connection: + +```bash +set -a +. ./.env +set +a +powercontext ready +powercontext capabilities +``` + +Continue with `.env.next-steps.md` to create and bind the selected Scopes. Use the real `scope_id` returned by the +creation request; a planned `codex-...` title is not an ID. Changing directories does not create isolation; use the +same Server and Scope in the Dashboard and Agent. Then install the matching plugins and launch a new Agent session. +The [complete walkthrough](https://powercontext.oceanbase.io/en/docs/get-started/quickstart/) covers Codex and Claude +Code, Dashboard login, SSH forwarding, HTTPS prerequisites, and observable acceptance checks. For example, the matching +Codex installation is: + +```bash +powercontext setup codex --ref powercontext-v1.3.0 +powercontext doctor codex +``` + +### 2. Verify the first end-to-end result + +This checks the path that makes PowerContext useful: Source capture → background processing → cross-session recall. In +the new Agent session bound to the same Scope, send a concrete decision such as: + +```text +We are designing the Aurora acceptance project. Use uv for Python dependencies and .env for configuration. +The first deployment runs on one Linux server, with a Mac connecting through an SSH tunnel. +Restate these constraints without changing any code. +``` + +If you enabled Dashboard, open the URL printed by the wizard; an empty Dashboard before capture is expected. Then: + +1. Confirm that the prompt appears as a Source. +2. After the configured inspection interval and model processing, confirm that a related Topic Memory appears. +3. Send a related update and confirm that the new Source arrives and the topic content or revision history reflects it. +4. Start a new Agent session with the same Scope and ask for the Aurora decisions with citations. + +`doctor codex` checks installation and connectivity only. Source capture does not by itself create Memory or Topic +Memory, and processing can wait for configured schedules and model work. In Basic memory mode, explicitly ask the Agent +to save a decision, then search for it in a new session; that does not test automatic extraction. + +### 3. Explore Python first — no API key + +The tutorials run from a repository checkout and take their dependencies from a `uv` dependency group, so they are not +part of the `powercontext` package. From the repository root: + +```bash +uv sync --locked --group notebooks +uv run --locked --group notebooks jupyter lab --notebook-dir=examples/jupyter +``` + +Start with [01 · Memory across sessions](examples/jupyter/01_memory_across_sessions.ipynb), then work through the +[22 Chinese Jupyter tutorials and a complete team workflow](examples/jupyter/README.md) to run Memory, context +preparation, Handoff, Experience, Skill, and a real Agent step by step. The first seven tutorials need no model or API +key. + +### Common issues + +- `doctor codex` verifies Codex installation and connectivity. To verify automatic memory, check that a real prompt + becomes a Source, produces a Topic, evolves after a related prompt, and can be recalled in a new session using the + same Scope. +- If Python dependency downloads are slow or fail, configure a package index for + [uv](https://docs.astral.sh/uv/configuration/indexes/) and retry. +- Choose **Full memory capabilities** to test automatic Memory and Topic Memory; this requires separate Generation and + Embedding API credentials. An Agent subscription does not provide those Server credentials. Choose **Basic memory** to + save and retrieve memories explicitly without additional model APIs. +- If seekdb needs installing, the wizard asks once and installs the dependency in the background. +- The optional recall-sufficiency gate records scope-local daily search effort and budget omissions for later policy + evaluation. See the [configuration reference](docs/en/docs/operate/configuration.md) for its recording and failure + behavior. +- For a Server on another machine, use HTTPS or follow the + [remote connection guide](docs/en/docs/operate/connect-remote-server.md). Setup recognizes remote HTTP URLs from flags + or environment variables and asks for explicit consent; automated setup uses `--allow-insecure-http`. + ## Connect your Agent Codex is `official`; other maintained hosts and Python Agent frameworks are `community`; Bub is `evaluation` only. diff --git a/README_CN.md b/README_CN.md index da0b21fc15..8ff79e1a1f 100644 --- a/README_CN.md +++ b/README_CN.md @@ -11,102 +11,6 @@ [网站](https://powercontext.oceanbase.io/zh/) · [快速开始](https://powercontext.oceanbase.io/zh/docs/get-started/quickstart/) · [接入 Agent](https://powercontext.oceanbase.io/zh/docs/integrations/) · [评测](https://powercontext.oceanbase.io/zh/benchmarks/) · [接口](https://powercontext.oceanbase.io/zh/docs/develop/interfaces/) -## 快速开始 - -PowerContext 把可长期复用的项目上下文放在单次对话之外。一次完整体验可以概括为: - -```text -Agent 输入 → Source 证据 → Memory / Topic Memory → PreparedContext → 新会话或新 Agent -``` - -PowerContext 1.3.0 包含交互式配置向导。需要 Python 3.11+、Git 和 -[uv](https://docs.astral.sh/uv/getting-started/installation/);需要时 uv 可以按需提供 Python。 -要接入 Agent,还需要安装对应的 CLI。向导中选择“基础记忆”即可在没有模型 API 的情况下显式保存与召回; -选择“完整记忆能力”则需要独立的 Generation、Embedding API 凭据。只想启动不依赖模型 API 的本地 Server 时, -请参考[安装与运行](docs/zh/docs/get-started/install-and-run.md)。 -支持 macOS 和 Linux;Windows 支持为 `experimental`。 - -请选择与你目标匹配的路径: - -| 目标 | 选择 | 需要 | -| --- | --- | --- | -| 体验显式保存与召回 | **基础记忆** | CLI 和 Server;无需模型 API | -| 自动处理 Source,使用 Topic Memory 或语义检索 | **完整记忆能力** | 独立的 Generation、Embedding API 凭据;仍受调度和 Scope 策略影响 | -| 用 Python 学习核心工作流 | 前七篇 Jupyter 教程 | 仓库 checkout 和 `uv`;不需要模型或 API Key | - -### 1. 安装并运行配置向导 - -```bash -uv tool install --force "powercontext[cli,server]==1.3.0" -mkdir -p powercontext-config && cd powercontext-config -powercontext config init --language zh --output .env -powercontext config validate --env-file .env -powercontext server run --env-file .env # 保持这个终端不关 -``` - -向导会询问存储、本机或远程使用场景、记忆能力、Dashboard/访问控制和 Agent 连接。首次体验可以使用 SQLite;只有确实需要时再选择嵌入式 seekdb,并同意依赖安装。 - -向导生成一个 `.env` 环境文件和 `.env.next-steps.md`。这些文件可能包含凭据,请勿提交到 Git。保持 Server 运行,在另一个终端回到 `powercontext-config` 目录,重新加载生成的环境文件并检查服务: - -```bash -set -a -. ./.env -set +a -powercontext ready -powercontext capabilities -``` - -接着按 `.env.next-steps.md` 创建并绑定 Scope。使用创建请求返回的真实 `scope_id`;向导规划的 `codex-...` 标题不是 ID。 -切换目录不会创建隔离;Dashboard 和 Agent 要使用同一个 Server 和 Scope。然后安装相同版本的插件,再打开新 Agent 会话。 -[完整安装流程](https://powercontext.oceanbase.io/zh/docs/get-started/quickstart/)包含 Codex、Claude Code、Dashboard 登录、SSH 隧道、HTTPS 前提及逐项验收。例如,匹配本版本的 Codex 安装命令是: - -```bash -powercontext setup codex --ref powercontext-v1.3.0 -powercontext doctor codex -``` - -### 2. 验收第一条端到端结果 - -这一步检查 PowerContext 真正有用的链路:Source 采集 → 后台处理 → 跨会话召回。 -在绑定了同一 Scope 的新 Agent 会话中,发送一条具体决定,例如: - -```text -我们正在设计 Aurora 验收项目。决定用 uv 管理 Python 依赖,配置文件使用 .env。 -第一阶段只在一台 Linux 服务器运行,Mac 通过 SSH 隧道访问。请复述这些约束,暂时不要修改代码。 -``` - -如果开启了 Dashboard,打开向导打印的地址;采集前页面为空是正常现象。然后: - -1. 确认这条输入出现在 Source 中。 -2. 等待配置的检查周期和模型处理,确认出现相关 Topic Memory。 -3. 发送一条相关更新,确认新的 Source 入库,且主题内容或修订记录反映了更新。 -4. 使用同一 Scope 开启新的 Agent 会话,要求它带引用找回 Aurora 的决定。 - -`doctor codex` 只检查安装与连接。Source 采集本身不会创建 Memory 或 Topic Memory,后台处理还要等待配置的调度和模型运行。 -基础记忆模式下,可以显式要求 Agent 保存一条决定,再在新会话中搜索;这不能验收自动提取。 - -### 3. 先用 Python 体验 - -教程需要在仓库 checkout 内运行,依赖由 `uv` 的依赖组提供,不在 `powercontext` 包内。在仓库根目录执行: - -```bash -uv sync --locked --group notebooks -uv run --locked --group notebooks jupyter lab --notebook-dir=examples/jupyter -``` - -先从 [01 · 让新会话用上项目约定](examples/jupyter/01_memory_across_sessions.ipynb)开始,再通过 -[22 篇中文 Jupyter 教程与完整团队工作流](examples/jupyter/README.md)亲手运行 Memory、上下文、交接、Experience、Skill -和真实 Agent。前七篇不需要模型或 API Key。 - -### 常见问题 - -- `doctor codex` 只验证 Codex 集成的安装和连接,不代表自动记忆流程已通过。要验收自动记忆,需要确认真实输入进入 Source、产生 Topic、相关输入推动主题演进,并能在使用同一 Scope 的新会话中召回。 -- Python 依赖下载缓慢或失败时,可先为 [uv](https://docs.astral.sh/uv/configuration/indexes/) 配置包索引(镜像源)再重试。 -- 要体验自动 Memory 提取和 Topic Memory,请选择**完整记忆能力**并准备独立的 Generation、Embedding API 凭据;Agent 官方订阅不会自动给 PowerContext Server 提供这些凭据。选择**基础记忆**则可显式保存与召回,无需额外模型 API。 -- 选择 seekdb 且缺少依赖时,会在确认后后台增量安装。 -- 可选的召回充分性门控会按 Scope 记录每日搜索工作量和字节预算遗漏,供后续策略评估使用。记录范围与失败行为见[配置说明](docs/zh/docs/operate/configuration.md)。 -- Server 部署在另一台机器上时,请使用 HTTPS 或参考[远程连接说明](docs/zh/docs/operate/connect-remote-server.md)。配置向导会从参数或环境变量识别远端 HTTP 地址并要求显式确认;自动化场景使用 `--allow-insecure-http`。 - ## PowerContext 是什么? **PowerContext 是一个面向 AI Agent 的开源上下文服务。** 它把工作里值得长期保留的部分——已经确认的决定、约束、证据、进展——从某一次对话里搬出来,这样下一个会话、下一个 Agent、或者下一个接手的人,都能从当前进展继续,而不必重读全部记录。 @@ -210,6 +114,102 @@ Experience 记录一个场景、一次动作、观察到的结果,以及可复 评测方法、完整结果和适用边界:[官网评测页](https://powercontext.oceanbase.io/zh/benchmarks/)。有两点我们宁愿写明而不是藏起来:上面这六组 LoCoMo Plus 分数由项目方提供,运行产物尚未公开供复核——公开的是评测工具的复现步骤,不代表这些分数本身已被公开验证。Windows 支持为 `experimental`。 +## 快速开始 + +PowerContext 把可长期复用的项目上下文放在单次对话之外。一次完整体验可以概括为: + +```text +Agent 输入 → Source 证据 → Memory / Topic Memory → PreparedContext → 新会话或新 Agent +``` + +PowerContext 1.3.0 包含交互式配置向导。需要 Python 3.11+、Git 和 +[uv](https://docs.astral.sh/uv/getting-started/installation/);需要时 uv 可以按需提供 Python。 +要接入 Agent,还需要安装对应的 CLI。向导中选择“基础记忆”即可在没有模型 API 的情况下显式保存与召回; +选择“完整记忆能力”则需要独立的 Generation、Embedding API 凭据。只想启动不依赖模型 API 的本地 Server 时, +请参考[安装与运行](docs/zh/docs/get-started/install-and-run.md)。 +支持 macOS 和 Linux;Windows 支持为 `experimental`。 + +请选择与你目标匹配的路径: + +| 目标 | 选择 | 需要 | +| --- | --- | --- | +| 体验显式保存与召回 | **基础记忆** | CLI 和 Server;无需模型 API | +| 自动处理 Source,使用 Topic Memory 或语义检索 | **完整记忆能力** | 独立的 Generation、Embedding API 凭据;仍受调度和 Scope 策略影响 | +| 用 Python 学习核心工作流 | 前七篇 Jupyter 教程 | 仓库 checkout 和 `uv`;不需要模型或 API Key | + +### 1. 安装并运行配置向导 + +```bash +uv tool install --force "powercontext[cli,server]==1.3.0" +mkdir -p powercontext-config && cd powercontext-config +powercontext config init --language zh --output .env +powercontext config validate --env-file .env +powercontext server run --env-file .env # 保持这个终端不关 +``` + +向导会询问存储、本机或远程使用场景、记忆能力、Dashboard/访问控制和 Agent 连接。首次体验可以使用 SQLite;只有确实需要时再选择嵌入式 seekdb,并同意依赖安装。 + +向导生成一个 `.env` 环境文件和 `.env.next-steps.md`。这些文件可能包含凭据,请勿提交到 Git。保持 Server 运行,在另一个终端回到 `powercontext-config` 目录,重新加载生成的环境文件并检查服务: + +```bash +set -a +. ./.env +set +a +powercontext ready +powercontext capabilities +``` + +接着按 `.env.next-steps.md` 创建并绑定 Scope。使用创建请求返回的真实 `scope_id`;向导规划的 `codex-...` 标题不是 ID。 +切换目录不会创建隔离;Dashboard 和 Agent 要使用同一个 Server 和 Scope。然后安装相同版本的插件,再打开新 Agent 会话。 +[完整安装流程](https://powercontext.oceanbase.io/zh/docs/get-started/quickstart/)包含 Codex、Claude Code、Dashboard 登录、SSH 隧道、HTTPS 前提及逐项验收。例如,匹配本版本的 Codex 安装命令是: + +```bash +powercontext setup codex --ref powercontext-v1.3.0 +powercontext doctor codex +``` + +### 2. 验收第一条端到端结果 + +这一步检查 PowerContext 真正有用的链路:Source 采集 → 后台处理 → 跨会话召回。 +在绑定了同一 Scope 的新 Agent 会话中,发送一条具体决定,例如: + +```text +我们正在设计 Aurora 验收项目。决定用 uv 管理 Python 依赖,配置文件使用 .env。 +第一阶段只在一台 Linux 服务器运行,Mac 通过 SSH 隧道访问。请复述这些约束,暂时不要修改代码。 +``` + +如果开启了 Dashboard,打开向导打印的地址;采集前页面为空是正常现象。然后: + +1. 确认这条输入出现在 Source 中。 +2. 等待配置的检查周期和模型处理,确认出现相关 Topic Memory。 +3. 发送一条相关更新,确认新的 Source 入库,且主题内容或修订记录反映了更新。 +4. 使用同一 Scope 开启新的 Agent 会话,要求它带引用找回 Aurora 的决定。 + +`doctor codex` 只检查安装与连接。Source 采集本身不会创建 Memory 或 Topic Memory,后台处理还要等待配置的调度和模型运行。 +基础记忆模式下,可以显式要求 Agent 保存一条决定,再在新会话中搜索;这不能验收自动提取。 + +### 3. 先用 Python 体验 + +教程需要在仓库 checkout 内运行,依赖由 `uv` 的依赖组提供,不在 `powercontext` 包内。在仓库根目录执行: + +```bash +uv sync --locked --group notebooks +uv run --locked --group notebooks jupyter lab --notebook-dir=examples/jupyter +``` + +先从 [01 · 让新会话用上项目约定](examples/jupyter/01_memory_across_sessions.ipynb)开始,再通过 +[22 篇中文 Jupyter 教程与完整团队工作流](examples/jupyter/README.md)亲手运行 Memory、上下文、交接、Experience、Skill +和真实 Agent。前七篇不需要模型或 API Key。 + +### 常见问题 + +- `doctor codex` 只验证 Codex 集成的安装和连接,不代表自动记忆流程已通过。要验收自动记忆,需要确认真实输入进入 Source、产生 Topic、相关输入推动主题演进,并能在使用同一 Scope 的新会话中召回。 +- Python 依赖下载缓慢或失败时,可先为 [uv](https://docs.astral.sh/uv/configuration/indexes/) 配置包索引(镜像源)再重试。 +- 要体验自动 Memory 提取和 Topic Memory,请选择**完整记忆能力**并准备独立的 Generation、Embedding API 凭据;Agent 官方订阅不会自动给 PowerContext Server 提供这些凭据。选择**基础记忆**则可显式保存与召回,无需额外模型 API。 +- 选择 seekdb 且缺少依赖时,会在确认后后台增量安装。 +- 可选的召回充分性门控会按 Scope 记录每日搜索工作量和字节预算遗漏,供后续策略评估使用。记录范围与失败行为见[配置说明](docs/zh/docs/operate/configuration.md)。 +- Server 部署在另一台机器上时,请使用 HTTPS 或参考[远程连接说明](docs/zh/docs/operate/connect-remote-server.md)。配置向导会从参数或环境变量识别远端 HTTP 地址并要求显式确认;自动化场景使用 `--allow-insecure-http`。 + ## 接入你的 Agent Codex 标为 `official`,其他受维护的宿主及 Python Agent 框架标为 `community`,Bub 标为 `evaluation`,仅用于评测。这些标签表示 PowerContext 集成的维护归属和用途;哪些宿主已通过资格验证、各自支持哪些功能,以[能力矩阵](https://powercontext.oceanbase.io/zh/docs/integrations/capabilities/)为准。 diff --git a/README_JP.md b/README_JP.md index 4952d99ab4..0478b2300b 100644 --- a/README_JP.md +++ b/README_JP.md @@ -11,98 +11,6 @@ [Web サイト](https://powercontext.oceanbase.io/en/) · [クイックスタート](https://powercontext.oceanbase.io/en/docs/get-started/quickstart/) · [Agent 連携](https://powercontext.oceanbase.io/en/docs/integrations/) · [ベンチマーク](https://powercontext.oceanbase.io/en/benchmarks/) · [インターフェース](https://powercontext.oceanbase.io/en/docs/develop/interfaces/) -## クイックスタート - -PowerContext は、長く使うプロジェクトのコンテキストを 1 つの会話の外に保持します。最初の実行は次の流れです。 - -```text -Agent の入力 → Source の証拠 → Memory / Topic Memory → PreparedContext → 新しいセッションまたは Agent -``` - -PowerContext 1.3.0 には対話式セットアップウィザードが含まれています。Python 3.11+、Git、[uv](https://docs.astral.sh/uv/getting-started/installation/) が必要です。必要に応じて uv が Python を用意できます。Agent に接続するには、その CLI もインストールしてください。ウィザードでは、モデル API なしで明示的な保存と想起を試す場合は Basic memory、自動抽出を有効にする場合は Full memory を選択してください。Full memory には Generation と Embedding API の個別の認証情報が必要です。モデル API なしでローカル Server だけを起動する場合は[インストールと実行](docs/en/docs/get-started/install-and-run.md)を参照してください。macOS と Linux をサポートし、Windows のサポートは `experimental` です。 - -目的に合う経路を選択してください: - -| 目的 | 選択 | 必要なもの | -| --- | --- | --- | -| 明示的な保存と想起を試す | **Basic memory** | CLI と Server。モデル API は不要 | -| Source を自動処理し、Topic Memory やセマンティック検索を使う | **Full memory** | Generation と Embedding API の個別の認証情報。スケジュールと Scope ポリシーも適用されます | -| Python で基本ワークフローを学ぶ | 最初の 7 本の Jupyter チュートリアル | リポジトリの checkout と `uv`。モデルや API キーは不要 | - -### 1. ウィザードをインストールして実行する - -```bash -uv tool install --force "powercontext[cli,server]==1.3.0" -mkdir -p powercontext-config && cd powercontext-config -powercontext config init --language en --output .env -powercontext config validate --env-file .env -powercontext server run --env-file .env # このターミナルは開いたままにする -``` - -ウィザードでは、ストレージ、ローカルまたはリモート利用、メモリ機能、Dashboard/アクセス制御、Agent 接続を選択します。最初は SQLite が簡単です。組み込み seekdb は必要な場合だけ選び、依存関係のインストールを許可してください。 - -ウィザードは `.env` と `.env.next-steps.md` を生成します。これらのファイルには認証情報が含まれることがあるため、コミットしないでください。Server を起動したまま、別のターミナルで `powercontext-config` に戻り、生成された環境ファイルを読み込んで接続を確認します。 - -```bash -set -a -. ./.env -set +a -powercontext ready -powercontext capabilities -``` - -続いて `.env.next-steps.md` の手順に従い、Scope を作成して紐付けます。作成リクエストが返す実際の `scope_id` を使ってください。 -計画された `codex-...` タイトルは ID ではありません。ディレクトリを変えても分離は作られないため、Dashboard と Agent で同じ Server と -Scope を使います。その後、対応するプラグインをインストールして新しい Agent セッションを起動します。[完全な手順](https://powercontext.oceanbase.io/en/docs/get-started/quickstart/)では、Codex と Claude Code、Dashboard へのログイン、SSH 転送、HTTPS の前提条件、確認可能な受け入れチェックを扱っています。対応する Codex のインストールは次のとおりです。 - -```bash -powercontext setup codex --ref powercontext-v1.3.0 -powercontext doctor codex -``` - -### 2. 最初のエンドツーエンド結果を確認する - -この確認では、PowerContext が役立つ流れを検証します:Source の取得 → バックグラウンド処理 → セッションをまたぐ想起。 -同じ Scope に紐付けた新しい Agent セッションで、次のような具体的な決定を送ります。 - -```text -Aurora の受け入れプロジェクトを設計しています。Python の依存関係には uv、設定には .env を使います。 -最初のデプロイは 1 台の Linux サーバーで行い、Mac から SSH トンネルで接続します。 -これらの制約を変えずに言い直してください。コードは変更しないでください。 -``` - -Dashboard を有効にした場合は、ウィザードが表示した URL を開いてください。取得前に Dashboard が空なのは正常です。 -その後、次を確認します。 - -1. 入力が Source として表示されること。 -2. 設定した検査間隔とモデル処理の後、関連する Topic Memory が現れること。 -3. 関連する更新を送り、新しい Source が入り、トピックの内容またはリビジョン履歴に反映されること。 -4. 同じ Scope で新しい Agent セッションを開始し、Aurora の決定を引用付きで探すこと。 - -`doctor codex` はインストールと接続だけを確認します。Source の取得だけでは Memory や Topic Memory は作成されず、バックグラウンド処理には設定したスケジュールとモデルの実行が必要です。 -Basic memory では Agent に決定を明示的に保存させ、新しいセッションで検索してください。ただし、これは自動抽出の検証ではありません。 - -### 3. Python で最初に試す - -チュートリアルはリポジトリの checkout 内で実行し、依存関係は `uv` の dependency group から取得します。`powercontext` パッケージには含まれません。リポジトリのルートで実行してください: - -```bash -uv sync --locked --group notebooks -uv run --locked --group notebooks jupyter lab --notebook-dir=examples/jupyter -``` - -まず [01 · Memory across sessions](examples/jupyter/01_memory_across_sessions.ipynb) を実行し、その後 [22 本の Jupyter チュートリアル(中国語)](examples/jupyter/README.md)で、Memory、コンテキストの準備、Handoff、Experience、Skill、実際の Agent を動かしながら学べます。 -最初の 7 本はモデルや API キーなしで実行できます。 - -### よくある問題 - -- `doctor codex` は Codex のインストールと接続を確認します。自動記憶を検証するには、実際の入力が Source になり、Topic が生成され、関連する入力で主題が変化し、同じ Scope を使う新しいセッションで想起できることを確認してください。 -- Python 依存関係のダウンロードが遅い、または失敗する場合は、[uv](https://docs.astral.sh/uv/configuration/indexes/) にパッケージインデックス(ミラー)を設定してから再試行してください。 -- 自動 Memory と Topic Memory を試すには **Full memory** を選択し、Generation と Embedding の API 接続を設定してください。Agent のサブスクリプションとは別の認証情報が必要です。**Basic memory** は追加のモデル API なしで明示的な保存・検索を利用できます。 -- seekdb のインストールが必要な場合、ウィザードが一度確認し、依存関係をバックグラウンドでインストールします。 -- オプションの想起十分性ゲートは、Scope ごとの 1 日あたりの検索量と予算超過を記録し、後からポリシー評価に使えます。記録範囲と失敗時の挙動は[設定リファレンス](docs/en/docs/operate/configuration.md)を参照してください。 -- Server が別のマシンにある場合は HTTPS を使用するか、[リモート接続ガイド](docs/en/docs/operate/connect-remote-server.md)に従ってください。セットアップはフラグや環境変数からリモート HTTP URL を認識し、明示的な同意を求めます。自動化されたセットアップでは `--allow-insecure-http` を使います。 - ## PowerContext とは何か? **PowerContext は、AI Agent 向けのオープンソース・コンテキストサービスです。** 作業のうち長く使う価値のある部分 —— 確定した判断、制約、根拠、進捗 —— を単一の会話の外に置きます。これにより、次のセッション、次の Agent、あるいは次の担当者が、記録をすべて読み返すのではなく現在の状態から続けられます。 @@ -202,6 +110,98 @@ Experience は、状況・行動・観察された結果・再利用可能な教 評価手法、詳細な結果、適用範囲は[公式ベンチマークページ](https://powercontext.oceanbase.io/en/benchmarks/)を参照してください。隠すより書いておきたい注意点が 2 つあります。上記 6 件の LoCoMo Plus スコアはプロジェクト所有者から提供されたもので、検証用の実行成果物は公開されていません。公開されている再現手順は評価ハーネスの説明であり、これらのスコア自体の検証を意味するものではありません。また、Windows のサポートは `experimental` です。 +## クイックスタート + +PowerContext は、長く使うプロジェクトのコンテキストを 1 つの会話の外に保持します。最初の実行は次の流れです。 + +```text +Agent の入力 → Source の証拠 → Memory / Topic Memory → PreparedContext → 新しいセッションまたは Agent +``` + +PowerContext 1.3.0 には対話式セットアップウィザードが含まれています。Python 3.11+、Git、[uv](https://docs.astral.sh/uv/getting-started/installation/) が必要です。必要に応じて uv が Python を用意できます。Agent に接続するには、その CLI もインストールしてください。ウィザードでは、モデル API なしで明示的な保存と想起を試す場合は Basic memory、自動抽出を有効にする場合は Full memory を選択してください。Full memory には Generation と Embedding API の個別の認証情報が必要です。モデル API なしでローカル Server だけを起動する場合は[インストールと実行](docs/en/docs/get-started/install-and-run.md)を参照してください。macOS と Linux をサポートし、Windows のサポートは `experimental` です。 + +目的に合う経路を選択してください: + +| 目的 | 選択 | 必要なもの | +| --- | --- | --- | +| 明示的な保存と想起を試す | **Basic memory** | CLI と Server。モデル API は不要 | +| Source を自動処理し、Topic Memory やセマンティック検索を使う | **Full memory** | Generation と Embedding API の個別の認証情報。スケジュールと Scope ポリシーも適用されます | +| Python で基本ワークフローを学ぶ | 最初の 7 本の Jupyter チュートリアル | リポジトリの checkout と `uv`。モデルや API キーは不要 | + +### 1. ウィザードをインストールして実行する + +```bash +uv tool install --force "powercontext[cli,server]==1.3.0" +mkdir -p powercontext-config && cd powercontext-config +powercontext config init --language en --output .env +powercontext config validate --env-file .env +powercontext server run --env-file .env # このターミナルは開いたままにする +``` + +ウィザードでは、ストレージ、ローカルまたはリモート利用、メモリ機能、Dashboard/アクセス制御、Agent 接続を選択します。最初は SQLite が簡単です。組み込み seekdb は必要な場合だけ選び、依存関係のインストールを許可してください。 + +ウィザードは `.env` と `.env.next-steps.md` を生成します。これらのファイルには認証情報が含まれることがあるため、コミットしないでください。Server を起動したまま、別のターミナルで `powercontext-config` に戻り、生成された環境ファイルを読み込んで接続を確認します。 + +```bash +set -a +. ./.env +set +a +powercontext ready +powercontext capabilities +``` + +続いて `.env.next-steps.md` の手順に従い、Scope を作成して紐付けます。作成リクエストが返す実際の `scope_id` を使ってください。 +計画された `codex-...` タイトルは ID ではありません。ディレクトリを変えても分離は作られないため、Dashboard と Agent で同じ Server と +Scope を使います。その後、対応するプラグインをインストールして新しい Agent セッションを起動します。[完全な手順](https://powercontext.oceanbase.io/en/docs/get-started/quickstart/)では、Codex と Claude Code、Dashboard へのログイン、SSH 転送、HTTPS の前提条件、確認可能な受け入れチェックを扱っています。対応する Codex のインストールは次のとおりです。 + +```bash +powercontext setup codex --ref powercontext-v1.3.0 +powercontext doctor codex +``` + +### 2. 最初のエンドツーエンド結果を確認する + +この確認では、PowerContext が役立つ流れを検証します:Source の取得 → バックグラウンド処理 → セッションをまたぐ想起。 +同じ Scope に紐付けた新しい Agent セッションで、次のような具体的な決定を送ります。 + +```text +Aurora の受け入れプロジェクトを設計しています。Python の依存関係には uv、設定には .env を使います。 +最初のデプロイは 1 台の Linux サーバーで行い、Mac から SSH トンネルで接続します。 +これらの制約を変えずに言い直してください。コードは変更しないでください。 +``` + +Dashboard を有効にした場合は、ウィザードが表示した URL を開いてください。取得前に Dashboard が空なのは正常です。 +その後、次を確認します。 + +1. 入力が Source として表示されること。 +2. 設定した検査間隔とモデル処理の後、関連する Topic Memory が現れること。 +3. 関連する更新を送り、新しい Source が入り、トピックの内容またはリビジョン履歴に反映されること。 +4. 同じ Scope で新しい Agent セッションを開始し、Aurora の決定を引用付きで探すこと。 + +`doctor codex` はインストールと接続だけを確認します。Source の取得だけでは Memory や Topic Memory は作成されず、バックグラウンド処理には設定したスケジュールとモデルの実行が必要です。 +Basic memory では Agent に決定を明示的に保存させ、新しいセッションで検索してください。ただし、これは自動抽出の検証ではありません。 + +### 3. Python で最初に試す + +チュートリアルはリポジトリの checkout 内で実行し、依存関係は `uv` の dependency group から取得します。`powercontext` パッケージには含まれません。リポジトリのルートで実行してください: + +```bash +uv sync --locked --group notebooks +uv run --locked --group notebooks jupyter lab --notebook-dir=examples/jupyter +``` + +まず [01 · Memory across sessions](examples/jupyter/01_memory_across_sessions.ipynb) を実行し、その後 [22 本の Jupyter チュートリアル(中国語)](examples/jupyter/README.md)で、Memory、コンテキストの準備、Handoff、Experience、Skill、実際の Agent を動かしながら学べます。 +最初の 7 本はモデルや API キーなしで実行できます。 + +### よくある問題 + +- `doctor codex` は Codex のインストールと接続を確認します。自動記憶を検証するには、実際の入力が Source になり、Topic が生成され、関連する入力で主題が変化し、同じ Scope を使う新しいセッションで想起できることを確認してください。 +- Python 依存関係のダウンロードが遅い、または失敗する場合は、[uv](https://docs.astral.sh/uv/configuration/indexes/) にパッケージインデックス(ミラー)を設定してから再試行してください。 +- 自動 Memory と Topic Memory を試すには **Full memory** を選択し、Generation と Embedding の API 接続を設定してください。Agent のサブスクリプションとは別の認証情報が必要です。**Basic memory** は追加のモデル API なしで明示的な保存・検索を利用できます。 +- seekdb のインストールが必要な場合、ウィザードが一度確認し、依存関係をバックグラウンドでインストールします。 +- オプションの想起十分性ゲートは、Scope ごとの 1 日あたりの検索量と予算超過を記録し、後からポリシー評価に使えます。記録範囲と失敗時の挙動は[設定リファレンス](docs/en/docs/operate/configuration.md)を参照してください。 +- Server が別のマシンにある場合は HTTPS を使用するか、[リモート接続ガイド](docs/en/docs/operate/connect-remote-server.md)に従ってください。セットアップはフラグや環境変数からリモート HTTP URL を認識し、明示的な同意を求めます。自動化されたセットアップでは `--allow-insecure-http` を使います。 + ## Agent と接続する Codex は `official`、他のメンテナンス対象ホストと Python Agent フレームワークは `community`、Bub は評価専用の `evaluation` です。これらは PowerContext 連携のメンテナンス主体と用途を示すタグです。どのホストが資格を満たしているか、対応機能と利用可能なバージョンは[機能一覧](https://powercontext.oceanbase.io/en/docs/integrations/capabilities/)に記載されています。