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:

Code Execution

Secure multi-language code execution:

System Operations

Command line and system interaction:

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