SandBase Agents overview
Pre-built, configurable agent harness that runs in managed infrastructure. Best for long-running tasks and asynchronous work.
SandBase offers multiple ways to build with AI, each suited to different use cases:
| LLM Gateway | Agents | |
|---|---|---|
| What it is | Direct model prompting access (OpenAI/Anthropic compatible) | Pre-built, configurable agent harness that runs in managed infrastructure |
| Best for | Custom agent loops and fine-grained control | Long-running tasks and asynchronous work |
| Learn more | LLM Gateway docs | Agents docs |
SandBase Agents provides the harness and infrastructure for running AI as an autonomous agent. Instead of building your own agent loop, tool execution, and runtime, you get a fully managed environment where the agent can read files, run commands, browse the web, and execute code securely.
Core concepts
SandBase Agents is built around four concepts:
| Concept | Description |
|---|---|
| Agent | The model, system prompt, tools, MCP servers, and skills. A reusable, versioned configuration. |
| Environment | Configuration for where sessions run: cloud containers with configurable resources. |
| Session | A running agent instance within an environment, performing a specific task and generating outputs. |
| Events | Messages exchanged between your application and the agent (user turns, tool results, status updates). |
How it works
1. Create an agent
Define the model, system prompt, tools, MCP servers, and skills. Create the agent once and reference it by ID across sessions.
from anthropic import Anthropic
client = Anthropic(api_key="sk-sb-YOUR_KEY", base_url="https://api.sandbase.ai")
agent = client.beta.agents.create(
model="claude-sonnet-4",
name="Research Assistant",
system="You are a research assistant. Search the web to answer questions.",
tools=[{"type": "agent_toolset_20260401"}],
mcp_servers=[{"name": "web-search", "type": "url", "url": "https://mcp.sandbase.ai/web-search/sse"}]
)2. Create an environment
Configure where the agent runs: a cloud container with CPU, memory, and timeout settings.
env = client.beta.environments.create(
name="Cloud Default",
config={"type": "cloud", "base_template": "code_interpreter", "resources": {"cpu": 2, "memory_mb": 4096, "timeout": 600}}
)3. Start a session
Launch a session that references your agent and environment configuration.
session = client.beta.sessions.create(
agent=agent.id,
environment_id=env.id
)4. Send events and get responses
Send user messages as events. The agent autonomously executes tools and returns results.
result = client.beta.sessions.events.create(
session_id=session.id,
events=[{"type": "user.message", "content": "What are the latest AI research papers on reasoning?"}]
)5. Steer or interrupt
Send additional user events to guide the agent mid-execution, or interrupt it to change direction.
# Interrupt a running agent
client.beta.sessions.events.create(
session_id=session.id,
events=[{"type": "user.interrupt"}]
)When to use Agents
Agents is best for workloads that need:
- Long-running execution: Tasks that run for minutes with multiple tool calls
- Cloud infrastructure: Secure containers with pre-installed packages and network access
- Minimal infrastructure: No need to build your own agent loop, sandbox, or tool execution layer
- Stateful sessions: Persistent filesystems and conversation history across multiple interactions
- Multi-model flexibility: Use any of 1400+ models (not limited to Claude)
Supported tools
Agents gives the agent access to built-in tools:
- Bash: Run shell commands in the container
- File operations: Read, write, edit, glob, and grep files
- Web search and fetch: Search the web and retrieve content from URLs
- MCP servers: Connect to 2000+ external tool providers
- Code execution: Run Python, JavaScript, and other languages
See MCP Tools for the full catalog and configuration options.
Multi-model support
Unlike Claude Managed Agents (which only supports Claude models), SandBase Agents supports any model from any provider:
| Provider | Models |
|---|---|
| Anthropic | Claude Sonnet 4, Claude Haiku 3.5 |
| OpenAI | GPT-4o, o3, o3-mini |
| Gemini 2.5 Pro, Gemini 2.5 Flash | |
| DeepSeek | DeepSeek V3, DeepSeek Reasoner |
| Meta | Llama 4 Maverick |
| + 50 more | Browse all 1400+ models → |
SDK compatibility
SandBase Agents is fully compatible with the Anthropic SDK. Just change the base_url:
from anthropic import Anthropic
client = Anthropic(
api_key="sk-sb-YOUR_KEY",
base_url="https://api.sandbase.ai"
)
# Use exactly like Claude Managed Agents
agent = client.beta.agents.create(model="claude-sonnet-4", name="My Agent")import Anthropic from '@anthropic-ai/sdk';
const client = new Anthropic({
apiKey: 'sk-sb-YOUR_KEY',
baseURL: 'https://api.sandbase.ai',
});
const agent = await client.beta.agents.create({ model: 'claude-sonnet-4', name: 'My Agent' });Rate limits
Agents endpoints are rate-limited per organization:
| Endpoint type | Limit |
|---|---|
| Create endpoints (agents, sessions, environments) | 300 requests per minute |
| Read endpoints (retrieve, list, stream) | 600 requests per minute |
Organization-level spend limits and rate limits also apply.
Next steps
- Agent API — Define and configure agents
- MCP Tools — Attach 2000+ tools
- Cloud Sandboxes — Execution environments
- API Reference — Full endpoint documentation

