Change how an agent answers by editing its instructions, which the model reads on every reply: who the agent is, what it helps with and how it replies. In code they are the agent's system.
Before you start
You need an agent. See Create an agent.
Write instructions
- Change the agent's
system:agents/support.tsimport { agent } from "veryfront/agent"; export default agent({ id: "support", name: "Support assistant", system: `You are the support assistant for an online shop.Help with orders, deliveries and refunds only. For anything else, say you can only help with orders.Reply in at most two short sentences, in plain words.Refunds reach the customer's card within 5 business days. Never promise sooner.End every reply with "Anything else?"`,}); - Start the project with
npm run dev. - Open Chat in Studio.
- Pick Support assistant.
- Ask "Can I get a refund on an order I placed yesterday?". You should now see a short reply that says 5 business days and ends with "Anything else?".
Try it in a sandbox
Create a project
Change the agent's system
Start it
Ask it