An open foundational toolkit providing essential components for building AI agents with minimal dependencies for local (non-HTTP/API) actions.
Project description
basic-open-agent-tools
An open foundational toolkit providing essential components for building AI agents with minimal dependencies for local (non-HTTP/API) actions. Designed with agent-friendly type signatures to eliminate "signature too complex" errors, while offering core utilities that developers can easily integrate into their agents to avoid excess boilerplate.
๐ What's New in v0.11.3
๐ง File Operation Logging: Enhanced input logging for replace_in_file() and insert_at_line() functions with detailed parameter tracking
๐ก๏ธ Security Auditing: Added comprehensive logging for file modification operations with truncated parameter display for security monitoring
๐ Operation Visibility: Real-time tracking of file content changes and line insertions with [FILE] prefix logging
๐ Enhanced Monitoring: Complete audit trail for file modification operations ensuring security compliance and debugging capability
Installation
Basic Installation
pip install basic-open-agent-tools
Or with UV:
uv add basic-open-agent-tools
Optional Dependency Groups
Install only the features you need:
# System tools (process management, system info, shell commands)
pip install basic-open-agent-tools[system]
# PDF tools (reading and creating PDFs)
pip install basic-open-agent-tools[pdf]
# All optional features
pip install basic-open-agent-tools[all]
# Development dependencies (testing, linting, type checking)
pip install basic-open-agent-tools[dev]
# Testing only
pip install basic-open-agent-tools[test]
๐ก Tip: Use [all] to get all optional features, or combine specific groups as needed.
Dependency Groups Explained
| Group | Dependencies | Use Case |
|---|---|---|
[system] |
psutil>=5.9.0 |
Process management, system monitoring, resource usage |
[pdf] |
PyPDF2>=3.0.0, reportlab>=4.0.0 |
PDF reading, creation, and manipulation |
[all] |
All optional dependencies | Complete feature set with all capabilities |
[dev] |
All above + testing/linting tools | Development, testing, and code quality |
[test] |
All above + testing tools only | CI/CD and automated testing |
Key Features
โจ Agent-Friendly Design: All functions use simplified type signatures to prevent "signature too complex" errors when used with AI agent frameworks
๐ Minimal Dependencies: Pure Python implementation with no external dependencies for core functionality
๐ง Modular Architecture: Load only the tools you need with category-specific helpers, or use load_all_tools() for everything
๐ค Multi-Framework Compatibility: Native support for Google ADK, LangChain, Strands Agents, and custom agent frameworks with @strands_tool decorators
๐ Enhanced User Feedback: Detailed operation confirmations and permission checking across all write operations for better agent decision-making
Quick Start
import logging
import warnings
from dotenv import load_dotenv
from google.adk.agents import Agent
from google.adk.models.lite_llm import LiteLlm
import basic_open_agent_tools as boat
# Option 1: Load all tools at once (recommended)
agent_tools = boat.load_all_tools() # All 166 functions from all modules
# Enhanced feedback and logging examples:
# All write operations now return detailed feedback strings
result = boat.file_system.write_file_from_string(
file_path="/tmp/example.txt",
content="Hello, World!",
skip_confirm=False # Safe default - prevents accidental overwrites
)
# Returns: "Created file /tmp/example.txt with 1 lines (13 bytes)"
# Data tools also provide enhanced feedback
csv_result = boat.data.write_csv_simple(
data=[{"name": "Alice", "age": 30}],
file_path="/tmp/data.csv",
delimiter=",",
headers=True,
skip_confirm=False # Safe default - prevents accidental overwrites
)
# Returns: "Created CSV file /tmp/data.csv with 1 rows and 2 columns (17 bytes)"
# Option 2: Load tools by category
fs_tools = boat.load_all_filesystem_tools() # 18 functions
text_tools = boat.load_all_text_tools() # 10 functions
data_tools = boat.load_all_data_tools() # 23 functions
datetime_tools = boat.load_all_datetime_tools() # 40 functions
network_tools = boat.load_all_network_tools() # 4 functions (NEW: DNS, port checking)
utilities_tools = boat.load_all_utilities_tools() # 8 functions (NEW: debugging tools)
system_tools = boat.load_all_system_tools() # 19 functions
crypto_tools = boat.load_all_crypto_tools() # 14 functions
pdf_tools = boat.load_all_pdf_tools() # 8 functions (NEW: advanced manipulation)
archive_tools = boat.load_all_archive_tools() # 9 functions (NEW: GZIP, BZIP2, XZ)
logging_tools = boat.load_all_logging_tools() # 5 functions
monitoring_tools = boat.load_all_monitoring_tools() # 8 functions (NEW: performance profiling)
# Merge selected categories (automatically deduplicates)
agent_tools = boat.merge_tool_lists(fs_tools, text_tools, network_tools, utilities_tools)
load_dotenv()
agent_instruction = """
**INSTRUCTION:**
You are FileOps, a specialized file and directory operations sub-agent.
Your role is to execute file operations (create, read, update, delete, move, copy) and directory operations (create, delete) with precision.
**Guidelines:**
- **Preserve Content:** Always read full file content before modifications; retain all original content except targeted changes.
- **Precision:** Execute instructions exactly, verify operations, and handle errors with specific details.
- **Communication:** Provide concise, technical status reports (success/failure, file paths, operation type, content preservation details).
- **Scope:** File/directory CRUD, move, copy, path validation. No code analysis.
- **Confirmation:** Confirm completion to the senior developer with specific details of modifications.
"""
logging.basicConfig(level=logging.ERROR)
warnings.filterwarnings("ignore")
file_ops_agent = Agent(
model=LiteLlm(model="anthropic/claude-3-5-haiku-20241022"),
name="FileOps",
instruction=agent_instruction,
description="Specialized file and directory operations sub-agent for the Python developer.",
tools=agent_tools,
)
"""
The above would load:
File and Directory Operations:
read_file_to_string
write_file_from_string
append_to_file
list_directory_contents
create_directory
delete_file
delete_directory
move_file
copy_file
get_file_info
file_exists
directory_exists
get_file_size
is_empty_directory
list_all_directory_contents
generate_directory_tree
validate_path
validate_file_content
Text Processing Tools:
clean_whitespace
normalize_line_endings
strip_html_tags
normalize_unicode
to_snake_case
to_camel_case
to_title_case
smart_split_lines
extract_sentences
join_with_oxford_comma
Network Tools:
http_request
Utilities Tools:
sleep_seconds
"""
Documentation
- Getting Started - Installation and quick start guide
- API Reference - Complete function reference and lookup
- Examples - Detailed usage examples and patterns
- FAQ - Frequently asked questions and troubleshooting
- Glossary - Agent framework terminology reference
- Contributing - Development setup and guidelines
- Changelog - Version history and migration notes
Current Features
File System Tools โ (18 functions)
- File operations (read, write, append, delete, copy, move)
- Directory operations (create, list, delete, tree visualization)
- File information and existence checking
- Path validation and security features
- ๐ Enhanced feedback: All write operations now include
skip_confirmparameter and return detailed operation summaries
Text Processing Tools โ (10 functions)
- Text cleaning and whitespace normalization
- Case conversion utilities (snake_case, camelCase, Title Case)
- Smart text splitting and sentence extraction
- HTML tag removal and Unicode normalization
Data Processing Tools โ (23 functions)
- JSON Processing: Safe serialization, validation, compression
- CSV Operations: Reading, writing, cleaning, validation
- Configuration Files: YAML, TOML, INI processing
- Data Validation: Schema checking, type validation, field validation
- Agent-Friendly Signatures: All functions use basic Python types for maximum AI framework compatibility
- ๐ Enhanced feedback: All write operations include detailed reports with row/column counts and file sizes
DateTime Tools โ (40 functions)
- Current Date/Time: Timezone-aware current date/time operations
- Date Arithmetic: Add/subtract days, hours, minutes with proper handling
- Date Ranges: Generate date ranges, quarters, business days
- Validation: ISO format validation, range checking, format verification
- Business Logic: Business day calculations, timezone conversions
- Information Extraction: Weekday names, month names, leap years
Network Tools โ (4 functions)
- HTTP Client: Make API calls and fetch web data with comprehensive error handling
- DNS Resolution: Resolve hostnames to IP addresses and reverse DNS lookups
- Port Checking: Check if ports are open on remote hosts with timeout controls
- Agent-Friendly: Simplified type signatures and structured responses
- Strands Compatible: Native
@strands_tooldecorator support - Security: SSL verification, timeout controls, proper error handling
Utilities Tools โ (8 functions)
- Timing Controls: Pause execution with interrupt handling and precision sleep
- Debugging Tools: Function signature inspection, call stack analysis, exception formatting
- Code Validation: Validate function calls before execution
- Variable Tracing: Track how variables change through operations
- Strands Compatible: Native
@strands_tooldecorator support - Agent-Friendly: Structured responses with detailed debugging information
System Tools โ (19 functions)
- Cross-Platform Shell: Execute shell commands on Windows, macOS, and Linux
- Process Management: Get process info, list running processes, check if processes are running
- System Information: CPU usage, memory usage, disk usage, system uptime
- Environment Variables: Get, set, and list environment variables
- Runtime Inspection: Inspect Python environment, modules, and system context
Crypto Tools โ (14 functions)
- Hashing: MD5, SHA-256, SHA-512 hashing for strings and files
- Encoding: Base64, URL, and hex encoding/decoding
- Generation: UUIDs, random strings, and random bytes with configurable entropy
- Verification: Checksum verification and hash validation
PDF Tools โ (8 functions)
- PDF Reading: Extract text from PDFs with page range support
- PDF Creation: Convert text to PDF with customizable formatting and merging
- PDF Information: Get metadata and document information
- PDF Manipulation: Split PDFs, extract pages, rotate pages, add watermarks
- Advanced Features: Page-specific operations and document transformation
Archive Tools โ (9 functions)
- ZIP Operations: Create and extract ZIP archives
- TAR Operations: Create and extract TAR archives
- Advanced Compression: GZIP, BZIP2, and XZ/LZMA single-file compression
- Compression Analysis: Detailed compression ratios and space savings metrics
- Multiple Formats: Support for all major compression formats with statistics
- ๐ Enhanced feedback: Archive creation includes
skip_confirmparameter and returns detailed compression statistics and file counts
Logging Tools โ (5 functions)
- Structured Logging: JSON-formatted logging with configurable fields
- Log Rotation: Automatic log file rotation and cleanup
- Multiple Handlers: File, console, and rotating file handlers
Monitoring Tools โ (8 functions)
- File Watching: Monitor files and directories for changes
- Health Checks: URL health monitoring and service status checks
- Performance Profiling: System performance monitoring and code execution profiling
- Benchmarking: Disk I/O benchmarking and system load analysis
- Real-time Monitoring: Event-driven file system and performance monitoring
Total: 166 implemented functions across 12 categories, designed specifically for building AI agents with comprehensive local operations, network utilities, advanced file processing, and development debugging tools.
Helper Functions
Load All Tools at Once โก
import basic_open_agent_tools as boat
# Get all 166 functions from all modules
all_tools = boat.load_all_tools()
# Use with any agent framework
agent = Agent(tools=all_tools)
Selective Loading ๐ฏ
# Load specific categories
fs_tools = boat.load_all_filesystem_tools() # File operations
text_tools = boat.load_all_text_tools() # Text processing
data_tools = boat.load_all_data_tools() # JSON, CSV, config files
datetime_tools = boat.load_all_datetime_tools() # Date/time operations
network_tools = boat.load_all_network_tools() # HTTP client
utilities_tools = boat.load_all_utilities_tools() # Timing functions
system_tools = boat.load_all_system_tools() # Shell, processes, system info
crypto_tools = boat.load_all_crypto_tools() # Hashing, encoding, generation
pdf_tools = boat.load_all_pdf_tools() # PDF reading and creation
archive_tools = boat.load_all_archive_tools() # ZIP and TAR operations
logging_tools = boat.load_all_logging_tools() # Structured logging
monitoring_tools = boat.load_all_monitoring_tools() # File watching, health checks
# Merge selected tools (automatically deduplicates)
custom_tools = boat.merge_tool_lists(
fs_tools,
network_tools,
system_tools,
crypto_tools
)
Contributing
We welcome contributions! Please see our Contributing Guide for development setup, coding standards, and pull request process.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file basic_open_agent_tools-0.12.5.tar.gz.
File metadata
- Download URL: basic_open_agent_tools-0.12.5.tar.gz
- Upload date:
- Size: 98.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c193f2a90df702b753765c38178cce6a035a73e7509996d49b593297b7726c4b
|
|
| MD5 |
d9bd659936236986af0367a22fe2241c
|
|
| BLAKE2b-256 |
922efe9e59305c7a311932b33a2b95d257ce07a75bd5b1120ab3448a69cb9134
|
Provenance
The following attestation bundles were made for basic_open_agent_tools-0.12.5.tar.gz:
Publisher:
publish.yml on Open-Agent-Tools/basic-open-agent-tools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
basic_open_agent_tools-0.12.5.tar.gz -
Subject digest:
c193f2a90df702b753765c38178cce6a035a73e7509996d49b593297b7726c4b - Sigstore transparency entry: 599990419
- Sigstore integration time:
-
Permalink:
Open-Agent-Tools/basic-open-agent-tools@4bb4a6077f112e8a5a977ce7711b8f56de232ebf -
Branch / Tag:
refs/tags/v0.12.5 - Owner: https://github.com/Open-Agent-Tools
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4bb4a6077f112e8a5a977ce7711b8f56de232ebf -
Trigger Event:
release
-
Statement type:
File details
Details for the file basic_open_agent_tools-0.12.5-py3-none-any.whl.
File metadata
- Download URL: basic_open_agent_tools-0.12.5-py3-none-any.whl
- Upload date:
- Size: 125.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17f56ec943472745314dd6449d1059ddebc7dff0412deed95dd2bb15fd5cdbb3
|
|
| MD5 |
e20d258a7b6f637a0b818a7f48c49957
|
|
| BLAKE2b-256 |
2ccbf2e92b68e8efdf6fd221f03811db9bc634301ebdaef0d958a4996b445848
|
Provenance
The following attestation bundles were made for basic_open_agent_tools-0.12.5-py3-none-any.whl:
Publisher:
publish.yml on Open-Agent-Tools/basic-open-agent-tools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
basic_open_agent_tools-0.12.5-py3-none-any.whl -
Subject digest:
17f56ec943472745314dd6449d1059ddebc7dff0412deed95dd2bb15fd5cdbb3 - Sigstore transparency entry: 599990421
- Sigstore integration time:
-
Permalink:
Open-Agent-Tools/basic-open-agent-tools@4bb4a6077f112e8a5a977ce7711b8f56de232ebf -
Branch / Tag:
refs/tags/v0.12.5 - Owner: https://github.com/Open-Agent-Tools
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4bb4a6077f112e8a5a977ce7711b8f56de232ebf -
Trigger Event:
release
-
Statement type: