Skip to main content

cast deploy

Deploy an agent to Castari.

Usage

cast deploy [slug]

Arguments

ArgumentDescriptionRequired
slugAgent slugNo (detected from castari.json if in project directory)

Examples

Deploy from a Castari project directory

If you’re inside a directory with a castari.json file, just run:
cast deploy
The CLI reads the agent slug from your configuration.

Deploy a specific agent

cast deploy my-agent
Deploys the agent with slug my-agent, pulling code from its configured git repository.

What Happens During Deploy

1

Fetch Code

Code is pulled from the agent’s configured git repository.
2

Create Sandbox

An isolated E2B sandbox is created for your agent.
3

Install Dependencies

npm install runs inside the sandbox.
4

Inject Secrets

Any secrets you’ve set become environment variables.
5

Ready

Agent status becomes active. Ready to invoke.

Agent Configuration

Your agent needs a castari.json file:
{
  "name": "my-agent",
  "version": "0.1.0",
  "entrypoint": "src/index.ts",
  "runtime": "node"
}

Redeploying

Running cast deploy on an already-deployed agent will redeploy it:
  1. Previous sandbox is destroyed
  2. New sandbox is created
  3. Latest code is deployed
Redeploying does not preserve sandbox state. All files and data in the sandbox are lost.

Errors

ErrorCauseFix
Agent not foundInvalid slugCheck cast agents list for correct slug
castari.json not foundNot in a project directorySpecify the slug explicitly or cd to your project
npm install failedDependency errorCheck package.json, run npm install locally first
Authentication requiredNot logged inRun cast login

See Also