Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ powercontext setup pi --source oceanbase/powercontext --ref master
powercontext setup workbuddy --source oceanbase/powercontext --ref master

# Or install several hosts in one pass.
powercontext setup select --host codex --host claude-code --host opencode
powercontext setup select --host codex --host claude-code --host opencode \
--source oceanbase/powercontext --ref master
```

The first command installs the CLI and local Server from the latest `master` revision in an isolated environment.
Expand All @@ -60,7 +61,8 @@ In another terminal, verify the service and plugin:

```bash
powercontext doctor
powercontext doctor codex # or: claude-code / dsh / hermes / openclaw / opencode / pi / workbuddy
powercontext doctor integrations
powercontext doctor codex # Replace codex with the host you installed.
```

By default, the Server listens on `127.0.0.1:8000`, exposes Streamable HTTP MCP at `/mcp`, and persists data in a
Expand Down
6 changes: 4 additions & 2 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ powercontext setup pi --source oceanbase/powercontext --ref master
powercontext setup workbuddy --source oceanbase/powercontext --ref master

# 或者一次性安装多个 Host。
powercontext setup select --host codex --host claude-code --host opencode
powercontext setup select --host codex --host claude-code --host opencode \
--source oceanbase/powercontext --ref master
```

第一条命令会在隔离环境中从最新 `master` revision 安装 CLI 和本地 Server;每条 setup 命令都会从同一个
Expand All @@ -57,7 +58,8 @@ powercontext server run

```bash
powercontext doctor
powercontext doctor codex # 或: claude-code / dsh / hermes / openclaw / opencode / pi / workbuddy
powercontext doctor integrations
powercontext doctor codex # 请把 codex 换成已安装的宿主。
```

默认情况下,Server 监听 `127.0.0.1:8000`,在 `/mcp` 提供 Streamable HTTP MCP,并将数据持久化到本地
Expand Down
6 changes: 4 additions & 2 deletions README_JP.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ powercontext setup pi --source oceanbase/powercontext --ref master
powercontext setup workbuddy --source oceanbase/powercontext --ref master

