Cowboy SDK
The official Python SDK for developing autonomous actors on the Cowboy PVM (Python Virtual Machine).
With this SDK, you can write fully deterministic on-chain Python code that interacts natively with LLMs, APIs, and the broader Cowboy ecosystem.
Features
- Decentralized AI Agents: Write prompt chains, FSM-based LLM logic, and MCP integrations directly in Python.
@runner.continuation: Turn Pythonasyncfunctions into verified Finite State Machines (FSMs) capable of pausing execution, offloading heavy compute (LLM inference, HTTP requests) to Runners, and seamlessly resuming on the next block.- Robust Determinism: The SDK strips away standard Python non-determinism (
time,random,set) and replaces it with consensus-safe primitives. - CBOR-backed State: The
CowboyModelandself.storagedict provide automatic schema validation and canonical CBOR serialization for zero-boilerplate state management. - Built-in Async Primitives: Leverage
TaskGroupfor concurrent Runner tasks,Retryfor robust backoff logic, andbounded_loopto ensure safety limits.
Quick Start
pip install cowboy-actor-sdk
from cowboy_sdk import actor, runner, capture
@actor
class MyAgent:
def init(self, payload):
self.storage["calls"] = 0
return b"ok"
@runner.continuation
async def chat(self, msg):
ctx = capture()
ctx.prompt = msg.get("message", "Hello")
# Off-chain heavy compute (LLM) securely verified via consensus
result = await runner.llm(ctx.prompt, system_prompt="You are a helpful assistant")
# Execution resumes here on the next block
chat_id = self.storage.get("calls", 0)
self.storage[f"reply:{chat_id}"] = result
self.storage["calls"] = chat_id + 1
return b"ok"
def _a(): return MyAgent()
def init(p): return _a().init(p)
def chat(p): return _a().chat(p)
def chat__resume(p): return _a().chat__resume(p)
def on_runner_result(p): return _a().on_runner_result(p)
Documentation & Tools
- Developer Manual: View on GitHub
- Vibe Coding Blueprint (Claude Code): Learn how to set up autonomous development without local chain dependencies. View Guide.
- Cowboy CLI: Pre-compiled binary required to deploy and send transactions. Download from the GitHub Releases.
License
MIT License. See the repository for details.
Metadata
Release files for cowboy-actor-sdk 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cowboy_actor_sdk-0.1.3.tar.gz | 173.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cowboy_actor_sdk-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 373.6 kB
Release files / cowboy_actor_sdk-0.1.3.tar.gz
| Download URL | cowboy_actor_sdk-0.1.3.tar.gz |
|---|---|
| Size | 173.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6fcda5abc825763c870572b5821715e59cb19eec316b63ad005f7f022a5c4392
|
|
BLAKE2b-256 checksum How to use checksums |
6f315cc53ec2ca0d2fcbdfd1660677759f837051e334d913b73bae25cf633e24
|
| 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 14, 2026.
Transparency logRelease files / cowboy_actor_sdk-0.1.3-py3-none-any.whl
| Download URL | cowboy_actor_sdk-0.1.3-py3-none-any.whl |
|---|---|
| Size | 199.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
073dfde072096831dfaeb72e5aa676534d4277ab3fbc759a629a6d277d46441d
|
|
BLAKE2b-256 checksum How to use checksums |
43444f7cdf5980fa648ff7c2adf41bf4b1bc91c81f494de08f93a7e78018264f
|
| 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 14, 2026.
Transparency log