All articles
Guide
Implementation, cost and ROI8 min

The system prompt behind your AI agent: what it is and who should write it

An owner commissions an AI agent, a contractor delivers a working bot, and somewhere in between a file appears that everyone calls "the system prompt" — yet few people on either side can say exactly what belongs in it or who is responsible for keeping it accurate six months later. The result is predictable: either the agent sounds generic because a developer wrote the prompt without knowing the business, or it over-promises because an owner wrote it without thinking through edge cases. Here is what a working system prompt actually contains and how to split ownership of it so you are not cleaning up after the fact.

A system prompt is not a knowledge base, and it is not a spec

These are three separate documents, and conflating them is one of the most common reasons an agent underperforms.

  • The spec describes what the agent should do at all — which scenarios it covers, which systems it touches, what outcome the business needs. That conversation happens before development starts; we cover what to put in it in our piece on writing a spec for an AI agent.
  • The knowledge base holds facts: prices, delivery windows, product specs, return policy. The agent looks things up there to answer a specific question. We walk through how to assemble one from what already exists in a company in building a knowledge base from existing materials.
  • The system prompt is neither facts nor a feature list — it is behaviour rules: how the agent speaks, what it can decide on its own, what it must hand to a human, what format it answers in, and what it must never do.

If specific prices or product lists start showing up inside the system prompt, that is a sign knowledge-base content leaked in where it does not belong. Every price update would then force a rewrite of the prompt, when it should be the opposite: the prompt stays stable while the knowledge base changes underneath it.

The six sections a working prompt actually needs

For a chat agent that talks to customers directly, the system prompt usually breaks into six parts.

SectionWhat goes in it
Role and toneWho the agent is to the customer, formal or casual register, whether emoji are allowed, how long replies should run
Source of factsWhere to pull prices and terms from — never invent them
What it can decide aloneAnswering a stock question, booking an open slot, sending a price list
What it must escalateComplaints, unusual requests, discount asks, a customer gone quiet for over a day
Response formatMessage length, use of lists, when to address the manager by name
Hard limitsNever quote a price absent from the knowledge base; never promise a delivery date; never invent a promotion

Anthropic's own guidance on system prompts for Claude recommends setting the role through the system parameter and putting task-specific instructions in the user turn — the same logic applies here: keep "who you are" and "what to do right now" separate instead of blending them into one paragraph.

A weak rule and a working rule: the difference is one trigger

A weak line in a system prompt usually reads well but constrains nothing:

"Be polite and help the customer as much as possible."

That is a wish, not an instruction. The agent has no way of knowing where "help" ends and "promise something the business cannot deliver" begins. A working version of the same rule looks different:

"If the customer asks for a production timeline and the knowledge base has no figure for this product category, do not state a number. Reply: 'Let me check with the workshop and confirm the exact timeline by this evening,' and create a task for the manager tagged 'confirm timeline'."

The difference is not length — it is that the second rule names a concrete trigger (a timeline question with no figure on file), a concrete action (do not guess), and a concrete next step (create a task). A prompt built from rules shaped like the first example reads well on paper and breaks on the first customer who does not fit the happy path.

Who should write it — and why it is rarely one person

In practice, a working system prompt is almost never the work of a single author.

  • A developer working alone knows how to structure instructions and test them against edge cases, but does not know which objections customers actually raise or what the business is willing to commit to. The result is technically sound but hollow — generic lines like "be helpful and professional."
  • An owner working alone knows the product and the customers well but tends to write the prompt as if instructing a person: long paragraphs, no explicit boundaries, no testing against an awkward or provocative question. A model reads that kind of text unpredictably.
  • The manager who actually handles the conversations is often the best source of content: they know which questions come up constantly, where customers push for a discount, and at what point a conversation normally needs to be taken over. But that knowledge needs someone to turn it into structured, testable rules rather than transcribe it as-is.

