# How Agents Work

An agent is an AI assistant with defined instructions, model configuration, optional integration access, and optional knowledge bases. Skills are not attached to one agent: a personal agent loads the skills you have enabled, and an organization agent your organization's, when they apply (see [How Agents Use Skills](/insulin/marketplace/skills/#how-agents-use-skills)). Each agent is tuned for a particular domain — from writing code to managing CRM data to analyzing revenue.

The default **Insulin** agent acts as your chief of staff: a general-purpose assistant for the everyday business work your teams bring to it, marketplace operations included. It is built in and cannot be edited or deleted, unlike the catalog and custom agents you install or create.

Fours also ships the **Co-sell Agent**, a built-in org-level agent that works your AWS co-sell referrals. It is set up in the co-sell area, in **Co-sell › Settings › AI Agent** (see [Co-sell Agent](/cosell/ai/agent/)), and the Insulin assistant can hand co-sell work to it — see [Handing co-sell work to the Co-sell Agent](#handing-co-sell-work-to-the-co-sell-agent).

![An installed agent (Code Reviewer) — its welcome message and conversation starters shown in a fresh conversation; the sidebar lists your installed agents with ownership badges (system / org / user)](../images/08-insulin-agents.png)

## What happens on a turn

Each message you send starts one **turn**, and every turn runs through the same steps:

1. **The agent is loaded** with its instructions, its default model, and the integrations and knowledge bases
   it may use, each at the access level it was given.
2. **Its tools are assembled** from those grants: your connections, your Fours data if you have
   [granted access](/insulin/agents/composer/#granting-access-to-your-fours-data), knowledge-base search,
   memory, and the [skills](/insulin/marketplace/skills/) you have enabled. Today's date in your time zone goes
   in with your message.
3. **A model is chosen**, your own connected providers first and then the hosted pool your organization allows,
   and the turn fails over down that list if a call fails (see [Model Selection](/insulin/agents/models/)).
4. **Billing is checked before any model is called.** If AI is paused for billing, the turn stops there (see
   [When AI pauses](/insulin/billing/when-ai-pauses/)).
5. **The reply streams** while the agent works. Each tool call shows as a chip, and multi-step work shows a plan
   checklist (see [Tools and Approvals](/insulin/agents/tools/)). A Slack post is the call that stops for your
   **Allow** or **Deny** before it runs.
6. **The turn is saved** with the conversation, so you can close the window and come back to it.

*Diagram: A turn loads the agent, assembles its tools and chooses a model; unless AI is paused for billing the reply streams, a Slack post waits for approval, and the turn is saved with the conversation.*

- 1. Load the agent (instructions, default model, integrations, knowledge bases) → 2. Assemble its tools (connections, Fours data, search, memory, skills)
- 2. Assemble its tools (connections, Fours data, search, memory, skills) → 3. Choose a model (your providers first, then the hosted pool)
- 3. Choose a model (your providers first, then the hosted pool) → 4. AI paused for billing?
- 4. AI paused for billing? → The turn stops: yes
- 4. AI paused for billing? → 5. Stream the reply (tool calls and plan progress as they run): no
- 5. Stream the reply (tool calls and plan progress as they run) → Tool Approval Required (a Slack post waits for Allow or Deny): a Slack post
- 5. Stream the reply (tool calls and plan progress as they run) → 6. Save the turn (with the conversation)

## Handing co-sell work to the Co-sell Agent

The built-in Insulin assistant can pass a question about your co-sell referrals to your organization's Co-sell Agent and answer you with what it finds: a referral's status, its AWS score, the proposals waiting for approval, its run history, or research into the deal. Insulin decides to do this on its own when you ask about co-sell referrals; there is nothing to pick.

It does so only when your organization has the Co-sell Agent turned on and you have access to it. Organization ADMINs and EDITORs have access by default, and so does anyone the agent is shared with (see [Co-sell Agent](/cosell/ai/agent/)).

| Where you ask | Can Insulin hand off to the Co-sell Agent? |
|---|---|
| A one-on-one chat with Insulin in the web workspace, on the main thread | Yes |
| The console's Home chat | Yes |
| Slack: a direct message with the app, or a channel where you @mention it | Yes |
| A reply in a [sub-thread](/insulin/agents/conversations/#sub-threads), an Insulin [channel](/insulin/channels/), a [job](/insulin/jobs/), or Microsoft Teams | No |
| A custom agent, or any agent other than Insulin | No |

- **It sees only the request.** Insulin writes the Co-sell Agent a request; the Co-sell Agent never sees your conversation.
- **It works with the organization's connections, not yours.** The Co-sell Agent runs as it does in its own chat, with the integrations and knowledge bases its settings give it, such as your CRM and Gong. Insulin itself still holds none of them; it gets back only the Co-sell Agent's answer.
- **It can't approve or reset anything itself.** For that, Insulin gives you the referral's link so you can act on the referral page.
- **A Slack post still waits for you.** If the Co-sell Agent wants to post a Slack message, Insulin's turn pauses on the same [Tool Approval Required](/insulin/agents/tools/#tool-approvals) card.
- **If your organization role can't be read, or the Co-sell Agent can't be looked up,** Insulin answers without it rather than failing the turn.

In the conversation, the hand-off and every tool the Co-sell Agent runs show as [tool-call chips](/insulin/agents/tools/#tool-calls) named after it.

*Diagram: Insulin sends the Co-sell Agent only the request; the agent reads the organization's sources and answers through Insulin, and a Slack post waits for your approval.*

- You ask Insulin about a co-sell referral → Insulin assistant (your own connections): your question
- Insulin assistant (your own connections) → Co-sell Agent (the organization's co-sell connections): the request only
- Co-sell Agent (the organization's co-sell connections) → CRM, Gong, knowledge bases and your co-sell referrals: reads
- Co-sell Agent (the organization's co-sell connections) → Tool Approval Required (for a Slack post): wants to post to Slack
- Co-sell Agent (the organization's co-sell connections) → Insulin assistant (your own connections): its answer
- Insulin assistant (your own connections) → You ask Insulin about a co-sell referral: the reply
