Sourcegraph is a code intelligence platform that enables developers to search, understand, and manage code across large codebases.
Sourcegraph is a code intelligence platform that enables developers to search, understand, and manage code across large codebases. On Nagent, Sourcegraph is exposed as a fully-configurable developer tools integration that any agent can call — 8 actions, and API key authentication. No code is required to wire Sourcegraph into your workflow — connect it once via the External Integrations panel and reuse it across every agent you build.
Agent builders use Sourcegraph to automate the kinds of tasks developer tools teams previously handled manually. Concrete examples — each one is a single agent step in Nagent — include:
Every action and trigger is paired with a structured input/output schema (visible in the sections below), so when you wire Sourcegraph into Helix — our agentic agent builder — the editor knows exactly what each step expects and produces. Configure once, deploy anywhere across your Nagent agents.
Every operation an agent can call against Sourcegraph, with input parameters and output schema. Drop these into any step of an agent built in Helix.
SOURCEGRAPH_CHECK_SITE_SETTINGS_EDIT_PERMISSIONTool 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.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
SOURCEGRAPH_COMPARE_COMMITSTool to compare two commits in a repository and retrieve their file diffs. Use after confirming the repository name and commit SHAs to inspect differences.
Input parameters
Base commit SHA or ref to compare from
Head commit SHA or ref to compare to
Repository name in format 'github.com/owner/repo'
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
SOURCEGRAPH_GET_COMMIT_DETAILSGet detailed information about a specific commit in a repository.
Input parameters
Commit SHA, branch name, or tag to get details for
Repository name in format 'github.com/owner/repo'
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
SOURCEGRAPH_GET_CURRENT_USERTool to retrieve information about the currently authenticated user. Use when needing confirmation of identity via Sourcegraph GraphQL API.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
SOURCEGRAPH_GET_FILE_CONTENTSTool 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.
Input parameters
Path to the file in the repository, relative to the root, e.g., 'README.md'.
Full repository name, including host and path, e.g., 'github.com/uber/react-map-gl'.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
SOURCEGRAPH_LIST_REPOSITORIESTool to list repositories on the Sourcegraph instance. Use when you need to paginate through all available repositories.
Input parameters
Pagination cursor returned from previous page; omit for first page.
Number of repositories to retrieve (1-1000).
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
SOURCEGRAPH_LIST_REPOSITORY_FILESTool to list all files and directories in a repository path. Use when you need to enumerate files in a repository without cloning.
Input parameters
Git ref (branch, tag, or commit SHA). Defaults to HEAD.
Path within the repository. Defaults to root ('').
Whether to list files recursively. Defaults to True.
Full repository name, e.g., 'github.com/owner/repo'
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
SOURCEGRAPH_LIST_REPOSITORY_LANGUAGESTool 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.
Input parameters
Full name of the repository (e.g., 'github.com/gorilla/mux').
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
No publicly available marketplace agent is found using this tool yet. There are 71 agents privately built on Nagent that already use Sourcegraph.
Build on Nagent
Connect Sourcegraph to any Nagent agent in minutes — no API key management, no boilerplate. Just configure and deploy.
The five questions agent builders ask before adopting a new integration.
Open the External Integrations panel inside Nagent (app.nagent.ai/externalIntegration), find Sourcegraph, and click "Connect Now." You'll authenticate with an API key — Nagent handles credential storage and refresh automatically. Once connected, Sourcegraph is available to any agent in your workspace.
No. Nagent provides no-code integration for every tool. Once Sourcegraph is connected, you configure its 8 actions directly in the agent builder UI — no API calls, no boilerplate, no schema management.
Helix — Nagent's agentic agent builder — lets you drop Sourcegraph steps into any workflow visually. Pick an action (e.g., one of those listed above), fill in the inputs (Helix knows the required vs. optional schema for each parameter), and connect it to upstream/downstream steps. Triggers run as the entry point of an agent, so when a Sourcegraph event fires, the agent kicks off automatically.
Every Sourcegraph action and trigger ships with a fully-typed schema — input parameters with name, type, required flag, and description, plus the output payload shape. The schemas are documented in the sections above. Helix uses these schemas to validate your configuration at build time and to type-check the data flowing between steps.
Yes. While Sourcegraph ships with 8 pre-built developer tools actions, you can layer custom logic around them inside Helix — pre/post-processing steps, conditional branches, retries, or stitching Sourcegraph together with other connected tools. For deeper customization, talk to our team about Nagent's Agentic AI Lab — forward-deployed engineers who build Sourcegraph-based workflows tailored to your business.