# Creating a Custom Agent

Build your own agent tailored to your team's needs:

1. Navigate to the **Agents** section in the sidebar
2. Click **Create Agent**
3. Configure the following:

| Field | Description |
|-------|-------------|
| **Icon** | An avatar image that identifies the agent in lists and chat |
| **Name** | A descriptive name for the agent |
| **Ownership** | Choose **Personal (only you)** or **Organization (shareable)**. The Organization option is disabled for members who are not org admins |
| **Default model** | The model the agent uses by default, chosen from the models your connected LLM providers make available (see below) |
| **Knowledge bases** | Optional knowledge bases the agent can search, each attached in **Read** or **Edit** mode (see [Integrations and Knowledge Bases](#integrations-and-knowledge-bases)) |
| **Integrations** | Optional allowlist of connected systems the agent can use, each set to **Read-only**, **Edit**, or **Full** (see [Integrations and Knowledge Bases](#integrations-and-knowledge-bases)) |
| **System prompt** | Instructions that define the agent's behavior, personality, and constraints |

The **Default model** dropdown is populated from the LLM providers your workspace has connected — bring-your-own-key (BYOK) providers such as Anthropic, OpenAI, and Gemini, plus, for a **Personal** agent, your own Claude Code or Codex sign-in. You can also connect **open-source model aggregators** — [OpenRouter](/integrations/openrouter/), [Baseten](/integrations/baseten/), [DeepInfra](/integrations/deepinfra-byok/), [Fireworks AI](/integrations/fireworks/), and [Together AI](/integrations/together/) — each of which serves a large catalog of models. [Cloudflare Workers AI](/integrations/cloudflare/) and [DigitalOcean GradientAI](/integrations/digitalocean/) are connected under **Settings → Integration** too, and each offers a fixed set of five chat models. Because an aggregator can expose hundreds of models, the Default model picker is **searchable and grouped by provider**, with **verified** models listed first. Fours' hosted models are offered to **Personal** and **Organization** agents alike — the same models either way — so a new agent normally has something to run on before you connect anything. Whether they are offered at all is an organization decision: see [How a turn resolves to a model](/insulin/agents/models/#how-a-turn-resolves-to-a-model). The **Ownership** you choose controls only whose BYOK providers join that list: an **Organization** agent draws on the organization's connected providers, a **Personal (only you)** agent on your own. If a saved default later becomes **unavailable** — its provider was disconnected or the model was retired — the picker marks it with the model's name followed by **"— unavailable"** with a hint to reconnect the provider or choose another model; the agent never silently switches to a different model. A turn that cannot reach the saved default stops with an error saying the model is not available, and if the default fails partway through a turn, the reply names the model that took over — see [When a model fails over](/insulin/agents/models/#when-a-model-fails-over).

## When a Default model is refused on save

Saving an agent whose **Default model** the agent could not actually run is refused rather than accepted and quietly failed over at the first turn. The reason you get back is the same one the runtime would give:

| Why the save was refused | What it means | What to do |
|---|---|---|
| **AI policy** | Your organization's AI model policy does not permit that model | Pick another model, or change the policy under **Settings → Organization → AI Gateway** |
| **Model unavailable** | The model itself cannot be reached for this agent's scope | Pick another model, or connect the provider that serves it |
| **Nothing to resolve with** | No provider could be resolved for the scope at all | Connect a provider — this is not a statement about the model you picked |

Two things this deliberately does *not* do. It does not hold a **Personal** agent to a stricter standard than an Organization one — either scope may pin a Fours-hosted model, because either scope can run one. And it re-checks the model **only when you change it**: renaming an agent whose long-standing pin a later policy change excluded still saves, rather than trapping you on a screen that refuses every edit over a field you did not touch.

:::info
You do not type a description. When you save, Insulin auto-generates the agent's description by summarizing its system prompt — so an empty system prompt yields an empty description. Write a clear, complete prompt and the description follows.
:::

:::tip
Write system prompts that are specific and actionable. Instead of "Be helpful," try "You are a marketplace operations assistant. Help users create and manage private offers across AWS, Azure, and GCP. Always confirm pricing details before finalizing."
:::

## User-Level vs Org-Level Agents

When creating an agent, you choose the ownership level:

- **User-level** — Private to you. Any member with the **ADMIN** or **EDITOR** organization role can create user-level agents; a **VIEWER** cannot.
- **Org-level** — Belongs to the organization. **Only org admins** can create org-level agents.

:::warning
Org-level agents can only use **org-level integrations** (MCP servers, API keys, etc.). They cannot access user-level integrations. Make sure the integrations your agent needs are configured at the organization level before creating an org-level agent. That includes a custom MCP server: an org admin can connect one for the whole organization, at the **Organization** level, so org agents can use it — see [MCP](/integrations/mcp/).
:::

## Integrations and Knowledge Bases

Agents do not automatically receive every connection your organization has configured. Their runtime access depends on the agent's ownership level:

| Agent type | Integration access |
|------------|--------------------|
| **User-level** | Uses user-level integrations selected for that agent. |
| **Org-level** | Uses organization-level integrations selected for that agent. |
| **Built-in** (such as Insulin) | Uses allowed user-scope integrations for the current user. |

Each integration you select on a custom agent has an access setting of its own — a select beside it in the agent's **Integrations** list. The levels build on each other: *Read-only looks things up, Edit also changes records, Full also deletes them.*

| Access | What the agent can do |
|--------|-----------------------|
| **Read-only** | Use only that integration's read tools — listing, searching, fetching. Its write tools are removed for this agent, and a tool Fours does not recognise as a read is treated as a write. |
| **Edit** | Read from the integration, and create and change records there, but not delete them. A delete is anything that takes a record out of that service — including what the service calls archiving, trashing, voiding or revoking — and a tool that runs arbitrary queries, such as a SQL statement, counts as one. |
| **Full** | Everything **Edit** allows, plus deleting. This is the default, and it is what an integration selected before the access setting existed keeps. |

Fours takes each tool's level from the integration's own definition of that tool where it has one, and otherwise from the tool's name.

To give an **organization** agent tools for your Fours records — offers, products, entitlements, co-sell referrals and more — an org admin adds the Fours MCP server to its integrations, where it is listed as **Fours MCP**. It is offered only on organization agents and only to org admins. Instead of an access select it carries a fixed **Edit** badge: the agent works on the organization's own credential and can read and change records, but never delete them. Even once it is added, its tools are attached only when the person the agent is working for is an organization **ADMIN** or **EDITOR**; for anyone else, the agent runs without them.

If you connected the Fours MCP server to your own account (see [Connect Fours' own MCP server](/integrations/mcp/#connect-fours-own-mcp-server)), it appears as **Fours MCP** among your personal agents' integrations, and in the Insulin assistant's settings, with a badge showing the access you chose when you connected it — **Read-only**, **Edit**, or **Full**. That level belongs to the connection, not to an agent: to change it, reconnect the server under **Settings → Integration**. If you have not connected it yet, **Grant access** on the chat's input connects it for you in one click, read-only — see [Granting access to your Fours data](/insulin/agents/composer/#granting-access-to-your-fours-data).

Custom agents can also attach knowledge bases. A custom agent searches the knowledge bases configured on it, while the built-in Insulin assistant searches the ones you own by default and lets you narrow that to an explicit set from its own panel; it never searches an organization knowledge base. See [Knowledge Bases](/insulin/knowledge-base/) to create one and fill it with files, websites, or synced connectors, and [Choosing which knowledge bases Insulin uses](/insulin/knowledge-base/agents/#choosing-which-knowledge-bases-insulin-uses) for the Insulin selection.

Each attached knowledge base has an **access mode**:

| Mode | What the agent can do |
|------|-----------------------|
| **Read** | Retrieve and search the knowledge base for grounded context only |
| **Edit** | Retrieve, plus create, update, and deprecate files in the knowledge base (never delete) |

:::info
For organization-level agents, editing integrations requires organization administrator access. This prevents a shared agent from being quietly granted new organization-level tool access by someone without admin privileges.
:::

### What the Insulin assistant may do with your integrations

The built-in Insulin assistant has no integration list to choose from: it can always reach every connection you have made under **Settings → Integration**, except hosting accounts, which are kept for publishing apps and no agent is given. What you can do is narrow what it may do with each one. Open a chat with Insulin, click the **pencil** in the conversation header, and use the panel's **Integrations** section: it lists each integration you have connected, AI model providers and hosting accounts aside, with the same **Read-only**, **Edit**, and **Full** levels as a custom agent. An integration you leave alone stays at **Full**.

- The levels are yours alone: they narrow Insulin for you, not for anyone else in the organization.
- Your own Fours MCP connection shows its access as a badge rather than a select — see above.
- If Fours cannot read your levels when a turn starts, Insulin runs that turn with every integration at **Read-only** rather than risk an action you restricted.
- A CRM action you approve in [Inbox](/insulin/inbox/#running-a-crm-action) is not held to these levels: you approved that one action on that one connection.

### Asking an agent about its own integrations

An agent can inspect the connections it has been given, so you can ask about them in plain language instead of opening Settings and guessing. There is no control to switch on — every agent has these abilities automatically:

- **List its integrations** — which connected systems it can reach, whether each one is user- or organization-level, and when it was connected.
- **Get the details of one integration** — the same record for a single connection, read from what the agent already has loaded rather than by calling the provider.
- **Check whether an integration is working** — a live probe that refreshes an expired OAuth sign-in if it can, then reports the connection healthy or unhealthy along with the reason it failed.
- **List the actions an integration supports** — the provider actions this agent may actually call, given the integration's access level and the kind of turn it is running, each with a description and whether it is read-only, plus non-secret connection details such as an account id or base URL. Credentials are never returned.

Because "is it attached?" and "does it still work?" are answered separately, an agent now tells **not connected** apart from **connected but failing**. Ask *"why can't you update Salesforce?"* and it can distinguish an integration that was never added to its allowlist from one that is on the allowlist but whose credential has stopped working — instead of reporting a live-but-erroring connection as disconnected and sending you to reconnect something that is already connected.

A connection can also be connected but unusable — for example, a Salesforce connection whose stored sign-in is missing the address of your Salesforce instance. The agent reports that one as unhealthy: it is connected, but none of its tools are available in this run, and you should reconnect it in **Settings → Integration**.
