Skip to main content

Instruct AI Agent

Your AI’s behavior is defined by guidance - the instructions, tools, and rules that control how it responds to users. Unlike static chatbots with fixed responses, botBrains lets you craft dynamic, context-aware behavior that adapts to different situations and user segments.

Why Behavior Configuration Matters

Your AI needs clear instructions to provide valuable customer service. Proper behavior configuration enables your AI to:
  • Maintain brand voice - Ensure every response reflects your company’s tone and values
  • Handle different scenarios - Respond appropriately whether users need sales info, technical support, or account help
  • Use the right tools - Access search tables, web search, or escalation capabilities when needed
  • Personalize interactions - Adapt responses based on user attributes like plan tier, location, or role
  • Evolve continuously - Update behavior as your product and customer needs change
Think of guidance as training sessions for your AI - you’re teaching it how to represent your company to customers.

Understanding Profiles

Profiles (called “Behavior” in the UI) are versioned configurations that define your AI’s complete behavior. Each profile contains:
  • Guidance rules - Instructions for different scenarios
  • Tool access - Which capabilities the AI can use
  • LLM settings - Model selection and configuration
  • Version history - Immutable record of changes

Profile Versioning

Profiles use semantic versioning (v0.0, v0.1, etc.) to track changes:
  1. Edit your current profile to make changes
  2. Build a new version when ready
  3. Deploy the version to production
  4. Previous versions remain available for rollback
This versioning ensures you never lose working configurations and can test changes before deploying.

Creating Effective Guidance

Guidance rules are the building blocks of your AI’s behavior. Each guidance defines:
  • Instructions - What the AI should do and how
  • Audience - Which users this guidance applies to
  • Tools - Which capabilities the AI can access
  • Priority - Order matters - first matching guidance wins

Anatomy of a Guidance Rule

Navigate to Behavior → Guidance to manage your guidance rules. Name
  • Descriptive label for organization
  • Example: “Sales Inquiries”, “Technical Support”, “Premium Customer Service”
Instructions
  • Natural language description of desired behavior
  • Rich text editor with formatting support
  • Reference tools using inline code: search_products
  • Be specific about tone, detail level, and response format
Allowed Tools
  • Select which capabilities this guidance can use
  • Tools mentioned in instructions are auto-enabled
  • Examples: search_web, search_products, offer_handoff
Audience
  • Define which users this guidance applies to
  • Use query builder to filter by attributes
  • Leave empty for “everyone”
Active Status
  • Toggle guidance on/off without deleting
  • Inactive guidance is skipped during conversations

Writing Instruction Templates

Your instructions guide the AI’s responses. Follow these principles: Be Specific
Good:
"Help users find products by asking clarifying questions about their needs,
budget, and preferences. Search the product catalog using `search_products`
and recommend 2-3 options with pros and cons for each. Keep responses
concise (under 150 words) and friendly."

Avoid:
"Help users find products."
Define Tone and Style
"Use a professional yet warm tone. Address users by first name if available.
Avoid jargon unless the user demonstrates technical expertise. Use bullet
points for lists of features or steps."
Specify Tool Usage
"Before answering questions about pricing or availability, always search
the product catalog using `search_products`. For general product questions,
search the knowledge base first. Only use `search_web` if our internal
resources don't have the answer."
Set Boundaries
"If users ask about topics outside your expertise (legal advice, medical
recommendations, financial guidance), politely explain you can't help with
that topic and offer to connect them with appropriate resources using
`offer_handoff`."
Include Examples
"When explaining technical concepts, use analogies. For example, explain
API rate limits like: 'Think of API calls like ordering coffee - you can
make 1000 orders per hour, but if you try to order more, you'll need to
wait until the next hour starts.'"

Audience Targeting

Audience targeting lets you create different behavior for different user segments.

Why Use Audiences?

  • Tiered Support - Premium customers get different service than free users
  • Regional Adaptation - Adjust responses for language, timezone, or local regulations
  • Role-Based Behavior - Treat developers differently from business users
  • Channel-Specific - Behavior varies by integration (website vs. Zendesk vs. Slack)

Creating Audience Rules

Click “Add Audience Filter” in any guidance to build targeting rules: User Attributes
User → Plan → equals → "enterprise"
User → Location → starts with → "EU"
User → Email → ends with → "@company.com"
Conversation Context
Conversation → Channel → equals → "zendesk"
Conversation → Topic → contains → "billing"
Message → Contains → "urgent"
Time Conditions
Current Time → Hour → between → 9 and 17
Current Time → Day of Week → in → ["Monday", "Tuesday", "Wednesday"]
Combining Conditions Use AND/OR logic to create complex rules:
(User.plan = "enterprise" OR User.plan = "business")
AND
User.location starts with "US"

