Skip to main content

Historical repository.

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

Current versions:

JEP-Agent SDK 1.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 import trace
from jep.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.adapters.langchain.auto Experimental patch
OpenAI Chat Completions (legacy) import jep.adapters.openai_agents.auto Experimental patch
MCP from jep.adapters.mcp import JEPMCPServer One line

Causal Web Viewer

jep 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.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 verify events.jsonl --public-key key.pem

# Export a full compliance report (HTML with embedded causal graph)
jep 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/
├── 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 web | jep verify | jep 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-1.0.1.tar.gz (29.8 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-1.0.1-py3-none-any.whl (26.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jep_agent_sdk-1.0.1.tar.gz
  • Upload date:
  • Size: 29.8 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-1.0.1.tar.gz
Algorithm Hash digest
SHA256 33332417d4dd2ee5c764c0396625f619072b0363e93e4bc7ce906f721510d622
MD5 dec25fbf8ea02f6f33aa2dbe3eeaf18e
BLAKE2b-256 03d7ee8e2819cf8e269a085464c136e8d89080ac7b54ed613fa6a3442f084e49

See more details on using hashes here.

Provenance

The following attestation bundles were made for jep_agent_sdk-1.0.1.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-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: jep_agent_sdk-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 26.2 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-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e07c01e3f6b61b2714908dea01e297aa5c12fb22755cc102f42e9ce40567fed0
MD5 6f222b8362422a6849b68b749791f1a2
BLAKE2b-256 96e08f3fc09e5fcf7471d80fd8366defe287325114fe72e8c3a2199aeadc610d

See more details on using hashes here.

Provenance

The following attestation bundles were made for jep_agent_sdk-1.0.1-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

2.0.0

2 files

This release

1.0.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