# Repository Briefing: oceanbase/powercontext
> Source: https://repoforai.com/repo/oceanbase/powercontext (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/oceanbase/powercontext
- **Official Docs / Website**: https://powercontext.oceanbase.io
- **Category**: Agents & Frameworks (智能体与框架)
- **Primary Language**: Python
- **License**: Apache-2.0
- **Engineering Health**: A+ (97/100 · Maintenance 35/35 · Adoption 22/25 · Releases 20/20 · License 20/20)
- **Latest Release**: powercontext-v1.6.1 (2026-12-01) — https://github.com/oceanbase/powercontext/releases
- **Review Snapshot**: 2026-12-02
- **Deployment / Stack Signals**: Docker, Self-Hosted, MCP, CLI, API
- **Momentum**: 2,017 ★ total (+17 24h / +124 7d) · 691 forks
- **Topics**: `agent`, `agent-context`, `agent-memory`, `ai-memory`, `claude-code`, `claude-code-memory`, `codex`, `codex-memory`, `context`, `context-engine`, `dsh-plugin`, `handoff`
- **When to Use**: Best for: Coding-agent teams and application builders that need agents to resume prior work, share evidence-backed memory within a Scope, and review generated guidance before reuse. Skip if: You only need document retrieval or local notes, or your deployment requires fully local inference and you cannot provide local generation and embedding endpoints.

## Overview
```text
### Architecture & Core Mechanics
PowerContext separates evidence ingestion, background processing, and recall. The Python Server stores conversations, documents, and work records as Sources within a Scope. Background jobs turn evidence into Artifacts such as memories, Topic Memory, profiles, experiences, and skills. Recall returns relevant artifacts for a subsequent turn, while provenance links let operators inspect the evidence and revision behind a memory. Source and Artifact plugins extend what the service can ingest and produce.

Agents can connect through hooks, HTTP, MCP, or Python interfaces. Applications can also embed Core. Gateway is a separate integration path: it sits in the model request path to inject context and working guidance and capture conversations. The repository separates the Python package in src/ from gateway/, integrations/, and plugins/. The operational distinction matters: using the Server for explicit save and recall does not require routing the agent's model traffic through Gateway.

### Key Capabilities & Differentiators
PowerContext combines shared memory and session handoff with searchable, revisioned knowledge bases for existing documents. Each Scope can version and restore its own prompts for extraction, reconciliation, profile generation, and Topic Memory. The Server retains control of schemas, permissions, evidence boundaries, and sensitive-data safeguards. Dream proposes revisions for approval rather than applying them automatically; generated experiences and skills must be reviewed before recall.

The 24-task Gateway benchmark enabled code retrieval, working guidance, and project memory together. Including memory generation, it used 32.57% fewer tokens and had 15.42% lower estimated model cost, with both groups solving 16 tasks. In a separate configuration, main-model calls fell from 708 to 539 (23.87%); the results should not be combined. Codex is the officially maintained integration. Other agent and framework integrations are community-maintained and vary in capability; Bub is for evaluation only.

### Trade-offs & Limitations
Compared with a vector store and a custom RAG pipeline, PowerContext provides evidence lineage, revision history, approval workflows, and cross-session handoffs out of the box. Those features are valuable when agents need to inherit prior work, but add Scope administration and background processing to what might otherwise be a simple document lookup. Per-Scope prompt rules can be managed through the API, but the Dashboard has no editor; with access control enabled, changes require Scope admin rights.

Gateway can reuse a conversation prefix cache for extraction on a supported Codex subscription, but it also puts another service in the model request path. Subscription-backed background generation still needs a separate embedding model, requires inference protection to stay off, and does not support Topic Memory or Dream. Apache-2.0 permits commercial self-hosting subject to its terms. For sensitive workloads, evaluate the data path separately: operating the Server yourself does not make external model calls local.

### Hardware & Deployment Guide
The pinned v1.6.1 CLI and Server quick start uses Python 3.11+, Git, and uv on macOS or Linux; Windows support is experimental. SQLite is a reasonable pilot store. Generate and validate the .env, install the service, and check it with powercontext ready and powercontext capabilities. Linux background service installation needs an available systemd --user manager. Keep the generated .env and .env.next-steps.md out of Git, then bind the agent and Dashboard to the same Server and actual scope_id returned during Scope creation.

Start with Basic memory to test explicit save and recall without a separate Server model API. Full memory needs Generation and Embedding credentials for automatic extraction. With external inference, size the host for concurrent requests, background processing, and evidence storage rather than assuming a GPU requirement. v1.6.0 introduced revisioned knowledge bases and stable Gateway; v1.6.1 improved Atomic Memory one_pass processing, Gateway conversation handling, installation reliability, and processing visibility.
```

## Key Capabilities
```text
- Provenance: memory links back to source evidence and its exact revision, with precise locations where available.
- Access boundaries: Scopes partition data and access; changing working directories does not create isolation.
- Review controls: generated experiences and skills require review before recall; Dream proposals require approval before taking effect.
- Integration paths: HTTP, MCP, Python, and agent hooks connect to the Server; Gateway injects context and captures conversations in the model request path.
- Processing tiers: Basic memory supports explicit save and recall; Full memory adds automatic extraction with Generation and Embedding credentials.
- Measured workload: the 24-task Gateway benchmark used 32.57% fewer tokens including memory generation, with both groups solving 16 tasks.
```

## Quick Start / Clone
```bash
uv tool install --force "powercontext[cli,server]==1.6.1"
mkdir -p powercontext-config && cd powercontext-config
powercontext config init --language en --output .env
powercontext config validate --env-file .env
powercontext service install --env-file .env
powercontext service status
```
