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

# Bot Management

> Create, update, and manage bots with the Core SDK

## Create a Bot

```javascript theme={null}
const result = await client.createBot({
  name: 'Customer Support Bot',
  model: 'gpt-5-mini',
  instruction: 'You are a helpful customer support assistant.',
  max_reply_tokens: 1000,
  status: 'active'
});

if (result.err) {
  console.error('Error:', result.err);
} else {
  console.log('Bot created:', result.response.id);
}
```

### Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `name` | string | Yes | Bot name |
| `model` | string | Yes | Model to use (e.g., `gpt-5-mini`) |
| `instruction` | string | Yes | System instructions for the bot |
| `max_reply_tokens` | number | No | Max response length (default: 1000) |
| `temperature` | number | No | Creativity 0-1 (default: 0.7) |
| `reasoning_mode` | string | No | `auto`, `standard`, `agent` |
| `tasks` | boolean | No | Show [Tasks](/docs/sdk/core/tasks.md) for this bot (default: `false`). Tasks are available from Free. |
| `status` | string | No | `active` or `inactive` (default: `active`) |

### Response

```javascript theme={null}
{
  err: null,
  response: {
    id: 'bot_abc123',
    name: 'Customer Support Bot',
    model: 'gpt-5-mini',
    instruction: 'You are a helpful customer support assistant.',
    status: 'active',
    created_at: '2025-01-01T12:00:00Z'
  }
}
```

## Get Bot Details

```javascript theme={null}
const result = await client.fetchBot('bot_abc123');

if (result.err) {
  console.error('Error:', result.err);
} else {
  console.log('Bot:', result.response);
}
```

## List All Bots

```javascript theme={null}
const result = await client.fetchBots({
  page: 1,
  per_page: 10
});

if (result.err) {
  console.error('Error:', result.err);
} else {
  console.log('Bots:', result.response);
}
```

### Response

```javascript theme={null}
{
  err: null,
  response: [
    {
      id: 'bot_abc123',
      name: 'Support Bot',
      model: 'gpt-5-mini',
      status: 'active'
    },
    {
      id: 'bot_xyz789',
      name: 'Sales Bot',
      model: 'gemini-3.5-flash-lite',
      status: 'active'
    }
  ]
}
```

## Update Bot

```javascript theme={null}
const result = await client.updateBot({
  bot_id: 'bot_abc123',
  name: 'Updated Support Bot',
  instruction: 'You are an expert support assistant.',
  model: 'gpt-6-sol',
  max_reply_tokens: 1500,
  status: 'active'
});

if (result.err) {
  console.error('Error:', result.err);
} else {
  console.log('Bot updated:', result.response);
}
```

## Reset Bot

Reset a bot's conversation history and training data:

```javascript theme={null}
const result = await client.resetBot('bot_abc123');

if (result.err) {
  console.error('Error:', result.err);
} else {
  console.log('Bot reset successfully');
}
```

## Delete Bot

```javascript theme={null}
const result = await client.deleteBot('bot_abc123');

if (result.err) {
  console.error('Error:', result.err);
} else {
  console.log('Bot deleted successfully');
}
```

## Choose a Model

See all available models:

> [card] [Model Comparison](/docs/providers/model-comparison.md)
>
> Compare 99 models across 14 providers

### Popular Models

* **gpt-6-luna** - Fast and cheap with a 1.05M context window (1 credit) — the default for new bots
* **gpt-5.6-luna** - Fast and cheap with a 1.05M context window (1 credit)
* **claude-haiku-4-5** - Anthropic's fast tier (4 credits)
* **claude-sonnet-5** - Best for complex tasks (8 credits)
* **gemini-3.8-flash** - Fast Google model (3 credits)
* **grok-4.5** - Native video input, 500K context (8 credits)

## Next Steps

> [card] [Chat API](/docs/sdk/core/chat-api.md)
>
> Interact with your bots

> [card] [Training Data](/docs/sdk/core/training-data.md)
>
> Add knowledge to bots


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.