Versioning
Versioning is your safety net for AI deployments. Every change you make to your AI’s knowledge or guidance creates a new, immutable version that you can test, deploy, and roll back with confidence. This ensures your customers always interact with stable, predictable AI behavior while you continue to innovate behind the scenes.Why Versioning Matters
AI agents are fundamentally different from traditional software. They don’t follow deterministic code paths - they generate responses dynamically based on instructions, knowledge, and context. Versioning provides the control and safety you need to manage this complexity.The Challenge Without Versioning
Imagine making a small tweak to your AI’s guidance and pushing it live immediately. Within minutes:- Customer conversations might get unexpected responses
- Critical functionality could break without warning
- You’d have no way to quickly revert the change
- Different channels might show inconsistent behavior
- You’d lose the ability to test before production
The Power of Versioning
With proper versioning, you gain: Predictable Deployments - Every version is an exact snapshot of your AI’s complete configuration. When you deploy version #15, you know precisely what behavior customers will experience. Safe Testing - Test new versions thoroughly in staging environments before exposing them to customers. Catch issues early when they’re easy to fix. Instant Rollback - If a deployment causes problems, revert to the previous version in seconds. Your customers experience minimal disruption. Audit Trail - Track exactly what changed and when. See your AI’s evolution over time and understand the impact of each modification. Consistency Across Channels - All channels (Website, Zendesk, Salesforce, Slack) use the same version simultaneously. No confusion about which configuration is live where. Confidence to Innovate - Experiment freely knowing you can always roll back. Version control removes the fear of making improvements.How Versioning Works
botBrains uses a three-tier architecture to manage versions and deployments:1. Profiles (Your Work in Progress)
A profile represents your AI’s current configuration:- Guidance instructions and rules
- Tool and integration settings
- LLM model selection and parameters
- Audience targeting rules
- General settings and preferences
- Add or modify guidance instructions
- Enable or disable tools
- Adjust LLM settings
- Test changes in preview mode
2. Versions (Immutable Snapshots)
A version is an immutable snapshot created when you build your profile:- Sequential number identifier (#1, #2, #3…)
- Complete profile configuration at build time
- Knowledge snapshot with all data provider content
- Creation timestamp
- Never changes after creation
- Freezes your current profile configuration
- Captures the complete state of all knowledge sources
- Indexes content for fast retrieval
- Creates a deployable package
- Makes it available for production use
Versions are immutable by design. Once built, they never change. This ensures consistency - version #12 behaves identically every time, whether you deploy it today or next month.
3. Aliases (Production Pointers)
An alias is a named pointer to a specific version:- “Production” alias points to your live version
- Can be updated to point to different versions
- All channels connect to aliases, not directly to versions
- Allows instant version switching without reconfiguring channels
- All channels using that alias switch immediately
- No downtime or configuration changes needed
- Previous version remains available for rollback
The Complete Architecture
The Deployment Flow
Understanding the complete lifecycle from making changes to deploying them helps you use versioning effectively.Step 1: Make Changes
Edit your AI configuration in the platform: Modify Guidance- Add new guidance rules for emerging use cases
- Refine existing instructions for better responses
- Update tone or style guidelines
- Adjust tool permissions
- Sync data providers to get latest content
- Create or edit snippets
- Upload new documents
- Update search tables
- Enable new integrations
- Adjust tool parameters
- Add or remove available actions
Step 2: Test in Preview
Before building a version, test your changes: Use Preview Mode- Navigate to Behavior → Guidance
- Click the preview/test interface
- Ask sample questions
- Verify responses match expectations
- Check that tools work correctly
- Current profile configuration (not deployed version)
- Latest knowledge from data providers
- All active guidance rules
- Enabled tools and integrations
- Preview doesn’t capture production traffic patterns
- May not reflect all edge cases
- Should be supplemented with test suites
Step 3: Build a Version
When you’re ready to make changes available: Navigate to Behavior and click Build Version, Set Active. What Happens During Build Immediate Actions (1-5 seconds):- System locks current profile configuration
- Assigns sequential version number
- Creates build job
- Captures complete knowledge snapshot
- Indexes all data provider content
- Processes all chunks and embeddings
- Compiles profile configuration
- Creates deployable package
- Validates completeness
- Version becomes available
- Production alias updates to new version (if “Set Active” chosen)
- All channels switch to new version
- Build notification appears
- Creates version and deploys to production
- All channels switch immediately
- Use when: Changes are tested and ready for customers
- Creates version without deploying
- Allows additional testing before going live
- Manually set as active later
- Use when: Major changes need final validation
- Runs build asynchronously in background
- Sends email notification when complete
- Use when: Many channels or large knowledge bases (10+ minutes build time)
Step 4: Verify Deployment
After building and deploying: Immediate Checks (First 5 minutes)- Test sample questions in each channel
- Verify responses match expectations
- Check that new knowledge is accessible
- Confirm tools work correctly
- Review incoming conversations
- Watch for error rates or unusual patterns
- Check customer satisfaction scores
- Monitor escalation rates
- Compare metrics to previous version
- Review conversation topics and outcomes
- Gather team feedback
- Identify any issues requiring rollback or fixes
Step 5: Iterate or Roll Back
Based on monitoring results: If Deployment Succeeds- Document what changed and why
- Note improvements in metrics
- Continue refining for next version
- Archive learnings for team knowledge
- Assess severity and impact
- Roll back immediately if critical (see Rolling Back)
- Investigate root cause
- Fix in development environment
- Test more thoroughly
- Build and deploy corrected version
Testing New Versions
Proper testing prevents production issues and builds confidence in deployments.Testing Strategies
Preview Testing (Basic) Test individual changes as you make them:- Make a change to guidance or knowledge
- Open preview interface
- Ask relevant questions
- Verify responses
- Iterate until satisfied
- Navigate to Test Suites
- Create suite for each major feature area
- Add test cases covering common scenarios
- Run suite against preview version
- Review results and fix failures
- Re-run until all tests pass
- Create separate botBrains project for testing
- Copy configuration from production
- Build and deploy test versions in staging
- Test with real channels (test Slack workspace, etc.)
- Validate with team before production deployment
- Deploy version A to some channels
- Deploy version B to other channels
- Monitor comparative metrics
- Identify winning version
- Deploy winner to all channels
What to Test
Functional Testing- Knowledge retrieval works correctly
- Tools and integrations execute properly
- Guidance rules apply as expected
- Audience targeting functions correctly
- Response accuracy meets standards
- Tone and style match brand guidelines
- Escalations trigger appropriately
- Citations and sources appear correctly
- Ambiguous or unclear questions
- Multi-step conversations with context
- Error conditions and fallback behavior
- Unusual user inputs or requests
- Response times are acceptable
- No timeout errors occur
- Concurrent conversations handle correctly
Test Coverage Guidelines
Minimum Viable Testing- 5-10 test cases covering most common user questions
- Manual preview testing before each build
- Spot-check after deployment
- 20-50 test cases organized into suites
- Automated test suite runs before deployment
- Structured monitoring after deployment
- Team review for major changes
- 100+ test cases covering all features
- Multiple test suites by feature area
- Staging environment validation
- Automated regression testing
- A/B testing for optimizations
Upgrading to Production
Promoting a version to production requires understanding the mechanisms and implications.Deployment Methods
Automatic Deployment (During Build) When building with “Set Active”:- Build process creates version
- Production alias updates automatically
- Channels switch immediately upon completion
- Zero manual steps after clicking “Build”
- Build process creates version (not deployed)
- Version appears in versions list
- Test version as needed
- Manually set as active when ready
- Production alias updates upon manual action
- Channels switch immediately
- Navigate to Behavior → General
- Scroll to Versions section
- Find the version you want to deploy
- Click the ⋮ menu (three vertical dots)
- Select Set as Active
- Confirm the action
Deployment Characteristics
Zero Downtime All deployments are zero-downtime:- Channels remain available during version switch
- New conversations use new version immediately
- Ongoing conversations complete with current version
- No service interruption occurs
- All channels update within 1-2 seconds
- No gradual rollout or propagation delay
- Consistent behavior across all integration points
- All channels switch simultaneously
- No partial deployment state exists
- Either old version or new version, never mixed
Channel-Specific Considerations
Each integration channel handles version updates seamlessly, but understanding the specifics helps you plan deployments. Website Widget- Updates apply to new chat sessions immediately
- Existing open chat windows may use previous version until refresh
- Users who reload page get new version
- Consider deployment timing around peak traffic
- Agent assist suggestions use new version immediately
- Automated responses switch instantly
- No impact on ticket workflow or history
- Existing tickets continue normally
- Case deflection uses new version for new cases
- Agent assist updates immediately
- Historical case data unaffected
- Salesforce knowledge sync continues
- Bot responses use new version immediately
- Direct messages and channel mentions update instantly
- Message history shows previous version’s responses
- Users see no interruption
- New messages use new version immediately
- Conversation history preserved
- No impact on message delivery
- Users experience seamless transition
While version switches are instant at the platform level, browser caching may cause brief delays (1-2 minutes) for website widgets. Users who refresh get the new version immediately.
Deployment Best Practices
Timing Deployments Deploy during periods that minimize impact:- Low traffic hours - Fewer customers affected if issues arise
- Team availability - Ensure team can monitor and respond
- Avoid critical periods - Don’t deploy during major events or holidays
- Consider time zones - If global, choose time when most regions have low activity
- Deploy to internal channels first (test Slack workspace)
- Monitor for issues
- Deploy to one customer-facing channel
- Monitor metrics and feedback
- Deploy to remaining channels if successful
- Before deployment: Notify team of upcoming changes
- During deployment: Communicate deployment in progress
- After deployment: Share results and next steps
- Document what changed in each version
- Note why changes were made
- Record deployment time and conditions
- Log any issues encountered
- Summarize outcomes and learnings
Why Knowledge is Versioned
Knowledge versioning is crucial for maintaining AI reliability and ensuring consistent behavior.The Need for Knowledge Snapshots
Your knowledge sources are constantly evolving:- Data providers sync new content regularly
- Snippets get created and edited
- Documents are updated or removed
- Tables receive new data
How Knowledge Snapshots Work
When you build a version, botBrains captures a complete knowledge snapshot: Data Provider Content- All synced pages, documents, and articles
- Current state of all sources
- Processed chunks and embeddings
- Metadata and structure
- All active snippets
- Content and formatting
- Audience targeting rules
- Priority ordering
- Table schemas and columns
- Row data (by reference)
- Query configurations
- Embeddings for semantic search
- Indexes for fast retrieval
- Chunk boundaries and metadata
Keeping Knowledge Current
As knowledge sources update, you need to rebuild to incorporate changes. Staleness Indicator The platform shows when deployed knowledge is outdated:- Green: “Knowledge Up-to-date” - Deployed version has latest content
- Orange: “Knowledge Stale” - Data providers synced new content after last build
- Review what changed in data providers
- Test updated content in preview
- Build new version when ready
- Deploy to incorporate latest knowledge
- Build new versions daily or multiple times per day
- Automate builds using API if needed
- Monitor staleness indicators
- Build new versions weekly
- Batch multiple knowledge updates into one version
- Schedule builds during low-traffic periods
- Build monthly or as needed
- Focus builds on significant knowledge additions
- Combine with guidance improvements
Guidance vs. Knowledge Versioning
Both guidance and knowledge are versioned, but they’re managed differently: Guidance Changes Require Rebuild- Edit guidance in profile
- Changes don’t affect production until build
- Preview shows edited guidance
- Build creates new version with updated guidance
- Data providers sync new content
- Synced content doesn’t affect production until build
- Preview may show updated knowledge
- Build creates new version with knowledge snapshot
- Most versions include both guidance and knowledge changes
- Build captures current state of both
- Version contains complete, consistent snapshot
Version Management
Effectively managing versions over time ensures clean history and easy navigation.Viewing Version History
Navigate to Behavior → General → Versions to see all versions. Version List Displays:- Version Number: Sequential identifier (#1, #2, #3…)
- Profile Name: Profile version at build time (v0.0, v0.1, v0.2…)
- Status Badge: “Production” if currently active
- Created Date: When version was built
- Actions Menu: Options to set as active or view details
Comparing Versions
Understanding what changed between versions helps troubleshoot issues and track improvements. Manual Comparison- Note version numbers to compare (e.g., #14 vs. #15)
- Check your documentation or notes for changes made
- Review guidance edits between profile versions
- Identify knowledge syncs that occurred between builds
- Navigate to Analyze → Conversations
- Filter by version number
- Review responses from each version
- Identify behavioral differences
- Determine which version performed better
- Navigate to Analyze → Metrics
- Compare time periods for each version
- Look at CSAT, resolution rate, escalation rate
- Identify performance improvements or regressions
The platform doesn’t currently provide automatic diff views between versions. Use your own documentation and metrics analysis to track changes.
Rolling Back to Previous Versions
When a deployment causes issues, rolling back quickly minimizes customer impact. Quick Rollback Process-
Identify the Problem
- Monitor conversations showing incorrect responses
- Review metrics showing degraded performance
- Receive customer or team feedback about issues
-
Determine Target Version
- Usually the version immediately before problematic one
- Verify that version was working correctly
- Check version number (e.g., rollback from #15 to #14)
-
Execute Rollback
- Navigate to Behavior → General → Versions
- Find the target version in list
- Click ⋮ menu next to version
- Select Set as Active
- Confirm the action
-
Verify Rollback
- Test sample questions immediately
- Monitor incoming conversations
- Confirm expected behavior restored
- Watch metrics for improvement
- 1 minute to identify issue and decide on rollback
- 1 minute to navigate and execute rollback
- 1-2 minutes for verification
- Channels update within seconds of rollback
When to Roll Back
Immediate Rollback (Critical Issues) Roll back immediately if you observe:- High error rates: Tools failing, knowledge not accessible
- Incorrect information: AI providing wrong answers systematically
- Broken functionality: Key features not working
- CSAT drop: Customer satisfaction drops significantly (>0.5 points)
- Escalation spike: Dramatic increase in human handoffs
- Customer complaints: Multiple reports of poor experience
- Slight metric fluctuations: Small changes within normal variance
- Isolated incidents: Single conversation with unexpected behavior
- Cosmetic issues: Minor wording or style differences
- Easily fixable: Can be corrected quickly with snippet update
-
Investigate Root Cause
- Review what changed between versions
- Identify specific guidance, knowledge, or configuration that caused issue
- Understand why the problem wasn’t caught in testing
-
Fix in Development
- Update profile with correction
- Test thoroughly in preview
- Run test suites to prevent regression
- Add new test cases covering the issue
-
Rebuild and Redeploy
- Build new version with fix
- Deploy during appropriate time
- Monitor closely for success
- Document the incident and resolution
Version Naming and Tagging
While versions have sequential numbers, profile names help track changes. Profile Naming Convention The platform uses semantic versioning for profiles:- v0.0, v0.1, v0.2 - Initial development versions
- v1.0 - First production-ready version
- v1.1, v1.2 - Minor improvements and refinements
- v2.0 - Major changes or new features
- Small guidance refinements
- Knowledge updates from syncs
- Bug fixes and corrections
- Tone adjustments
- Single feature additions
- Complete guidance overhaul
- New integration channels
- Major feature additions
- Significant knowledge restructuring
- Fundamental behavior changes
Cleaning Up Old Versions
Versions are stored indefinitely by default, which provides complete history. Version Retention All versions remain available unless explicitly deleted:- No automatic cleanup or archiving
- Oldest versions remain accessible
- Storage costs are minimal
- History provides valuable audit trail
- Recent versions (last 10-20 builds)
- Major milestone versions (v1.0, v2.0)
- Versions used in production for significant periods
- Versions representing major changes
- 100+ versions may slow UI performance
- Most projects have 20-50 versions over time
- Consider your rollback needs when deciding retention
Best Practices
Effective version management comes from disciplined processes and clear conventions.Build Frequency
During Active Development Build frequently to test and iterate quickly:- After each significant change
- Daily or multiple times per day
- Test each version before setting as production
- Iterate based on test results
- Weekly or monthly to incorporate knowledge updates
- When substantial guidance improvements are ready
- Batch multiple small changes into single version
- Avoid building for trivial changes
Testing Before Deployment
Minimum Testing (Small Changes)- Preview test with 5-10 sample questions
- Verify specific change works as intended
- Quick smoke test across main features
- Run full test suite (20-50 test cases)
- Preview test across multiple scenarios
- Team review if multiple people involved
- Check for regressions in core functionality
- Multiple test suites covering all features
- Staging environment validation
- Team review and sign-off
- Phased rollout plan prepared
- Rollback plan documented
Monitoring After Deployment
First 30 Minutes- Spot-check conversations manually
- Test in each channel
- Verify no immediate errors
- Confirm expected behavior
- Monitor key metrics (CSAT, escalation rate)
- Review conversation topics
- Check error logs
- Gather team feedback
- Compare metrics to previous version
- Identify unexpected patterns
- Review customer feedback
- Document learnings
Documentation Standards
Version Notes Template For each version, document:- Write version notes immediately after building
- Update with deployment results within 24 hours
- Keep notes in shared location (wiki, docs, Git)
- Make documentation part of deployment process
Team Workflows
Single Person Team- Make changes to profile
- Test in preview
- Build version and set active
- Monitor for issues
- Document results
- Person A makes changes
- Person B reviews in preview
- Team lead approves build
- Person A builds and deploys
- Team monitors together
- Person A documents
- Developer makes changes in profile
- QA team runs test suites
- Product manager reviews and approves
- DevOps builds and deploys
- Support team monitors conversations
- Developer documents and shares learnings
Troubleshooting
Common versioning issues and their solutions.Build Fails
Symptoms- “Build failed” error message
- Build process stops after starting
- Version doesn’t appear in list
-
TODO items in configuration
- Solution: Search for “TODO” in guidance and remove placeholders
-
No guidance defined
- Solution: Add at least one active guidance rule with instructions
-
Invalid tool configuration
- Solution: Verify JSON syntax in tool configurations
-
Missing required fields
- Solution: Check that all required profile fields are filled
-
Knowledge indexing error
- Solution: Verify data providers synced successfully before building
- Review error message for specific cause
- Navigate to indicated configuration area
- Fix the identified issue
- Try building again
- Contact support if error persists
Knowledge Not Updating
Symptoms- New knowledge doesn’t appear in AI responses
- Staleness indicator shows green but content is outdated
- Data provider synced but AI doesn’t know new information
- Navigate to Data Providers
- Verify sync completed successfully
- Check staleness indicator in Behavior → General
- If orange, build new version
- Set new version as active
- Verify AI can access new knowledge
- Build new version after knowledge syncs
- Check staleness indicator regularly
- Set up regular rebuild schedule
Channels Not Using New Version
Symptoms- Some channels show old responses after deployment
- Version updated but behavior unchanged
- Inconsistent responses across channels
-
Verify production alias updated
- Navigate to Behavior → General → Versions
- Check which version has “Production” badge
-
Confirm channels connected to production alias
- Navigate to Behavior → General → Channels
- Verify channels point to correct alias
-
Clear browser cache (for website widgets)
- Hard refresh browser (Cmd+Shift+R or Ctrl+Shift+R)
- Clear site data in browser settings
-
Check channel configuration
- Navigate to specific channel settings
- Verify alias assignment hasn’t changed
- Usually resolves automatically within 1-2 minutes
- Browser cache clearing often fixes widget issues
- If persisting beyond 5 minutes, rebuild and redeploy
- Contact support if issue continues beyond 10 minutes
Deployment Stuck
Symptoms- Build shows “Building…” for longer than expected
- No completion notification after 5+ minutes
- Build progress indicator doesn’t update
- Small projects (minimal knowledge): 30-60 seconds
- Medium projects (typical knowledge): 1-3 minutes
- Large projects (extensive knowledge): 3-10 minutes
- Wait 10 minutes minimum for large projects
- Don’t start another build during this time
- Refresh page to see if build completed
- Check versions list for newly created version
- Look for completion notification
- Try building again (may have timed out)
- Check data provider sync status (failed syncs can block builds)
- Review browser console for errors
- Contact support with project ID and approximate build start time
Version Rollback Not Working
Symptoms- Set previous version as active but behavior unchanged
- Rollback appears successful but issues persist
- Channels still using problematic version
-
Verify version switch completed
- Check which version has “Production” badge
- Ensure correct version marked as active
-
Test in fresh session
- Start new conversation (don’t use existing chat)
- Clear browser cache if using web widget
- Test in different channel to rule out caching
-
Confirm correct rollback target
- Verify version you rolled back to was actually working
- Check version created date matches expected timeframe
- Review version’s profile name to confirm it’s correct one
-
Force propagation
- Set to different version, wait 1 minute
- Set back to intended version
- Verify channels update
- Document which versions work well
- Test rollback target before deploying to all channels
- Keep notes on version history for quick reference
Advanced Patterns
Multiple Environment Setup
For teams requiring staging and production separation: Approach: Separate Projects Create two botBrains projects: Staging Project- Development and testing environment
- Copy of production configuration
- Connected to test channels (test Slack, staging website)
- Frequent builds and experimentation
- No real customer traffic
- Live customer environment
- Only tested changes deployed
- Connected to customer-facing channels
- Careful build and deployment process
- Monitored continuously
- Make changes in staging project
- Build and test in staging
- Validate with team
- Manually replicate changes to production project
- Build and deploy in production
- Requires manual synchronization between projects
- Doubles configuration effort
- Provides maximum safety for high-stakes deployments
Automated Deployment
For engineering-driven teams: Using the API Automate version building via API:- Data provider completes sync
- Webhook triggers build API call
- New version automatically created
- Notification sent to team
- Guidance changes committed to Git
- CI pipeline runs tests
- Automated build triggered
- Deploy only if tests pass
- Requires API access and automation infrastructure
- Need robust testing to prevent bad automated deployments
- Benefits teams with frequent updates and technical capability
Next Steps
You now understand how versioning protects your AI deployments while enabling continuous improvement. Continue learning:Deployments Overview
Learn about the complete deployment system including aliases and channels
Testing AI Agents
Build test suites to validate versions before deployment
Integration Channels
Connect your AI to Website, Zendesk, Salesforce, Slack, and more
Monitoring Performance
Track metrics to measure the impact of your deployments