Skip to main content

Historical repository.

Version 2 uses from jep_agent import ... and the jep-agent command. This removes the package/command collisions with the current jep-sdk-py and jep-cli. The historical JEP-04/JAC-01 event format is retained. See migration.

This repository reflects an earlier design line and is no longer the current implementation track.

Current versions:

JEP-Agent SDK 2.0

IETF Draft IETF Draft PyPI License Python

Historical tracing SDK with explicit instrumentation and local verification.

JEP-Agent SDK is an experimental implementation of the Judgment Event Protocol (JEP-04) and JAC-01. It records instrumented calls using the historical event format. A configured signing key and independently trusted verification key are required for signature assurance.


Install

pip install jep-agent-sdk

With framework adapters:

pip install jep-agent-sdk[langchain,openai]

For current MCP and OpenAI Agents integrations, use jep-mcp-wrapper and jep-openai-agents-middleware. This repository retains legacy adapters.


30-Second Quickstart

from jep_agent import trace
from jep_agent.recorder import record
from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PrivateKey

trace.enable(issuer="did:example:agent-001", private_key=Ed25519PrivateKey.generate())

@record(issuer="did:example:agent-001", chain=trace.chain)
def my_agent(query: str) -> str:
    return f"Result for {query}"

my_agent("hello")
trace.view()   # See the J/D/T/V event chain in your terminal

Legacy framework adapters

Framework Integration Your Code Changes
LangChain import jep_agent.adapters.langchain.auto Experimental patch
OpenAI Chat Completions (legacy) import jep_agent.adapters.openai_agents.auto Experimental patch
MCP from jep_agent.adapters.mcp import JEPMCPServer One line

Causal Web Viewer

jep-agent web --port 8080

Drag-and-drop your events.jsonl. Get an interactive force-directed causal graph. Click any node to inspect the full JEP event. Pan, zoom, export.


Determinability Guard — Stop Agents from Guessing

from jep_agent.determinability import DeterminabilityGuard

guard = DeterminabilityGuard(
    evidence_fn=lambda ctx: len(ctx.get("tools_used", [])),
    target_fn=lambda ctx: ctx.get("outcome"),
    knowledge_base=[{"tools_used": ["search", "calc"], "outcome": 1},
                    {"tools_used": ["search"], "outcome": 0}],
    on_insufficient="raise",
)

@guard.require_determinable
def my_agent(query: str, tools_used: list) -> str:
    ...

What it does: If your agent hasn't gathered enough evidence to make a deterministic decision, the guard blocks execution and tells you exactly what's missing. This is an application-defined gate; it does not guarantee factual accuracy.


CLI Tools

# Verify signatures, chains, and anti-replay
jep-agent verify events.jsonl --public-key key.pem

# Export a full compliance report (HTML with embedded causal graph)
jep-agent export events.jsonl --output report.html

What is JEP?

JEP (Judgment Event Protocol) is a minimal log format proposed in an individual IETF Internet-Draft for AI agent decisions. It defines four immutable verbs:

Verb Meaning RFC 2119
J Judge — Initiate a decision MUST
D Delegate — Transfer authority MUST
T Terminate — Close lifecycle MUST
V Verify — Validate an event MUST

Signing is optional at recording time. Unsigned events are unverified. This historical format uses its own embedded JWS payload and hash links; use jep-v06 for the current detached JWS/JCS conformance baseline.


Project Structure

jep_agent/
├── core/           # JEP-04 protocol engine (event, crypto, verifier, chain)
├── primitives.py   # J/D/T/V convenience wrappers
├── recorder.py     # @record decorator + global trace manager
├── determinability.py  # Causal sufficiency gate (DeterminabilityGuard)
├── extensions/
│   └── jac.py      # JAC-01 cross-agent accountability
├── adapters/
│   ├── langchain.py      # TRUE zero-code auto-patch
│   ├── openai_agents.py  # TRUE zero-code auto-patch
│   └── mcp.py            # MCP server wrapper
├── cli/
│   └── main.py     # jep-agent web | jep-agent verify | jep-agent export
└── web/
    └── static/
        └── index.html   # Drag-and-drop causal topology viewer

Documentation


Contributing

git clone https://github.com/hjs-spec/jep-agent-sdk.git
cd jep-agent-sdk
make install
make test

See CONTRIBUTING.md.


Author

Yuqiang Wang
HJS Foundation Ltd.
Email: signal@humanjudgment.org
GitHub: @hjs-spec


JEP-Agent SDK is released under BSD-3-Clause. The protocol draft is an individual IETF Internet-Draft and does not represent IETF endorsement.

Download files

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

Source Distribution

jep_agent_sdk-2.0.0.tar.gz (31.4 kB view details)

Uploaded Source

Built Distribution

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

jep_agent_sdk-2.0.0-py3-none-any.whl (26.6 kB view details)

Uploaded Python 3

File details

Details for the file jep_agent_sdk-2.0.0.tar.gz.

File metadata

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

File hashes

Hashes for jep_agent_sdk-2.0.0.tar.gz
Algorithm Hash digest
SHA256 81ccb1df8ea330ed1222a0227d23d8b71941f615860f502700eecbbb27001f86
MD5 541181e9d88472cf29504b1566eb0390
BLAKE2b-256 92e48af21812a97c637d80972fa6f271346feff62fea3fed82c3e5a068064dd2

See more details on using hashes here.

Provenance

The following attestation bundles were made for jep_agent_sdk-2.0.0.tar.gz:

Publisher: release.yml on hjs-spec/jep-agent-sdk

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_agent_sdk-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: jep_agent_sdk-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 26.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for jep_agent_sdk-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c3f15ed93fd961408b7d234806088074afaf070952526593b449ad6fbf7bdf34
MD5 03907a0eec07eea6cac6bcd430d581fd
BLAKE2b-256 1dde3725fb8a8c94aae127b1bf123da459dc7064ad386c0ebac0d41b6653fa52

See more details on using hashes here.

Provenance

The following attestation bundles were made for jep_agent_sdk-2.0.0-py3-none-any.whl:

Publisher: release.yml on hjs-spec/jep-agent-sdk

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

2.0.0 This release

2 files

1.0.1

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