Skip to main content
AG-Kit provides a comprehensive set of built-in tools that cover the most common tasks AI agents need to perform. These tools are production-ready, well-tested, and designed to work seamlessly together.

Tool Categories

File System Operations

Complete file and directory management capabilities:

File Operations

Read, write, and edit files with encoding support

Directory Operations

List, create, and manage directories

Search Operations

Find files with glob patterns and search content with regex

Advanced Editor

Multi-operation file editor for complex workflows

Code Execution

Secure multi-language code execution:

Sandboxed Execution

Secure execution in isolated E2B containers

Local Execution

High-performance local code execution

Language Support

Python, JavaScript, TypeScript, Bash, and more

Streaming Output

Real-time stdout/stderr streaming

System Operations

Command line and system interaction:

Shell Commands

Execute shell commands with proper isolation

Environment Control

Manage environment variables and working directories

Process Management

Control process execution and resource limits

Output Handling

Capture and process command output

Common Patterns

Tool Selection by Use Case

Choose the right combination of tools based on your agent’s purpose:
from agkit.tools import (
    FilesystemToolkit, BuiltInCodeExecutor,
    create_grep_tool, create_glob_tool, create_bash_tool, create_mcp_tools
)
import os

# File operations: filesystem + search tools
filesystem_toolkit = FilesystemToolkit(name="fs", context=context)

file_tools = [
    *filesystem_toolkit.get_tools(),
    create_grep_tool(context),
    create_glob_tool(context)
]

# Development workflow: code + files + shell
dev_tools = [
    BuiltInCodeExecutor(api_key=os.getenv("E2B_API_KEY")),
    *filesystem_toolkit.get_tools(),
    create_bash_tool(context)
]

# Full-featured: all built-in tools
all_tools = [
    *dev_tools,
    *create_mcp_tools(mcp_config)
]

Error Handling

All built-in tools follow consistent error handling patterns:
result = await tool.invoke(input_data)

if not result.success:
    if result.error_type == 'validation':
        print(f'Invalid input: {result.error}')
    elif result.error_type == 'permission':
        print(f'Access denied: {result.error}')
    elif result.error_type == 'execution':
        print(f'Execution failed: {result.error}')
    elif result.error_type == 'network':
        print(f'Network error: {result.error}')
else:
    print(f'Success: {result.data}')

Next Steps

File System Tools

Complete guide to file system operations

Code Execution Tools

Secure multi-language code execution

Command Line Tools

Shell command execution and system operations

MCP Integration

External tool ecosystem integration