179 questions
No questions match those filters.
How do you design an agentic system that costs $100/mon...
This is one of the questions in the full AI/ML interview bank. Pro unlocks all 1789 questions; Premium includes the same bank plus the highest daily Practice limit.
See plansThe reason agent cost gets out of hand faster than single-call LLM cost is that it’s steps times tokens times model price, and all three multiply together rather than adding. The fix works the same way — pull each lever in order of impact:
- Model routing — most steps in an agent run are cheap decisions: classify the task, pick a tool, format an output. Only a minority need the most expensive model’s reasoning. Routing simple steps to a small, cheap model and reserving the frontier model for the handful of steps that actually need it is usually where most of the savings come from.
- Fewer steps — every step costs money regardless of which model handles it. Better tool design and tighter prompting that gets a task done in five steps instead of fifteen is a 3x cost reduction before touching the model choice at all.
- Caching — if the agent calls the same search or the same lookup twice within a run, or across runs, cache the first result rather than paying for it again.
- Context pruning — keeping the entire run history in context means every subsequent step pays input-token cost for everything that came before it. Trimming to the last few steps plus a summary of the rest keeps that from compounding as the run gets longer.
Applied together, these compound rather than just adding — model routing alone might cut cost by three-quarters, and the remaining levers each take another meaningful bite out of what’s left, which is how a genuinely wasteful agent design gets to a small fraction of its starting cost without losing capability.