Latest / The CTO Podcast with Fexingo: Technical Leadership, Architecture, and Engineering Org / How Figma Built a Secure AI Sandbox
Transcript
- Lucas: When you look at the wave of generative AI landing on creative software platforms, the biggest risk isn't really accuracy—it's leakage. If a design tool starts using your proprietary component libraries to train a public model, or worse, lets users extract trade secrets through prompt injection, the whole value proposition collapses. Luna: Right, because designers treat those component libraries as their crown jewels. So how did Figma actually solve for that without killing the utility? Lucas: They went with what they call a secure AI sandbox. The core idea is total isolation between the inference layer and your persistent data store. Instead of giving the LLM direct read-write access to the database, they route everything through a controlled middleware that sanitizes inputs and restricts outputs. Luna: So it's more like a buffer zone than a direct connection? Lucas: Exactly. Think of it like a secure drop box. You put your context in, the system processes it against a restricted index, and only returns approved suggestions. They didn't just wrap an API; they rebuilt the data flow specifically for AI workloads. Luna: That makes sense for IP protection, but does it slow down the response time for the user? Lucas: It adds latency, yes, but they optimized it by caching common patterns. The trick was realizing that most design queries aren't unique—they're variations of standard layout problems. By pre-computing some of the retrieval paths, they kept the experience fluid despite the extra security hop. Luna: I see. It sounds like they prioritized safety over speed, but found a way to make speed acceptable. Lucas: Precisely. And this brings us to a broader point about how we fund these kinds of deep-tech infrastructure projects. We deliberately don't run ads on these. If you want to support that choice, the link is buy me a coffee dot com slash fexingo. Luna: Thanks for keeping the signal clean. Back to Figma—their sandbox also had to handle real-time collaboration, which is notoriously tricky. Lucas: That's the next layer. In a collaborative environment, multiple users might be prompting the AI simultaneously. If the sandbox doesn't properly segregate those sessions, you risk cross-contamination where User A's private design elements leak into User B's workspace. Luna: Wow. I hadn't thought about session-level contamination as a specific vector. Lucas: It's a classic multi-tenancy problem, but amplified by the stochastic nature of AI. Their solution involved tokenizing every interaction with a temporary, ephemeral identifier that expires immediately after the turn. No long-lived sessions means no persistent attack surface. Luna: So even if someone hacked the session, there's nothing left to steal once the moment passes. Lucas: Exactly. It's a zero-knowledge approach to the conversation history. The AI sees the immediate context needed to generate the response, but never retains memory of who said what beyond that millisecond. Luna: That's a bold move for a product that relies heavily on context. Doesn't it hurt the quality of the suggestions? Lucas: It forces them to be smarter about retrieval. They use what's called retrieval-augmented generation, but with a twist. Instead of feeding the whole document, they feed only the relevant schema fragments—like button styles or grid rules—that are safe to share publicly within the app. Luna: Ah, so they strip out the custom brand assets and only give the AI the structural logic. Lucas: Spot on. The AI learns the grammar of good design, not the specific vocabulary of your brand. That distinction is crucial. It allows the model to suggest layouts without ever seeing your proprietary color palettes or logo usage. Luna: It feels like they're building a firewall around the creativity itself. Lucas: I prefer to think of it as a glass wall. Users can see the structure and understand the logic, but they can't take the pieces home. It maintains transparency for the user while protecting the asset for the enterprise. Luna: Does this architecture scale well when they roll out new AI features? Lucas: That's the beauty of the sandbox model. Because the AI layer is decoupled from the data layer, they can swap out models or add new capabilities without rewriting the core database code. It's modular by design. Luna: So if a better model comes along, they just plug it into the sandbox? Lucas: Yes, provided the new model respects the same input-output constraints. The sandbox acts as a contract. As long as the new engine adheres to the protocol, the rest of the platform stays stable. Luna: It reminds me of how banking apps use tokenization for payments. Same principle, different domain. Lucas: Absolutely. Tokenization is the bedrock of modern secure systems. Whether it's credit card numbers or design tokens, the goal is to replace sensitive values with non-sensitive equivalents that still function within the system. Luna: Do you think other design tools will follow this path, or is Figma too far ahead? Lucas: I think the pressure is forcing everyone's hand. Competitors are starting to adopt similar sandboxing techniques, but Figma has the advantage of having implemented it early. First-mover advantage in trust is hard to beat. Luna: Trust seems to be the new moat for AI products. Lucas: Without a doubt. Speed gets you noticed, but security keeps you in the room. Enterprises won't adopt AI tools that risk leaking their IP, no matter how clever the features. Luna: So the real bottleneck isn't the AI capability, it's the legal and architectural compliance. Lucas: You've hit the nail on the head. Engineering teams are now spending as much time on data governance as they do on feature development. It's a shift in priority that's going to define the next decade of software. Luna: It changes the job description for CTOs, doesn't it? You need lawyers sitting at the architecture table. Lucas: Not necessarily lawyers, but people who speak the language of risk. Product leaders need to understand the implications of every data touchpoint. It's becoming a core competency, not a peripheral concern. Luna: I wonder if this will lead to more open-source alternatives that prioritize privacy by default. Lucas: That's a possibility. But proprietary tools have the resources to build these complex sandboxes at scale. Open source might struggle with the overhead unless there's a community-driven standard for AI security protocols. Luna: Or maybe the standards emerge from the big players like Figma and Microsoft. Lucas: Likely. Once the industry settles on a common framework for secure AI integration, smaller players can adopt those standards rather than reinventing the wheel. Luna: It feels like we're moving from the wild west of AI to a regulated era. Lucas: We certainly are. And for businesses, that regulation is a blessing. It levels the playing field and ensures that innovation doesn't come at the cost of security. Luna: Looking ahead, what's the next hurdle for these sandbox architectures? Lucas: Handling multimodal inputs. Right now, text and images are relatively easy to sandbox. But as AI starts processing video and audio streams in real-time, the complexity—and the risk surface—explodes. Luna: Video is a nightmare for storage and processing. How do you sandbox a live stream? Lucas: By processing frames individually and discarding them immediately after analysis. It's computationally expensive, but it preserves the zero-retention policy. You get the insight without keeping the evidence. Luna: It's a fascinating balance of power and restraint. Lucas: And one that will likely determine which companies survive the next cycle of AI adoption. Those who respect the boundaries will earn the loyalty of their users. Luna: Let's hope the industry follows Figma's lead rather than cutting corners. Lucas: If they don't, the backlash could set back progress by years. Trust is fragile. Luna: Agreed. It'll be interesting to see who steps up next. Lucas: Stay curious about the architecture behind the features. The magic is usually in the walls, not the windows.