At the SDK Level <we raise a ConversationRuntError...
# proj-sdk
s
At the SDK Level we raise a ConversationRuntError from the original. In the AgentServer, we often call run in a background process and don't wait for it to complete- it just runs in the background and any events in the event stream are sent over the websocket. I feel that adding something to the event stream would make sense here.
c
Interestingly, in v0 we actually left these out of the event stream on purpose... 🤔
s
In V1 we have the concept of LLMSerializable events LLMConvertibleEvent - if an event is not LLM convertible, it is still in the stream but not sent to the LLM. I think errors for in this quite nicely
nod 1
Actually reading the sdk code, it looks like we already have this - it just isn't being sent
c
Argh, not that one... that one is sent to the agent/llm
nod 1
s
Though this one is LLMConvertible
c
I do think we need to continue to have a hard split, a clear split, between those that are LLM blunders, which the agent will continue and fix, and those that are not
s
What threw me was the name
AgentErrorEvent
- I assumed this meant "Error with Agent" as opposed to "Error for Agent to fix"
😅 1
c
You're not alone, some docs also were saying it's an error that stops the agent Maybe it's badly named, but idk how else atm... https://github.com/OpenHands/software-agent-sdk/blob/b2b3da3a10c4e4197147273a838a3[…]06fe7095c27/openhands-sdk/openhands/sdk/llm/exceptions/types.py
So the LLM auth and other LLM errors are an LLMError
The "cause" of a ConversationRunError is the LLM-related specific error... though that doesn't help fully I guess
s
The question remains - what to name this new event?
ErrorWithAgentEvent
c
(Just to note, I don't have concerns on adding an error to the event stream, I just do think that we need to comment in code and in docs that it's really really separate from
AgentErrorEvent
and has different behavior/expectations/use... they had the bad habit of getting mixed up in v0 )
Could we use
ConversationRunError
? It does seem fit, it's an error that stops the conversation, right?
s
I like it
(I used ConversationErrorEvent in the end, as it must be an Event type)
gratitude thank you 1