@@ -288,9 +288,9 @@ async def run_my_agent() -> str:
288288
289289In 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
295295You can do this by supplying the ` custom_output_extractor ` argument to the ` as_tool ` method:
296296
@@ -369,15 +369,17 @@ asyncio.run(main())
369369```
370370
371371The ` is_enabled ` parameter accepts:
372- - ** Boolean values** : ` True ` (always enabled) or ` False ` (always disabled)
373- - ** Callable functions** : Functions that take ` (context, agent) ` and return a boolean
374- - ** Async functions** : Async functions for complex conditional logic
372+
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
375376
376377Disabled tools are completely hidden from the LLM at runtime, making this useful for:
377- - Feature gating based on user permissions
378- - Environment-specific tool availability (dev vs prod)
379- - A/B testing different tool configurations
380- - Dynamic tool filtering based on runtime state
378+
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
381383
382384## Handling errors in function tools
383385
0 commit comments