Apex Aide apexaide

Enable Agentforce and Data Cloud in a Scratch Org

www.salesforcebolt.com· ·Intermediate ·Developer ·6 min read
Summary

Spin up an Agentforce-enabled scratch org quickly using the exact JSON definition files and Salesforce CLI commands. This setup solves the common problem of limited AI-enabled environments for developing and testing Agentforce solutions by avoiding the delays and limitations of sandboxes and Trailhead orgs. It covers prerequisites, feature configuration, and step-by-step commands to create scratch orgs with Agentforce alone or combined with Data Cloud for ISV/Partner orgs. After setup, developers get instant access to Agentforce tools and APIs for AI agent building and testing, enabling faster and cleaner development cycles.

Takeaways
  • Use Einstein1AIPlatform feature to enable Agentforce in scratch orgs.
  • Configure agentPlatformSettings and einsteinGptSettings in scratch org definition files.
  • Request Data Cloud permission for Partner Business Org Dev Hubs before including it.
  • Create scratch orgs with sf org create scratch CLI command for fast setup.
  • Prefer sandboxes for Data Library or production data needs; use scratch orgs for rapid Agentforce dev.

  Stop hacking workarounds. Here's the exact definition file and CLI commands to spin up an Agentforce-ready scratch org in minutes. If you've been building Agentforce solutions, you already know the pain of needing an AI-enabled org to test in. Trailhead orgs expire, sandboxes take time to spin up, and production is off-limits. Scratch orgs with Agentforce enabled are the right developer tool for the job — and once you know the exact definition file structure, it takes about two minutes to have a fresh Agentforce org ready to go. What You're Getting According to the official Agentforce Developer Guide , a scratch org is a configurable, short-term Salesforce environment that you can quickly spin up when starting a new project, a new feature branch, or a feature test. Unlike a sandbox, a scratch org doesn't contain data or metadata from your production org. It is configured entirely from a definition file.

Agentforce