Tool Configuration

Tools extend your AI’s capabilities beyond conversation. Configure tools in the Tools tab.

General Tools

Enable built-in capabilities: Web Search
  • Search the internet for current information
  • Use when: Product launches, news, real-time data
  • Example: “What are the latest features in version 2.0?”
Fetch Web Pages
  • Retrieve specific URLs for content
  • Use when: Reading documentation, release notes, blog posts
  • Example: “Summarize the changelog from our blog”
Offer Handoff
  • Create email escalation to support team
  • User reviews and confirms before sending
  • Use when: Complex issues requiring human expertise
Escalate to Human
  • Immediately transfer conversation to support
  • No user confirmation required
  • Use when: Urgent issues, compliance concerns, high-value customers
Only enable tools your AI actually needs. Extra tools add decision overhead and can confuse the AI about when to use each one.

Search Tables

Connect structured data sources for precise information retrieval:
  1. Navigate to Tools → Search Tables
  2. Click Add Search Table
  3. Configure:
    • Tool Name: How AI refers to it (e.g., search_products)
    • Description: When to use this tool
    • Select Table: Choose your configured table
  4. Save
The AI automatically generates search parameters based on user questions. Example Configuration
Tool Name: search_products
Description: Search our product catalog by category, price range, brand,
and availability. Use this when users ask about products, features, pricing,
or inventory.
Table: product_catalog

MCP Servers

Connect external systems via Model Context Protocol:
  1. Navigate to Tools → MCP Servers
  2. Add Server with URL and authentication
  3. Import Tools from the server
  4. Configure approval requirements for each tool
MCP servers enable integrations with CRM, ticketing, databases, and custom APIs.

Guidance Priority and Matching

When multiple guidance rules exist, the AI uses the first matching rule based on:
  1. Order in the list - Drag to reorder guidance rules
  2. Active status - Only active guidance is considered
  3. Audience match - User must match audience criteria
  4. Tool availability - Required tools must be enabled

Organizing Guidance

Specific to General Place targeted guidance first, general guidance last:
1. Premium Support (audience: enterprise customers)
2. Billing Questions (audience: topic contains "billing")
3. Product Questions (audience: everyone)
4. General Assistant (audience: everyone, fallback)
By Channel Different behavior per integration:
1. Zendesk Private Mode (audience: channel = zendesk, mode = private)
2. Zendesk Public Mode (audience: channel = zendesk, mode = public)
3. Website Chat (audience: channel = web)
4. Slack Internal (audience: channel = slack)
By Use Case Organize around common scenarios:
1. Sales Inquiries
2. Technical Support
3. Account Management
4. Onboarding
5. General Questions

Building and Deploying

After editing guidance, you must build and deploy a new version.

Build Process

  1. Make Changes - Edit guidance, tools, or settings
  2. Review - Check “Unsaved Changes” indicator
  3. Build Version - Creates new immutable profile version
  4. Wait - System processes changes and creates deployment
  5. Deploy - Set new version as active in production

Build Options

Build Version, Set Active
  • Creates new version and deploys to production immediately
  • Recommended for most updates
  • Takes 30-60 seconds
Build Version
  • Creates version without deploying
  • Use when: Testing changes before going live
  • Deploy manually later from General tab
Build Version, Set Active, Get Email
  • For large deployments affecting many channels
  • Receive email notification when complete
  • Use when: Major behavior changes, many integrations

Deployment Status

Check deployment health in the header: Knowledge Fresh
  • Green indicator: AI has latest knowledge
  • Orange indicator: Knowledge sources updated, rebuild needed
Unsaved Changes
  • Orange indicator: Edits not yet built
  • Build required to save changes
Changes Saved
  • Gray indicator: No pending edits

Best Practices

Start Simple, Iterate

Begin with one general guidance rule:
Name: Customer Support Assistant
Instructions: Help customers with product questions, account issues,
and general inquiries. Use a friendly, professional tone. Search our
knowledge base and product catalog before answering. Offer to escalate
complex issues to our support team.
Audience: Everyone
Tools: search_web, offer_handoff
Add specific guidance as patterns emerge from conversations.

Test Before Deploying

Use the preview frame (right sidebar on Guidance tab) to test changes:
  1. Enter test messages
  2. Observe AI responses
  3. Verify tool usage
  4. Adjust instructions
  5. Build and deploy when satisfied

Monitor and Improve

After deployment:
  1. Review conversations - Check real interactions in Analyze
  2. Identify gaps - Where does guidance need refinement?
  3. Update instructions - Make targeted improvements
  4. Redeploy - Build new version with fixes

