---
title: Potpie AI Raises $2.2 Million to Give AI Agents Codebase Context
description: Potpie AI raises $2.2 million in pre-seed funding to build a context layer that makes AI agents useful inside complex enterprise codebases.
author: Darie Nani (Editor-in-Chief)
date: 2026-02-23T14:15:43.000Z
updated: 2026-05-05T19:29:39.544Z
canonical: https://www.sovereignmagazine.com/article/potpie-ai-raises-2-2-million-to-give-ai-agents-codebase-context
image: https://cdn.nanimediahouse.com/potpie-ai-product-overview.webp
categories: Startups
content_type: Spotlight
region: Global
publication: Sovereign Magazine
about:
  - type: Organization
    name: Potpie AI
    description: Potpie AI is a foundational context layer that allows AI agents to operate across complex, large-scale codebases. The platform converts source code, tickets, logs, documentation and code reviews into a unified knowledge graph, enabling AI agents to reason across entire systems rather than individual files. Founded in 2023 by Aditi Kothari and Dhiren Mathur, Potpie launched publicly in January 2025 and works with Fortune 500 companies in regulated industries. The company is headquartered in San Francisco. More information is available at potpie.ai .
    url: https://potpie.ai/
---

Potpie AI has raised $2.2 million in pre-seed funding to build a context layer that allows AI agents to operate inside large, complex codebases. The round was led by Emergent Ventures, with participation from All In Capital, DeVC and Point One Capital.

