## LLM Tools: Install and Manage Python Tools for…
LLM-tools.txt is requirements.txt for LLM tools.** Install, pin, discover, describe, and execute an agent's tools from one simple file.
Giving an LLM one tool is easy. Keeping many tools installed, documented, versioned, and working across several AI agents is not.
A typical Python agent project starts with a few copied tool files. Soon it has large nested folders, duplicated API clients, hard-coded endpoints, stale Git clones, and different versions of the same tool. Every agent framework expects a different schema. Moving the agent to another computer means finding and installing everything again. An LLM cannot reliably install these tools by itself because there is no standard client-side package contract.
This creates practical problems:
Where is each tool installed?
Which version does this agent use?
How does the LLM learn the correct arguments?
Does the tool expect JSON, XML, or a provider-specific schema?
How is the API called without copying its client into every project?
What error information reaches the agent when a call fails?
LLM Tools solves this with a lightweight Python LLM tool manager. Think of LLM-tools.txt as requirements.txt for the tools an LLM can actually call. Each tool is a normal pip package. The manager installs it on the agent's machine, records its exact version, asks it for usage instructions, and executes it through one predictable contract.
The tool's real work can remain on a FastAPI server, commercial API, local model, or local Python service. Only a small client package is installed beside the agent. This clean separation keeps server logic on the server and gives the LLM a reliable client-side interface.
Without a tool manager, setup often looks like this:
agent/ ├── tools/ │ ├── copied_weather_client/ │ ├── old_search_tool/ │ ├── search_tool_new/ │ └── random_helpers/ ├── tool_schemas/ └── undocumented_setup_steps.txt
Nobody knows which folder is current, which Git commit is required, or which schema the LLM should use.
With LLM Tools, the same agent has one readable registry:
weather-tool==1.2.0 search-tool==2.1.3
Installing and using a published tool becomes three beginner-friendly commands. Here, weather-tool is an example package name; a fully runnable package is provided later in this README.
llm-tools install weather-tool
llm-tools describe weather-tool --format json
llm-tools execute weather-tool --payload ' {"city":"Chicago"} '
That is the main benefit: an agent can install an LLM tool with pip, discover its schema, and call it without cloning repositories, copying source files, or writing a new integration for every model provider.
Client-side installation makes tools behave like normal Python dependencies. Python packages have requirements.txt ; LLM tool packages have LLM-tools.txt . Each agent chooses and pins the versions it needs. Another developer can read that file, recreate the same setup, and understand exactly what the LLM can call.
The manager provides:
one requirements-style LLM-tools.txt registry;
automatic pip installation and exact version tracking;
one Python class for discovery, description, execution, and removal;
one CLI contract shared by every independent tool package;
JSON and XML for open-source and vendor-locked LLMs;
structured failures with stderr, exit code, timeout, and error type;
no copied API clients, giant tool folders, or hidden Git-version guesses;
no secrets in the registry.
This makes LLM tool discovery and installation simple enough for a person, Python application, or AI agent to perform safely and repeatably.
Python 3.11 or newer is required. Start in the folder containing your agent. A virtual environment keeps its tools separate from other Python projects:
python -m venv .venv
source .venv/bin/activate
Now install LLM Tools directly from GitHub with one pip command:
python -m pip install " git+https://github.com/John-Codes/LLM-Tools.git "
Confirm that it is ready:
llm-tools --help
That installs the llm-tools command and the LLMTool Python class. You do not need to copy this repository into every agent project.
After a release is published to PyPI, installation becomes:
python -m pip install llm-tools
Installing a compatible, published tool is one command. Replace YOUR_TOOL_PACKAGE with its pip package name:
llm-tools install YOUR_TOOL_PACKAGE
LLM Tools runs pip safely, confirms that the tool command exists, detects the installed version, and records it in LLM-tools.txt . The resulting file is as simple as a Python requirements file:
YOUR_TOOL_PACKAGE==1.2.0
Now an agent can discover, understand, and call the package:
llm-tools list llm-tools describe YOUR_TOOL_PACKAGE --format json llm-tools execute YOUR_TOOL_PACKAGE --payload ' {"input":"value"} '
The default registry is LLM-tools.txt in the current directory. Override it with LLM_TOOLS_FILE or LLMTool("path/to/LLM-tools.txt") .
This repository includes example-tool , a real pip package backed by FastAPI. It accepts text and returns the uppercase version. Install both the manager and the example without cloning the repository:
Install it:
python -m pip install " git+https://github.com/John-Codes/LLM-Tools.git "
llm-tools install example-tool
--source " git+https://github.com/John-Codes/LLM-Tools.git#subdirectory=examples/example_tool "
Start its API in terminal one:
source .venv/bin/activate uvicorn example_tool.api.main:app --port 8000
Use it in terminal two:
source .venv/bin/activate llm-tools list llm-tools describe example-tool --format json llm-tools execute example-tool --payload ' {"text":"hello LLM"} '
The execution result includes both the tool output and call diagnostics:
{ "ok" : true , "output" : { "result" : " HELLO LLM " }, "stdout" : " { " result " : " HELLO LLM " } \n " , "stderr" : " " , "exit_code" : 0 , "error_type" : null , "error_message" : null , "timed_out" : false }
This is the complete client-side flow an agent needs:
from llm_tools import LLMTool
tools = LLMTool ( "LLM-tools.txt" )
for tool in tools . get_tools (): print ( tool . package , tool . version )
schema = tools . describe ( "example-tool" , format = "json" ) print ( schema [ "description" ]) print ( schema [ "input_schema" ])
result = tools . execute ( "example-tool" , payload = { "text" : "hello from Python" }, format = "json" , ) if result . ok : print ( result . output ) # {'result': 'HELLO FROM PYTHON'} else : print ( result . to_dict ())
There are only three concepts: read registered tools, describe one tool, then execute it with a payload. Installation and removal maintain the same registry.
An agent can install a published tool without cloning its Git repository:
from llm_tools import LLMTool tools = LLMTool () installed = tools . install ( "weather-tool" ) schema = tools . describe ( installed . package ) result = tools . execute ( installed . package , { "city" : "Chicago" })
For a local package or Git checkout, identify its required command name and pass its directory as the pip source:
tools . install ( "example-tool" , source…
本条由桃子采集流水线(启发式模式)自动整理,原文见文末信源。