Apex Aide apexaide

Keep Your Agentforce Dev Org Alive and Kicking

By Bob Buzzard· Bob Buzzard Blog· ·Intermediate ·Developer ·5 min read
Summary

Salesforce introduced Developer Editions with Agentforce and Data Cloud, which expire quickly if unused, especially for generative AI-enabled orgs that last only 45 days without activity. The solution is automating org renewal using GitHub Actions to regularly run Salesforce CLI commands that refresh the org lease. This approach saves time and effort by eliminating manual login reminders and repeated org setup, enabling consistent access to dev environments. Salesforce teams can set up secrets in GitHub repos and schedule workflow triggers to keep their dev orgs alive effortlessly.

Takeaways
  • Use GitHub Actions to automate Salesforce CLI commands for org renewal.
  • Store Sfdx Auth Url securely as a GitHub environment secret.
  • Configure workflow_dispatch and cron triggers to renew org leases on schedule.
  • Make your GitHub repository public to use GitHub Actions on a free account.
  • Renew Agentforce dev orgs before 45-day inactivity to avoid termination.

Image generated by OpenAI GPT4o in response to a prompt by Bob Buzzard This post was updated on 12th April to point the Github repo links to V1.0, as a pull request to allow multiple dev orgs to be "renewed" at once was merged to the main branch. Thanks Warren Walters for the PR. Introduction One of the major announcements at TrailblazerDX '25 was the availability of Salesforce Developer Editions with Agentforce and Data Cloud. This is something that just about everyone has been asking for since the first generative AI features went GA in April 2024. Everything else that wasn't associated with a paid contract expired - Trailhead specials after 5 days and Partner SDOs couldn't be taken past 90 days, and even getting that far required raising a case to extend it past the default 30 days. The icing on the cake was the metadata support wasn't fantastic, which meant manually recreating features after spinning up a new org, which gets a bit samey after the fifth time.

Agentforce