![potpie ai founders aditi kothari dhiren mathur 1024x684](https://cdn.nanimediahouse.com/potpie-ai-founders-aditi-kothari-dhiren-mathur-1024x684.webp)

The company converts entire codebases into a Neo4j-based knowledge graph (a structured map of every file, class, function and their relationships) then layers AI agents on top that can reason across the full system. It pulls in information from source code, tickets, logs, documentation and code reviews, links it together and makes it queryable by agents. The principle is that an AI agent is only as effective as the context it can access. Most cannot access enough.

## Why Code Generation Is Not the Hard Part

Cursor hit a $29.3 billion valuation in its latest round. OpenAI acquired Windsurf for a reported $3 billion. Cognition raised $400 million for Devin. Almost all of this capital targets the same problem: generating code faster.

That is not where enterprise engineering teams are stuck. The constraint is context. In systems spanning millions of lines of code, critical knowledge about architecture, dependencies and design intent lives in the heads of a handful of senior engineers. When those engineers leave, it leaves with them. When an AI agent operates without that context, it produces code that compiles but breaks things in production because it does not understand what the surrounding system expects.

A recent Anthropic study found that [AI coding assistants speed up work but can reduce the skills](https://www.sovereignmagazine.com/article/anthropic-study-finds-ai-coding-assistants-speed-up-work-but-reduce-skills) teams need to catch exactly those failures. Potpie is designed to close that gap by giving agents system-level understanding before they write a single line.

## How the Platform Works

Rather than autocompleting individual lines, Potpie builds a graphical representation of an entire software system and infers behaviour across modules. It indexes APIs, services, databases and components into a searchable, tagged structure that reduces search space and improves reliability.

Practical applications include debugging cross-service failures (tracing a production issue across multiple connected services), blast radius detection (predicting what breaks when something changes), automated end-to-end test generation and system design from tickets. The platform also generates documentation automatically when pull requests are created and produces release notes when code ships.

One enterprise customer with a codebase exceeding 40 million lines reduced root cause analysis for production issues from nearly a week to roughly 30 minutes. Engineers shifted from investigating to reviewing. Another customer maintaining decades-old hardware-integrated systems compressed multi-sprint test generation into a fraction of the original timeline.

## The Founders

Aditi Kothari (CEO) and Dhiren Mathur (CTO) founded the company in late 2023. While most of the industry targeted knowledge workers with generative AI tools, they focused on developers, where the problem is structurally different. Code is non-linear, deeply interconnected and spread across systems that were never designed for AI to operate inside.

Kothari previously worked as a product manager at Razorpay, the Indian fintech unicorn. Mathur spent four years building scalable microservice applications at Cisco Webex. They spent nearly two years building the foundational knowledge graph layer before launching Potpie publicly in January 2025.

The company now works with Fortune 500 and publicly listed companies in regulated industries, including healthcare and insurtech. Its open-source projects have surpassed 5,000 stars on GitHub, which has become a pipeline for enterprise adoption. Revenue reached $1.1 million by mid-2025, according to data tracked by Latka.

## The Investment Case

Emergent Ventures manages over $140 million and focuses on enterprise AI and cloud infrastructure. Managing partner Anupam Rastogi, who led the investment, has a track record with developer-facing companies. His portfolio includes Observe.ai (now on the Forbes AI 50) and Acceldata (used by the world’s largest banks). TIME named Emergent one of America’s top VC firms in 2025.

‘In large enterprises, the real challenge is not generating code, it is understanding the system deeply enough to change it safely,’ Rastogi said. ‘Potpie’s ontology-first architecture creates a structured model of the entire engineering ecosystem. This allows AI agents to reason across services, dependencies, tickets and production signals with the clarity of a senior engineer.’

## What the Capital Funds

The $2.2 million will fund early enterprise deployments, expand the engineering team and continue development of the core context and agent infrastructure. Potpie targets codebases starting at one million lines and scaling to hundreds of millions.

The [competition between Anthropic and OpenAI](https://www.sovereignmagazine.com/article/anthropic-and-openai-release-competing-ai-coding-models-within-minutes-of-each-other) on the underlying models is accelerating the pace of [AI coding tool development](https://www.sovereignmagazine.com/article/cielara-code-ai-coding-localization). But models alone do not solve the context problem. Potpie is betting that the companies which build structured understanding of complex systems will become the infrastructure layer that everything else depends on.

‘AI readiness is not about picking the right model,’ Kothari said. ‘It is about building systems that can support intelligence over time.’

## Further Context

**Q: How do AI coding agents work?**
AI coding agents go beyond autocomplete. They receive a goal (a bug to fix, a feature to build, a test to write), break it into subtasks, then iteratively plan, write code, run it and refine the output. The difference from a chatbot is autonomy: an agent can execute multiple steps without waiting for human input at each stage. Most agents rely on large language models for reasoning, but their effectiveness depends on how much context they can access. An agent working with a flat text file understands far less than one operating on a structured graph of the entire codebase. That gap in context access is where most enterprise deployments succeed or fail.

**Q: Which AI coding tools lead the market in 2026?**
The landscape splits into three tiers. IDE-integrated tools (Cursor, GitHub Copilot, Windsurf) dominate individual developer productivity and attract the largest funding rounds. Cloud-first autonomous agents (Cognition’s Devin, Google’s Jules) aim to replace entire development tasks end to end. Infrastructure layers (Potpie, Sourcegraph’s Cody) focus on making the other tools work better by providing deeper codebase understanding. Cursor leads on valuation at $29.3 billion. Windsurf was acquired by OpenAI. The market is consolidating fast, and the competition on the underlying models between Anthropic and OpenAI is accelerating the pace.

**Q: What are the legal risks of AI-generated code?**
AI-generated code sits in a legal grey area. In most jurisdictions, output produced entirely by an AI system is not eligible for copyright protection, which means it cannot be owned in the traditional sense. Companies with AI-assisted codebases typically protect their work through trade secret law rather than copyright. The larger risk is liability: if an AI agent introduces a vulnerability or copies licensed code without attribution, the company deploying it bears responsibility. Regulated industries (healthcare, financial services, insurance) face additional scrutiny, which is one reason enterprise customers increasingly require tools that can demonstrate how and why code was generated.

**About Potpie AI**

Potpie AI is a foundational context layer that allows AI agents to operate across complex, large-scale codebases. The platform converts source code, tickets, logs, documentation and code reviews into a unified knowledge graph, enabling AI agents to reason across entire systems rather than individual files. Founded in 2023 by Aditi Kothari and Dhiren Mathur, Potpie launched publicly in January 2025 and works with Fortune 500 companies in regulated industries. The company is headquartered in San Francisco. More information is available at potpie.ai .

[Website](https://potpie.ai/)
