Agentic Batch Changes
Agentic Batch Changes lets you describe a change in plain language: then, the agent scopes it, applies it across every repo, and tracks it through to merge.
Agentic Batch Changes is currently a Beta feature. The Beta is currently only available upon request: schedule a demo or reach out to your account manager to get started.
Agentic Batch Changes is built on top of Batch Changes, our precision tool for applying code changes at scale. Paired with Deep Search, our code understanding agent, these two tools form the foundation of an agent harness specialised for operating across your entire codebase: from thousands of repositories, to the largest monorepos.
Getting started
Agentic Batch Changes is currently a Beta feature. The Beta is currently only available upon request: schedule a demo or reach out to your account manager to get started.
Once Agentic Batch Changes is enabled, you can find it in the Sourcegraph navigation bar.
Setup
Before creating an Agentic Batch Change, make sure your Sourcegraph instance can access the repositories and publish changes back to your code host:
- Configure code host connections for the repositories you want the agent to search and modify.
- Configure Batch Changes credentials for each code host where the agent should publish pull requests or merge requests.
- Deploy Sourcegraph executors so Agentic Batch Changes can run code-modification jobs in isolated workspaces. Executors are available with no additional setup on Sourcegraph Cloud.
Prompting
Each Agentic Batch Change starts with a prompt. Like any agent, specificity and a clear success criteria can dramatically improve results. The agent works particularly well with detailed migration plans, which you can upload for the agent to consume. However, you can also start with some fairly simple requests to see how the agent responds:
- "Generate documentation for these repositories to describe the purpose of the repository."
- "Generate
AGENTS.mdguidance for these repositories to help coding agents." - "Identify usage of primitive wrapper constructors in Java projects, like
new Boolean(true), and replace them with the recommended.valueOf()factory methodBoolean.valueOf(true)." - "In our Go 1.16+ code, remove
ioutilimports, replacing them with the appropriate modern methods in packages likeioandos." - "Find repositories affected by CVE-2025-55182. Prioritize repositories that have execution paths to vulnerable code. If the application’s React code does not use a server, it is not affected by this vulnerability. If the app does not use a framework, bundler, or bundler plugin that supports React Server Components, the app is not affected by this vulnerability."
Customisation
Most organisations will also have specific conventions, technologies, and preferences. The agent may discover some of these conventions in its research, but you can also improve performance by customising the agent with skills and AGENTS.md-style guidance, available on a per-user, per-organisation, or global level in settings:
- Users → Settings → Batch Changes → Agent
- Administration → Batch Changes → Agent
Administration
Most Batch Changes configurations still apply in Agentic Batch Changes, unless otherwise listed before. To learn more about Batch Changes configuration options, refer to Site Admin Configuration for Batch Changes.
Access control
Access to Agentic Batch Changes can be managed through role-based access control. Users will need both of:
- Batch Changes permissions
Batch Changes: ReadorBatch Changes: Write - Agentic Batch Changes permissions
Batch Changes: Agent ReadorBatch Changes: Agent Write
Security
Agentic Batch Changes uses the same security model as Batch Changes, with additional safeguards for agent-generated work:
- Repository permissions are enforced when users view, create, update, or publish changes, so users can only act on repositories they are allowed to access.
- Batch Changes credentials control which code host identity publishes pull requests or merge requests.
- Code host protections, including CI checks, branch protections, and review requirements, continue to apply to pull requests or merge requests created by Agentic Batch Changes.
- Executors run code-modification jobs in isolated workspaces. Executors do not access code host credentials directly.
- Executor secrets are scoped by user, organisation, or globally, and are redacted in logs. Agentic Batch Changes will ask you for approval on any agent-generated actions that reference your secrets before those actions run.