<@U080DD1FR4K> / <@U06QJHRBLQG> / <@U07TE39J96U> -...
# proj-sdk
s
@wide-doctor-37830 / @chilly-france-44439 / @quick-window-91705 - what are your thoughts on events that are not to be sent to the LLM? Should these still be in the event stream? For example, suppose I am in the middle of a conversation, and I realize I haven't set up git. In the existing OpenHands, I might... • Go to the terminal and do
export GITHUB_TOKEN=MY_TOKEN
• In the LLM prompt say "Please create a PR on github - the
GITHUB_TOKEN
environment variable should include what you need to do this" In this case, the terminal command was not sent to the LLM - in our current architecture it is completely outside the event stream. Should this still be the case?
c
Just to note, OpenHands V0, in a case like terminal command where the user does something, I think we send to the LLM the command, as a run command event with role=user
s
šŸ¤” - Yes - and if I recall, we also had code to remove secrets from the event stream
w
We'll definitely have events in the stream that are not meant to be sent to the LLM. Right now those are just
PauseEvent
and some condensation events. Anything that inherits from
LLMConvertibleEvent
can be sent to the LLM as a message, but there's not always a one-to-one correspondence between those events and the messages sent.
c
For terminal, i imagine we will be using
/api/tool/{tool_id}/execute
which we haven't implemented for BASH terminal?
actually, we've discussed potentially make that terminal read-only
s
This is what spawned the question
(I'm implementing it)
q
Are there other reasons we'd want to support passing terminal commands besides exporting new secrets? V1 sdk has an option to do that via
conversation.update_secrets()
. we could extend it so that the update secrets event is passed to the agent
^ and make the terminal read only
c
we were delaying it because we don't yet have secret manager -- but now we DO have it!
nod 1
cc @wooden-umbrella-84098 maybe it is ok to make Terminal read-only from now on, and have all the secret stuff going through the
.update_secrets
? This should make things much simpler (eg we don't need
/api/tool/{tool_id}/execute
now?
s
I think we still need it
Extra functions are a lot easier to implement if we have it
nod 1
q
^ I think we should consider those extra functions outside the context of the agent, which should simplify things a bit
s
I think we still need an endpoint on the agent server though
For things like...
q
Ah yep I meant we still have the agent server with this endpoint, but we don't send action events in the agent history for the functions we execute
nod 1
c
nod and it is a good practice to NOT using the agent's tool to do stuff
s
The only wrinkle I see with not using the agents tool is environment variables
c
eg agent's terminal can be brittle.. sometimes your command might leave unexpected sideeffect that may confuses the agent (eg mutate some env var the agent set earlier)
yeah, we have secret manager for env var which i think we should be ok?
s
ok cool - these will be fully separate then
šŸ‘ 2
w
cc @wooden-umbrella-84098 maybe it is ok to make Terminal read-only
Yes very much in favor
c
yeah! let's do that to simplify the terminal implementation then šŸ™‚