Skip to content

Commit 7a37932

Browse files
Add SDK FAQ documentation with parallel tool calling information (#149)
* Add FAQ documentation for SDK with parallel tool calling info - Created new sdk/faq.mdx with detailed information about parallel tool calling support - Added FAQ page to docs.json navigation right below 'Getting Started' - Included code references and links to architecture documentation - Explained how parallel tool calling works with llm_response_id grouping * Compact related documentation links into one paragraph * Compact 'How it works' section into collapsible Accordion - Converted detailed 'How it works' section into a Mintlify Accordion component - Made the content more concise while preserving key information - Improves readability by allowing users to expand details on demand * Compact code references section into one paragraph * Convert code references and related documentation into collapsible accordions * Merge all three accordions into one 'How it works' section --------- Co-authored-by: openhands <openhands@all-hands.dev>
1 parent 37d74f7 commit 7a37932

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

docs.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@
192192
"pages": [
193193
"sdk/index",
194194
"sdk/getting-started",
195+
"sdk/faq",
195196
{
196197
"group": "Guides",
197198
"pages": [

sdk/faq.mdx

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
title: FAQ
3+
description: Frequently asked questions about the OpenHands SDK
4+
icon: question
5+
---
6+
7+
## Does the agent SDK support parallel tool calling?
8+
9+
**Yes, the OpenHands SDK supports parallel tool calling by default.**
10+
11+
The SDK automatically handles parallel tool calls when the underlying LLM (like Claude or GPT-4) returns multiple tool calls in a single response. This allows agents to execute multiple independent actions simultaneously, improving efficiency.
12+
13+
<Accordion title="How it works" icon="gear">
14+
When the LLM generates multiple tool calls in parallel, the SDK groups them using a shared `llm_response_id`:
15+
16+
```python
17+
ActionEvent(llm_response_id="abc123", thought="Let me check...", tool_call=tool1)
18+
ActionEvent(llm_response_id="abc123", thought=[], tool_call=tool2)
19+
# Combined into: Message(role="assistant", content="Let me check...", tool_calls=[tool1, tool2])
20+
```
21+
22+
Multiple `ActionEvent`s with the same `llm_response_id` are grouped together and combined into a single LLM message with multiple `tool_calls`. Only the first event's thought/reasoning is included. The parallel tool calling implementation can be found in the [Events Architecture](/sdk/arch/events#event-types) for detailed explanation of how parallel function calling works, the [`prepare_llm_messages` in utils.py](https://github.com/OpenHands/software-agent-sdk/blob/main/openhands-sdk/openhands/sdk/agent/utils.py) which groups ActionEvents by `llm_response_id` when converting events to LLM messages, the [agent step method](https://github.com/OpenHands/software-agent-sdk/blob/main/openhands-sdk/openhands/sdk/agent/agent.py#L200-L300) where actions are created with shared `llm_response_id`, and the [`ActionEvent` class](https://github.com/OpenHands/software-agent-sdk/blob/main/openhands-sdk/openhands/sdk/event/llm_convertible/action.py) which includes the `llm_response_id` field. For more details, see the **[Events Architecture](/sdk/arch/events)** for a deep dive into the event system and parallel function calling, the **[Tool System](/sdk/arch/tool-system)** for understanding how tools work with the agent, and the **[Agent Architecture](/sdk/arch/agent)** for how agents process and execute actions.
23+
</Accordion>
24+
25+
## More questions?
26+
27+
If you have additional questions:
28+
29+
- **[Join our Slack Community](https://openhands.dev/joinslack)** - Ask questions and get help from the community
30+
- **[GitHub Discussions](https://github.com/OpenHands/software-agent-sdk/discussions)** - Start a discussion
31+
- **[GitHub Issues](https://github.com/OpenHands/software-agent-sdk/issues)** - Report bugs or request features

0 commit comments

Comments
 (0)