> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.messageblue.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.messageblue.ai/_mcp/server.

# AI Agent Studio

Route `/agent`

Find it Left rail → AI Agent

Who can open it Admins and team members

AI Agent Studio is where you *"give your app an AI agent that replies to incoming iMessages automatically."* It is organised as five tabs — **Configure**, **Knowledge**, **Integrations**, **Test** and **Activity** — and a status badge with a deploy control that sits above all of them.

## Configure

### Model

A single dropdown chooses the model behind every reply. The catalogue spans five families:

| Family               | Options                                                                                                                                     |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| **OpenAI**           | GPT-4o *(recommended)*, GPT-4o Mini *(faster)*, GPT-4.1, GPT-4.1 Mini *(faster)*, o3 *(reasoning)*, o3-mini *(reasoning)*, o1 *(reasoning)* |
| **Anthropic**        | Claude Opus 4.8, Claude Sonnet 4.5, Claude Haiku 4.5 *(faster)*                                                                             |
| **Google**           | Gemini 2.5 Pro, Gemini 2.5 Flash *(faster)*, Gemini 2.5 Flash Lite *(fastest)*                                                              |
| **Reasoning / open** | DeepSeek V3, DeepSeek R1 *(reasoning)*, Grok 4.5, Llama 3.3 70B, Mistral Large, Qwen 2.5 72B, Qwen 2.5 VL 72B *(vision)*                    |

GPT-4o is marked *recommended* and is the sensible default. The `(faster)` variants trade some quality for latency and cost — worth considering because a customer is waiting on the other end of a text message.

### System prompt

The instruction set that defines your agent's job. The placeholder shows the expected shape:

```text
You are the customer support agent for Acme Dental.
Answer questions about opening hours, appointments and pricing.
If you cannot help, tell the customer a human will follow up shortly.
```

Every save **versions the prompt in Langfuse**, and deploying promotes the latest version to production. You therefore have a full history of prompt changes, and saving a prompt is safe — it does not change what live customers see until you deploy.

![AI Agent Studio Configure tab showing the model dropdown, system prompt box and the Remember customers toggle](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/message-blue.docs.buildwithfern.com/f5280b4afad64562ba821731c951d7a8592b176dce176a3859c2c38ae20263de/docs/assets/frontend/agent-configure.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260916%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260916T201510Z&X-Amz-Expires=604800&X-Amz-Signature=b608479ed81206cdfbd029aecf547266e806f04618173ad3f7ebcaa90584ba8f&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)

### Memory

**Remember customers between conversations**:

> Your agent keeps a short set of durable notes per customer — stable preferences, constraints and anything they explicitly ask it to remember — and reads them back on future messages. Turn this off and each conversation starts cold.

Turning it off is non-destructive: existing notes are kept, just not read or added to, and turning it back on restores them. Use it as a switch, not a delete.

### Agentic flow

**Agentic flow (multi-step tasks)**:

> Lets the agent work a request over several steps — looking things up, calling your connected tools, then replying once it has an answer. It tells the customer up front that it will take a few minutes. Turn this off and every message gets a single direct reply instead.

That "tells the customer up front" behaviour matters: a multi-step run is slow by nature, so the agent acknowledges the request before disappearing to work on it. Leave the switch off for straightforward question-and-answer, where it only adds latency and cost.

**Max tokens per run**:

> Total tokens one task run may use before it stops and answers with what it has — the customer still gets a reply, just a shorter-researched one. Leave blank for the platform default. Ordinary one-shot replies are not affected.

Hitting the cap is a soft landing, not a failure — the agent stops researching and answers with what it has. The customer always gets a reply. Two things follow: the ceiling is genuinely safe to set low while you are calibrating cost, and the cap applies only to agentic runs, so ordinary one-shot replies are never affected by it.

![Configure tab scrolled to show the agentic flow toggle, Max tokens per run field and the Multi-step tasks section](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/message-blue.docs.buildwithfern.com/86d1ca480082d83f8c774219bed879e0baad1eff1404e1f9d6495602face956d/docs/assets/frontend/agent-configure-agentic.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260916%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260916T201510Z&X-Amz-Expires=604800&X-Amz-Signature=96b51c9cc0a990da2afccbaa3f3c2638b733aa8d7641079477e434bb3f8195e6&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)

