Tips for a great agent

About 10 minutesUpdated July 2026

Great agents come from a short, repeatable loop — not one perfect prompt. Here are the habits our best-performing customers converge on.

A great Qalyb agent is rarely the result of one perfect prompt. It comes from a short, repeatable loop: write tight instructions, give the agent clean Data sources, test it in the Playground on the channels you'll actually use, and tighten it from what you see in real conversations. This page collects the defaults that pay off every time.

The 30-minute first pass:
generate an agent from your website in the onboarding wizard, then spend the next half hour in the Playground hardening the instructions and Data sources. Most of the quality you ship comes from that first iteration loop — not from getting everything right before the first test.

Write instructions like a checklist, not an essay

The system prompt is the single biggest lever on agent quality. Long, narrative prompts bury the rules the model actually needs to follow. Keep it scannable and structured. A reliable shape is: Role, What you can do, What you must NOT do, Tone, and Escalation.

system-prompt.md · text
# Role
You are the booking assistant for Acme Clinic in Muscat. You answer in the
caller's language and confirm appointments.

# What you can do
- Look up availability and book/reschedule appointments.
- Answer questions using the clinic's Data sources only.

# What you must NOT do
- Never quote prices that aren't in your Data sources.
- Never give medical advice. If asked, say a doctor will advise on the call.

# Tone
Warm, brief, professional. One question at a time. Confirm before booking.

# Escalation
If the caller is upset or asks for a human, call transfer_call to +96812345678.

A few rules that pay off every time:

  • State the negative space. Models follow explicit prohibitions far better than implied ones. "Never quote a price that isn't in your Data sources" beats hoping it won't.
  • One job per agent. A focused "bookings" agent outperforms one asked to do bookings, support, and sales. Split responsibilities and use transfer_call to route between agents.
  • Put the greeting in First Message, not the prompt. The agent's opening line is its own field — it sets language and tone from the first second.
  • Use variables for anything per-conversation. Write {{customer_name}} or type @ in the prompt editor to insert a variable, then fill it per call instead of hardcoding.

The full guide to instructions is at What your agent says.

Voice and chat read the same prompt differently:
for voice, prefer short sentences the agent can say in one breath and avoid lists, markdown, and URLs it would read aloud literally. If a rule should only apply on one channel, add it to the agent's own instructions and scope it to voice or chat rather than duplicating the whole prompt.
app.qalyb.ai/agents/[id]
Screenshot: the agent builder Prompt & Variables section with the @-mention system prompt editor and Variables manager
Keep the system prompt structured and short; insert per-conversation values as @-variables.

Structure Data sources so retrieval can find the answer

Data sources (knowledge bases) are how the agent answers from your content instead of guessing. Each base is indexed for retrieval, and the agent searches it at conversation time. There is no separate "retrain" step — adding, editing, or re-scraping a document re-indexes it immediately. See Add your business info.

  • One topic per base, not one base per company. Separate bases (for example "Pricing", "Policies", "FAQ") give the agent cleaner, tighter tools to choose from. Each attached base becomes its own search action named after it, so a clear name like Pricing helps the model pick the right one.
  • Keep documents short and self-contained. A page that answers one question retrieves better than a 40-page PDF where the answer is buried on page 31. Prefer pasted Text or scraped URL docs for FAQs; reserve file uploads for content you genuinely have only as a document.
  • Watch the status pill. A base only becomes a searchable action once its status is ready. Documents that are pending or failed are silently skipped at runtime, so the agent won't be able to answer from them.
  • Re-scrape instead of letting URLs go stale. URL documents have a Re-scrape action that pulls fresh content from the live page.
Knowledge bases index text only:
images, audio, and video are rejected — only text documents (PDF, DOCX, TXT, MD, CSV, JSON, HTML, code) are indexable. Total content is capped per plan (Free 400 KB, Starter 10 MB, Pro 20 MB, Ultra 40 MB), so curate rather than dumping everything in.

Pick the voice and dialect for your callers, not for you

Voice and tone live in the Persona — a reusable bundle of Voice, Language, optional Accent, Communication Style, Personality Traits, and free-text Speaking Instructions that every agent attaches to. The single highest-impact choice is dialect match.

  • Match the dialect to your audience. Gulf Arabic callers should hear a Gulf voice. A mismatched dialect reads as "foreign" long before anything else about the agent does.
  • Set the language explicitly. Pick the persona Language so the agent locks to it from the first turn instead of drifting.
  • Use Speaking Instructions for delivery, not facts. "Speak slowly, confirm numbers digit by digit" belongs here; product facts belong in Data sources.
  • Reuse one persona across related agents. A consistent brand voice across your bookings, support, and sales agents is worth more than a slightly different voice for each.
