ABZ AgentABZ AgentDocs← Site
Docs/Core Concepts/Built-in Tools

Built-in Tools

Ready-to-use MathTool and TimeTool.

Built-in Tools are ready-to-use tools provided by ABZ Agent SDK.

They help you build AI applications faster without writing common functionality yourself.

Why Use Built-in Tools?#

Built-in Tools reduce boilerplate code and speed up development.

Available Built-in Tools#

MathTool
Safe arithmetic calculator. Evaluates expressions like (1.5 + 2.5) * 2 through a whitelist-based evaluator — never raw eval().
TimeTool
Returns the current time for a given IANA timezone (e.g. Asia/Tokyo), falling back to UTC if none is given.

Using a Built-in Tool#

MathTool#

math_assistant.py
from abagentsdk import Agent
from abagentsdk.Tools.tools_math import MathTool

agent = Agent(
    name="Math Assistant",
    instructions="You solve arithmetic problems.",
    model="gemini-2.5-flash",
    tools=[MathTool()]
)

response = agent.run("What is (1.5 + 2.5) * 2?")
print(response.content)

TimeTool#

clock_assistant.py
from abagentsdk import Agent
from abagentsdk.Tools.tools_time import TimeTool

agent = Agent(
    name="Clock Assistant",
    instructions="You tell the time.",
    model="gemini-2.5-flash",
    tools=[TimeTool()]
)

response = agent.run("What time is it in Tokyo?")
print(response.content)

Using Multiple Tools#

An agent can use multiple built-in tools and function tools together.

Python
agent = Agent(
    ...
    tools=[
        weather_tool,
        calculator_tool,
        search_tool
    ]
)

Best Practices#

  • Register only the tools your application needs.
  • Combine built-in tools with custom function tools when appropriate.
  • Keep your tool list organized.

Next Step#

Continue to Structured Output.

← Previous
Function Tools
Next →
Structured Output