PowerContext
PowerContext is PowerMem 2.0, the upgraded version of PowerMem. It gives agents durable, project-scoped context. A later session can recover a decision, outcome, current state, or next step without relying on chat history. PowerContext includes a local Server, SQLite storage, an async Python client, a Core SDK, a CLI, and a Codex plugin.
PowerContext can be installed directly from its Git URL. Users need read access to that URL, but they do not need to clone the repository or run commands from its working tree.
Install for Codex
Prerequisites:
- macOS or Linux;
- uv;
- Codex CLI;
- read access to
oceanbase/powercontext.
Install the tool and configure the Codex plugin:
uv tool install "powercontext[cli,server] @ git+https://github.com/oceanbase/powercontext.git@master"
powercontext setup codex --source oceanbase/powercontext --ref master
You do not need to create or manage a repository checkout. Start the local service in a terminal:
powercontext server run
In another terminal, verify the package and Server dependencies, then the optional Codex integration:
powercontext doctor
powercontext doctor codex
Runtime or database failures make the Server not ready. A configured inference failure is reported as degraded without removing the Server from traffic; the separate Codex command does not affect Server health.
Start a new Codex session after installation. Open /hooks once and approve the PowerContext hook if Codex asks for
trust. The default database is persistent and requires no configuration.
See the Codex quickstart for a first cross-session workflow.
Choose an interface
| Interface | Use it for |
|---|---|
| Codex plugin | Restore relevant project memory and explicitly remember, revise, or retire entries while coding |
| CLI | Install the plugin, run or connect to the Server, inspect content, and diagnose an installation |
| Python client | Call the Server's Source and Memory API from an application |
| Core SDK | Embed PowerContext contracts or supply custom adapters in a Python system |
| HTTP and MCP | Integrate a non-Python process or an agent host with the running Server |
The interface reference explains the ownership boundary between these
surfaces. Installation, configuration, and troubleshooting live under docs/en/docs/.
Python projects
Add only the role the project imports:
uv add "powercontext[client] @ git+https://github.com/oceanbase/powercontext.git@master"
Available extras are builtin, client, server, and cli. The CLI always includes Server-backed content commands;
installing the server role also makes local Server process management available.
Benchmarks
LOCOMO
| Metric | PowerContext | PowerMem | Full-context baseline |
|---|---|---|---|
| Accuracy | 90.78% (1,398/1,540) | 87.79% | 52.9% |
| Search p95 latency | 1.38 s | 1.44 s | 17.12 s |
| Answer tokens / question | ~1.65 k | ~0.9 k | 26 k |
The PowerContext results come from a full 1,540-question run across all 10 LOCOMO conversations.
Development
Repository contributors can install the locked environment and hooks with make install. Use make test,
make check, and make docs-test before opening a pull request. See CONTRIBUTING.md for the full
workflow and docs/en/development/ for implementation guides.
License
PowerContext is licensed under the Apache License 2.0.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file powercontext-0.0.1.tar.gz.
File metadata
- Download URL: powercontext-0.0.1.tar.gz
- Upload date:
- Size: 1.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2faf0d4dd529fba071aacf659669b4655e4f0906c67b2a09bb1e46bcf7d7bc03
|
|
| MD5 |
94121246b6fae23c8a5f716716371227
|
|
| BLAKE2b-256 |
2b560ec8e5073c232178ea6811b5ff1ffffd8372ff9d139d3f3d841f6330203b
|
Provenance
The following attestation bundles were made for powercontext-0.0.1.tar.gz:
Publisher:
release.yml on oceanbase/powercontext
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
powercontext-0.0.1.tar.gz -
Subject digest:
2faf0d4dd529fba071aacf659669b4655e4f0906c67b2a09bb1e46bcf7d7bc03 - Sigstore transparency entry: 2450603884
- Sigstore integration time:
-
Permalink:
oceanbase/powercontext@ce14647fbb1c65dca5d1c290bfb9d6af9ef8053d -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/oceanbase
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ce14647fbb1c65dca5d1c290bfb9d6af9ef8053d -
Trigger Event:
release
-
Statement type:
File details
Details for the file powercontext-0.0.1-py3-none-any.whl.
File metadata
- Download URL: powercontext-0.0.1-py3-none-any.whl
- Upload date:
- Size: 339.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eadd646a90dccb4d5a3b815dadff0c968d7aa6f57b7fc9fa24492ec56a7d2230
|
|
| MD5 |
48829ae2a19d7984a48da73cbe08f28b
|
|
| BLAKE2b-256 |
827d0c73c1385f1a2399d4d2f33180dd0c40da1ff1a699b35dab83bfebfd3f82
|
Provenance
The following attestation bundles were made for powercontext-0.0.1-py3-none-any.whl:
Publisher:
release.yml on oceanbase/powercontext
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
powercontext-0.0.1-py3-none-any.whl -
Subject digest:
eadd646a90dccb4d5a3b815dadff0c968d7aa6f57b7fc9fa24492ec56a7d2230 - Sigstore transparency entry: 2450604003
- Sigstore integration time:
-
Permalink:
oceanbase/powercontext@ce14647fbb1c65dca5d1c290bfb9d6af9ef8053d -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/oceanbase
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ce14647fbb1c65dca5d1c290bfb9d6af9ef8053d -
Trigger Event:
release
-
Statement type: