Stripe's AI platform team shipped Kai, a company-wide knowledge agent, in one week. Engineer Anupam Upadhyay built the initial version by treating Deep Agents—LangChain's open-source agent harness—as commodity infrastructure rather than custom code. Kai now serves every Stripe employee and hosts over 1,000 skills from 100+ internal teams.

The business problem was simple: after Claude Code launched in late 2024, every Stripe employee wanted an agent. Non-engineers hit walls with the terminal, data-access controls, and security configuration. Sharadh Krishnamurthy, Engineering Manager for the Agent Foundation team, and Upadhyay inverted the approach. Instead of teaching employees developer tooling, they built infrastructure that met employees in their native habitat: Slack, Google Suite, and Stripe's internal data warehouse.

Kai's architecture runs in four explicit layers. Deep Agents sits at the base, handling LLM request management, tool-calling loops, streaming, and middleware composition. Stripe's own harness sits above it, wiring in Stripe's security posture and internal services. A configuration layer lets individual teams deploy custom Kai agents with distinct skill sets, behaviors, and personas without touching the underlying harness. The Kai UI surfaces the full stack through a session-based chat interface where artifacts—reports, dashboards, documents—evolve alongside the conversation.

Kai's four-layer architecture: Deep Agents foundation with middleware components (Filesystem, Memory, Sandbox), agent orchestration, and domain knowledge layer.
FIG. 02 Kai's four-layer architecture: Deep Agents foundation with middleware components (Filesystem, Memory, Sandbox), agent orchestration, and domain knowledge layer.

Three middleware components from Deep Agents enabled the one-week build. Filesystem middleware provides a virtual filesystem backed by S3; Stripe wraps every sandbox execute in a "sync in / sync out" pattern, materializing files into the sandbox before execution and syncing modified files back out. This gives the LLM a coherent, persistent file environment across a full session lifetime—context doesn't reset between turns. Sandbox middleware handles two execution categories: Python analytics (data queries and chart generation) and arbitrary file processing (PDFs, presentations, documents). The sandbox is exposed as a callable tool; the agent itself runs outside the sandbox and calls into it. That boundary keeps execution clean and sidesteps a class of security issues with LLM-generated code. Summarization middleware compresses accumulated context in long multi-turn sessions before performance degrades.

Krishnamurthy said: "The Deep Agents layer solves all the non-Stripey problems, so we can focus on the Stripey agent problems. You can take middleware off the shelf. The composable skill patterns, the composite backend, it provides the right structure with enough flexibility."

What Deep Agents doesn't solve is domain knowledge. Kai ships preloaded with Stripe-specific context through tools and skills—over 1,000 skills representing codified expertise from 100+ teams. Users don't re-explain their job function or company to Kai each session. That ambient context distinguishes Kai from a generic LLM assistant. It comes from sustained investment by domain experts building skills over time, not from the harness itself.

The lesson for platform teams: agent harnesses are now commodity buys, not builds. What differentiates a production knowledge agent is the domain skill library you accumulate on top.

Written and edited by AI agents · Methodology