Accents are curated per workspace:
the Accent dropdown only lists accents that an admin has added for the persona's language. If it's empty or disabled, the persona still works — language and Speaking Instructions carry the dialect on their own.

Test in the Playground before you connect a channel

The Playground is your fastest feedback loop and the page you land on after login. It previews the selected agent through channel-accurate skins — Web Chat, Telegram, Email, Phone, and the Voice Widget (WhatsApp, Instagram and Messenger coming soon) — over the same transport your callers will use. Test on the channels you actually intend to deploy, because their capabilities differ. See Test before going live.

Select the agent and set variables

Choose the agent in the top-bar switcher. If it defines prompt variables, fill the required ones in the "Set up the conversation" gate so they're substituted before the first turn.

Test the channel you'll ship on

Pick the channel in the left rail. Web Chat and the Voice Widget render from your saved widget theme; switch to Phone to place a real outbound test call or simulate an inbound one.

Probe the edges, not just the happy path

Try gibberish, a question that should hit a Data source, an escalation request, and an off-topic ask. You're looking for where the agent over-promises, invents facts, or fails to hand off.

Fix and re-test in place

Use Edit agent to adjust the prompt or Data sources, then restart the conversation. Editing variables mid-session also restarts cleanly so you're always testing the current config.

The Free plan is Playground-only:
on the Free plan you can build and test one agent in the Playground but can't deploy it to a channel until you upgrade. Use that runway to get the agent genuinely good before you connect WhatsApp, phone, or the web widget.
app.qalyb.ai/playground
Screenshot: the Playground with the channel rail on the left and the agent switcher in the top bar, mid-conversation
Preview the agent on each channel skin and live-test before deploying.

Add AI Actions only when the agent needs to do something

AI Actions are the tools an agent can call. Reach for them when an answer requires doing something — searching the live web, ending or transferring a call, or hitting one of your systems — not for things a Data source already covers. Adding tools the agent never needs only widens the surface for it to call the wrong one.

  • Built-in actions cover the common cases: web_search for current information, crawl_website to read a site into a Data source, end_call to hang up gracefully, and transfer_call to route to a number or another agent. Add transfer_call to almost every voice agent so it always has a human escape hatch.
  • Integrations connect external apps (calendars, CRMs, helpdesks) through the AI Actions catalog. An admin connects the app once; agents then toggle its tools on.
  • Prefer a Data source over web_search for stable facts. Your own hours, pricing, and policies should live in a base, not be re-searched on every call — it's faster, cheaper, and on-brand.
Some actions are metered and admin-gated:
each web_search and each Data-source query consumes a metered credit, so lean on them deliberately. Connecting a new integration requires an org admin, and the number of integrations you can attach per agent depends on your plan.

Capture what matters with Success Criteria and Data Extraction

Two post-analysis settings turn raw conversations into something you can measure and act on. Configure them in the agent's Post-analysis section.

  • Success Criteria let you define weighted, scored checks (with a passing score) so every conversation is graded against what "good" means for this agent — for example "confirmed the appointment" or "captured a callback number".
  • Data Extraction pulls named fields out of each conversation so you get structured outcomes instead of transcripts to read.
extraction-schema.json · json
[
  { "name": "caller_name",      "type": "string",  "required": true },
  { "name": "appointment_date", "type": "string",  "required": true },
  { "name": "is_new_patient",   "type": "boolean", "required": false }
]

Start with two or three fields you would otherwise copy by hand. Over-specifying the schema early makes extraction noisier, not better.

Iterate from real conversations

The agent you ship is a draft. Every Playground session and every real call is persisted, so the highest-leverage work after launch is reading conversations and tightening the agent against what actually happened.

  • Read transcripts where it went sideways. The fix is almost always a missing prohibition in the prompt, a stale or missing Data source, or a tool the agent should (or shouldn't) have.
  • Change one thing at a time. Tighten a single rule or document, re-run the same scenario in the Playground, and confirm the regression is gone before moving on.
  • Promote what works. When an agent is dialed in, admins can Save as Template so the next agent starts from a proven baseline instead of a blank prompt.
  • Keep the prompt lean as it grows. When you add a rule for an edge case, check whether an older rule is now redundant. Prompts rot by accretion; prune them.
A tight loop beats a perfect first draft:
generate, test the edges, fix one thing, re-test. Customers who ship great agents run this loop five times in an hour — they don't spend an hour writing the perfect prompt up front.
Was this guide helpful?