The working pattern is a pair: a business-side expert — the owner, a sales lead, or an experienced manager — states the rules and the limits, while whoever configures the agent turns that into prompt structure and runs it through test conversations before real customers see it. We describe that same pre-launch testing approach in the piece on assembling a knowledge base — a prompt gets checked the same way: against a set of real questions, not by reading it aloud.

Who owns the prompt after launch

A prompt written once at launch is out of date within the first month: a new service line appears, the return policy changes, or it turns out customers constantly ask about something the rules never anticipated. The agent does not need a developer for every such tweak — it needs someone inside the company who reviews conversations regularly, notices recurring failures, and can state precisely what to add or tighten. That role and its day-to-day duties are covered in the AI agent operator role.

One rule deserves separate attention: anything the prompt lets the agent send to a customer without a pause for review. If a wording mistake slips into the prompt, it reaches the customer before anyone notices. How to build a review step that cannot be accidentally skipped is covered in human in the loop.

Mistakes that show up again and again

  • The prompt gets written once and never versioned. Without a change history, there is no way to tell which edit made the agent start behaving differently — teams end up rolling back everything at once.
  • Numbers and facts get baked into the prompt. A price or a promotion's end date goes stale while the prompt stays put, so the agent contradicts reality.
  • There is no explicit rule for "I don't know." Without one, the model either invents an answer or loops on vague deflections — both irritate the customer.
  • Rules contradict each other. One line says "be brief," another says "explain every shipping option in detail." The agent then behaves inconsistently from one conversation to the next.

FAQ

Can a detailed knowledge base substitute for a separate system prompt?

No. The knowledge base answers "what to say," the system prompt answers "how to behave." An agent with a perfect knowledge base but no behaviour rules will still over-promise or fail to escalate a difficult case in time.

How long should a working system prompt actually be?

Length is not the measure that matters — each rule needs a clear trigger and to be testable. In practice, a working prompt for a sales or support chat agent fits on one or two pages; if it keeps growing far past that, facts that belong in the knowledge base have usually crept in.

How do you know it is time to rewrite the prompt rather than patch it?

When edits accumulate and start contradicting one another, and the people running the agent can no longer remember what was already added, that is the signal to rebuild the structure rather than keep layering patches on top.

Does the system prompt need legal or compliance sign-off?

If the agent operates in a regulated area — banking, insurance, healthcare — yes. The wording around what the agent may promise and how far it can go discussing terms is worth a review before launch, not after the first complaint.

If you are planning an AI agent rollout and want to be clear from the start on who writes what, you can raise it in a first conversation with the Unika Solutions team, or see the kind of work we already do in AI agents for business.

Subscribe to AI Insights

Case studies, tips and AI automation trends — weekly

Want similar results?

Get a free consultation and ROI calculation for your company

Free Consultation

Related Articles

Guide

Customer Consent to Data Processing When an AI Agent Is the One Replying

The customer is messaging a bot, not a person — but the requirement to get consent for data processing does not disappear. Here is when to ask for it, how to set it up across channels, and what to log.

Guide

AI on your own server: when you genuinely need it, and when it only feels that way

"It's safer" isn't an answer. We separate the checkable reasons for self-hosting AI from the outdated fear driving most of these decisions.

Guide

Open-weight models or a commercial API: which one your business should run on, and when self-hosting pays off

"Host the model ourselves and it's free and private" sounds right until you price the GPU, the engineer and the quality gap. Three options and the criteria that decide between them.

Guide

Support after launch: what happens to your AI agent a month in

Launch isn't the finish line — it's the start of a different job. Here's what usually happens to an agent in its first month: where it starts drifting, who should notice, and what a weekly review should look like.

Guide

After the pilot: how to scale your AI agent to other departments without repeating the same mistakes

A successful pilot in one department doesn't mean the rest of the company is ready for the same agent. How to choose the next department and what to re-check each time.

Guide

Testing an AI agent before launch: the scenarios to run so your first customers don't become your testers

Which conversations to run through your agent before a real customer sees it — routine questions, grey zones, provocations, integration failures and human handoff, with a test case template.

AI agent system prompt: what it is and who writes it | UNIKA