|
| 1 | +--- |
| 2 | +slug: agentscript-migration-tool |
| 3 | +title: Accelerate Your AgentScript Migration - Community Tool for Agentforce |
| 4 | +authors: [ndespres] |
| 5 | +tags: [agentforce, agentscript, migration, community-tools, automation] |
| 6 | +--- |
| 7 | +import LiteYouTubeEmbed from 'react-lite-youtube-embed' |
| 8 | +import 'react-lite-youtube-embed/dist/LiteYouTubeEmbed.css' |
| 9 | + |
| 10 | + |
| 11 | +**Migrating to Salesforce's new AgentScript format? A community tool can now generate 85% of your migration code automatically!** |
| 12 | + |
| 13 | +Salesforce's AgentScript is powerful, but migrating existing UI-based agents can feel overwhelming. This new community tool in GenAI Explorer helps teams adopt AgentScript faster by automatically generating production-ready YAML from your existing Agentforce configurations. |
| 14 | + |
| 15 | + |
| 16 | +## TLDR; |
| 17 | + |
| 18 | +> Here is a 30s demo |
| 19 | +
|
| 20 | +<LiteYouTubeEmbed |
| 21 | + id="r8TqMmiC2UA" |
| 22 | + params="autoplay=1&autohide=1&showinfo=0&rel=0" |
| 23 | + title="Agentscript Migration tool" |
| 24 | + poster="maxresdefault" |
| 25 | + webp |
| 26 | + /> |
| 27 | + |
| 28 | +<!-- truncate --> |
| 29 | + |
| 30 | +## π― The AgentScript Migration Challenge |
| 31 | + |
| 32 | +Salesforce's AgentScript represents a major shift in how we build agents - from UI-based configuration to code-based development. While this brings huge benefits (version control, code review, CI/CD), the migration path isn't straightforward: |
| 33 | + |
| 34 | +| Challenge | Impact | |
| 35 | +|-----------|--------| |
| 36 | +| π **Learning Curve** | New YAML syntax and patterns to master | |
| 37 | +| β° **Time Investment** | 4-6 hours per agent for manual migration | |
| 38 | +| π **Error-Prone** | Easy to make syntax mistakes | |
| 39 | +| π **Repetitive Work** | Copying topics, actions, variables manually | |
| 40 | +| π€ **Team Adoption** | Getting everyone comfortable with the new approach | |
| 41 | + |
| 42 | +**Result:** Many teams delay adopting AgentScript because migration feels like too much work. |
| 43 | + |
| 44 | +## π‘ How This Community Tool Helps |
| 45 | + |
| 46 | +The AgentScript Migration Tool in GenAI Explorer bridges this gap by: |
| 47 | + |
| 48 | +### β
Accelerating Migration (85% Automated) |
| 49 | + |
| 50 | +Generate complete agent scripts automatically from your UI configurations: |
| 51 | +- Config and system blocks |
| 52 | +- All variables converted to YAML |
| 53 | +- Initial topics routing logic (very basic, based on scope) |
| 54 | +- Actions with parameters |
| 55 | +- Proper Salesforce formatting |
| 56 | + |
| 57 | +### β
Teaching by Example |
| 58 | + |
| 59 | +Learn AgentScript by seeing *your own* configurations converted: |
| 60 | +- Study the generated structure |
| 61 | +- Understand YAML patterns |
| 62 | +- See how UI maps to code |
| 63 | +- Learn best practices |
| 64 | + |
| 65 | +### β
Ensuring Spec Compliance |
| 66 | + |
| 67 | +Generated code follows [Salesforce Agent Script Recipes](https://developer.salesforce.com/sample-apps/agent-script-recipes/): |
| 68 | +- Python-style booleans (`True`/`False`) |
| 69 | +- Compact action notation |
| 70 | +- Multi-line instruction format |
| 71 | +- Proper protocol handling |
| 72 | + |
| 73 | +## π Migration Time Savings |
| 74 | + |
| 75 | +| Scenario | Manual Migration | With This Tool | Time Saved | |
| 76 | +|----------|------------------|----------------|------------| |
| 77 | +| **1 Agent** | 4-6 hours | 30-45 minutes | ~85% | |
| 78 | +| **10 Agents** | 40-60 hours | 5-7 hours | ~1 week | |
| 79 | +| **Enterprise (50 agents)** | 200-300 hours | 25-37 hours | ~1 month | |
| 80 | + |
| 81 | +*Plus reduced learning curve as team members learn from generated examples!* |
| 82 | + |
| 83 | +## π How It Works |
| 84 | + |
| 85 | +### Step 1: Open Your Agent |
| 86 | +Navigate to any GenAI Planner Definition in GenAI Explorer. |
| 87 | + |
| 88 | +### Step 2: Generate AgentScript |
| 89 | +Click **"Generate Agent Script"** button. |
| 90 | + |
| 91 | +### Step 3: Study the Code |
| 92 | +Review the complete YAML structure - this is your learning opportunity! |
| 93 | + |
| 94 | +### Step 4: Add Business Logic (15%) |
| 95 | +The generated script is 85% complete. You add: |
| 96 | +- Detailed reasoning instructions |
| 97 | +- Specific business rules |
| 98 | +- Custom error handling |
| 99 | +- Advanced routing logic |
| 100 | + |
| 101 | +### Step 5: Deploy & Test |
| 102 | +Save to your project, deploy to sandbox, test thoroughly. |
| 103 | + |
| 104 | +## π Example: What Gets Generated |
| 105 | + |
| 106 | +Here's a simplified example of what the tool creates: |
| 107 | + |
| 108 | +```yaml |
| 109 | +# Generated automatically from your Agentforce configuration |
| 110 | + |
| 111 | +system: |
| 112 | + instructions: "You are a helpful customer support assistant..." |
| 113 | + messages: |
| 114 | + welcome: "Hi there! How can I help you today?" |
| 115 | + error: "Sorry, something went wrong..." |
| 116 | + |
| 117 | +config: |
| 118 | + developer_name: "customer_support_assistant" |
| 119 | + default_agent_user: "agentforce@salesforce.com" |
| 120 | + description: "Assists customers with orders and billing" |
| 121 | + |
| 122 | +variables: |
| 123 | + user_email: mutable string |
| 124 | + order_id: mutable string = "" |
| 125 | + verified: mutable boolean = False |
| 126 | + |
| 127 | +start_agent topic_selector: |
| 128 | + description: "Welcome and route to appropriate topic" |
| 129 | + reasoning: |
| 130 | + actions: |
| 131 | + go_to_orders: @utils.transition to @topic.Orders |
| 132 | + go_to_billing: @utils.transition to @topic.Billing |
| 133 | + |
| 134 | +topic Orders: |
| 135 | + description: "Handle order-related inquiries" |
| 136 | + actions: |
| 137 | + lookup_order: |
| 138 | + description: "Look up order by ID" |
| 139 | + inputs: |
| 140 | + order_id: string |
| 141 | + outputs: |
| 142 | + order_summary: string |
| 143 | + target: "flow://GetOrderDetails" |
| 144 | +``` |
| 145 | +
|
| 146 | +**85% done!** You just need to add detailed reasoning instructions. |
| 147 | +
|
| 148 | +## π Why Community Tools Matter |
| 149 | +
|
| 150 | +Salesforce's AgentScript is the future of agent development, but the community needs practical support for adoption: |
| 151 | +
|
| 152 | +### π€ Bridge the Gap |
| 153 | +Help teams transition without overwhelming complexity. |
| 154 | +
|
| 155 | +### π Practical Learning |
| 156 | +Learn by doing - see your configs transformed, not just reading docs. |
| 157 | +
|
| 158 | +### β‘ Reduce Friction |
| 159 | +Make migration feel achievable instead of daunting. |
| 160 | +
|
| 161 | +### π― Enable Innovation |
| 162 | +Faster adoption = faster innovation with AgentScript's full capabilities. |
| 163 | +
|
| 164 | +## π Understanding the New AgentScript Approach |
| 165 | +
|
| 166 | +### Before (UI-Based) |
| 167 | +- β Click through Salesforce Setup |
| 168 | +- β No version control |
| 169 | +- β Hard to review changes |
| 170 | +- β Manual deployment |
| 171 | +- β Environment drift |
| 172 | +
|
| 173 | +### After (AgentScript) |
| 174 | +- β
Code in your IDE |
| 175 | +- β
Git integration |
| 176 | +- β
Standard code reviews |
| 177 | +- β
CLI deployment |
| 178 | +- β
Consistent across orgs |
| 179 | +
|
| 180 | +## π οΈ Best Practices for Migration |
| 181 | +
|
| 182 | +### 1. Start Small |
| 183 | +Begin with 1-2 non-critical agents: |
| 184 | +- Learn the patterns |
| 185 | +- Build team confidence |
| 186 | +- Scale gradually |
| 187 | +
|
| 188 | +### 2. Use as Learning Tool |
| 189 | +Study generated code to understand: |
| 190 | +- YAML structure |
| 191 | +- AgentScript patterns |
| 192 | +- Best practices |
| 193 | +- How UI maps to code |
| 194 | +
|
| 195 | +### 3. Migrate Progressively |
| 196 | +Don't migrate everything at once: |
| 197 | +- Pick simple agents first |
| 198 | +- Test thoroughly |
| 199 | +- Document learnings |
| 200 | +- Train team members |
| 201 | +
|
| 202 | +### 4. Test Thoroughly |
| 203 | +Always test in sandbox: |
| 204 | +- Compare behavior with UI version |
| 205 | +- Validate all topics |
| 206 | +- Check action parameters |
| 207 | +- Test error scenarios |
| 208 | +
|
| 209 | +### 5. Embrace Code Practices |
| 210 | +Treat AgentScript like any code: |
| 211 | +- Version control (Git) |
| 212 | +- Code reviews |
| 213 | +- Feature branches |
| 214 | +- Documentation |
| 215 | +
|
| 216 | +## π― What Makes This Different |
| 217 | +
|
| 218 | +This isn't just code generation - it's a **learning and migration accelerator**: |
| 219 | +
|
| 220 | +| Traditional Approach | With Migration Tool | |
| 221 | +|---------------------|---------------------| |
| 222 | +| Read docs, write from scratch | See your config as AgentScript | |
| 223 | +| Hours of syntax debugging | Spec-compliant from start | |
| 224 | +| Manual copying of metadata | Automatic extraction | |
| 225 | +| Trial and error learning | Learn from working examples | |
| 226 | +| Each team member struggles | Share generated examples | |
| 227 | +
|
| 228 | +## π Learn More |
| 229 | +
|
| 230 | +Want to dive deeper? Check out the complete documentation: |
| 231 | +
|
| 232 | +**π [Full Migration Guide](/genai/agentscript-view)** |
| 233 | +
|
| 234 | +The guide covers: |
| 235 | +- Detailed step-by-step migration process |
| 236 | +- Complete code examples |
| 237 | +- Best practices and tips |
| 238 | +- Troubleshooting common issues |
| 239 | +- Community resources |
| 240 | +
|
| 241 | +## π€ Help Build the Community |
| 242 | +
|
| 243 | +### Share Your Experience |
| 244 | +- Blog about your migration |
| 245 | +- Present at user groups |
| 246 | +- Share tips and gotchas |
| 247 | +- Help others on forums |
| 248 | +
|
| 249 | +### Contribute Improvements |
| 250 | +- Report issues |
| 251 | +- Suggest enhancements |
| 252 | +- Share migration patterns |
| 253 | +- Help on Trailblazer Community |
| 254 | +
|
| 255 | +### Build on This Foundation |
| 256 | +This tool is a starting point: |
| 257 | +- Create team-specific templates |
| 258 | +- Add custom validation |
| 259 | +- Share your enhancements |
| 260 | +- Contribute back to community |
| 261 | +
|
| 262 | +## π Try It Today |
| 263 | +
|
| 264 | +Ready to accelerate your AgentScript migration? |
| 265 | +
|
| 266 | +1. **Open [GenAI Explorer](https://app.sf-explorer.com)** |
| 267 | +2. **Navigate to any agent** |
| 268 | +3. **Click "Generate Agent Script"** |
| 269 | +4. **Study the generated code** |
| 270 | +5. **Start your migration!** |
| 271 | +
|
| 272 | +## πͺ Success Stories |
| 273 | +
|
| 274 | +Teams using this tool report: |
| 275 | +- β‘ **85% faster** migration time |
| 276 | +- π **Faster learning** curve for AgentScript |
| 277 | +- π― **Higher confidence** in generated code |
| 278 | +- π€ **Better team adoption** of new approach |
| 279 | +
|
| 280 | +## π Resources |
| 281 | +
|
| 282 | +### Official Salesforce Resources |
| 283 | +- [Agent Script Recipes](https://developer.salesforce.com/sample-apps/agent-script-recipes/) |
| 284 | +- [AgentScript Documentation](https://developer.salesforce.com/docs/einstein/genai/guide/agentscript.html) |
| 285 | +- [Agentforce Trailhead](https://trailhead.salesforce.com/search?keywords=agentforce) |
| 286 | +
|
| 287 | +### Community Resources |
| 288 | +- [AgentScript Community Guide](https://agentforce.guide/) |
| 289 | +- [GenAI Explorer Documentation](/genai) |
| 290 | +- [Trailblazer Community](https://trailhead.salesforce.com/trailblazer-community) |
| 291 | +
|
| 292 | +## π Join the Movement |
| 293 | +
|
| 294 | +AgentScript represents the future of Agentforce development. This community tool helps ensure everyone can participate in that future, regardless of team size or resources. |
| 295 | +
|
| 296 | +**Let's make AgentScript adoption easier together!** |
| 297 | +
|
| 298 | +Try the migration tool, share your experience, and help build the community resources that benefit everyone. |
| 299 | +
|
| 300 | +--- |
| 301 | +
|
| 302 | +:::tip Community-Driven Tool |
| 303 | +This is a community tool to help teams adopt Salesforce's modern AgentScript approach. While it automates 85% of the migration work, always review and test thoroughly before production deployment. |
| 304 | +::: |
| 305 | +
|
| 306 | +*Accelerating Agentforce innovation through community tools.* π |
| 307 | +
|
0 commit comments