### Multi-step tasks

Optionally, name the jobs the agent is expected to handle. Each task has a **name** and a **goal**:

| Field     | Example                                                                       |
| --------- | ----------------------------------------------------------------------------- |
| Task name | `Book an appointment`                                                         |
| Goal      | `Find a free slot, confirm it with the customer, then put it in the calendar` |

Rows are added with **Add task** or the **+** on the last row, and removed with the bin icon.

![Multi-step tasks section with one empty task row showing name and goal placeholders, a bin icon and a plus icon](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/message-blue.docs.buildwithfern.com/3b82e02294dbdd2b494649f25abcb548834a4ddc72559f716860e705c2db4b56/docs/assets/frontend/agent-multistep-task.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260916%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260916T201510Z&X-Amz-Expires=604800&X-Amz-Signature=871d72777a0e475dc27d59230bb21475ba954e80eb73580865fa565c20d74218&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)

The two fields carry their own examples as placeholders, which is the clearest guidance on how specific to be: a short recognisable **name**, and a **goal** written as the sequence of steps you expect.

Defining tasks is genuinely optional — with none defined, *"the agent works out what's being asked on its own."* Define them when you want predictable handling of your most common requests.

Nothing on this tab takes effect until **Save configuration**, which confirms with *"Agent configuration saved. Prompt versioned in Langfuse."*

## Deploying

Saving and deploying are deliberately separate.

#### Save

Writes the configuration and versions the prompt. Live behaviour is unchanged.

#### Deploy

Promotes it. The app confirms with *"Agent deployed 🎉 — Your AI agent is now live and replying to incoming iMessages."*

#### Pause, if needed

**Pause agent** stops automatic replies immediately: *"The agent will no longer reply to incoming messages."* The configuration is kept, so deploying again resumes exactly where you left off.

Pausing is the fastest way to stop an agent that is behaving badly — faster than editing the prompt, and reversible.

## Knowledge

Knowledge is what the agent retrieves from to ground its replies: *"Menus, price lists, FAQs, and website content."* Without it, the agent knows only what is in the system prompt.

#### Upload a file

**PDF / DOCX** or **CSV**. Menus, price lists and brochures. Scanned PDFs are read with vision OCR, so image-only documents still work.

#### Add a website

Give a URL and MessageBlue crawls the page and indexes its content.

#### Paste notes / FAQ

Free text, for facts that live nowhere else — *"Hours: Mon–Fri 9–6. Parking in rear. We take walk-ins…"*

![Knowledge tab showing Upload a file, Add a website and Paste notes / FAQ inputs](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/message-blue.docs.buildwithfern.com/ef58d15cfd67fd887bbb2ba08c0a6d407b07daf320fef4cfc5d0842f18f6dde1/docs/assets/frontend/agent-knowledge.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260916%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260916T201510Z&X-Amz-Expires=604800&X-Amz-Signature=abce5a28cfec8040611b1884829c38aa809d3777538e73f974c3e360df023b50&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)

Everything you add appears under **Indexed knowledge**. Indexing is asynchronous — a website shows *"We are crawling and indexing it now."* and pasted text *"Your text is being indexed."* — so a newly added source takes a moment before the agent can answer from it.

Removing a source deletes both the source and what was indexed from it: *"Asset and its indexed content were deleted."*

## Integrations

Integrations connect your business apps through **unified.to** OAuth so the agent can answer from live data rather than static documents. Each service can be connected in one of two fundamentally different ways, and the app asks which one you want:

#### Connect for the bot

The agent answers from the **business's own account**. One connection, used for every conversation. Right for a shared calendar, catalogue or CRM.

#### Enable for customers

Each customer connects **their own account** through a private link, and the agent acts on their behalf. Right when the data is personal to the customer.

You are asked this every time you enable a service — the choice is per provider, not a global setting:

