Quickstart¶
Create your first coding agent sandbox in 5 minutes.
1. Install¶
See Installation for more options.
2. Start the Server¶
The API is now available at http://localhost:9090 (default port).
Health Check
Verify the server is running: curl http://localhost:9090/health
3. Create a Sandbox¶
ciab sandbox create \
--provider claude-code \
--name my-first-sandbox \
--env ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY
This will:
- Validate the sandbox specification
- Resolve and inject credentials
- Start the agent process (local by default, or in a container with Docker/OpenSandbox)
You'll see provisioning progress streamed to your terminal.
4. Chat with the Agent¶
# Single message
ciab agent chat --sandbox-id <id> --message "Explain the project structure" --stream
# Interactive mode
ciab agent chat --sandbox-id <id> --interactive --stream
The --stream flag shows the agent's response as it's generated, including tool use.
5. Execute Commands¶
# Run a command in the sandbox
ciab sandbox exec <id> -- ls -la /workspace
# Check installed tools
ciab sandbox exec <id> -- node --version
6. Browse Files¶
# List files
ciab files list <id> --path /workspace
# Download a file
ciab files download <id> --path /workspace/README.md --output ./README.md
# Upload a file
ciab files upload <id> --path /workspace/data.json --input ./data.json
7. Monitor Resources¶
Output shows CPU usage, memory, disk, and network statistics.
8. Clean Up¶
Using the REST API¶
All CLI operations are available via the REST API:
# Create a sandbox
curl -X POST http://localhost:9090/api/v1/sandboxes \
-H "Content-Type: application/json" \
-d '{
"agent_provider": "claude-code",
"name": "api-sandbox",
"env_vars": {
"ANTHROPIC_API_KEY": "sk-ant-..."
}
}'
# Send a message
curl -X POST http://localhost:9090/api/v1/sessions/<sid>/messages \
-H "Content-Type: application/json" \
-d '{"role": "user", "content": [{"type": "text", "text": "Hello!"}]}'
# Stream events (SSE)
curl -N http://localhost:9090/api/v1/sandboxes/<id>/stream
Next Steps¶
- Architecture — Understand how CIAB works
- API Reference — Full endpoint documentation
- CLI Reference — All CLI commands
- Configuration — Customize your setup