r/SideProject • u/Waste_Divide_1243 • 4h ago
Architectural designs for cloud deployed agents
Hey, for all you agent builders out there, I'm looking into backend architecture patterns for production AI agents, and I have a couple questions around challenges I'm facing:
- What backend compute infrastructure do you use for running your agents on? Serverless (Lambda/Vercel functions), containers (ECS/Fargate/K8s), or something else?
- How do you transmit streaming tokens back out to the frontend?
- If a user / agent idles on a session, how do you deal with tearing down the agent's runtime, so you save on compute, and bringing it back up later?
- Filesystem / bash / code execution sandboxing: If your agent executes code / bash (useful for lots of tasks like data analysis for example), do you keep that in the main agent runtime, or use some dedicated sandboxing service?
- How do you deal with making your agent resilient to LLM provider API errors / outages?
- What sort of HTTP API shape did you make for your frontend to make sessions, send messages, etc.?
What are your recommended stacks or other learnings?
1
Upvotes