Agent Design Patterns: Tool Usage — Integrating External Tools to Break Capability Limits [Translation]

Agent Design Patterns: Tool Usage — Integrating External Tools to Break Capability Limits [Translation]

Agentic Design Patterns — Chinese Translation Project

Just as Design Patterns became the “Bible” of software engineering, the open-source Agentic Design Patterns — authored by a senior Google engineering director — offers the first comprehensive set of design principles and best practices for the fast-growing AI agents field.

Author: Antonio Gulli

Foreword: Saurabh Tiwary (VP, Google Cloud AI)

Recommendation: Marco Argenti (CIO, Goldman Sachs)

It distills 21 core agent design patterns, spanning prompt chaining, tool usage, multi-agent collaboration, self-reflection, and correction.

---

Translation Workflow

We are translating this book using:

  • AI initial translation
  • AI cross-review
  • Human review
  • Human cross-review

All translated content will be continuously updated here:

github.com/ginobefun/agentic-design-patterns-cn

---

Completed Translations

---

Tool Use Pattern — Key Insights

The Tool Use Pattern enables AI agents to break free of LLM training-data limits and interact with external systems, APIs, and services.

By leveraging function calling, agents can:

  • Access real-time information
  • Perform computations
  • Operate databases
  • Control IoT/physical devices

---

1. Concept: From Generating Text to Taking Action

Workflow:

Understand request → Decide tool call → Execute tool → Integrate results

This enables agents to perceive and act on external inputs.

Without tools:

  • Static training knowledge only
  • No real-time data access
  • No external actions

With tools:

  • Invoke APIs & services
  • Retrieve dynamic info
  • Perform precise calculations
  • Execute real-world operations

---

2. Six Steps of Tool Invocation

  • Tool Definition: Purpose, name, parameter types, description
  • LLM Decision-Making: Decide if tool is needed
  • Function Call Generation: Model outputs structured JSON with tool + parameters
  • Tool Execution: Agent framework runs call
  • Observation: Tool returns result to agent
  • Result Processing: Agent integrates result into reply or next step

---

3. Application Scenarios

  • External Info: Weather, stock prices, etc.
  • Databases & APIs: Inventory, orders, payments
  • Calculation/Data Analysis: Math, stats, post-processing
  • Notifications: Email, messaging APIs
  • Code Execution: Sandboxed environments
  • System Control: Smart home, IoT

---

4. Implementation Frameworks

  • LangChain: `@tool` decorator, `create_tool_calling_agent`, `AgentExecutor`
  • CrewAI: Simple tool definitions, multi-tool support, multi-agent collaboration
  • Google ADK: Built-in tools (Google Search, Vertex AI Search, Code Executor), custom extensions

---

5. When to Use

When:

  • Real-time/dynamic info needed
  • Private/proprietary data sources access
  • Precision calculations or code execution
  • Trigger actions in other systems

Why:

Transforms LLM into an active agent capable of perceiving, reasoning, action-taking — essential for real-world AI apps.

---

Practical Implementation

This document includes hands-on examples for:

  • LangChain
  • CrewAI
  • Google ADK
  • Vertex AI Search

> Each code listing comes with explanations of setup, agent definition, tool function, and workflow execution.

---

Example: LangChain Tool-Calling Agent

# (Full Python code from original text preserved)
# Demonstrates @tool definition and tool call orchestration

---

Example: CrewAI Financial Analyst

# Defines a CrewAI Agent using a stock lookup tool

---

Example: Google ADK Search Agent

# Uses built-in google_search tool to answer questions

---

Example: Google ADK Code Execution Agent

# Uses BuiltInCodeExecutor to process calculations via Python code

---

Example: Vertex AI Search Agent

# Queries Vertex datastore for enterprise search use cases

---

Key Takeaways

Problem:

LLMs have static knowledge and no external action capability.

Solution:

Tool usage pattern = structured function calling + orchestration layer execution.

Rule of Thumb:

Use whenever external data, precise computation, or system interaction is needed.

---

Core Points

  • Tools extend LLMs beyond text output
  • Clear definitions & parameters essential
  • LLM decides when/how to invoke tools
  • Framework executes calls & returns results
  • Essential for real-world agent utility

---

Visual Summary

image

Figure: Workflow and benefits of tool usage

---

Conclusion

The Tool Use Pattern is a foundation for building active, capable agents.

Frameworks like LangChain, CrewAI, and Google ADK simplify this by abstracting tool definitions and handling function calls.

Integrated ecosystems such as AiToEarn combine:

  • AI generation
  • Tool execution
  • Cross-platform publishing
  • Analytics & model ranking

This makes monetizing AI agent outputs straightforward in real-world deployments.

---

References

---

💡 Tip: If your AI workflow includes content creation + publishing, platforms like AiToEarn help you publish to Douyin, Kwai, WeChat, Bilibili, Xiaohongshu, Facebook, Instagram, LinkedIn, Threads, YouTube, Pinterest, and X — from one pipeline, while integrating analytics and rankings.

Read more

Translate the following blog post title into English, concise and natural. Return plain text only without quotes.

ChatGPT Atlas 发布,AI 浏览器大乱斗...

Translate the following blog post title into English, concise and natural. Return plain text only without quotes. ChatGPT Atlas 发布,AI 浏览器大乱斗...

# AI Browsers: When LLM Companies Step In 原创 lencx · 2025-10-22 07:00 · 上海 --- ## Overview Large Language Model (LLM) companies are making moves into the **AI browser** space. From new entrants like **Dia**[1], **Comet**[2], and **ChatGPT Atlas**[3], to established browsers like **Chrome** and **Edge** (which now feature

By Honghao Wang