Connect Sourcegraph to your AI agent

Developer Tools 8 actions available

Sourcegraph is a code intelligence platform that enables developers to search, understand, and manage code across large codebases.

We set up the connection using your own Sourcegraph account, with keys you control, and keep it running. Your agent picks it up and starts doing the work.

What your agent can do in Sourcegraph

Each one is a real action the agent can take on its own, the same things a person clicking around Sourcegraph could do. Read-only by default; write actions are confirmed against your policy.

  • Check Site Settings Edit Permission Tool to check whether site settings can be edited through the API. Use when you need to confirm the API allows site settings edits before attempting configuration changes.
  • Compare Commits Tool to compare two commits in a repository and retrieve their file diffs. Use after confirming the repository name and commit SHAs to inspect differences.
  • Get Commit Details Get detailed information about a specific commit in a repository.
  • Get Current User Tool to retrieve information about the currently authenticated user. Use when needing confirmation of identity via Sourcegraph GraphQL API.
  • Get File Contents Tool to fetch the contents of a specified file on the default branch. Use when you need raw file text without cloning the repo or using a slower code-host API.
  • List Repositories Tool to list repositories on the Sourcegraph instance. Use when you need to paginate through all available repositories.
  • List Repository Files Tool to list all files and directories in a repository path. Use when you need to enumerate files in a repository without cloning.
  • List repository languages Tool to list languages used in a repository. Use when you need to determine the primary and all languages of a given repository; call after you have the repository name.

How we connect it

  1. 1

    Connect your account

    You create a key in Sourcegraph, a key you create and control, and paste it in once. It lives in a secrets store on your server, not with us.

  2. 2

    Set the guardrails

    Read-only by default. You choose which write actions the agent may take, and anything outside that policy gets confirmed with you first.

  3. 3

    We keep it running

    Health checks on every connection, updates handled for you, and we watch the first week of activity to make sure the work lands.

Sourcegraph questions, answered.

With a key you create and control. You paste it in once, it is stored in a secrets store on your server, permissions are scoped to the minimum the agent needs, and you can revoke it at any time.
The actions Sourcegraph's API allows, the same things a person clicking around the app could do. Connections start read-only by default; write actions are confirmed against the policy you set before the agent takes them.
Connections are priced per tool on top of the base plan. Some are included, some are premium. See pricing for how connection charges work.
Standard tools are ready inside 7 business days of the setup call. We test the connection end to end, walk you through how the agent uses it, and watch the first week of activity.

Ready to put Sourcegraph to work?

Tell us what your team runs on. We set up the connection, secure it, and your agent takes it from there.

All product names, logos, and brands are property of their respective owners; used for identification only. ZeroToClaw is not affiliated with or endorsed by Sourcegraph.