Agents
An agent is your Claude-powered application deployed on Castari.What is an Agent?
An agent is a program that:- Receives a prompt as input
- Uses Claude to reason and decide on actions
- Executes tools to interact with the world
- Returns a response
- Read and write files
- Execute shell commands
- Search the web
- Query databases
- Call external APIs
Agent Structure
Every Castari agent has this structure:castari.json
The agent configuration file:| Field | Required | Description |
|---|---|---|
name | Yes | Display name |
version | Yes | Semantic version |
entrypoint | Yes | Path to main file |
runtime | Yes | Runtime (node) |
CLAUDE.md
Instructions for Claude that shape the agent’s behavior:Agent Lifecycle
| Status | Description |
|---|---|
pending | Created but never deployed |
deploying | Deployment in progress |
active | Running and accepting invocations |
stopped | Manually stopped (can be redeployed) |
error | Deployment or runtime failure |
Slugs and Naming
Every agent has a slug — a URL-safe identifier:- Slugs are lowercase alphanumeric with hyphens
- Example:
my-agent,research-bot-v2 - Slugs must be unique per user
- Used in CLI commands:
cast invoke my-agent "Hello"
Entry Point Contract
Your agent’s entry point must:- Read prompt from stdin
- Process with Claude and tools
- Write response to stdout