Skip to content

How Stripe Built Kai

Read the Portuguese translation →

Author: LangChain · Watch on YouTube

Video authored by the channel shown, not by IANIA; all rights belong to the creator. Transcript and summary generated automatically; the original-language content is preserved.

Original language: English

Original video: How Stripe Built Kai · Channel: LangChain · 01:32 · Watch on YouTube

Topics: AI agents, Enterprise AI applications, Cybersecurity and software security, Prompt and context engineering, AI developer tools

Stripe built Kai, an internal AI assistant used weekly by 83% of the company, with more than a thousand skills and 500 internal tools. Built on Deep Agents, Kai loads only the tools relevant to the selected skill while keeping foundational skills and policies in context. It runs code through an isolated sandbox and uses an S3-backed virtual file system to persist state across turns. One engineer built the first working version in a week, and adoption grew 16-fold in about a month, with Kai now running over 60,000 sessions a week.

  • Kai connects employees to Stripe’s data warehouse, Slack, and internal tools.
  • Loading every skill and tool into one prompt would exceed the agent’s available context.
  • Each skill has its own allowed tools, so selecting a skill limits which tools are loaded.
  • Foundational skills remain pinned to protect core context and policies.
  • The agent writes code outside a sandbox but calls into the sandbox to execute it.
  • A virtual file system backed by S3 persists state across a session.
  • One Stripe engineer built the first working version of Kai in a single week.
  • Adoption grew 16-fold in about a month, and Kai runs over 60,000 sessions a week.
Start Chapter Summary
00:00 The context challenge Stripe wanted an assistant connected to company data and tools, but loading all its skills and tools into one prompt would overwhelm the agent.
00:30 Selecting tools and protecting execution Deep Agents loads tools based on the chosen skill, keeps foundational policies pinned, and uses a sandbox to isolate code execution.
01:01 Persistence, adoption, and next steps Kai persists state with an S3-backed virtual file system, was built quickly, and grew to tens of thousands of weekly sessions.

Stripe built an internal AI assistant with over a thousand skills, 500 internal tools, and 83% of the company using it every week. — 00:00

the agent’s context ends up with just a handful, not all 500 available tools at once. — 00:30

One Stripe engineer built the first working version of Kai in a single week — 01:01

the Deep Agents layer solves all the non-Stripey problems — 01:01

Stripe, Kai, Deep Agents, LangChain, S3, sandbox, skill, LangChain Academy

00:00 Stripe built an internal AI assistant with over a thousand skills, 500 internal tools, and 83% of the company using it every week. They did that by managing context correctly. Stripe wanted every employee to have an assistant connected to their data warehouse, Slack, and internal tools. But load a thousand skills and 500 tools into one system prompt, and the agent runs out of room before it even starts the task. So, they built it on Deep Agents, our open-source agent harness. Each skill carries its own list of allowed tools. So, picking a skill

00:30 decides which tools load, and the agent’s context ends up with just a handful, not all 500 available tools at once. Of course, a handful of foundational skills always stay pinned no matter what. So, Stripe’s core context and policies never get dropped by accident. So, that covers what stays in context. Now, the agent runs and writes code outside a sandbox, but for safety, it calls into the sandbox to run that code. So, execution stays isolated without ever exposing Stripe’s real infrastructure or credentials. The agent also needs to remember things

01:01 across a session. So, a virtual file system, backed by S3, lets it persist state instead of rereading everything from scratch on every turn. One Stripe engineer built the first working version of Kai in a single week, because Deep Agents had already solved the hard infrastructure problems. Adoption grew 16-fold in about a month, and Kai now runs over 60,000 sessions a week. As the engineering manager for Stripe’s agent foundation team put it, the Deep Agents layer solves all the non-Stripey problems, so his team could focus on Stripe’s problems instead. If you want to learn more about the

01:32 mechanics behind Deep Agents, LangChain Academy’s Deep Agents course walks through everything hands-on, so you can apply it to your own team.