How does V1 expect to handle user bash action inpu...
# proj-sdk
f
How does V1 expect to handle user bash action inputs? In V0, we send an object via WS like:
Copy code
{
  "action": "run",
  "args": {
    "command": "ls -la",
    "hidden": false
  }
}
Do we send an
ExecuteBashAction
via WS for V1 too or call
/api/bash/execute_bash_command
on the agent server? What is the difference between
/api/bash/execute_bash_command
and
/api/bash/start_bash_command
?
c
@wooden-umbrella-84098 i think we were planning to just make the bash terminal read only. And user can execute their bash command via vscode
v1 don't have native support for executing bash using the agent's tool
šŸ‘ 2
w
nod yeah let's make it read only
šŸ‘ 1
f
In that case, do we want to disable it for V0 as well?
Should I remove the Jupyter tab and whatever related artifacts on the front end while I’m at it too?
s
The agent server includes an API for executing bash commands if needed
It includes search for previous commands, an executor for new commands and a websocket api
It is totally independent of the agent
Are we sure we want this read only?
Occasionally I've found the bash invaluable for getting out of a jam
w
yeah go ahead and go read only for v0 too
Occasionally I've found the bash invaluable for getting out of a jam
does a vscode terminal not work?
s
Good point - I've also used that.
Maybe we should remove the bash command API then?
(The one not linked to the agent)
If the preferred method is to use the vscode terminal
c
we need those for eval though
ugh i just realize maybe we still need a way to execute agent's bash tool for
setup.sh
if setup.sh actually set any env var?
w
in v0 we run
source setup.sh
instead of
./setup.sh
so yeah, it'd be good to keep doing that
c
oh yeah, so it does have the ability to set env var
that makes thing a bit complicated (i.e., we need to support execute bash for agent's tool in a conversation) I.e., be able to do
conversation.agent.tool_map['execute_bash'](ExecuteBashAction(command='source setup.sh'))
via agent server API (maybe a
/conversation
-level API)
@nutritious-balloon-65098 create an issue about this in OpenHands/agent-sdk repo
n
I'm on it! Xingyao Wang can track my progress here.
s
I suppose it helps out in any case where vscode is disabled / unavailable
n
Summary I've successfully created a GitHub issue in the OpenHands/agent-sdk repository to address the design questions around bash command execution in the V1 architecture. Issue Created Issue #941: Design Question: Executing Bash Commands Through Agent Tool in Conversations What the Issue Covers The issue comprehensively documents: 1. Problem Statement: The ambiguity around how to handle bash command execution in agent conversations, particularly regarding session state management 2. Background Context: ā—¦ V0's WebSocket-based action handling ā—¦ V1's multiple bash execution endpoints and their unclear relationships 3. Current Implementation Gaps: ā—¦ No conversation-level bash execution API ā—¦ Unclear relationship between
/api/bash/execute_bash_command
and
/api/bash/start_bash_command
ā—¦ Missing agent tool invocation API 4. Critical Use Case: Executing setup scripts with
source setup.sh
to preserve environment variables across the conversation 5. Key Questions for Design Clarification: ā—¦ Should user-initiated bash commands go through conversation endpoints or bash endpoints? ā—¦ Do the
/api/bash/*
endpoints maintain session state? ā—¦ What's the recommended way to execute setup scripts? 6. Three Proposed Solutions: ā—¦ Option A: Conversation-level tool execution API ā—¦ Option B: Enhanced message API ā—¦ Option C: Separate session-aware bash API 7. Impact Analysis: Frontend UI, evaluation harness, GitHub workflows, and initialization steps The issue has been labeled as
enhancement
,
question
, and
design
, with high priority noted as it blocks V1 frontend integration and evaluation setup. <sub>View full conversation</sub>
Summary I've successfully created and updated GitHub issue #941 in the OpenHands/agent-sdk repository as requested. Final Issue Details Issue #941: Add Conversation-level Tool Execution API The issue has been simplified per your request to focus specifically on implementing the Conversation-level tool execution API. It now includes: 1. Problem Statement: Clear description of the missing capability to execute agent tools directly within a conversation context 2. Use Case: Focused on the
source setup.sh
scenario for setting environment variables 3. Proposed Solution: Specific API endpoint design:
Copy code
POST /conversations/{conversation_id}/tools/execute
With example request/response bodies 4. Requirements: ā—¦ Execute tools through the agent's tool instance (to maintain session state) ā—¦ Support pre-conversation execution ā—¦ Return tool execution results ā—¦ Maintain compatibility with existing tools 5. Impact: Lists affected systems (evaluation harness, frontend UI, GitHub workflows) 6. Related Code: Points to relevant implementation files The issue is labeled as
enhancement
and is ready for discussion and implementation. No code changes were made to the repository - this was purely an issue creation task. <sub>View full conversation</sub>