occ-openai-agents
OCC cryptographic proof signing for the OpenAI Agents SDK.
Every tool call produces an Ed25519-signed proof entry in proof.jsonl, creating a tamper-evident audit log of agent actions.
Install
pip install occ-openai-agents
Quick Start
Decorator
from agents import Agent, function_tool, Runner
from occ_openai_agents import occ_tool
@occ_tool
@function_tool
def search(query: str) -> str:
"""Search the web."""
return f"Results for: {query}"
agent = Agent(name="my-agent", tools=[search])
result = Runner.run_sync(agent, "Search for OCC proofs")
Wrap All Tools
from occ_openai_agents import wrap_agent_tools
agent = Agent(
name="my-agent",
tools=wrap_agent_tools([search, calculator]),
)
Hook Class
from occ_openai_agents import OccToolHook, OCCSigner
signer = OCCSigner(state_dir=".occ", proof_file="audit.jsonl")
hook = OccToolHook(signer=signer)
agent = Agent(
name="my-agent",
tools=hook.wrap_tools([search, calculator]),
)
Proof Format
Each line in proof.jsonl is a JSON object:
{
"version": "occ/proof/1",
"timestamp": "2026-03-20T12:00:00.000Z",
"signer": "<base64url-ed25519-public-key>",
"payload": {
"type": "tool-call",
"tool": "search",
"inputHash": "<sha256-hex>",
"outputHash": "<sha256-hex>"
},
"signature": "<base64url-ed25519-signature>",
"prev": "<sha256-hex-of-previous-proof>"
}
Proofs are chained: each proof's prev field contains the SHA-256 hash of the previous proof's canonical JSON.
Configuration
- State directory: Keypair stored in
.occ/signer-state.json(defaults to CWD) - Proof file: Defaults to
proof.jsonlin CWD - Both configurable via
OCCSigner(state_dir=..., proof_file=...)
License
Apache-2.0
Metadata
Release files for occ-openai-agents 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| occ_openai_agents-0.2.0.tar.gz | 5.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| occ_openai_agents-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.5 kB
Release files / occ_openai_agents-0.2.0.tar.gz
| Download URL | occ_openai_agents-0.2.0.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8df4a3e38ec207bba18e96d279804cc777393475b94e098cc5a617ff83953c79
|
|
BLAKE2b-256 checksum How to use checksums |
5c48e9848ea67f6d1340b3aea9e5c3c322b9a0f746ef096dd09038ca50ee48da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / occ_openai_agents-0.2.0-py3-none-any.whl
| Download URL | occ_openai_agents-0.2.0-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
32e5c45314a67e48a3a997bff198c3c2ddda309d872e22d54318cb4e0e0524d8
|
|
BLAKE2b-256 checksum How to use checksums |
4c7d2670fc2ced900371d219c4703240dc24120d1a9642cfad83c8e0baebe4cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|