Agentic AI Notebook
Agent Foundations
Phase 4Module 13 of 15

Multi Tool

Single-tool agents cannot complete real workflows that span systems.

Swiss Army knife — one agent, many specialized blades for different jobs.

Visual Workflows

Start here — scroll inside each diagram frame to explore, then use + / to zoom up to 200% if needed.

100%
Loading diagram...

Scroll inside the frame to explore · use + / − to zoom up to 200%

Parallel vs Sequential Tools

100%
Loading diagram...

Scroll inside the frame to explore · use + / − to zoom up to 200%

Run independent tools in parallel to cut latency.

Key Takeaways

  • 1.Real tasks need search SQL email code in one workflow.
  • 2.Tool registry holds schemas handlers permissions.
  • 3.Router LLM selects tool per step.
  • 4.Run independent tools in parallel when possible.

Real Example

Scenario

Research workflow: `web_search` (×3 parallel queries) → `summarize` → `notion_create_page` → `send_email` — searches are independent; later steps are sequential.

What you would do

Registry holds four tools with JSON schemas. Steps 1a–1c run in parallel. Step 2 needs merged search results — must be sequential. Validate Notion page ID before email. Monitor: parallel fan-out latency vs an all-sequential baseline.

Practice Task

List the tool order for the research workflow. Mark which steps can run in parallel and which must wait for prior output.

Code Walkthrough

Highlighted lines show where Multi Tool happens in the code.

Multi Tool
1import asyncio  # import dependencies2
3TOOLS = {4    "web_search": search_fn,5    "summarize": summarize_fn,6    "notion_create_page": notion_fn,7    "send_email": email_fn,8}9
10async def research_workflow(queries: list[str]):11    search_results = await asyncio.gather(*[TOOLS["web_search"](q) for q in queries])  # run independent tools in parallel12    summary = TOOLS["summarize"]("\n".join(search_results))13    page_id = TOOLS["notion_create_page"](summary)14    return TOOLS["send_email"](to="team@co.com", body=f"Page: {page_id}")  # return the result

Cheat Sheet

Quick recap

quick ref
  • Registry = schema + handler + permissions
  • Parallel when tools independent
  • Feed errors back to LLM
  • Validate args before execute
  • Rate limit expensive tools

Common Mistakes

  • Skipping evaluation for Multi Tool before production
  • No logging or tracing around multi tool steps
  • Ignoring cost and latency implications