Use Clear Language

Write instructions as if training a new team member:
  • Be explicit about expectations
  • Provide examples of good responses
  • Explain why certain approaches work
  • Define edge cases and how to handle them

Leverage Tool Mentions

Reference tools in instructions using inline code:
"Search for relevant help articles using `search_knowledge_base`. If no
articles match, try `search_web` for general information."
The system automatically enables mentioned tools.

Version Strategically

Create new versions for:
  • Significant behavior changes
  • New tool additions
  • Audience targeting updates
  • Tone or style adjustments
Don’t create versions for:
  • Minor wording tweaks (combine several into one version)
  • Experimental changes (test in preview first)

Common Patterns

Pattern 1: Tiered Customer Support

Goal: Premium customers get enhanced service
Guidance 1: Enterprise Support
Instructions: "Provide detailed, comprehensive answers. Proactively offer
resources and best practices. Use `search_advanced_docs` for technical
details. Always offer to schedule a call with our success team."
Audience: User.plan = "enterprise"
Tools: search_advanced_docs, search_web, offer_handoff

Guidance 2: Standard Support
Instructions: "Help users solve common issues efficiently. Point to
documentation and guides. Escalate complex issues to support team."
Audience: Everyone
Tools: search_docs, offer_handoff

Pattern 2: Sales vs. Support

Goal: Different behavior for prospects vs. customers
Guidance 1: Sales Assistant
Instructions: "Focus on product benefits and use cases. Highlight features
relevant to user's industry. Offer demos and trials. Use `search_case_studies`
to show customer success stories."
Audience: User.is_customer = false
Tools: search_products, search_case_studies, search_web

Guidance 2: Customer Support
Instructions: "Help customers use the product effectively. Answer how-to
questions and troubleshoot issues. Search documentation first."
Audience: User.is_customer = true
Tools: search_docs, search_products, offer_handoff

Pattern 3: Channel-Specific Behavior

Goal: Adapt to integration context
Guidance 1: Zendesk Agent Assist
Instructions: "You're assisting support agents, not end customers. Provide
concise, factual information agents can relay to customers. Include ticket
number references and knowledge base links."
Audience: Channel = "zendesk", Mode = "private"
Tools: search_docs, search_tickets

Guidance 2: Website Chat
Instructions: "Engage directly with website visitors. Be welcoming and
helpful. Qualify leads by understanding their needs before recommending
solutions."
Audience: Channel = "web"
Tools: search_products, search_web, offer_handoff

Pattern 4: Regional Compliance

Goal: Different responses for regulated regions
Guidance 1: EU Data Privacy
Instructions: "When discussing data handling, emphasize GDPR compliance.
Provide links to privacy policy. Never share specific customer data without
explicit consent. Offer to connect users with data protection officer."
Audience: User.region starts with "EU"
Tools: search_privacy_docs, offer_handoff

Guidance 2: General Region
Instructions: "Answer data and privacy questions using standard privacy
policy. Focus on security measures and data protection."
Audience: Everyone
Tools: search_privacy_docs

Troubleshooting

AI Not Using the Right Guidance

Symptoms: Responses don’t match your instructions Solutions:
  • Check audience filters - user might not match criteria
  • Verify guidance is active (toggle on)
  • Review guidance order - a general rule might match first
  • Ensure required tools are enabled
  • Check instruction clarity - be more explicit

Tools Not Available

Symptoms: AI says it can’t use a tool you enabled Solutions:
  • Verify tool is checked in allowed_tools for the active guidance
  • Confirm tool is enabled in Tools tab
  • For search tables, ensure table exists and has data
  • For MCP servers, check connection status
  • Rebuild profile to apply tool changes

Inconsistent Responses

Symptoms: Similar questions get different answers Solutions:
  • Tighten instructions to reduce variability
  • Provide specific examples of desired responses
  • Use search tables instead of general knowledge for facts
  • Add explicit rules for edge cases
  • Review conversation history to identify patterns

Build Failures

Symptoms: “Build failed” error when creating version Solutions:
  • Check for TODO items in advanced configuration
  • Verify all required fields are filled
  • Ensure at least one guidance exists (or system prompt in advanced)
  • Review error message for specific issue
  • Contact support if error persists

Knowledge Out of Date

Symptoms: Orange “Knowledge Stale” indicator Solutions:
  • Rebuild profile to use latest knowledge snapshots
  • This happens when data providers sync new content
  • Build process incorporates latest knowledge into deployment

Next Steps

Now that you understand how to instruct your AI: Your AI’s behavior is never “finished” - continuously refine guidance based on user interactions and evolving business needs.