Skip to content

Tools Module

Built-in tools for agent use.

Available Tools

Tool Description
Filesystem File operations
Bash Shell commands
Glob Pattern matching
Grep Content search
ToolRegistry Tool management

Quick Example

from mamba_agents import Agent
from mamba_agents.tools import (
    read_file,
    write_file,
    list_directory,
    glob_search,
    grep_search,
    run_bash,
)

agent = Agent(
    "gpt-4o",
    tools=[read_file, write_file, glob_search, grep_search, run_bash],
)

Tool Categories

File Operations

  • read_file - Read file contents
  • write_file - Write to file
  • append_file - Append to file
  • list_directory - List directory
  • file_info - Get file metadata
  • delete_file - Delete file
  • move_file - Move/rename file
  • copy_file - Copy file
  • glob_search - Find files by pattern
  • grep_search - Search file contents

Shell

  • run_bash - Execute commands