Where should AI agent orchestration run: frontend or backend?

AI agent creation, , data grounding, and the surrounding runtime can all run on the backend. In that setup, the frontend sends a user request to the backend, and the backend uses a prepared agent to create the answer and return the result.

Other product features can trigger different backend agents by sending only the information each agent needs. Tools like and Claude Code often do more work near the user’s local app because the code, files, and are already there.

The main design question is whether agent and the should live on the backend or closer to the frontend. A related question is how to connect MCP when the runs on the backend.

Key points

  • A backend-first design lets the frontend send requests while server-side agents do the work.
  • Different backend agents can handle different product use cases.
  • and Claude Code often work close to the user’s local coding environment.
  • Agents that need local files or may fit better near the frontend.
  • MCP integration becomes a key question when stays on the backend.
Read original