← Latest papers
💻 computer science

Scalable Inference Architectures for Compound AI Systems: A Production Deployment Study

This paper presents a production deployment study of a modular, platform-agnostic inference architecture at Salesforce that enables scalable, cost-effective, and low-latency serving of compound AI systems like Agentforce and ApexGuru, achieving significant improvements in throughput, tail latency, and operational costs while addressing unique challenges such as multi-model fan-out and cascading cold starts.

Original authors: Srikanta Prasad S V, Utkarsh Arora

Published 2026-04-29
📖 5 min read🧠 Deep dive

Original authors: Srikanta Prasad S V, Utkarsh Arora

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you run a busy, high-end restaurant called Agentforce. In the past, this restaurant had a single, massive kitchen (a "static" setup) where one head chef tried to do everything: chop vegetables, grill steaks, bake desserts, and wash dishes. If the restaurant got busy, the kitchen got clogged. If the chef needed to take a break to rest (a "cold start"), the whole restaurant stopped serving food. And worst of all, you had to pay the chef's salary 24/7, even when no one was eating.

This paper describes how Salesforce rebuilt their "restaurant" to handle Compound AI Systems. Instead of one big kitchen, they built a modular, on-demand food delivery network.

Here is how they did it, explained in simple terms:

1. The Problem: The "One-Size-Fits-All" Kitchen

Modern AI applications (like Agentforce or ApexGuru) are complex. When a customer asks a question, the system doesn't just ask one robot to answer. It's more like a team of specialists working together:

  • Specialist A (Embedding Model) looks up the customer's history.
  • Specialist B (LLM) writes the response.
  • Specialist C (SQL Executor) checks the database.
  • Specialist D (Classifier) decides what the customer actually wants.

In the old "static" setup, all these specialists were stuck in the same room on the same hardware.

  • The Bottleneck: If the database specialist was slow, the whole order was delayed.
  • The Waste: You had to keep all specialists awake and ready 24/7, even if only the "chopping" specialist was needed at 3 AM.
  • The "Cold Start" Nightmare: If the restaurant closed for an hour and reopened, every specialist had to wake up, stretch, and get their tools ready. The customer had to wait for the slowest one to wake up before getting any food.

2. The Solution: A "Smart Delivery Network"

Salesforce built a new architecture that acts like a smart, dynamic delivery service.

  • The Order Taker (Prediction Service): When a customer orders, a smart dispatcher doesn't send the order to one big kitchen. Instead, it breaks the order into parts and sends them to the specific specialists who are best suited for the job.
  • Independent Scaling: If 100 people order "steak" (LLM calls), the system instantly hires 100 steak chefs. If only 5 people order "salad" (embedding calls), it only hires 5 salad chefs. They don't fight for space in the same kitchen.
  • Serverless (Pay-As-You-Go): The specialists don't sit in a building waiting for orders. They are "cloud workers" who only show up when an order arrives and leave when they are done. You only pay for the minutes they actually work.

3. Solving the "Waking Up" Problem (Cascading Cold Starts)

The paper discovered a tricky problem: In a compound system, the specialists depend on each other. Specialist A must finish before Specialist B can start.

  • The Old Way: If the restaurant reopens, Specialist A wakes up (30 seconds), then Specialist B wakes up (150 seconds), then Specialist C wakes up (20 seconds). The customer waits 180 seconds total.
  • The New "Pre-Warming" Trick: The system is smart enough to know the recipe. As soon as Specialist A is called, the system simultaneously wakes up Specialists B and C in the background.
  • The Result: Instead of waiting 180 seconds, the customer only waits about 65 seconds. The paper says this cut the "waking up" time by 65%.

4. The Results: Faster, Cheaper, and Smoother

After running this new system for over a year with real customers, here is what happened:

  • Speed: The "tail latency" (the worst-case wait time for slow customers) dropped by 50%. Orders that used to take 37 seconds now take about 10–11 seconds.
  • Capacity: The system can handle 3.9 times more orders at the same time compared to the old kitchen.
  • Cost: Because they stopped paying for idle workers, they saved 30–40% on costs.
  • Reliability: If one specialist gets sick (fails), the system doesn't shut down the whole restaurant. It just routes the order around that person (e.g., "We can't check the database, so let's just give a general answer"). The restaurant stays open 95% of the time, even when parts break.

5. Key Lessons Learned (The "Chef's Secrets")

The authors shared a few big takeaways for anyone building these systems:

  1. Cold starts multiply, they don't just add up. If you have a chain of tasks, the wait time stacks up. You have to wake up the whole chain at once, not one by one.
  2. Watch the whole pipeline, not just individual workers. A worker might be fast on their own, but if they are stuck waiting for someone else, the whole order is slow. You need to see the "big picture" of the order.
  3. Test pieces individually. Because the system is modular, you can swap out just the "salad chef" for a new one without firing the "steak chef." This lets them improve their AI models in days instead of weeks.
  4. Graceful degradation is better than perfection. If a small part of the system fails, the whole thing shouldn't crash. It's better to give a slightly less detailed answer than to give no answer at all.

Summary

This paper is about moving from a rigid, expensive, "one-kitchen" AI setup to a flexible, "gig-economy" style network. By treating every AI tool as a separate, on-demand worker that can be scaled up or down instantly, Salesforce made their AI agents faster, cheaper, and much more reliable for thousands of enterprise users.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →