Skip to main content

OCC cryptographic proof signing for CrewAI

Project description

occ-crewai

OCC cryptographic proof signing for CrewAI.

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-crewai

Quick Start

Decorator

from crewai.tools import tool
from occ_crewai import occ_tool

@occ_tool
@tool("Search")
def search(query: str) -> str:
    """Search the web."""
    return do_search(query)

Wrap All Tools

from occ_crewai import wrap_tools

safe_tools = wrap_tools([search_tool, calc_tool])
agent = Agent(role="researcher", tools=safe_tools)

Step Callback

from occ_crewai import occ_step_callback

crew = Crew(
    agents=[researcher, writer],
    tasks=[research_task, write_task],
    step_callback=occ_step_callback(),
)

Custom Signer

from occ_crewai import OCCSigner, occ_tool

signer = OCCSigner(state_dir="/tmp/.occ", proof_file="audit.jsonl")

@occ_tool(signer=signer)
@tool("Search")
def search(query: str) -> str:
    """Search the web."""
    return do_search(query)

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.jsonl in CWD
  • Both configurable via OCCSigner(state_dir=..., proof_file=...)

License

Apache-2.0

Project details


Download files

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

Source Distribution

occ_crewai-0.1.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

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

occ_crewai-0.1.0-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file occ_crewai-0.1.0.tar.gz.

File metadata

  • Download URL: occ_crewai-0.1.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for occ_crewai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c7d1c6de4c8fc2374224da8649e7fbd3c61c943db9fdcdf3b88cc32e804facde
MD5 35a545b77398c8e5f583e2d4701767eb
BLAKE2b-256 140a5b681d1c418600a13b2ee5f09c41df9f5cabe5c55bdf473fb0e023992df9

See more details on using hashes here.

File details

Details for the file occ_crewai-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: occ_crewai-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for occ_crewai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 66ca28ab7e80b9ff38664da3c57919501f93b0b55dd8896cba6c2a461c33e2f7
MD5 a1d4ac34a4e035448804d76d4b20373a
BLAKE2b-256 09b0556e75d5872fadbe2c9ede5de79280bd9db95e2a4b82fbc3be32ad4c45a4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page