Skip to main content

Agents

An agent is your Claude-powered application deployed on Castari.

What is an Agent?

An agent is a program that:
  1. Receives a prompt as input
  2. Uses Claude to reason and decide on actions
  3. Executes tools to interact with the world
  4. Returns a response
Agents can do things like:
  • 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:

CLAUDE.md

Instructions for Claude that shape the agent’s behavior:

Agent Lifecycle

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:
  1. Read prompt from stdin
  2. Process with Claude and tools
  3. Write response to stdout

Tools

Agents use tools to take actions. Tools are defined as schemas:
When Claude decides to use a tool, your code executes it:

See Also

Your First Agent

Build and customize agents

Templates

Start with pre-built agents

Custom Agents

Build from scratch

Sandboxes

Execution environment