powerful-smartphone-18734
12/04/2025, 4:32 PMchilly-france-44439
12/04/2025, 4:34 PMchilly-france-44439
12/04/2025, 4:35 PMnutritious-balloon-65098
12/04/2025, 4:35 PMnutritious-balloon-65098
12/04/2025, 4:40 PMsdk/faq.mdx):
• Added comprehensive answer to "Does the agent SDK support parallel tool calling?"
• Answer: Yes, the OpenHands SDK supports parallel tool calling by default
• Explained how it works using llm_response_id to group multiple ActionEvents
• Included a clear code example showing parallel tool call grouping
• Provided multiple code references linking to the actual implementation:
◦ Events Architecture documentation page
◦ prepare_llm_messages function in utils.py
◦ Agent step method in agent.py
◦ ActionEvent class definition
• Added related documentation links and community resources
✅ Updated navigation (docs.json):
• Placed the FAQ page directly below "Getting Started" in the SDK tab navigation (line 195)
Verification:
• ✅ Request completely addressed
• ✅ Changes are concise (only 2 files modified, 50 lines added)
• ✅ Committed with clear commit message
-------------------------
Would you like me to:
1. Push these changes to a new branch and create a pull request?
2. Keep the changes local for now?
3. Any other specific Git workflow you prefer?
<sub>View full conversation</sub>powerful-smartphone-18734
12/04/2025, 4:46 PMpowerful-smartphone-18734
12/04/2025, 4:47 PMchilly-france-44439
12/04/2025, 4:51 PMchilly-france-44439
12/04/2025, 4:51 PMnutritious-balloon-65098
12/04/2025, 4:52 PMsdk/faq.mdx) with:
• Answer to "Does the agent SDK support parallel tool calling?" - Yes, by default
• Technical explanation of how llm_response_id groups parallel ActionEvents
• Code examples and direct links to implementation in the agent-sdk repository
• References to Events Architecture, agent.py, utils.py, and ActionEvent class
✅ Updated navigation (docs.json) to place FAQ right below "Getting Started"
✅ Pushed to GitHub on branch add-sdk-faq-parallel-tool-calling
✅ Created Pull Request: https://github.com/OpenHands/docs/pull/149 (draft)
Key Answer:
The OpenHands SDK does support parallel tool calling by default. When an LLM returns multiple tool calls, the SDK groups them using a shared llm_response_id and processes them together efficiently. Full details and code references are now documented in the new FAQ page.
<sub>View full conversation</sub>powerful-smartphone-18734
12/04/2025, 4:52 PMchilly-france-44439
12/04/2025, 4:53 PMActionEvent. The SDK uses a shared llm_response_id to group these related actions together:
1. Grouping: Multiple `ActionEvent`s with the same llm_response_id are grouped together
2. Message combining: They're combined into a single LLM message with multiple tool_calls
3. Thought consolidation: Only the first event's thought, reasoning_content, and thinking_blocks are included; subsequent events have empty thought fields
Example:
python
ActionEvent(llm_response_id="abc123", thought="Let me check...", tool_call=tool1)
ActionEvent(llm_response_id="abc123", thought=[], tool_call=tool2)
# Combined into: Message(role="assistant", content="Let me check...", tool_calls=[tool1, tool2])
### Code references
The parallel tool calling implementation can be found in these key locations:
- Event system architecture: See [Events Architecture](/sdk/arch/events#event-types) for detailed explanation of how parallel function calling works
- Event grouping logic: The SDK groups ActionEvents by llm_response_id when converting events to LLM messages (see [prepare_llm_messages in utils.py](https://github.com/OpenHands/software-agent-sdk/blob/main/openhands-sdk/openhands/sdk/agent/utils.py))
- Action creation: Actions are created with shared llm_response_id in the [agent step method](https://github.com/OpenHands/software-agent-sdk/blob/main/openhands-sdk/openhands/sdk/agent/agent.py#L200-L300)
- Event definitions: [ActionEvent class](https://github.com/OpenHands/software-agent-sdk/blob/main/openhands-sdk/openhands/sdk/event/llm_convertible/action.py) includes the llm_response_id fieldnutritious-balloon-65098
12/04/2025, 4:59 PMsdk/faq.mdx) with comprehensive answer to parallel tool calling question
✅ Placed FAQ right below "Getting Started" in docs.json navigation
✅ Added detailed answer - "Yes, SDK supports parallel tool calling by default"
✅ Included code links - Multiple references to actual implementation in agent-sdk repository
✅ Compacted "How it works" section - Converted to Mintlify Accordion component with gear icon
✅ Pushed to GitHub and created PR #149
Changes Summary:
• 2 files changed, 45 lines added (concise and focused)
• New FAQ page with collapsible technical details for better readability
• Direct links to Events Architecture, agent.py, utils.py, and ActionEvent class
• PR available at: https://github.com/OpenHands/docs/pull/149 (draft)
Key Answer Restated:
The OpenHands SDK supports parallel tool calling by default. When an LLM returns multiple tool calls, the SDK automatically groups them using llm_response_id and processes them together efficiently. Technical details are now available in an expandable accordion for users who want to learn more.
<sub>View full conversation</sub>