Skip to content

Commit 2b0b5f5

Browse files
authored
Apply suggestions from code review
1 parent 64baa61 commit 2b0b5f5

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

docs/tools.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -288,9 +288,9 @@ async def run_my_agent() -> str:
288288

289289
In certain cases, you might want to modify the output of the tool-agents before returning it to the central agent. This may be useful if you want to:
290290

291-
- Extract a specific piece of information (e.g., a JSON payload) from the sub-agent's chat history.
292-
- Convert or reformat the agent’s final answer (e.g., transform Markdown into plain text or CSV).
293-
- Validate the output or provide a fallback value when the agent’s response is missing or malformed.
291+
- Extract a specific piece of information (e.g., a JSON payload) from the sub-agent's chat history.
292+
- Convert or reformat the agent’s final answer (e.g., transform Markdown into plain text or CSV).
293+
- Validate the output or provide a fallback value when the agent’s response is missing or malformed.
294294

295295
You can do this by supplying the `custom_output_extractor` argument to the `as_tool` method:
296296

@@ -370,16 +370,16 @@ asyncio.run(main())
370370

371371
The `is_enabled` parameter accepts:
372372

373-
- **Boolean values**: `True` (always enabled) or `False` (always disabled)
374-
- **Callable functions**: Functions that take `(context, agent)` and return a boolean
375-
- **Async functions**: Async functions for complex conditional logic
373+
- **Boolean values**: `True` (always enabled) or `False` (always disabled)
374+
- **Callable functions**: Functions that take `(context, agent)` and return a boolean
375+
- **Async functions**: Async functions for complex conditional logic
376376

377377
Disabled tools are completely hidden from the LLM at runtime, making this useful for:
378378

379-
- Feature gating based on user permissions
380-
- Environment-specific tool availability (dev vs prod)
381-
- A/B testing different tool configurations
382-
- Dynamic tool filtering based on runtime state
379+
- Feature gating based on user permissions
380+
- Environment-specific tool availability (dev vs prod)
381+
- A/B testing different tool configurations
382+
- Dynamic tool filtering based on runtime state
383383

384384
## Handling errors in function tools
385385

0 commit comments

Comments
 (0)