
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.




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
See how engineering teams use AI agents to search code, understand changes, and answer architecture questions across their Sourcegraph-indexed codebases.
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.
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.
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.

Sourcegraph
FAQs
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.
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.
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.
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.
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.
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.
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.
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.
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
At Tars, we take privacy and security very seriously. We are compliant with GDPR, ISO, SOC 2, and HIPAA.