Skip to main content

jep-langgraph-adapter

JEP runtime adapter for LangGraph: replayable delegation and verifiable AI accountability semantics.

This package instruments LangGraph-style node callables without modifying LangGraph core. Wrapped node execution naturally emits a deterministic, hash-linked JEP accountability chain containing:

  • Judgment Event
  • Delegation Event
  • Termination Event
  • Verification Event

Each event records node_name, agent_id, tool_name, state_transition, authority_scope, and previous_event_hash.

Install

pip install -e .

LangGraph is optional for tests and examples because the adapter works at the callable-node boundary:

pip install -e '.[langgraph]'

Usage

from jep_langgraph_adapter import LangGraphEventAdapter

adapter = LangGraphEventAdapter(
    session_id="demo-session",
    agent_id="planner-agent",
    authority_scope={"tools": ["search"], "max_steps": 3},
)

def plan(state):
    return {**state, "plan": "call search"}

wrapped_plan = adapter.wrap_node(plan, node_name="plan")
next_state = wrapped_plan({"question": "What changed?"})
adapter.exporter().export_jsonl("session.jsonl")

For a StateGraph, add wrapped nodes through instrument_state_graph:

adapter.instrument_state_graph(graph, {"plan": plan, "answer": answer})

Replay CLI

jep-langgraph replay session.jsonl

The replay command validates deterministic event hashes, sequence numbers, and previous_event_hash links.

Components

  • JEPNodeMiddleware: wraps sync or async LangGraph node callables.
  • JEPExecutionTracer: records judgment, delegation, termination, and verification events.
  • JEPReplayExporter: exports JSON/JSONL and validates replay chains.
  • LangGraphEventAdapter: high-level facade for node and graph instrumentation.

Examples

  • examples/multi_step_graph.py: multi-step graph execution.
  • examples/sub_agent_delegation.py: sub-agent delegation chain.
  • examples/tool_invocation_replay.py: tool invocation verification and replay.

Runtime and verification notes

See HARDENING.md for supported behavior, regression checks, and compatibility boundaries.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jep_langgraph_adapter-0.1.1.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jep_langgraph_adapter-0.1.1-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file jep_langgraph_adapter-0.1.1.tar.gz.

File metadata

  • Download URL: jep_langgraph_adapter-0.1.1.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for jep_langgraph_adapter-0.1.1.tar.gz
Algorithm Hash digest
SHA256 7db382bebba2095882348cf65aca958f6894a32b058f79c0291b8789fe444e1b
MD5 e5cefb903ac673b21fa8ee1641282458
BLAKE2b-256 6ba14885d5d5c5f88606818f19dfb348e40e2466811816a42e3d12a6a771523a

See more details on using hashes here.

Provenance

The following attestation bundles were made for jep_langgraph_adapter-0.1.1.tar.gz:

Publisher: release.yml on hjs-spec/jep-langgraph-adapter

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file jep_langgraph_adapter-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for jep_langgraph_adapter-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ec1a25e4ffec57b5b4f8d0d01e7ce27a672bb5e8b609d76e3fc311316b4b4d2d
MD5 af316d7039ba8c5f98caed35deccf642
BLAKE2b-256 5b90030084c3a31f9990fa35df02e03bc83d474aece17a0fba4793cf4406f6d5

See more details on using hashes here.

Provenance

The following attestation bundles were made for jep_langgraph_adapter-0.1.1-py3-none-any.whl:

Publisher: release.yml on hjs-spec/jep-langgraph-adapter

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page