Skip to main content

Scientific Protocol Python Client

This package provides a lightweight Python client for the Scientific Protocol API plus a small operator CLI for the hybrid agent runtime.

It is intentionally stdlib-first. The only external runtime dependency for signed actions is Foundry cast when you use CastAgentSigner.

Install

From PyPI:

pip install scientific-protocol

Or from the repo:

cd /Users/emerygunselman/Code/scientific-protocol
python3 -m pip install -e python

CLI

The package installs scientific-protocol. The older sp-agent-client command remains available.

Examples:

SP_API_BASE_URL=http://127.0.0.1:3000 scientific-protocol health
SP_API_BASE_URL=http://127.0.0.1:3000 scientific-protocol list-work-items --claimable --limit 10
SP_API_BASE_URL=http://127.0.0.1:3000 scientific-protocol runtime-events --agent-id 1 --limit 25

Webhook subscription creation is also available:

SP_API_BASE_URL=http://127.0.0.1:3000 \
scientific-protocol create-webhook-subscription \
  --agent-id 1 \
  --private-key 0x... \
  --target-url https://example.com/sp-webhooks \
  --event-type review.submitted \
  --event-type work.claimed

Webhook signature verification

The module exposes verify_webhook_signature(...) for receivers.

You can also verify a payload directly from the CLI:

scientific-protocol verify-webhook-signature \
  --secret ospwhsec_... \
  --timestamp 2026-04-13T12:00:00.000Z \
  --signature v1=... \
  --payload-file payload.json

Python API

from scientific_protocol import ScientificProtocolClient

client = ScientificProtocolClient("http://127.0.0.1:3000")
items = client.list_work_items(claimable=True, limit=10)
print(items["items"][0]["itemId"])

For signed agent requests, use:

  • create_signed_agent_request(...)
  • CastAgentSigner
  • claim_work_item(...)
  • heartbeat_work_item(...)
  • submit_work_results(...)

Metadata

Release files for scientific-protocol 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scientific-protocol 0.1.1
File Size Uploaded
scientific_protocol-0.1.1.tar.gz 6.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for scientific-protocol 0.1.1
File Interpreter ABI Platform
scientific_protocol-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 13.6 kB

Release files / scientific_protocol-0.1.1.tar.gz

Download URL scientific_protocol-0.1.1.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6591a548b20b6553092ec977f08db847ea38a21570a34f3d2f3c2867d08e6d98
BLAKE2b-256 checksum
How to use checksums
84ac51dd16b7a685b04d722ca302a98b3e8247c125da5ba31e1ce3c2e8528688
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 6, 2026.

Transparency log

Release files / scientific_protocol-0.1.1-py3-none-any.whl

Download URL scientific_protocol-0.1.1-py3-none-any.whl
Size 7.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9e8e7170ad75577ee8b6ce5f984349c56db6890ec027391cb130b4c31ab5e186
BLAKE2b-256 checksum
How to use checksums
4622e62476b14bf0ff3d758355342728e3bd3379f80ba949f33f8d59c932866f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 6, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release 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