Could someone please confirm, on the cloud: - do w...
# proj-sdk
c
Could someone please confirm, on the cloud: • do we run multiple conversations in the same
agent-server
container? • in the same time? My understanding was: I assumed we'd have one container per
agent-server
, and that seems to imply one container per conversation. Since a server instance is tied to a single workspace, I'm a bit confused how we'd run multiple conversations in the same time, since I thought that means an agent would run on the same branch as another? Please shoot down this understanding if it's wrong! It's relevant for how we design things in agent-sdk. šŸ˜“ Re: https://github.com/OpenHands/agent-sdk/pull/712#discussion_r2445793517
c
My hope is that we will land on a solution that would allow multiple conversations against the same workspace, at different times. Eventually it would be nice to support this at the same time. Cursor supports the concurrent conversations against same workspace with a very basic locking mechanism -- if one agent has touched a file, other agents making an edit file tool call ask permission before proceeding with the edit. I have used this quite a bit and though simple it has worked for me. I get more locks than really needed but it is easy to dismiss them. But even if our initial mechanism were simpler--is another agent active?--being able to setup a workspace where setup is expensive and then serially run one conversation after another against that workspace would be a huge win, IMHO.
c
I hear you. I think this does work, locally: • We can keep the
agent-server
running (or reusing on the same workspace), and start a new conversation ā—¦ so, serially • I have not tried in the same time. My impression from the code was that it wasn't ready - and that it's more an app-server feature - but I'll try it right now! • I don't know of any locking mechanism (in agent-sdk) That said, the above is fully local. No docker even. We can mess around locally, why not šŸ˜‚
Taking a step back: In V0, once we use sandboxing, we have a docker container per conversation, a runtime. One can make a different conversation on the same branch, but it's a different runtime, the agent's modifications in each conversation are fully isolated and go out via a push/PR usually. This is the case with docker locally, as it is on the cloud. I assumed the agent-server in V1 will behave similarly to runtimes in V0 on this šŸ¤”
c
I think we are trying to create more flexibility for reuse of sandboxes in V1. But I am not very close to the action on this.
šŸ¤” 1
I think it is important because there are many real-world scenarios where sandbox setup is quite expensive and cases where many PRs on the same theme can use the same sandbox.
w
To be clear: when we go live, there will only be one conversation per sandbox
Even though we can hypothetically support more, and may find ways to do this in the future
e
Makes sense Robert. This brings up thoughts around Forking a Conversation, which could be a use case for re-using a runtime across multiple conversations. Still need to settle on MVP requirements here.
s
Here was my thinking : The sandbox API is now explicit rather than implicit, and does support multiple conversations per sandbox, though initially the UI will be set up as it is now, with one per sandbox. This is because sandboxes are expensive - they take time to start and consume resources. If we ever can find a way to share / reuse them more efficiently, then this will be better for users. (we hide this fact at the moment behind concepts like warm runtimes, but it is ever present.) One way a sandbox could be shared is simply using directories per conversation. The workspace/projects dir could become workspace/projects/conversation-id and then the user has a separare local repo per conversation.
This would also support concepts like forking (simply by copying the directory)
(Right now in V1 when starting a conversation in the app server you can specify a sandbox Id and have it use an existing sandbox - you you can go to the agent server and start a conversation there - in either case it is registered with the app server.)
The local workspace class as defined right now allows you to specify a directory - so directory per conversation could be done right now with a small change to the app server code