> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chucky.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Build AI agents with Claude

> Claude as a Service - Deploy AI agents with managed infrastructure

# Chucky SDK

Chucky provides **Claude as a Service** - a fully managed infrastructure for deploying AI agents powered by Claude. Build conversational AI applications without managing servers, handling authentication complexity, or worrying about scaling.

## The Problem

Building AI features into your product sounds simple: call the API, get a response, show it to users. But once you ship, reality hits:

| Challenge     | What You Need to Build                                                  | Time      |
| ------------- | ----------------------------------------------------------------------- | --------- |
| **Billing**   | Usage tracking, budget limits, Stripe metering, usage-based billing     | 2-4 weeks |
| **Execution** | Sandboxed environments, file system isolation, process management       | 4-8 weeks |
| **Tools**     | Tool execution routing, browser-to-server communication, error handling | 2-4 weeks |
| **Sessions**  | Persistence, context management, message history, resume logic          | 1-2 weeks |

That's **9-18 weeks** of infrastructure work before you can ship your AI feature.

## The Chucky Solution

Chucky handles all of this with one SDK:

```typescript theme={null}
// Billing, execution, tools, sessions - all handled.
const client = new ChuckyClient({ token });
const result = await client.prompt('Deploy my code to production');
```

**Built-in per-user billing:** JWT tokens carry budgets. Enforcement happens at the edge.

```typescript theme={null}
const token = await createToken({
  userId: 'user-123',
  budget: createBudget({
    aiDollars: 5.00,    // User can spend up to $5
    computeHours: 1,    // And 1 hour of compute
    window: 'day',      // Resets daily
  }),
});
```

When the budget runs out, requests stop. No surprise bills.

## Comparison

| Capability          | Direct API        | Chucky           |
| ------------------- | ----------------- | ---------------- |
| Per-user billing    | Build it yourself | Built-in         |
| Budget enforcement  | Build it yourself | Automatic        |
| Code execution      | Build it yourself | Managed sandbox  |
| File operations     | Not available     | Full access      |
| Shell commands      | Not available     | Full access      |
| Browser tools       | Build it yourself | Native support   |
| Local execution     | Build it yourself | Possession Mode  |
| Session persistence | Build it yourself | Automatic        |
| Multi-turn context  | Build it yourself | Automatic        |
| Git integration     | Build it yourself | Built-in bundles |

## Who Uses Chucky

**Agencies Billing Clients:** Deploy once, bill each client automatically. JWT tokens carry per-client budgets. No custom metering code per project.

**SaaS Teams Adding AI:** Add AI features without building infrastructure. Set budgets per subscription tier. Ship in days, not months.

**Indie Developers:** One SDK, one deployment. Focus on your product, not on building AI infrastructure.

## Key Features

<CardGroup cols={2}>
  <Card title="Simple Integration" icon="plug">
    One SDK, same API for browser and Node.js. WebSocket-based real-time communication.
  </Card>

  <Card title="Budget Controls" icon="wallet">
    Set per-user AI and compute budgets. Track usage in real-time with automatic limits.
  </Card>

  <Card title="Custom Tools" icon="wrench">
    Define tools that Claude can call. Execute in browser or server context.
  </Card>

  <Card title="Multi-Provider" icon="layer-group">
    Use Claude, OpenAI, or 100+ OpenRouter models. Configure behavior with environment variables.
  </Card>
</CardGroup>

## Supported Models

| Provider       | Models                     | Best For                   |
| -------------- | -------------------------- | -------------------------- |
| **Anthropic**  | Claude Opus, Sonnet, Haiku | Default, best quality      |
| **OpenAI**     | GPT-5.2, GPT-5, o3, o4     | Alternative provider       |
| **OpenRouter** | 100+ models                | Cost optimization, variety |

Configure models per-session with [environment variables](/concepts/models#environment-variables) like `ANTHROPIC_MODEL` and `CLAUDE_CODE_SUBAGENT_MODEL`.

## Next Steps

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Get up and running in 5 minutes
  </Card>

  <Card title="Architecture" icon="sitemap" href="/architecture">
    How Chucky works under the hood
  </Card>

  <Card title="Use Cases" icon="lightbulb" href="/use-cases">
    Practical guides and recipes
  </Card>

  <Card title="Billing" icon="credit-card" href="/billing">
    Pricing and budget controls
  </Card>
</CardGroup>

## Popular Topics

<CardGroup cols={3}>
  <Card title="Models" icon="microchip" href="/concepts/models">
    Multi-provider & env vars
  </Card>

  <Card title="Tools" icon="wrench" href="/concepts/tools">
    Create custom tools
  </Card>

  <Card title="MCP Servers" icon="server" href="/concepts/mcp-servers">
    Connect external services
  </Card>

  <Card title="CLI" icon="terminal" href="/cli">
    Command-line interface
  </Card>

  <Card title="Jobs" icon="clock" href="/cli/jobs">
    Background tasks
  </Card>

  <Card title="Sessions" icon="comments" href="/concepts/sessions">
    Multi-turn conversations
  </Card>
</CardGroup>
