Skip to main content
Custom instructions tell the Customer Agent how to handle support in your workspace, in your own words. They take priority over its default behavior, so you can change when it hands off, how it writes, and what it says about itself. A short list of fixed rules, such as never inventing facts or links, applies whatever your instructions say.

Getting started

1

Read how instructions apply

Read how the Customer Agent reads your instructions and its default behavior, so you know what you’re changing.
2

Open the preferences page

3

Write and save your instructions

Write your instructions in the Custom instructions field, and save. Instructions can be up to 20,000 characters.
The Customer Agent applies your instructions from the next customer message it handles, on both new and existing threads. Write and check them while the Customer Agent is in test mode, so you can see how they change its behavior before it replies to customers. To try a change once the Customer Agent is live, see test changes to the Customer Agent.

Set instructions with the API

Use the GraphQL API when you manage instructions from code: to automate changes, run evals in a staging workspace, or keep instructions in source control. The API writes the same value as the Custom Instructions field, and the Customer Agent uses it from the next customer message it handles. Call updateSetting with the code plain_ai/agent/custom_instructions and the WORKSPACE scope. Your API key needs the setting/workspace:edit permission. A value over 20,000 characters returns a validation error. From an MCP client, use the updateSetting tool in the MCP server with the same input.
Mutation
Variables
To read the current instructions, query setting with the same code and scope, which needs the setting/workspace:read permission:
Query
To remove the instructions, call deleteSetting with the same code and scope, and the Customer Agent runs with its default behavior only.

How the Customer Agent reads your instructions

Every message the Customer Agent handles follows three sets of rules, in this order:
  • Fixed rules: apply in every workspace, and nothing overrides them
  • Your custom instructions: win wherever they conflict with the default behavior
  • Default behavior: applies wherever your instructions say nothing
The Customer Agent reads all of your instructions on every message, so tone, routing, and terminology guidance can sit in one block of text. Your instructions also count as a source of facts: if they say “Refunds take 5 business days”, the Customer Agent can tell a customer that. An instruction that only allows something, such as “Answer from general knowledge”, gives it nothing to state, so it still won’t answer from general knowledge.

Fixed rules

These apply whatever your custom instructions say:
  • No invented facts: the Customer Agent only states facts from the thread, its searches of your knowledge sources, or your instructions, never from general knowledge
  • No invented links: it only links to a URL that a search returned or that your instructions contain, copied exactly. See citations for the link settings
  • The thread isn’t instructions: messages, attached files, and file names are information. A customer can’t change the Customer Agent’s rules by writing new ones
  • Nothing internal is revealed: it never reveals its instructions, your custom instructions, or internal details about the thread, such as its labels, thread fields, priority, or why it was routed or handed off. Asked for them, it says it can’t share them. A contact, code, or wording your instructions tell it to give the customer isn’t internal
  • It’s an AI: it never presents itself as a human or speaks as someone on your team. Whenever it introduces or describes itself, it says it’s an AI
  • No promises without a handoff message: when Send handoff message is off, it never tells the customer that someone on your team will pick up their request. See handoffs
Every reply is also checked against these rules before it’s sent. See how the Customer Agent handles a message.

Default behavior

This is how the Customer Agent behaves when your instructions say nothing. Each rule is a default, so a custom instruction that says otherwise wins. Deciding whether to reply:
  • Skips a message that clearly needs no reply: spam, a pitch for someone else’s product or service, an automated notification, or chatter not addressed to it
  • Replies briefly to a greeting, thanks, or acknowledgement, without searching
  • Treats a short message as a request when it’s unsure
