Procedures: build step-by-step playbooks for your AI agent
Procedures let you teach your AI agent to handle specific requests with a
repeatable, multi-step flow — the same way you'd train a new teammate. When a
customer's message matches what a procedure is for, the agent follows your steps
in order: asking questions, looking things up, using your tools, getting a
teammate's approval when needed, and resolving the request.
This guide covers what Procedures are, how to build one, and how they behave in a
live conversation.
When to use a Procedure
Your AI agent already answers questions on its own from your knowledge base. Use
a Procedure when a request needs a specific sequence of actions rather
than a single answer — for example:
- Processing a refund (verify the order → check eligibility → refund or explain)
- Quotes or plan recommendations (collect details → calculate → recommend)
- Anything that needs a teammate's approval before acting
- Anything that collects information across a few messages
If a request can be answered in one reply from your help articles, you don't need
a procedure — let the agent handle it normally.
Create a Procedure
- Open Procedures in the sidebar and click New procedure.
- Name it clearly (e.g. "Refund request").
- Describe when it should run. In the trigger field, write the customer
intent that should start it, in plain language — like "The customer wants a
refund or to return an order." The agent matches on meaning, so you don't
need exact keywords. - Add your steps (see the building blocks below).
- Save, then turn it on to make it live. While it's off it stays a draft
and won't run.
💡 Start simple. A few clear steps work better than a long, deeply branched flow.
The building blocks
Add steps from the + Add step menu. Each block does one thing:
Using your tools inside a step
While writing a step, type @ to mention a tool — your custom actions, MCP
tools, and built-ins appear in a list. Mentioning a tool lets the agent use it
for that step only, so it can't reach for anything it shouldn't.
How a Procedure behaves in a conversation
- It starts automatically. When a customer's message matches a procedure's
trigger, the agent begins following it — no command needed. - One at a time. A conversation runs one procedure at a time. If the customer
clearly switches to a different request, the agent switches too. - It asks and waits. On an Ask the customer step, the agent sends the
question and waits — even if the customer replies a while later, it resumes
right where it left off. - It can pause for your approval. On a Wait for approval step, an
Approval needed prompt appears on the conversation with Approve /
Reject buttons. The procedure continues down the matching branch once you
decide; the customer is told you're checking in the meantime. - It handles side questions. If the customer asks something unrelated mid-flow
("by the way, what are your hours?"), the agent answers it from your knowledge
base, then steers back to the procedure — without losing its place. - It speaks naturally. Replies are written in the customer's language and your
brand's tone. Your step text is guidance for the agent, not a script it reads
aloud. - It ends cleanly. When the flow reaches End (or hands off), the
conversation wraps up with a clear message.
Example: a refund procedure
- Ask the customer — "What's the order number you'd like refunded?"
- Use a tool — look up the order.
- If / Else — If the order is within 30 days:
- Wait for approval — "Approve refund for this order?"
- If approved: Use a tool to process the refund → Step: confirm to
the customer. - If rejected: Step — explain it can't be refunded and offer options.
- If approved: Use a tool to process the refund → Step: confirm to
- Otherwise: Step — explain the 30-day policy.
- Wait for approval — "Approve refund for this order?"
- End — "Thanks for reaching out — anything else I can help with?"
Tips & best practices
- Write triggers by intent, not keywords — describe what the customer wants.
- Keep steps focused — one action or message per step is clearer and more reliable.
- Use approvals for anything sensitive — refunds, account changes, etc.
- Only mention the tools a step needs — it keeps each step precise.
- Test it in your widget before turning it live for everyone.
Quick start: Create your first Procedure
Procedures are step-by-step playbooks your AI agent follows to resolve specific customer requests — booking a demo, checking an order, processing a refund. When a conversation matches a procedure's trigger, the agent works through your steps top to bottom, pausing to ask the customer, calling tools, branching on conditions, or handing off to a teammate exactly where you tell it to.
This guide walks you through building one from scratch in about five minutes, using a "Book a demo" example.
[Image blocked: The Procedures page with the New procedure button]The Procedures list — click New procedure (top right) to start.
1. Create the procedure
- In the left sidebar, go to Procedures.
- Click New procedure (top right).
You'll land straight in the procedure editor with an "Untitled procedure". Give it a clear name at the top — e.g. Book a demo — so your team can find it later.
[Image blocked: The procedure editor with name, Draft badge, When to use, and Steps]The procedure editor — name at the top, the Draft badge, and the When to use this procedure and Steps sections.
At the top you'll also see a Draft badge. A procedure only runs once it's set Live — we'll do that at the end, after it's built and tested.
2. Define when it should run
The When to use this procedure box is how the agent decides whether a conversation matches. Describe the customer intent in plain language — and, just as importantly, when it should not fire.
For our example:
Trigger when the customer wants to book or schedule a product demo.
Only trigger if the customer:
- asks to book, schedule, or set up a demo or call
Do not trigger if:
- they only ask about pricing or features
- they already have a demo booked and want to reschedule
Tip: Be specific about the "do not" cases. The clearest line you can draw is the one between this procedure and the next one, so the agent doesn't fire the wrong playbook.
(The filled-in trigger box is shown in the editor screenshot above — it grows to fit as you type.)
3. Add the steps
This is the heart of the procedure. Click + Add step to open the step menu — each step type does a specific job:
[Image blocked: The Add step menu showing all step types]The + Add step menu — every step type in one place.
Steps run top to bottom. You can reorder or delete any step with the controls that appear on hover.
Build the "Book a demo" flow
Step 1 — Ask the customer. Add an Ask the customer step:
What day and time works best for your demo?
This is the key one to get right: an Ask the customer step pauses the procedure until the customer replies. (A plain Step that says "ask them…" does not pause — the agent keeps going. When it matters that the agent waits, always use an Ask the customer step.)
[Image blocked: An Ask the customer step with the pauses-until-they-reply hint]An Ask the customer step — note the "pauses until they reply" label.
Step 2 — Use a tool. Add a Use a tool step, select your calendar/booking tool, and describe what to do:
Check availability for the requested time and book the demo.
You can also reference a tool inline inside any step's text with Insert tool (the @ button) — handy when a single instruction touches more than one tool.
[Image blocked: A Use a tool step with a tool selected and an instruction]A Use a tool step — pick a connected tool, then tell the agent what to do with it.
Step 3 — If / Else. Add an If / Else step to handle the two outcomes:
- Condition: the requested time is available
- IF: Confirm the booking and tell the customer they'll receive a calendar invite.
- OTHERWISE: Offer the three nearest available times and ask them to pick one.
(The completed If / Else step, with its IF and OTHERWISE branches, is shown in the full procedure below.)
Step 4 — End. Add an End step with a friendly closing message:
Great — your demo is booked! You'll get a calendar invite shortly. Anything else I can help with?
[Image blocked: The full assembled Book a demo procedure with all four steps]The full Book a demo procedure — Ask → Use a tool → If / Else → End.
4. Writing effective steps
A few habits that make procedures reliable:
- Write for a smart new teammate. Plain, direct instructions ("Confirm the booking and share the invite") beat vague ones ("handle the booking").
- One action per step. Smaller steps are easier for the agent to follow and easier for you to debug.
- Use the right pause. Ask the customer and Wait for approval are the only steps that pause — reach for them whenever the flow must stop and wait.
- Branch on real signals. In an If / Else condition, point at something concrete the agent can know (a tool result, the channel, the order age) rather than a vague judgment call.
If you write a question into a plain Step, STARKO flags it inline — a reminder that plain steps don't wait for a reply:
[Image blocked: Inline warning that a plain step asks a question but does not pause]Pro tip: Need a human in the loop for anything sensitive (issuing a refund, sending a contract)? Drop a Wait for approval step in front of it — the procedure pauses until a teammate approves, then continues down the IF APPROVED branch.
5. Set it live
When you're happy with the flow:
- Click Save.
- Click Set live.
The badge flips from Draft to Live, and the agent will start using the procedure on matching conversations. To pause it at any time, open it and click Set to draft — your steps are kept, it just stops firing.
[Image blocked: The procedure header with the Draft badge, Save, and Set live buttons]Save your work, then click Set live. The badge flips from Draft to Live.
FAQ
When does a procedure actually run?Only when it's Live and a conversation matches the When to use this procedure description. If two procedures could match, tighten the "do not trigger" lines so the agent has a clear choice.
Why didn't the agent wait for the customer's answer?A plain Step never pauses. If the agent should stop and wait for a reply, use an Ask the customer step; for teammate sign-off, use Wait for approval.
Can one step use more than one tool?Yes — add a Use a tool step for the primary tool, and reference any others inline with Insert tool (@) inside the step text.
What happens when a procedure ends?A Hand off to human step routes the conversation to your team and ends the procedure. An End step closes it with an optional final message. If neither is reached, the agent simply finishes the last step and continues the conversation normally.
Next: connect your tools so procedures can take real actions, and explore branching with If / Else and Wait for approval for more advanced flows.
FAQ
Do Procedures replace the AI's normal answers?No. The agent still answers everyday questions from your knowledge base.
Procedures only start for the specific requests you've defined.
What if the customer goes off-script?The agent answers their side question, then guides the conversation back. If
they've clearly moved to a different request, it switches procedures.
Which channels do Procedures work on?Web chat, email, WhatsApp, and Instagram.
What happens if no one approves a "Wait for approval" step?The procedure stays paused and the customer is kept informed. It resumes the
moment a teammate approves or rejects.
Did this answer your question?