Stateless Compute for Agents
Sep 10, 2025 | ishaanbhagwat | 1mins
The need for state:
Every ai agent needs a workspace to get work done. The simplest approach is a 1:1 mapping of a user-session to a compute instance (container) somewhere in your cloud compute cluster. This instance has all the necessary information (read: state) to perform some required action (like code execution).
Now, how do we keep track of the agent environment after successive/consecutive actions? If our compute instance is stateful, then it's all right there. But what if our compute instance dies? or gets evicted? How do we serve user queries?
That's where a stateless layer for compute orchestration comes in. Any available compute instance can complete a user query as long as it can effectively rebuild the 'agent state' from the previously actions.