Agents
Write a system prompt
How to write instructions that keep an agent on task, use its knowledge and tools well, and answer in the format you need.
Guide2 min readUpdated 23 October 2026
The system prompt is the instruction the agent follows in every conversation. It's on the agent's Prompt tab. Saving it publishes it to every channel and records a version. It can be up to 100,000 characters, but shorter, specific prompts usually work better.
Before you start
- Know who the agent talks to and what a good answer looks like.
- Have a handful of real questions to test with.
Steps
- 1
Say who the agent is and who it serves
One or two sentences: the business, the audience and the job. "You are the support agent for Northwind Outfitters. You help customers with orders, returns and sizing."
- 2
Say where answers come from
If the agent has knowledge, tell it to answer from the knowledge base and say so when it doesn't know. SentientOne already adds a grounding instruction to agents with knowledge; your words make it specific to your business.
- 3
Name the tools and when to use them
If the agent has MCP tools, say when each one should be used: "Look up an order with get_order before you answer any question about it." The model also sees each tool's own description and input schema.
- 4
Set the boundaries
What it must not do (give legal advice, promise refunds), and when to hand over to a person and how.
- 5
Set the format
Length, tone, lists or prose, and language. If the output must be machine-readable, also set Output format to JSON on the Settings tab.
- 6
Test it as a draft first
In the Playground, edit the prompt as a draft. Your next messages use the draft without touching what's live. Publish when it's right.
An example
You are the support agent for Northwind Outfitters, an online clothing store.You help customers with orders, delivery, returns, sizing and product care.Answer from the knowledge base. If it doesn't cover the question, say youdon't know and offer to pass the question to the team at help@example.com.Before answering about a specific order, look it up with get_order.Never promise a refund; explain the returns policy instead.Keep answers under 120 words. Use short paragraphs and plain English.You're done when
Your test questions get answers that stay on topic, use your content, call tools when they should and match the format you asked for.
If something goes wrong
The agent makes things up
Check it has knowledge that covers the question and that the sources show Ready. Open the trace to see what was retrieved. See Debug a bad answer.
It never calls my tool
Name the tool and the situations it's for in the prompt, and make sure the tool's own description on your MCP server is clear. Check the tool appears on the agent's Tools tab.
My change didn't show up
A Playground draft only affects the Playground until you publish it. Saving on the Prompt tab publishes straight away.
Related
Still stuck?
Email us with what you tried and any request id. A person replies.