Step 1: Choose and assign campaigns
- From your Hatch workspace, go to the Campaigns section
- Select the campaign you want your AI agent to handle (e.g. Speed to Lead, Estimate Follow-Ups, Nurture)
- Assign your AI agent to the chosen campaign
Assigning campaigns ensures your agent only manages the right types of conversations, keeping interactions organized and efficient.
Step 2: Create your script
Each AI script includes four key sections:
- Persona — defines who your AI is (tone, personality, communication style)
- Goal — clarifies what the conversation is trying to achieve
- Instructions — outlines how your AI should guide the conversation
- Additional considerations — specifies any unique cases or exceptions
Step 3: Generate script instructions automatically
- Click the 💬 icon at the bottom-right of your screen
- Select Generate Instructions
- Type your prompt — for example: “Give me an AI agent script for a speed-to-lead campaign with the goal of engaging leads about their project request and getting them set up with a booked appointment.”
- Hatch will automatically generate a script template
- Review, edit, and customize the template to fit your business and tone
Step 4: Add outcome commands
Every script must include commands that tell your AI what to do when a conversation reaches an outcome.
The three required commands:
- Success — the conversation achieved its goal (e.g. appointment booked)
- Bailout — a human CSR should take over (e.g. customer asks for a call or specific pricing)
- Discard — the lead opted out or is no longer interested
Examples:
- If a customer requests a phone call → your AI responds “Someone from our team will reach out soon!” and ends with a bailout
- If a customer reports an emergency → use the bailout command to ensure immediate human follow-up
Step 5: Use commands to reference knowledge data
Commands allow your AI to access stored knowledge and personalize conversations.
- Type a backslash (
\) inside your script
- Choose a knowledge command from the dropdown
- For example, to reference a customer’s first name: type
\ → select Knowledge → Customer Data → First Name
- Click Save to apply changes
This enables your AI to use existing customer data naturally — without asking for information you already have.
Step 6: Test your decision tree
- Open your AI agent environment
- Run test conversations to simulate real interactions
- Observe how your AI responds to different outcomes
- Continue testing until it behaves exactly how you want
Everything you add saves automatically, so you can safely test and refine in real time.
Step 7: Add additional considerations
Use this section to handle edge cases such as:
- Handling urgent requests differently
- Escalating messages based on keywords
- Customizing responses by service type
Hatch AI Agent Setup Guide