Skip to main content

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 to offer core utilities and interfaces that developers can easily integrate into their own agents to avoid excess boilerplate, while being simpler than solutions requiring MCP or A2A.

Installation

pip install basic-open-agent-tools

Or with UV:

uv add basic-open-agent-tools

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
from basic_open_agent_tools.file_system.operations import (
    append_to_file, copy_file, create_directory, delete_directory, delete_file,
    list_directory_contents, move_file, read_file_to_string, write_file_from_string,
)
from basic_open_agent_tools.file_system.info import (
    directory_exists, file_exists, get_file_info, get_file_size, is_empty_directory,
)

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=[
        append_to_file, copy_file, create_directory, delete_directory, delete_file,
        directory_exists, file_exists, get_file_info, get_file_size, is_empty_directory,
        list_directory_contents, move_file, read_file_to_string, write_file_from_string,
    ],
)

Documentation

Current Features

File System Tools

  • File operations (read, write, append, delete, copy, move)
  • Directory operations (create, list, delete, tree visualization)
  • File information and existence checking
  • Path validation and error handling

Planned Modules

  • HTTP request utilities
  • Text processing and manipulation
  • Data parsing and conversion
  • System information and process management
  • Cryptographic utilities
  • Common helper functions

Contributing

We welcome contributions! Please see our Contributing Guide for development setup, coding standards, and pull request process.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

basic_open_agent_tools-0.2.0.tar.gz (22.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

basic_open_agent_tools-0.2.0-py3-none-any.whl (25.0 kB view details)

Uploaded Python 3

File details

Details for the file basic_open_agent_tools-0.2.0.tar.gz.

File metadata

  • Download URL: basic_open_agent_tools-0.2.0.tar.gz
  • Upload date:
  • Size: 22.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for basic_open_agent_tools-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e41ecdfb3ce346a6e2d257e8f4be111e5d1b5574a2990e62df7442979375c1bb
MD5 ab9095dca9b242fd46ec5ef68f4e95bc
BLAKE2b-256 d2b6871dd38e6ef7b2d3c01fd9738139520aceca46a9c9e6f675b91bb51f9859

See more details on using hashes here.

Provenance

The following attestation bundles were made for basic_open_agent_tools-0.2.0.tar.gz:

Publisher: publish.yml on Open-Agent-Tools/basic-open-agent-tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file basic_open_agent_tools-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for basic_open_agent_tools-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0de14f02b1860e1cdf0c4e9b6574297d51173d4001d108207b6fcb894ada1830
MD5 35c36b38f203d0d5cc3ace315808d316
BLAKE2b-256 c36bf2896d9dc37970698f5b61b86f3e250728052c687990d1d056f2e6fe2fb7

See more details on using hashes here.

Provenance

The following attestation bundles were made for basic_open_agent_tools-0.2.0-py3-none-any.whl:

Publisher: publish.yml on Open-Agent-Tools/basic-open-agent-tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page