JEP-Agent SDK 2.1 — JEP Core 0.7
Record signed Core 0.7 events about agent calls, export them, and verify their integrity.
Install
pip install jep-agent-sdk
The Python import is jep_agent; the command is jep-agent.
Local create → export → independent verification
No API, account or hosted service is required after installing dependencies. The runnable example is maintained in this repository:
git clone --branch v2.1.8 --depth 1 https://github.com/hjs-spec/jep-agent-sdk.git
cd jep-agent-sdk
python -m pip install jep-agent-sdk==2.1.8
python examples/local_roundtrip.py create ./local-evidence
python examples/local_roundtrip.py verify ./local-evidence
The verify command reopens the exported files in a separate process. The directory contains event.json,
public-key.pem and keys.json; the temporary private key is never exported.
Verification reports status: valid, cryptographic: pass and the original
Event Hash. Existing directories are never overwritten.
An independently implemented Core verifier can check the same files:
python -m pip install jep-core-conformance==0.7.7
jep-validate validate ./local-evidence/event.json --keys ./local-evidence/keys.json
The demonstration uses a temporary key. A public key shipped with a record proves signature consistency; identifying a real actor requires an independently trusted key/profile. Changing the signed claim causes verification to fail.
Signed trace
from pathlib import Path
from cryptography.hazmat.primitives import serialization
from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PrivateKey
from jep_agent import AuditChain, record
key = Ed25519PrivateKey.generate()
chain = AuditChain("agent:example", private_key=key)
@record(issuer=chain.issuer, chain=chain)
def task(value):
return value * 2
assert task(21) == 42
assert chain.verify_chain(key.public_key())
chain.save("events.jsonl")
Path("public-key.pem").write_bytes(key.public_key().public_bytes(
serialization.Encoding.PEM, serialization.PublicFormat.SubjectPublicKeyInfo
))
Recording without a key is allowed for local traces, but produces unsigned, unverified records. Use a securely persisted key in a real deployment; this example generates a temporary key.
@recordretains function names and lifecycle status by default. Enablecapture_values=Trueonly for arguments and results that are safe to retain.RecordingError.call_executed=Truemeans the business call already ran; do not automatically retry it.- Load an existing archive before appending. Replacing it requires
save(..., overwrite=True).
See the integration guide for asynchronous calls, unsupported generators and failure handling.
Inspect and verify
jep-agent verify events.jsonl --public-key public-key.pem
jep-agent export events.jsonl --output report.html
jep-agent web --port 8080
The CLI checks Core signatures and any local audit-chain links. It does not resolve arbitrary external references. The viewer and HTML export show recorded relationships and Signed (unverified) status; visual links do not establish causality or legal responsibility.
Acceptance and local extensions
JEPVerifier acceptance state is process-local and is lost on restart. Repeated
delivery of the same identity and unsigned content returns already_accepted;
different content under the same identity is rejected. For shared durable state,
use the reference API.
The SDK stores audit links in ext['jep-agent.chain'] and local task links in
ext['jep-agent.jac']. See the API reference for supported checks
and Core contract for event semantics.
Optional framework adapters
The experimental OpenAI adapter targets synchronous Chat Completions; the LangChain auto patch targets historical AgentExecutor APIs. Install their extra dependencies only when using those adapters:
pip install 'jep-agent-sdk[langchain,openai]'
Development
From a source checkout:
pip install '.[dev,langchain,openai]' build
make lint
python -m pytest -q
python validate.py
python -m build --wheel
python scripts/check_coexistence.py dist/*.whl
CI uses fixed Core 0.7 J/D/T/V vectors and a commit-pinned independent Core validator. It also installs the built wheel beside the Python SDK and CLI in both orders and checks independent uninstalls.
- Architecture and research-helper boundaries
- API
- Migration and historical compatibility
- Implementation limits
- Canonical JEP Core repository
BSD-3-Clause. Author: Yuqiang Wang, HJS Foundation, signal@humanjudgment.org.
Metadata
Release files for jep-agent-sdk 2.1.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jep_agent_sdk-2.1.8.tar.gz | 59.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jep_agent_sdk-2.1.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 93.3 kB
Release files / jep_agent_sdk-2.1.8.tar.gz
| Download URL | jep_agent_sdk-2.1.8.tar.gz |
|---|---|
| Size | 59.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6520abff519b3c0f5754f3195b245a489abf76232ed76b1f6786fd91c3ed5470
|
|
BLAKE2b-256 checksum How to use checksums |
fbebca931449a623192cb1ee1e02a4d4fc5a9abc363dfb118cc14ecab4b0cf74
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.
Transparency logRelease files / jep_agent_sdk-2.1.8-py3-none-any.whl
| Download URL | jep_agent_sdk-2.1.8-py3-none-any.whl |
|---|---|
| Size | 34.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
57d7261e1b550091f39399b4baa4f4e7cc8924220794c9a91f62863aebfdc6c4
|
|
BLAKE2b-256 checksum How to use checksums |
e2ac5a0e97248ce8e867a4e4f68ff0102f803548acddf90aacb295d8196afcff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.
Transparency log