# 複数の Host を一度にインストールすることもできます。
powercontext setup select --host codex --host claude-code --host opencode
powercontext setup select --host codex --host claude-code --host opencode \
--source oceanbase/powercontext --ref master
```

最初のコマンドは、隔離された環境に最新の `master` revision から CLI とローカル Server をインストールします。
Expand All @@ -60,7 +61,8 @@ powercontext server run

```bash
powercontext doctor
powercontext doctor codex # または: claude-code / dsh / hermes / openclaw / opencode / pi / workbuddy
powercontext doctor integrations
powercontext doctor codex # codex をインストールした Host 名に置き換えてください。
```

デフォルトでは、Server は `127.0.0.1:8000` で待ち受け、`/mcp` で Streamable HTTP MCP を公開し、
Expand Down
10 changes: 7 additions & 3 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,16 @@ Run the Server with persistent SQLite and scheduler data:
```bash
docker run --rm \
--name powercontext-server \
--publish 8000:8000 \
--publish 127.0.0.1:8000:8000 \
--volume powercontext-data:/data \
powercontext-server:local
```

The image listens on `0.0.0.0:8000`, stores its default data under `/data`, and exposes a Docker health check backed
The image listens on `0.0.0.0:8000` inside the container. Keep the host-side publish address on loopback unless bearer
authentication and a TLS-terminating network boundary are configured. See
[`Deploy the Server`](../docs/en/docs/how-to/deploy-server.md) for the remote-access setup.

The image stores its default data under `/data` and exposes a Docker health check backed
by `GET /health/ready`. Runtime or database failures return `not_ready` with HTTP 503. A configured inference failure
returns `degraded` with HTTP 200, so database-backed operations remain in traffic while the response exposes the
affected capability. Provider checks make one minimal real request at startup. `ready` and `misconfigured` results
Expand All @@ -42,6 +46,6 @@ TLS-terminating proxy and enable bearer authentication with
opt-in is no longer required.

The `Build Docker image` GitHub workflow builds downloadable Linux amd64 and arm64 image archives for pull requests,
changes merged to `main`, and manual runs. Publishing a GitHub Release pushes a multi-platform image to Docker Hub.
changes merged to `master`, and manual runs. Publishing a GitHub Release pushes a multi-platform image to Docker Hub.
Repository configuration must provide `DOCKER_USERNAME` and `DOCKER_PASSWORD` secrets plus a `DOCKER_PUSH_BASE`
variable such as `oceanbase`; Release tags must use `vX.Y.Z` or `X.Y.Z` semantic versioning.
102 changes: 102 additions & 0 deletions docs/en/docs/how-to/configure-hermes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
---
title: Configure Hermes
description: Install the Hermes MemoryProvider and slash-command companion, then connect them to PowerContext Server.
---

# Configure Hermes

The integration contains a standard Hermes `MemoryProvider` and a standalone slash-command plugin. Hermes remains
responsible for the conversation and memory lifecycle; the provider sends recall, capture, and explicit operations to
a separately running PowerContext Server. The companion registers `/pc` and `/powercontext` before the provider is
activated. Backend failures do not interrupt the Hermes conversation.

## Prerequisites

- Hermes Agent 0.20.4 or newer, available on `PATH`;
- PowerContext CLI and Server installed from `master`;
- a running PowerContext Server.

```bash
uv tool install --force "powercontext[cli,server] @ git+https://github.com/oceanbase/powercontext.git@master"
powercontext server run
```

## Install both plugins

In another terminal, install or refresh both plugins from the matching revision:

```bash
powercontext setup hermes --source oceanbase/powercontext --ref master
powercontext doctor hermes
```

The setup command copies the provider to `$HERMES_HOME/plugins/powercontext`, installs
`$HERMES_HOME/plugins/powercontext-command`, and enables the companion without granting built-in tool override
permissions. It does not start the Server or select the provider in Hermes.

Run the Hermes memory setup wizard and select `PowerContext`:

```bash
hermes memory setup
```

On Hermes 0.20.4, use the generic command above. `hermes memory setup powercontext` selects the provider but does not
open its configuration wizard. Restart Hermes after setup.

## Verify recall and writes

```bash
hermes powercontext status
hermes powercontext remember preference "The user prefers uv"
hermes powercontext search "Python package manager"
```

Inside an interactive Hermes session, `/pc status` should reach the same active provider. Use `/pc ` followed by
Tab/Down to inspect the available Memory, Handoff, Experience, Skill, review, statistics, trace, and Workstream
commands. Hermes 0.20.4 does not provide enough invocation context to route gateway slash commands safely, so the
companion rejects gateway invocations; use the provider's Hermes tools in gateway sessions.

The provider uses `http://127.0.0.1:8000` by default. In a Git workspace, Workstream persistence first reads the
shared `.git/powercontext/codex-workspace.json` scope binding. An explicit scope configuration takes precedence.
Without either value, the provider derives a scope from the active Hermes profile and gateway user identifier; for a
local CLI session without a user identifier, it derives a stable value from `HERMES_HOME`.

## Configure the connection

The wizard writes non-sensitive settings to `$HERMES_HOME/powercontext/config.json`. Environment variables override
the file:

| Variable | Purpose |
| --- | --- |
| `POWERCONTEXT_HERMES_CONFIG` | Config file path; defaults to `$HERMES_HOME/powercontext/config.json` |
| `POWERCONTEXT_HERMES_BASE_URL` | PowerContext Server URL |
| `POWERCONTEXT_HERMES_AUTHORIZATION` | Complete authorization header, such as `Bearer <token>` |
| `POWERCONTEXT_HERMES_TOKEN` | Bare-token shorthand used when `AUTHORIZATION` is absent |
| `POWERCONTEXT_HERMES_SCOPE_ID` | Explicit scope or scope template |
| `POWERCONTEXT_HERMES_MAX_BYTES` | Maximum prepared-context size, from 512 to 32768 bytes |
| `POWERCONTEXT_HERMES_TIMEOUT` | HTTP request timeout in seconds |
| `POWERCONTEXT_HERMES_CAPTURE_TURNS` | Capture completed turns as Sources |
| `POWERCONTEXT_HERMES_FLUSH_ON_SESSION_END` | Run Memory extraction at session end |
| `POWERCONTEXT_HERMES_CAPTURE_PRE_COMPRESS` | Capture filtered new turns before compression; disabled by default |
| `POWERCONTEXT_HERMES_EVALUATION_TRACE` | Record recalled context in sensitive local JSONL traces; disabled by default |
| `POWERCONTEXT_HERMES_EVALUATION_TRACE_PATH` | Override the evaluation trace directory |
| `POWERCONTEXT_HERMES_WORKSTREAM` | Read the shared Git-private Workstream binding; enabled by default |

