cowboy CLI, so once you’ve installed the CLI you already have it. It also knows Cowboy from the start: in a Cowboy project, it loads a skill for building, testing and deploying actors. You describe the actor you want, and it writes the code and tests it on your machine.
There’s no API key to set up and no account to open with a model company. Lasso itself runs on your machine. Runners, machines on Cowboy’s network, serve the models, and you pay them from your wallet.
You start it with cowboy console. lasso is another name for the same agent.
1. Fund your wallet
Lasso pays from the same wallet you deploy with, in CBY, Cowboy’s currency. If you’ve done the Quickstart, yours is ready. If not, create one and claim the one-time credit:Output
Output
credit claim opens a page in your browser that adds the credit to this wallet. When you need more, Billing covers adding money.
2. Start it in a project
Create a project and go into it:Output
Output
/model at any time to see what runners serve and switch. If your channel’s runner doesn’t serve the model you pick, Lasso asks before opening a second channel, with its own deposit.
How you pay for models
You pay for two things, both from the channel’s deposit:- Tokens. Each call costs what its tokens cost, at the prices shown when the channel opened.
- A prepaid balance with the runner. Your first call with a runner pays it enough to cover its maximum per call, 10 CBY here. This is the nonrefundable credit in the question. You pay it once per runner, and it stays there for your later channels with that runner.
/wallet shows where you stand, but its figure is the deposit minus what your calls have used, not what you’d get back. Calls stop when that figure gets down to the runner’s maximum, and /topup <CBY> adds more from your wallet.
When you’re done, /wallet close closes the channel in use and prints its id. The message says Lasso collects the rest of the deposit later, but for now you have to do that yourself. Wait about a minute and a half, then run:
Output
cowboy wallet balance then shows the money back. If you run it too soon, it fails without sending anything, and you can run it again.
The runner reports what each call used, and the most it can take from a channel is its deposit. CIP-8 specifies how channels work on the chain, where they’re called sessions.
Stay in control
Lasso reads and edits files in the project folder. On macOS its commands run in a sandbox with no network, and on Linux it asks before each one. Apart from reading chain data and these docs, it asks before anything that reaches the network, and it asks before it deploys or opens a channel, so you see what’s about to happen first. What you send the model, including file contents and command output, leaves your machine, so keep private data out of the project. These are the commands you’ll use most inside a session:
From your shell,
cowboy console -c continues the latest conversation in the folder, and cowboy console -p "<prompt>" runs one prompt and exits. That can’t stop to ask you anything, so the folder must already be trusted and a channel already open. cowboy console channel --model <id> opens a channel without starting Lasso.