AnyTool  by HKUDS

Universal tool-use layer for AI agents

Created 1 month ago
466 stars

Top 65.2% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

AnyTool provides a universal tool-use layer designed to enhance AI agents with fast, scalable, and powerful tool integration. It addresses challenges like overwhelming tool contexts, unreliable community tools, and limited capability coverage, enabling more robust and intelligent agent automation for production environments. The system offers a simplified integration, allowing complex multi-tool workflows to be executed with a single API call.

How It Works

AnyTool employs a multi-stage pipeline for lightning-fast tool retrieval, filtering contexts progressively to deliver exact tools in milliseconds. Its self-evolving orchestration adapts to growing tool ecosystems through adaptive MCP tool selection and persistent memory, optimizing performance and resource usage. The universal automation capability extends beyond web APIs to system operations, GUI automation, and deep research via a unified, quality-aware interface that includes reliability tracking and safety controls.

Quick Start & Requirements

  • Installation: Clone the repository, create and activate a Python 3.12+ conda environment, and install dependencies via pip install -r requirements.txt.
  • Prerequisites: A .env file is required for API keys. Platform-specific dependencies are necessary for the local server (macOS: pyobjc-*, atomacos; Linux: python-xlib, pyatspi, at-spi2-core, python3-tk, scrot; Windows: pywinauto, pywin32, PyGetWindow).
  • Local Server: A lightweight Flask service (python -m anytool.local_server.main) is required for GUI automation, Python/Bash execution, and file operations.
  • Integration: A single line async with AnyTool() as tool_layer: followed by await tool_layer.execute("Your task") enables intelligent tool orchestration.
  • Links: GitHub Repository, Communication Channels

Highlighted Details

  • "One line of code to supercharge any agent with Fast, Scalable and Powerful Tool Use."
  • Fast Tool Retrieval: Multi-stage pipeline (server selection, name matching, semantic search, LLM ranking) and zero-waste processing (pre-computed embeddings, lazy initialization).
  • Self-Evolving Orchestration: Adaptive MCP tool selection with smart caching and selective re-indexing, plus self-evolving optimization via persistent memory.
  • Universal Automation: Quality-aware selection (description checks, performance tracking) and a multi-backend architecture supporting MCP, Shell, GUI, and Web operations.

Maintenance & Community

The project provides links to Feishu and WeChat groups for community interaction. Specific details on maintainers, sponsorships, or partnerships are not explicitly detailed in the README.

Licensing & Compatibility

The project is licensed under the MIT License, permitting commercial use and closed-source linking.

Limitations & Caveats

Platform-specific dependencies and manual setup are required for the local server to enable full functionality like GUI automation and shell execution. API keys must be managed via a .env file.

Health Check
Last Commit

2 weeks ago

Responsiveness

Inactive

Pull Requests (30d)
2
Issues (30d)
1
Star History
326 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.