Sourcegraph

AI agents that navigate your entire codebase through Sourcegraph

Developers ask questions about code across hundreds of repositories. Your AI agent searches Sourcegraph instantly, retrieves file contents, compares commits, and identifies repository languages. Code understanding happens in the conversation, not in a separate tab.

Chosen by 800+ global brands across industries

Code intelligence at conversation speed

Your AI agent becomes a code search expert, browsing repositories, inspecting file contents, and comparing commits across your entire Sourcegraph instance in real time.

Sourcegraph

Use Cases

Developer support scenarios solved

See how engineering teams use AI agents to search code, understand changes, and answer architecture questions across their Sourcegraph-indexed codebases.

Codebase Exploration Without Cloning

A new engineer asks 'Where is the authentication logic in the payments service?' Your AI Agent searches Sourcegraph repositories, finds the matching project, lists files in the auth directory, and retrieves the relevant source code. The developer gets code context in seconds instead of spending 20 minutes cloning repos and searching locally.

Release Comparison on Demand

A product manager asks 'What changed between v2.3 and v2.4?' Your AI Agent compares the two tags in Sourcegraph, retrieves all file diffs, and produces a human-readable summary of modified features. No need to bother an engineer for a changelog walkthrough.

Cross-Repository Dependency Checks

A security engineer wants to know which services still use an outdated library. Your AI Agent browses repository file contents across multiple projects in Sourcegraph, checks package manifests, and returns a list of repos that need updating. Vulnerability triage happens during the conversation rather than in a separate sprint.

Try
Sourcegraph

Sourcegraph

FAQs

Frequently Asked Questions

How does the AI agent search code across repositories in Sourcegraph?

The agent uses Sourcegraph's GraphQL API to list repositories and retrieve file contents. When someone asks about code, the agent queries the repository index, navigates directory trees, and fetches specific files, all in real time from your Sourcegraph instance without cloning anything locally.

Can the agent access private repositories on my Sourcegraph instance?

Yes. Access is determined by the personal access token you provide during setup. The agent sees exactly what that token's owner can see. If the token has access to private repositories on your self-hosted or cloud Sourcegraph instance, the agent can search and browse them.

Does Tars store copies of my source code from Sourcegraph?

No. Tars queries Sourcegraph in real time during conversations. File contents, commit data, and repository information are fetched on demand and used only to respond to the current request. No code is cached or stored in a separate database.

Can the agent compare commits across different branches or tags?

Yes. The compare commits capability accepts any valid git reference, including commit SHAs, branch names, and tags. You can ask the agent to diff 'main versus staging' or 'v1.0 versus v2.0' and get file-level change summaries.

What happens if a repository has thousands of files?

The agent handles large repositories using Sourcegraph's pagination. It can list files recursively or scoped to a specific directory path. For very large repos, the agent narrows results to the most relevant path based on the developer's question.

How is this different from using Sourcegraph's web interface directly?

Sourcegraph's web UI requires developers to leave their current workflow. With Tars, code search happens inside the conversation, in Slack, Teams, or on your website. The agent combines multiple API calls, like finding a repo then reading a file, into a single conversational answer.

Does the agent work with Sourcegraph Cloud and self-hosted instances?

Yes. As long as the Sourcegraph instance exposes the API and you provide a valid access token, the agent connects to both cloud-hosted and self-managed Sourcegraph deployments. Configure the base URL during tool setup.

Can I restrict which repositories the agent can browse?

Repository access is controlled through the Sourcegraph access token's permissions. Create a token with scoped access to specific repositories or code hosts, and the agent will only be able to browse what that token permits. Tars does not add any additional access beyond the token.

How to add Tools to your AI Agent

Supercharge your AI Agent with Tool Integrations

Don't limit your AI Agent to basic conversations. Watch how to configure and add powerful tools making your agent smarter and more functional.

Privacy & Security

We’ll never let you lose sleep over privacy and security concerns

At Tars, we take privacy and security very seriously. We are compliant with GDPR, ISO, SOC 2, and HIPAA.

GDPR
ISO
SOC 2
HIPAA

Still scrolling? We both know you're interested.

Let's chat about AI Agents the old-fashioned way. Get a demo tailored to your requirements.

Schedule a Demo