Skip to main content
Packaging is not uniform. The Pydantic AI Agent adapter is Preview and currently has no working standalone install. LangGraph and LangChain are source-install only and are not published to PyPI.
PowerContext has four Python framework paths. They share a Server contract, but not an abstraction. For a first agent integration, choose LangGraph or LangChain; both can be installed from source. Pydantic AI inference inside the Server only configures generation, embedding, and reranking. It is not an agent adapter. Read the Preview adapter for Pydantic AI agents only when you need it. Do not use it as the first page.

Four boundaries, not one

The three external agent integrations call a separately running PowerContext Server through the public Python Client. They do not start another Server in the agent process. Server-side Pydantic AI inference sits inside Server composition. It supplies generation, embedding, and optional reranking. It does not add tools, recall hooks, or middleware to an agent.

Maturity and install status

Not validated and Unsupported are different. Not validated means the path may work but lacks the stated evidence. Unsupported means the integration does not provide that operation.

Minimum usage: choose the boundary

Capability matrix

Choose by lifecycle first, then use the matrix to confirm that the selected adapter has the exact behavior you need. Capture means “send a Source.” A Source becomes Memory only after Server extraction and a commit; extraction may also produce no-op. The matrix does not collapse those stages.

Execution flow

Server-side Pydantic AI inference

The Server receives a domain operation, calls its configured generation, embedding, or reranking boundary when that capability is needed, validates the result, and only then continues the domain workflow. Provider output is not direct authority to write or approve an Artifact.

Pydantic AI Capability and Toolset

PowerContext resolves Scope once for a run, prepares context once, labels the recalled block as untrusted evidence, and exposes three explicit Memory tools. Capture is optional. When enabled, successful events become Sources and the Capability attempts checkpoint and final flushes. PowerContextToolset stops at the three tools. It has no automatic prepare, capture, or flush lifecycle.

LangGraph

PowerContextRecall prepares once for the latest human turn and reuses that result during the ReAct tool loop. It writes complete model input to llm_input_messages, not persisted messages. powercontext_tools() supplies the three Memory tools, and PowerContextScope carries per-invocation Scope and connection overrides.

LangChain

PowerContextMiddleware prepares before every model request and overrides only that request’s system_message. It does not mutate agent state. Optional auto_capture=True stores the latest user message and final non-empty assistant result as one completed-turn Source after a successful run. It neither adds Memory tools nor flushes that Source.

Scope, token, and transport rules

These settings form one security boundary. Resolve Scope from authenticated application state, keep tokens out of model-visible data, and require HTTPS away from loopback. Pydantic AI hashes an explicit Scope that exceeds the public bound into a bounded identifier. LangGraph and LangChain also bound accepted explicit values, but neither has a local fallback. In a multi-tenant service, derive Scope from an authenticated tenant/project mapping and pass it per run. All three adapters take a bare token:
Do not prepend Bearer or paste a complete Authorization header. PowerContextClient adds Authorization: Bearer .... The Pydantic AI adapter validates this convention strictly; the LangGraph and LangChain adapters document it but do not strictly validate token syntax at the adapter boundary. Non-loopback HTTP must use HTTPS unless the caller supplies a transport and explicitly marks its security as trusted. A token does not make plaintext transport safe.

Failure, privacy, and trust boundary

Client-side automatic recall and adapter-owned capture or flush are auxiliary paths. Their Server-call failures fail open so an outage does not replace the model result or stop the host task. Configuration and Scope callbacks can fail before this boundary and must be validated separately. Explicit failures stay visible:
  • Pydantic AI tools raise ModelRetry;
  • LangGraph tools return a short model-visible error string;
  • LangChain has no adapter-provided PowerContext tools.
A 401 or 403 is not “empty Memory.” Diagnostics must remain bounded and exclude tokens, Scope content, queries, and response bodies. Recalled content may contain old user or model text. Treat it as untrusted evidence, keep it ephemeral, and never persist the recalled block into framework state or conversation history. Current system and user instructions still win, and recalled text grants no tool permission. Capture needs a separate privacy decision. Pydantic AI excludes thinking parts and redacts known credential shapes, but that is not complete DLP. LangChain does not promise complete secret redaction. LangGraph does not capture.

Currently unsupported or not validated

Completion checklist

  • The selected path matches the boundary you need: Server inference, Pydantic adapter, graph, or middleware.
  • Packaging status is acceptable, and source installs are pinned when reproducibility matters.
  • Every run receives the intended Scope; cross-tenant isolation has a negative test.
  • Tokens remain bare and outside state/history; remote transport is HTTPS or explicitly trusted.
  • Recalled evidence is ephemeral and untrusted.
  • Automatic fail-open behavior is tested separately from explicit tool failure.
  • Capture, flush, and Memory are verified as separate stages.
  • Unsupported and Not validated claims remain distinct in deployment documentation.
If any checklist item is unknown, stop at the integration’s model-free or Server-only check before adding an external model provider.

LangGraph

Add three Memory tools and per-turn transient recall to an async graph. Install it from source.

LangChain

Add recall on every model request, with optional completed-turn Source capture. Install it from source.
Read Pydantic AI Server inference when you need generation, embedding, or reranking inside the Server. The Pydantic AI Agent adapter is still Preview and currently has no working standalone install, so do not use it as the first page.