Skip to main content
This page takes the starter actor from cowboy init to a live actor on Cowboy Cloud. Everything up to the deploy runs on your machine, is free, and needs no account. You need the cowboy CLI and uv. A new wallet can claim a one-time credit, which pays for the deploy.

1. Create the project

Output
This writes a project that’s already set to deploy to Cloud. Run the commands below from inside hello/. The actor is actors/hello/main.py:
An actor is a class that inherits Actor, and its @public methods are the handlers anyone can call. init runs once, at deploy, and saves what it’s given in the actor’s state. main returns what init saved.

2. Try it on your machine

Output
check applies the rules Cowboy applies to actor code, test runs the project’s tests, and run runs one handler the way Cowboy would, keeping state between runs. The last line is what main returned: 0x68656c6c6f is the word hello, in hex.

3. Deploy it to Cloud

Create a wallet, unless you already have one, and claim the credit:
Output
Output
wallet create stores the key outside the project, so it never lands in your repository. credit claim opens a page in your browser that adds the credit to this wallet, and waits until it arrives. Then deploy:
Output
deploy creates the actor, runs its init, and makes you its owner. It asks how much to move from your wallet to the actor so it can pay for its own work, 1 CBY by default. CBY is Cowboy’s currency. It ends with hello is live on cloud and the actor’s address.

4. Call it

Output
Output
A call costs a small fee and reports that it went through, not what main returned. Reading state is free, and actor state shows 0x68656c6c6f, the hello that init saved. Anyone can read an actor’s state, so keep secrets out of it (Your keys and your data).

If something fails

init says the environment failed. init runs uv last. Install or fix uv, then run cowboy init again in the project folder. “The node could not read this transaction; your cowboy CLI may be older than the network.” Install the latest release and run the command again. Deploy stops because the wallet can’t pay. Check cowboy wallet balance --env cloud, and claim the credit if you haven’t. Billing covers adding money.

Next

Build your first actor writes an actor that fetches a price on a schedule and asks a model about it. To have a coding agent write one for you, see Build with your coding agent.