
# Agentic Batch Changes

[Agentic Batch Changes](http://sourcegraph.com/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.

<Callout type="warning">
	Agentic Batch Changes is currently a [Beta feature](/beta-and-experimental).
	The Beta is currently only available upon request: **[schedule a
	demo](https://sourcegraph.com/contact) or reach out to your account manager
	to get started.**
</Callout>

Agentic Batch Changes is built on top of [Batch Changes](/batch-changes), our precision tool for applying code changes at scale. Paired with [Deep Search](/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.

<video autoPlay loop muted playsInline>
	<source
		src="https://storage.googleapis.com/changelog-static-assets-prod/20260630_agentic-batch-changes-beta_agentic-batch-changes-beta-demo-1.mp4"
		type="video/mp4"
	/>
</video>

## Getting started

Agentic Batch Changes is currently a [Beta feature](/beta-and-experimental). The Beta is currently only available upon request: **[schedule a demo](https://sourcegraph.com/contact) 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](/admin/code-hosts) for the repositories you want the agent to search and modify.
- [Configure Batch Changes credentials](/batch-changes/configuring-credentials) for each code host where the agent should publish pull requests or merge requests.
- [Deploy Sourcegraph executors](/self-hosted/executors/deploy-executors) so Agentic Batch Changes can run code-modification jobs in isolated workspaces. Executors are available with no additional setup on [Sourcegraph Cloud](/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.md` guidance 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 method `Boolean.valueOf(true)`."
- "In our Go 1.16+ code, remove `ioutil` imports, replacing them with the appropriate modern methods in packages like `io` and `os`."
- "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](/batch-changes/site-admin-configuration).

### Access control

Access to Agentic Batch Changes can be managed through [role-based access control](/admin/access-control). Users will need both of:

- Batch Changes permissions `Batch Changes: Read` or `Batch Changes: Write`
- Agentic Batch Changes permissions `Batch Changes: Agent Read` or `Batch Changes: Agent Write`

## Security

Agentic Batch Changes uses the same security model as Batch Changes, with additional safeguards for agent-generated work:

- [Repository permissions](/admin/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](/batch-changes/configuring-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](/admin/executors/) run code-modification jobs in isolated workspaces. Executors do not access code host credentials directly.
- [Executor secrets](/admin/executors/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.
