Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Principle:ANative Lab EvoAgentX Tool Augmented Agents

From Leeroopedia
Knowledge Sources
Domains Agents, Tools
Last Updated 2026-10-21 00:00 GMT

Overview

Pattern for extending LLM agents with callable external tools, enabling multi-step reasoning and action through a tool-calling loop with native or text-based function calling.

Description

Tool-Augmented Agents combine LLM reasoning with external tool execution. The agent enters a loop: it generates a response, the response may contain tool-call requests (either via native function-calling API or text-parsed tool calls), the framework executes the requested tools, feeds results back to the LLM, and the loop continues until a final answer is produced or `max_steps` is reached. Tools are defined as `Tool` subclasses with JSON schemas that the LLM uses to select and parameterize calls. `Toolkit` groups related tools.

Usage

Use this principle when agents need to interact with external systems (file I/O, web search, code execution, MCP servers). Attach tools to a `CustomizeAgent` via `tools=[Toolkit()]`. The tool-calling loop is automatic:

  • Native mode: When `llm.supports_native_tool_calling()` is True, uses the provider's function-calling API
  • Default mode: Falls back to text-based tool-call parsing
  • Concurrency: Up to `max_tool_call_concurrency` tools can execute in parallel per step

Theoretical Basis

The tool-calling loop follows the ReAct pattern (Reason + Act):

# Abstract algorithm (not real implementation)
for step in range(max_steps):
    response = llm.generate(prompt, tools=tool_schemas)
    if response.contains_tool_calls:
        tool_results = execute_tools(response.tool_calls, max_concurrency)
        prompt = append_results(prompt, tool_results)
    else:
        return parse_final_answer(response)

Key properties:

  • Schema-driven: Each tool declares its input schema; the LLM generates arguments matching the schema
  • Native vs. text: Native mode uses the provider API; text mode parses tool calls from LLM output
  • Iteration limit: `max_steps` prevents infinite loops
  • Parallelism: Multiple tool calls per step can execute concurrently

Related Pages

Implemented By

Uses Heuristic

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment