Code Understanding, Oversight and Evolution | Sourcegraph Modern appsec at codebase scale on Aug 6 | Register now Platform Solutions Resources Pricing Schedule a demo Deep Search Agentic, natural language AI search Code Search Powerful search for complex codebases Agentic Batch Changes New AI agent for large scale code changes Insights High-level code metrics and analytics MCP Code graph knowledge for agents APIs Integrate with Sourcegraph CLI Sourcegraph in your terminal Code Migrations and Modernization Modernize and migrate codebases at scale Code security Security visibility and remediation at scale Code understanding Give every engineer complete codebase context Agent effectiveness Give AI coding agents the context to succeed Resources hub Guides, reports, and more Case studies Real-world results from our customers Events Conferences, webinars, and meetups Partners Cloud, technology, and channel partners Blog Product + engineering updates Changelog What's changed in Sourcegraph Documentation Get help using Sourcegraph Security Explore our security and compliance portal Public Code Search Search across 1M+ public repositories Take control of your codebase Give humans and agents complete context to understand, oversee, and evolve the world's largest, most complex codebases. Get a demo → Trusted by 200+ enterprise engineering teams The problem A tidal wave of code is coming. Code is growing faster than teams can understand or control it. Agents see only fragments of the enterprise codebase, rebuilding context for each task. As agent adoption grows, that blind spot becomes inconsistency, missed changes, and risk at scale. This is where engineering teams lose control. The solution Take back control with complete codebase context Sourcegraph indexes all of your repositories across the entire codebase, intelligently empowering agents with full context, driving improved outcomes. Execute the same task with dramatically different results. Coding Agent Agent Read models/user.go I'll add a Role field to the User struct and update the store methods. | I'll add a Role field to the User struct and update the store methods. Edit models/user.go — added Role string field Edit database/user_store.go — updated Create/Update Done! I've added: Done! I've added: Role field to the User struct Role field to the User struct Updated Create and Update to persist the role Updated Create and Update to persist the role Added a GetByRole query method Added a GetByRole query method You'll want to add a migration for the new column and update your auth checks. What the agent missed Auth middleware — no role check, any user can access admin routes API response DTO — role never returned to clients Audit logging — role changes not tracked, no compliance trail /admin frontend routes — no guard, UI still accessible to all Invite flow — new users created without a default role 4 integration tests — assert on user shape, will break Coding Agent Agent + Sourcegraph MCP sg mcp sg_keyword_search "User struct" across 2,847 repositories Found 31 files referencing User across 7 layers models/user.go middleware/auth.go api/dto/user_response.go routes/admin/guard.ts +27 more files This is a cross-cutting change. Here's my plan: | This is a cross-cutting change. Here's my plan: Plan 8 steps 1. DB migration 2. Model 3. Auth middleware 4. API DTO 5. Audit logging 6. Invite flow 7. Frontend 8. Tests Edit 12 files across 7 layers Complete. All layers updated, tests passing. Full diff ready for review. | Complete. All layers updated, tests passing. Full diff ready for review. Nothing missed Auth middleware API response DTO Audit logging Frontend routes Invite flow Integration tests Stripe makes their fleet of internal AI agents more effective with the Sourcegraph MCP server Read more ↗ "Minions are connected to MCP… this is how they gather context: internal docs, ticket details, build statuses, and code intelligence via Sourcegraph search." — Alistair Gray, Stripe Sourcegraph Understand. Oversee. Evolve. The platform that gives you control of your codebase. Code understanding. Understand your codebase, completely. Agents are only as good as the context they receive. Sourcegraph gives them full codebase intelligence. Deep Search. Ask complex questions in natural language. Get grounded answers with citations. Used by engineering, support, and go-to market teams. How are versioned docs deployed to sourcegraph.com? Will Dollman, Security Engineer How do we handle database migrations and schema changes across services? Erik Seliger, Software Engineer What design tokens and color variables are used across our UI components? Taiyab Raja, Product Designer Is there a way to limit or allocate searches on an individual or team level for Deep Search? Ashley Singh, Account Executive MCP Server. Make every token count. Give agents complete, SCIP-powered context to produce reliable results with fewer retries and lower inference spend. Code Search. Search your entire codebase with exact, deterministic, and exhaustive results. Trusted by enterprise teams for over a decade. Code oversight. Keep up with what's changing. Understand system-wide impact before changes ship. Track patterns, monitor risk, and stay ahead of issues as code evolves. Code Insights. Track migrations, adoption, and risk across your codebase over time. Code Monitoring. Alert agents and teams when code changes. Living Documentation. A continuously updated knowledge base of your codebase. Codebase evolution. Execute changes safely and at scale. Making one change is easy. Making it everywhere, correctly, is not. New batch change › Onboarding Modernization Code health Security Run Agentic Batch Changes. AI agent for large-scale code changes. Migrate, modernize, and remediate across every repository with full control. Understanding Oversight Evolution Built for Big Code Trusted. Scalable. Enterprise-ready. SOC2 Type II + ISO27001 Compliance. Your code and data stay secure. Zero data retention. Your LLM inference is never stored beyond what's required and never shared with third parties. Built to scale. Handles the world's largest monorepos and multi-repo architectures. Enterprise authentication. SSO (SAML, OpenID Connect, OAuth), SCIM provisioning and lifecycle management, and RBAC for secure, centralized authentication. Dedicated support. Account Managers + Support Engineers provide dedicated help. Guide The Sourcegraph guide to surviving Big Code Discover 100 ways to understand, oversee, and evolve large codebases. This guide explores practical ways for navigating Big Code and keeping your team and agents in control. Download guide Take control of your codebase Understand it. Oversee it. Evolve it with confidence at Big Code scale. Get a demo → ✕ CodeScaleBench Report Learn how Sourcegraph makes agents faster, cheaper, and more accurate. Download → Code understanding for humans and agents Platform Deep Search Code Search MCP server Agentic Batch Changes Search public code Pricing Solutions Code Migrations and Modernization Code security Code understanding Agent effectiveness Resources Documentation Resource library Blog Changelog Case studies Partners Community Security portal Company About Careers Contact Handbook Brand Guide System status Terms of service Privacy policy Cookie preferences Do not sell