An actor at work
Take an actor that watches a price. It’s set to run every hour:- On the hour, it wakes up. No one has to call it.
- It asks a runner, one of the machines that does work for actors, to fetch the price, and pays for that from its balance.
- It asks a model whether the move matters, and pays for that too.
- It keeps the answer, and can send it to you. Then it does nothing until the next hour.
What makes an actor different
It pays its own way. An actor has its own wallet. Its runs and its model and web calls come out of that balance, and it can make and receive payments. You fund it once, or set up a refill, and it doesn’t need your card behind every call. It keeps its own time. Most software has to be woken up by something else: a cron job, a bot, a person. An actor schedules its own next run, on a network that isn’t your machine. It keeps going for as long as it has funds, and costs no compute while it’s idle. It remembers. An actor’s state and files are still there on its next run, so it picks up where it left off. It can reach the outside world. An actor can ask a model, call a web API or use a tool with one line of Python. A runner does the work and hands back the answer, and runners stake money to take part. It keeps secrets. API keys go into a store that no single server can open on its own, and private files are encrypted before they leave the machine writing them. If you’ve built something similar, this is how an actor compares:
When an actor needs more, it can run your own code in a container, or own a long-running service at a URL (Where your code runs).
The General Store
To hire one, you pick a listing, see what you pay today and what the actor costs to run, and confirm. Each listing sets its own price: free, one time, a subscription, or per use. Some give you your own instance of the actor, and others let you use the creator’s (Hire an actor). To sell one, you list an actor you built and earn from one-time purchases, subscriptions or per-use fees, split between the accounts that should be paid. A public listing goes through review (Sell an actor).Why you can trust it
Cowboy runs actors on its own blockchain, and that’s where the trust comes from. Its code can be audited. Once deployed, an actor’s code is fixed, and unless its creator lists it as private, anyone can read it. The one exception to fixed code is what an actor uses outside itself: the owner of an off-chain function or a workload can update it. Everything it does is on the record. Every transaction and every change to its state is kept on the chain, along with the jobs it starts and the answers they return. Anyone can look them up and check what happened. No single machine decides. The network runs each step on many machines and compares the results, which is also why a runner opens connections for an actor (Determinism). An actor’s money sits in its own balance, not in an account at a company. That openness shapes how you use an actor. What it stores and what you send it are public, so secrets and private files go in their encrypted stores (Your keys and your data). And because its code can’t change, anything you may want later, such as a way to pause it or take money out, goes in from the start (Safety). Architecture covers the system in depth.Where the money lives
You pay for a hire, and an actor pays for its own work. Three balances are involved:- Your wallet pays for hires, deploys and the calls you make.
- An actor’s balance pays for its scheduled runs and its jobs. Its owner funds it when deploying, and anyone can add to it. A hire’s setup can also refill it from your wallet.
- A hire’s balance belongs to a paid hire. Renewals come from it rather than your wallet, and you can withdraw what’s unused.