ag_kit.tools
Theag_kit.tools package provides a comprehensive toolkit system that enables AI agents to interact with the external world through a unified, type-safe interface.
Available Tools
File System Tools
Read, write, edit, and manage files and directories with full path safety
Code Execution
Execute Python code snippets with secure sandboxed or local execution options
Command Line Tools
Run shell commands and system operations with proper isolation
Framework Adapters
Seamlessly integrate with LangChain and LlamaIndex frameworks
MCP Integration
Connect to MCP servers and expose AG-Kit tools via Model Context Protocol
Custom Tools
Build and integrate custom tools for your specific use cases
Installation
Core Architecture
All tools implement a standardizedBaseTool interface for consistency and type safety:
Quick Start
Key Features
- Type Safety: Full Pydantic support with schema validation
- Security: Path validation, input sanitization, and sandboxed execution
- Extensibility: Easy custom tool creation with the base tool class
- Performance: Async operations with timeout control and resource management
- Error Handling: Structured error types with detailed context
Tool Categories
File System Tools
Complete file and directory operations including read, write, edit, search, and pattern matching. Learn more →Code Execution Tools
Secure Python code execution with both sandboxed and local options. Learn more →Command Line Tools
Shell command execution with proper isolation and environment control. Learn more →Framework Adapters
Seamless bidirectional conversion between AG-Kit tools and popular AI frameworks like LangChain and LlamaIndex. Learn more →MCP Integration
Bidirectional integration with Model Context Protocol for connecting to external MCP servers and exposing AG-Kit tools. Learn more →Custom Tools
Framework for building specialized tools tailored to your specific use cases. Learn more →Next Steps
File System Guide
Comprehensive file and directory operations
Code Execution Guide
Secure Python code execution
Command Line Guide
Shell command execution and system operations
Framework Adapters Guide
Integrate with LangChain and LlamaIndex
MCP Integration Guide
Connect to external MCP servers and expose AG-Kit tools
Custom Tools Guide
Build specialized tools for your use cases
Integration Resources
- Agent Integration - Using tools with AG-Kit agents
- Server Integration - Deploy tools in server environments
- Examples & Tutorials - Real-world tool usage patterns