Skip to main content

Overview

This guide walks through the fastest path from a working cowboy CLI to a deployed Python actor on the hosted Cowboy devnet. You will create a normal project directory, initialize a devnet wallet, scaffold a starter actor, deploy it, call it, and inspect the result. What you’ll learn:
  • How to scaffold a project and manage a wallet
  • How to deploy and execute a Python actor
  • Where to go next when you want to customize actor behavior

Prerequisites

  • The cowboy CLI is installed and available on your PATH
  • Optional: lasso is installed if you prefer the interactive console
Verify the CLI:
If you use Lasso, verify it separately:

1. Create a Project Directory

Start from any directory where you keep projects:

2. Initialize Devnet Config

This creates .cowboy/ with a fresh secp256k1 keypair and a config pointing at the hosted Mesa devnet. The devnet faucet funds the generated wallet when available.
Verify the network and wallet:

3. Scaffold the Hello Actor

This creates actors/hello/main.py, a tiny SDK counter actor. The generated file includes durable actor storage, an init handler, public handlers, and module-level dispatch functions:
The generated file also includes the wrapper functions the PVM calls by handler name. Keep those wrappers in place when you edit the actor.

4. Deploy the Hello Actor

Deploy it:
The CLI prints a transaction hash and a deterministic CREATE2-style actor address:
Use the printed Actor address in the commands below. Compute that address ahead of time if you want:

5. Call the Actor

Execute a handler:
Inspect state and logs:

6. Next Steps

Minimal Actor Walkthrough

Understand the actor programming model

CLI Reference

Every cowboy subcommand, flags, and semantics

End-to-End Example

Study source-checkout examples when you want larger actor patterns

Fee Model

Learn how Cycles and Cells are metered and priced

Where to Find Things

Troubleshooting

Install the cowboy CLI using the distribution method provided by the Cowboy team, then open a new terminal and run cowboy version.
Run cowboy status to see which RPC URL the CLI is using. If you intended to use the hosted devnet, re-run cowboy init dev or pass --rpc-url explicitly. If you are intentionally using a local validator, make sure that validator is running before using cowboy init local.
The default cycle/cell limits are conservative. For larger actors, pass --cycles-limit and --cells-limit — see cowboy actor.