Let the Hermes wizard store authorization in its protected `.env` secret store; do not put the token in
`config.json`. Use plain HTTP only for a loopback Server. See [Deploy the Server](deploy-server.md) before connecting
to a remote deployment. Evaluation traces contain prompts and recalled context; keep them local and protect them as
sensitive data.

## Enable automatic extraction only when needed

Completed-turn capture creates Source evidence. It does not create Memory by itself. Automatic Source-to-Memory
extraction requires a generation model on the Server:

```bash
export POWERCONTEXT_SERVER_INFERENCE_GENERATION_MODEL=provider:model-name
powercontext server run
powercontext capabilities
```

The capability output must report Memory extraction as enabled. Explicit `hermes powercontext remember` writes do not
require a model.
7 changes: 4 additions & 3 deletions docs/en/docs/how-to/configure-langchain.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,18 @@ The middleware uses LangChain's public `AgentMiddleware` API. Recalled content m

## Install

The middleware ships in the standalone `powercontext-langchain` distribution and requires LangChain 1.3 or later:
The middleware source is packaged separately as `powercontext-langchain` and requires LangChain 1.3 or later. It is
not currently published on PyPI:

```bash
uv tool install "powercontext[cli,server]==0.0.2"
uv tool install --force "powercontext[cli,server] @ git+https://github.com/oceanbase/powercontext.git@master"
powercontext server run
```

Keep the Server running, then install the middleware in the LangChain application's environment:

```bash
uv pip install "powercontext-langchain @ git+https://github.com/oceanbase/powercontext.git#subdirectory=integrations/langchain"
uv pip install "powercontext-langchain @ git+https://github.com/oceanbase/powercontext.git@master#subdirectory=integrations/langchain"
```

Skip the Server installation when the application already connects to a separately managed Server. From a repository
Expand Down
17 changes: 8 additions & 9 deletions docs/en/docs/how-to/configure-langgraph.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@ primitives that are stable public API. It never starts or embeds the Server.
The package is not yet published to PyPI, so install it from source alongside a running Server:

```bash
uv pip install "powercontext-langgraph @ git+https://github.com/oceanbase/powercontext.git#subdirectory=integrations/langgraph"
uv pip install "powercontext-langgraph @ git+https://github.com/oceanbase/powercontext.git@master#subdirectory=integrations/langgraph"
powercontext server run
```

From a checkout you can install the local path instead: `uv pip install ./integrations/langgraph`. Publishing to
PyPI is pending a standalone build and release step that advances the package version independently of the root
`powercontext` distribution; until that lands, use the source install above.
From a checkout you can install the local path instead: `uv pip install ./integrations/langgraph`. The adapter is not
currently published on PyPI, so use one of these source installations.

The package depends on `powercontext[client]`, `langgraph`, `langchain-core`, and `pydantic-settings`. It does not
pull in the Server; point it at a Server you run separately.
Expand Down Expand Up @@ -148,10 +147,10 @@ Server. Implementing only search and raising for the rest produces an object tha
fails at runtime inside unrelated nodes or tools, which is worse than providing no store. The adapter therefore
integrates at the node and tool level and does not occupy the `store` parameter of `compile()`.

## Scope of this release
## Current scope

In scope: Memory read and write, and bounded context preparation.
Included: Memory read and write, and bounded context preparation.

