Your First Agent
After runningcast init, you have a working agent. Let’s understand its structure and how to customize it.
Agent Structure
Every Castari agent has this structure:castari.json
The agent configuration file:CLAUDE.md
This file contains instructions for Claude. It’s like a system prompt that shapes your agent’s behavior:src/index.ts
The entry point defines your agent’s tools and handles invocations:Local Testing
Test your agent locally before deploying:cast invoke does remotely.
Customizing Your Agent
Add a New Tool
- Define the tool schema in
toolsarray - Add the handler in
handleToolfunction
Change Agent Behavior
EditCLAUDE.md to change how your agent thinks and acts:
Add Dependencies
Redeploying
After making changes, redeploy:Redeploying destroys the previous sandbox. Any files or state in the sandbox are lost.
Next Steps
CLI Reference
Learn all available commands
Templates
Try different agent templates
Add Secrets
Add API keys for external services
How It Works
Understand the architecture