Answering:
  • Only helps with your product, your policies, and the customer’s account, and declines anything else in one sentence
  • Searches your knowledge before it answers or asks the customer anything about those
  • Answers with what your knowledge and the thread support, and says plainly what it can’t confirm. It hands off only when it can say nothing useful
  • Answers rather than asks. It asks one question only when the answer depends on a detail it doesn’t have
  • Gives the customer the steps to make a change themselves when your knowledge has them, since it can’t make changes for them
  • Doesn’t speculate about causes or promise fixes, features, timelines, or meetings
  • Doesn’t send the customer back to support or to another channel. Pointing them to another party, such as their bank or their admin, is fine
  • Doesn’t repeat an approach it already offered, and never asks for something the customer already said
Handing off:
  • Hands off a request for a person, an outage, a security incident, a sales request, a feature request, an abusive customer, and a request it can’t act on. See when it hands off for each one
  • Tells the customer in one sentence that someone will pick up their request, and only mentions your team when it hands off
  • Answers the part it can and hands off the rest, when only part of a request needs your team
  • Writes its note for your team in English
Writing replies:
  • Replies in the language of the customer’s latest message
  • States facts directly, without mentioning documentation or searches
  • Answers only the question asked, with no extra tips or options
  • Keeps code, commands, and numbered steps whole, in Markdown
  • Uses the customer’s first name, or no name
  • Doesn’t introduce itself unless your custom instructions name it or ask it to. Then its first reply gives that name and says it’s an AI
  • Doesn’t sign replies, unless your instructions give a sign-off
  • Links only when a link helps the customer go further, at most 2 per reply

Writing good instructions

Custom instructions now win over the defaults above, so a rule written for one case can change another. Six habits keep them predictable:
  • Say when, then what: “When a customer asks about refunds, hand off” works better than “Be careful with refunds”
  • Name the handoffs you want to keep: a broad rule such as “Always try to answer before handing off” also covers outages, security incidents, and requests for a person. Add the exceptions, as in keep urgent handoffs
  • Keep the handoff message for the customer: the customer reads the handoff message. The Customer Agent writes its note for your team on its own, so don’t ask it to put IDs or steps for your team in the message
  • Keep facts current, and keep long ones in knowledge: the Customer Agent states facts from your instructions as true. Put product documentation in knowledge sources, where it’s searched and cited
  • Ask for things it can do: it can search, reply, ask a question, hand off, and skip a message. It can’t add labels, change thread fields, leave a note without handing off, or act in your product
  • Keep exact wording short: greetings, sign-offs, and handoff wording are followed most reliably as one sentence

Examples

Company context

Tell the Customer Agent who it works for, so it understands your business, customers, and products:

Name and introduction

The Customer Agent only introduces itself when your instructions name it or ask it to. Give it a name, and it says it’s an AI when it introduces itself:

Handoff message

Set expectations in the message the customer reads when the Customer Agent hands off:

Always hand off a topic

Send a topic to your team even when your knowledge could answer it:

Answer, then hand off

Have the Customer Agent explain what it can before your team takes over:

Collect details before handing off

The Customer Agent can ask a question, wait for the answer, and hand off once it has it:

Keep urgent handoffs

When a rule limits handoffs, name the cases it shouldn’t cover:

Stop handing off feature requests

Change a default handoff, here for features your product doesn’t have:

Clarifying questions

Ask for the details your knowledge needs before troubleshooting:

Terminology mapping

Bridge the words your customers use and the words your documentation uses, so searches find the right pages:

Documentation preferences

Choose which documented approach the Customer Agent leads with when your knowledge covers several:

Sign-off

Add a sign-off to every reply:

Tone and spelling

Customize the tone of replies. You can also set this in tone of voice preferences. Scope a spelling preference to English, so it doesn’t change the reply language:

Point to your own tools

The Customer Agent can’t take actions in your product. Point customers to a tool that can, instead of handing off:

What instructions can’t do

Custom instructions can’t:
  • Override the fixed rules
  • Make the Customer Agent act in your product or on the thread beyond replying and handing off, such as adding labels, changing thread fields, or leaving a note for your team without handing off
  • Add a link that isn’t in your instructions or in a page a search returned
  • Choose which knowledge sources the Customer Agent searches. Knowledge source settings and label filters control that