Coding agent retrieval caching

DesignHard50 minAnthropic and OpenAI style

Your task

Design the backend for an AI coding agent that answers questions and makes edits over a developer's large monorepo (millions of lines, thousands of files). The agent calls an LLM in a multi-step loop (search code to read files to propose edits to run tests), so a single user request can trigger many LLM calls and tool invocations, and latency/cost compound. Design the retrieval + agent-orchestration + caching system to keep this responsive and affordable at scale.

It covers

  • Agentic
  • Tool use
  • Caching