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

# LLMs

> Configure the AI model that powers your agent's reasoning — set a system prompt, choose a provider, tune parameters, and attach tools.

## How LLMs work

Every agent has an **LLM model** (`llm_id`) that controls what the agent says and does. The agent and the LLM model are separate resources so you can share one brain across multiple agents — update the system prompt once and every agent using that model picks up the change immediately.

```
Agent (voice, first message, call behaviour)
  └── LLM model (system prompt, provider, model, tools, knowledge bases)
```

When you create an agent, OneInbox automatically creates an LLM model with sensible defaults and returns its `id` as `llm_id`.

***

## Providers

OneInbox supports several LLM providers. Platform providers work out of the box — no credentials needed.

| Provider      | Models                                    | Credential required                                |
| ------------- | ----------------------------------------- | -------------------------------------------------- |
| **OpenAI**    | `gpt-4o`, `gpt-4o-mini`, `gpt-5`          | No — platform-provided                             |
| **Shisa**     | `shisa-v2-llama3.3-70b`                   | No — platform-provided                             |
| **Anthropic** | `claude-sonnet-4-5`, `claude-haiku-4-5`   | Yes — [add an integration](/concepts/integrations) |
| **Groq**      | `llama-3.3-70b-versatile`, `gemma2-9b-it` | Yes — [add an integration](/concepts/integrations) |

***

## Set a system prompt

The system prompt defines the agent's persona, goals, and rules. Update it at any time without rebuilding the agent:

```bash theme={null}
curl -X PATCH https://api.oneinbox.ai/v1/models/<llm_id> \
  -H "Authorization: Bearer <api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "system_prompt": "You are Aria, a friendly sales rep for Acme Corp. Keep replies under two sentences. When the caller says goodbye, call end_call.",
    "temperature": 0.7
  }'
```

| Field           | Default           | What it does                                              |
| --------------- | ----------------- | --------------------------------------------------------- |
| `system_prompt` | General assistant | The agent's persona, goals, and rules                     |
| `temperature`   | `0.7`             | Creativity. Lower = more consistent, higher = more varied |

***

## Switch provider or model

To use a different provider or model, pass `provider` and `model` together:

```bash theme={null}
curl -X PATCH https://api.oneinbox.ai/v1/models/<llm_id> \
  -H "Authorization: Bearer <api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "openai",
    "model": "gpt-4o-mini"
  }'
```

For Anthropic or Groq, pass `credential_id` as well:

```bash theme={null}
curl -X PATCH https://api.oneinbox.ai/v1/models/<llm_id> \
  -H "Authorization: Bearer <api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "anthropic",
    "model": "claude-haiku-4-5",
    "credential_id": "<crd_abc123>"
  }'
```

See [Integrations](/concepts/integrations) for how to add a credential for Anthropic or Groq.

***

## Attach tools

Tools give the agent the ability to take actions during a call. They are attached to the LLM model — not to the agent directly:

```bash theme={null}
curl -X PATCH https://api.oneinbox.ai/v1/models/<llm_id> \
  -H "Authorization: Bearer <api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "tool_ids": ["<tool_id_1>", "<tool_id_2>"]
  }'
```

This replaces the full `tool_ids` list. Include all tool IDs you want active — any not listed are detached.

See [Tools](/guides/tools) for how to create tools.

***

## Attach a knowledge base

Knowledge bases let the agent answer questions from your documents or URLs. They are attached to the agent — not to the LLM model directly:

```bash theme={null}
curl -X PATCH https://api.oneinbox.ai/v1/agents/<agent_id> \
  -H "Authorization: Bearer <api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "kb_ids": ["<kb_id_1>", "<kb_id_2>"]
  }'
```

This replaces the full `kb_ids` list. Include all knowledge base IDs you want active — any not listed are detached.

See [Knowledge bases](/guides/knowledge-bases) for how to create and manage them.

***

## Get an LLM model

```bash theme={null}
curl https://api.oneinbox.ai/v1/models/<llm_id> \
  -H "Authorization: Bearer <api_key>"
```

```json theme={null}
{
  "id": "llm_xyz789",
  "provider": "openai",
  "model": "gpt-4o-mini",
  "system_prompt": "You are Aria...",
  "temperature": 0.7,
  "tool_ids": ["tool_abc123"]
}
```

***

## API reference

[List models](/api-reference/llm-models/list-llm-models) · [Get model](/api-reference/llm-models/get-llm-model) · [Update model](/api-reference/llm-models/update-llm-model)
