---
title: "Sourcegraph integration for LuumenAI"
url: "https://www.luumen.ai/integrations/sourcegraph/"
entity: SoftwareIntegration
category: "Source control & CI/CD"
audience: "SRE, DevOps, platform engineering, IT operations"
---

# Sourcegraph integration for LuumenAI

Read code, commits, and diffs from Sourcegraph while you work an incident

## What LuumenAI can do with Sourcegraph

LuumenAI connects to Sourcegraph with an API token and exposes 8 tools (8 read-only). Every tool is read-only, so it can answer questions from Sourcegraph but cannot change anything in it. Read actions still follow the configured access and approval policy.

## Key facts

- Authentication: API token
- Tools available: 8 tools (8 read-only)
- Deployment: scoped as part of your Pilot, Platform, or Managed rollout
- Category: Source control & CI/CD

## About Sourcegraph with LuumenAI

Connect Sourcegraph and the agent can answer code questions during an incident. List repositories, walk a repository path, pull file contents from the default branch, read commit details, and compare two commits to see what changed. It reads only — there are no write tools here. Authentication is by API key.

## Example tools

Read-only (8 in total):

- `SOURCEGRAPH_CHECK_SITE_SETTINGS_EDIT_PERMISSION` — Check whether site settings can be edited through the API.
- `SOURCEGRAPH_COMPARE_COMMITS` — Compare two commits in a repository and retrieve their file diffs.
- `SOURCEGRAPH_GET_COMMIT_DETAILS` — Get detailed information about a specific commit in a repository.
- `SOURCEGRAPH_GET_CURRENT_USER` — Retrieve information about the currently authenticated user.
- `SOURCEGRAPH_GET_FILE_CONTENTS` — Fetch the contents of a specified file on the default branch.
- `SOURCEGRAPH_LIST_REPOSITORIES` — List repositories on the Sourcegraph instance.
- `SOURCEGRAPH_LIST_REPOSITORY_FILES` — List all files and directories in a repository path.
- `SOURCEGRAPH_LIST_REPOSITORY_LANGUAGES` — List languages used in a repository.

## Frequently asked questions

### How does LuumenAI connect to Sourcegraph?

Authorize once with API token. Luumen lists the scopes each action needs before you approve the connection, and credentials never appear in the chat.

### Can LuumenAI change things in Sourcegraph on its own?

No. Every one of the 8 tools is read-only, so LuumenAI can answer questions from Sourcegraph but cannot change anything in it. Read actions still follow the configured access and approval policy.

### Is there an audit trail?

Every call to Sourcegraph is recorded with the actor, the input, and the result.

Full page: https://www.luumen.ai/integrations/sourcegraph/