![Enable Affinity dialog headed How should this integration be used, offering Connect for the bot and Enable for customers](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/message-blue.docs.buildwithfern.com/6361653f8b5798bb4c93cd128bf8968fd4b3d167e39179fb6b0e632c1adeee9a/docs/assets/frontend/agent-integration-choice.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260916%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260916T201510Z&X-Amz-Expires=604800&X-Amz-Signature=69d05730b7e562c0e2500fc1e5e9367a9a5685dc59414830a2042bd45252c612&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)

Choosing *Enable for customers* is what produces the [Connect your accounts](/customer-connect) link you send to a contact.

![Integrations tab showing an empty Connected for the bot section and Cal.com, GitHub and Atlassian Jira enabled for customers](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/message-blue.docs.buildwithfern.com/260847793b4fbe7c59ca1d7c71fd31f9b723b0cbd0eec402047e2c2925336329/docs/assets/frontend/agent-integrations.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260916%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260916T201510Z&X-Amz-Expires=604800&X-Amz-Signature=2b2b32aaba8c530b70b80ede265b532d4a1f0d13db8d217b20134edb96615391&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)

Connected providers are badged with the capabilities they expose — `calendar`, `repo`, `auth`, `task`, `storage` — so you can see at a glance what the agent gains from each one.

The catalogue is searchable and filterable by category, and each entry is badged **Connects via OAuth** or **Connects via API key**. **Refresh** re-pulls whatever you have activated in your unified.to workspace — if a service you expect is missing, activate it there first, then refresh.

If the tab says *"Integrations aren't configured yet — add the unified.to workspace + API key on the backend to enable this."*, the environment has no unified.to credentials. That is a backend configuration matter, not something to fix here.

## Test

The test bench runs *"the latest saved prompt against the app's knowledge (RAG) — without sending a real iMessage or touching conversation history."*

This is worth reading twice. Testing is safe in both directions: no customer receives anything, and nothing you type here pollutes a real conversation's history. It exercises the **saved** configuration, so save before you test.

Type what a customer might send, optionally attach an image, and read the reply.

![Test your agent tab with a message field, Test button and Attach image control](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/message-blue.docs.buildwithfern.com/cfff7ab65e32f9ad603266158ec056b06eb95af293746a3d8a4ca34cdb7df429/docs/assets/frontend/agent-test.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260916%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260916T201510Z&X-Amz-Expires=604800&X-Amz-Signature=a173c87eb9b9e71a62a79772269e7048f1e85a4c5bb69f8588f75de35a24cb40&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)

Attachments are not faked for the test:

> Attachments upload exactly as a real inbound one does, so this exercises the whole path — including whether the model provider can fetch them. The model must support that input type; if it can't, it will say so rather than guess.

That makes the bench a genuine integration test of the media path, not just a prompt playground — if your chosen model cannot read images, you find out here rather than from a customer.

Images are supported; voice notes are not. Attaching audio shows *"Attach an image. Voice notes are not supported at the moment."*

## Activity

A live feed of *"incoming messages, agent replies and delivery statuses."* — the fastest way to confirm a freshly deployed agent is actually doing something. A new app shows *"No activity yet."*

![Recent activity feed listing message.received, agent.reply.sent and message.status events with timestamps](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/message-blue.docs.buildwithfern.com/41a8917b16c6ca430a45c19fdfad66c198176d901489a09e2f71d862c3c8fc54/docs/assets/frontend/agent-activity.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260916%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260916T201510Z&X-Amz-Expires=604800&X-Amz-Signature=8e09e163f9e754032ca2fa5201d88f3dae74b1e14f17fc80a04ad08eefa7a0f2&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)

Events are typed, and the three you will see most are:

| Event              | Meaning                                     |
| ------------------ | ------------------------------------------- |
| `message.received` | An inbound message arrived, with its text   |
| `agent.reply.sent` | The agent answered, with the reply it sent  |
| `message.status`   | A delivery transition — `sent`, then `read` |

Reading top to bottom gives you the whole round trip for a single customer turn: the message came in, the agent answered, the reply was delivered and then read.

For aggregate numbers rather than individual events — what the agent is costing you, which models it used — see [Analytics](/analytics#token-usage).