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.2.0.tar.gz (5.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.2.0-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: occ_crewai-0.2.0.tar.gz
  • Upload date:
  • Size: 5.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.2.0.tar.gz
Algorithm Hash digest
SHA256 88ff7b6541dd5dca0d5f4559fb5c9a45e79779dcb500cc74a55e9bbddd06c76c
MD5 92b442e87a7cf6e901ffd765d20bf14b
BLAKE2b-256 7baa4a2af94e41bf1f465e5acf7165accdfaf3e9b48e06d2b871e39f488ac2cc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: occ_crewai-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 6.6 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7465d6b1123885b3de05ee53db9df1283d77a28e248378ba05a25c5533b06e46
MD5 4b32f6c02907c92d02c75b9c5bb435cd
BLAKE2b-256 3268228f3d38ab5d140704e2e26788504148678413e0e6a3bbdfdd9e2226bbe8

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