Out of scope for this release: automatic trajectory capture, checkpointing, Handoff, Artifact Candidate review, and
Experience or Skill generation. Use `powercontext_remember` for explicit writes; automatic capture of a run as Source
evidence is not part of this adapter.
Not included: automatic trajectory capture, checkpointing, Handoff, Artifact Candidate review, and Experience or
Skill generation. Use `powercontext_remember` for explicit writes; automatic capture of a run as Source evidence is
not part of this adapter.
2 changes: 1 addition & 1 deletion docs/en/docs/how-to/configure-openclaw.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: Install the PowerContext memory plugin for OpenClaw and control rec

## Install or refresh the plugin

Until a PowerContext release includes OpenClaw, install the CLI and plugin from the same `master` revision:
Install the CLI and plugin from the same `master` revision:

```bash
uv tool install --force "powercontext[cli,server] @ git+https://github.com/oceanbase/powercontext.git@master"
Expand Down
28 changes: 16 additions & 12 deletions docs/en/docs/how-to/configure-pydantic-ai.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
---
title: Configure Pydantic AI
description: Add durable Memory tools, automatic context preparation, and optional trajectory capture to Pydantic AI.
title: Pydantic AI adapter preview
description: Review the current Pydantic AI adapter API and its installation status.
---

# Configure Pydantic AI
# Pydantic AI adapter preview

Use the independently released `powercontext-pydantic-ai` package when a Pydantic AI agent should share durable
Memory through a running PowerContext Server.
The repository contains a preview adapter that lets a Pydantic AI agent share durable Memory through a running
PowerContext Server. It is not yet available as a supported standalone installation.

## Install the adapter
## Check availability before using it

Start the Server, then install the adapter in the agent application:
`powercontext-pydantic-ai` is not currently published on PyPI. Its source package also requires a final
`powercontext[client]>=0.0.3`, which the current public package and the development version from `master` do not
satisfy. Therefore, both the old PyPI command and a direct Git subdirectory install fail dependency resolution.

```bash
uv add powercontext-pydantic-ai "pydantic-ai-slim[openai]"
```
Do not add this adapter to an application until compatible root and adapter packages have been released. Repository
contributors can run its tests through the root development environment; the remaining sections document the preview
API for development and review, not a supported installation path.

## Attach the preview capability

The example below uses OpenAI. For another provider, install the matching `pydantic-ai-slim` provider extra and
change the model string.
Expand Down Expand Up @@ -108,5 +112,5 @@ Connecting PowerContext MCP requires no adapter package, but it is a lower-capab
provides explicit tools; it does not automatically call `prepare_context`, capture trajectory events, or Flush at
checkpoints and run completion.

This first adapter release supports ordinary Pydantic AI runs. Durable execution through Temporal, DBOS, Prefect, or
similar systems is not yet validated. Handoff, Candidate Review, Experience, and Skill operations are not included.
The preview supports ordinary Pydantic AI runs. Durable execution through Temporal, DBOS, Prefect, or similar systems
is not yet validated. Handoff, Candidate Review, Experience, and Skill operations are not included.
7 changes: 2 additions & 5 deletions docs/en/docs/how-to/configure-workbuddy.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,12 @@ description: Install the PowerContext WorkBuddy hooks and control its local beha

## Prerequisites

- A running PowerContext installation. Until WorkBuddy support is included in a
tagged release, install the CLI and local Server from the same `master`
revision used below:
- A running PowerContext installation. Install the CLI and local Server from the same `master` revision used below:
`uv tool install "powercontext[cli,server] @ git+https://github.com/oceanbase/powercontext.git@master"`.
Start the Server with `powercontext server run`.
- WorkBuddy with user-level hooks, MCP, and Skills support (the desktop app).
- Python 3.11 or newer on `PATH` for the hook process.
- The plugin directory from this repository:
`integrations/workbuddy/plugins/powercontext`.
- The plugin directory from this repository: `integrations/workbuddy/plugins/powercontext`.

The integration does not start or embed the Server; it only talks to a running
PowerContext Server over HTTP.
Expand Down
Loading
Loading