:thread: for agent-sdk & openhands-server inte...
# proj-sdk
c
๐Ÿงต for agent-sdk & openhands-server integration w/ @straight-sundown-84319
let's just uv if there's no objection? https://github.com/All-Hands-AI/OpenHands-Server/pull/2
s
Merged!
c
s
That is copypasta I think
Yes
Sorry about that
c
(sorry i'm probably gonna have a lot of questions in this thread while i integrate stuff lolsob )
no worries!
it happens!
s
t should be
get_local_conversation
c
can you push the fix to main and i can grab it?
s
updating...
(Those will go away once I've added the proper linter)
c
Another thing, i'd propose using the stricter pre-commit from agent-sdk if it works for you ๐Ÿ˜„ https://github.com/All-Hands-AI/agent-sdk/blob/main/.pre-commit-config.yaml
(it uses pyright instead of mypy so vscode won't complaint anymore lolsob )
s
Sounds really good - I just hadn't got around to it yet
c
sg! i can put a pr if you are ok
though most of stuff will fail
i can just copy from agent-sdk
๐Ÿ‘ 1
๐Ÿ‘€ 1
ugh another merge conflict
on it now
fixed
s
Merged!
c
question: do we want to use both dataclass and pydantic, so do we want to just keep one?
s
I was sometimes using dataclasses when I don't want to serialize the object
I suppose I probably should just use regular classes there and put the logic in the init method to avoid confusion
nod 1
w
Maybe for simplicity/clarity we can put the sandbox code somewhere else
nod 1
thonk we're going to need
git status
type endpoints on local server
if we want feature parity, e.g. for the changes tab
s
We run those using command actions right now
w
so I guess just an
/execute_command
endpoint, similar to actionexecutionserver?
s
I think that is handled by
send_message
w
I think
send_message
just sends english into the history
whereas we need a synchronous response back with the stdout
s
Ok - then we do need a way of sending a command in the agent sdk
๐Ÿ‘ 1
w
maybe a
tool_call
endpoint
to make it reusable
c
s
Yes
c
i'll port these over too ๐Ÿ™‚
or actually you can do this more appropriately
i think it is doesn't belongs to
/local-conversation
route, but still belongs to the local server, no?
s
Yes
c
so maybe you'll have more context on where we should put these stuff
i'm working on porting converstaion start now ๐Ÿ™‚
s
Yes - I actually want to change the packages around a bit now that we are fully separating the local server
๐Ÿ‘ 1
c
lmk when you are done and i can continue working on it1
s
Hey - so you said that there is a way to serialize the tools using pydantic now in the agent sdk?
c
yep! i can implement that part once you fix the changes with packages
PR not ready yet, but you can see the data model here @straight-sundown-84319 https://github.com/All-Hands-AI/OpenHands-Server/pull/10
also now the Agent-SDK also have the notion of Enum for status -- means we probably don't need to redefine it again in server
@straight-sundown-84319 https://github.com/All-Hands-AI/OpenHands-Server/pull/10 this is ready! happy to hop on a call to chat more about details if you'd like
and i kinda don't like the pattern of
get_default_local_conversation_service
- is this really necessary now?
i'd get it if we have a pattern that actually need this, if not, i'd leaning towards making the local server as simple as possible now ๐Ÿ™‚
(and easier to work with vscode type check too, bc click the method will get you to the class with implementation instead of the abc)
routes added are: โ€ข send message โ€ข response to confirmation others should be the same -- if this is working for you, i'd be happy to hook up the client library on the SDK side to work with this set of backend API