Large Language Models can run tools in your terminal with LLM 0.26
LLM 0.26 lets you grant any language model—OpenAI, Anthropic, Gemini, or local Ollama models—access to arbitrary Python functions as tools, either through plugins or by literally pasting code on the command line.
Read Original Summary used for search
TLDR
• Pass --tool simpleeval to give models math abilities, --tool 'Datasette("url")' to query remote databases, or write your own tools as Python functions
• The --functions flag accepts literal Python code on the CLI—define a function and the model can call it (example: 4 lines of code to search Simon's blog via httpx)
• Works across vendors (OpenAI, Anthropic, Gemini) and local models (Ollama's Qwen3:4b can use simple tools at 2.6GB)
• Python API includes model.chain() that automatically handles the tool execution loop, supports async tools with concurrent execution
• Design challenge was creating an abstraction layer that works across all vendors—took until now because tool support APIs finally converged on a consensus pattern
In Detail
LLM 0.26 introduces comprehensive tool support, allowing language models to execute Python functions through both CLI and Python library interfaces. The implementation works across major vendors (OpenAI, Anthropic, Google) and local models via Ollama, solving the long-standing design challenge of creating a unified abstraction layer.
The tool system operates at three levels. First, installable plugins like llm-tools-simpleeval (math expressions), llm-tools-quickjs (JavaScript sandbox), llm-tools-sqlite, and llm-tools-datasette provide pre-built capabilities. Second, the --functions option accepts literal Python code on the command line—you can define a function inline and the model can immediately call it. Third, the Python API's new model.chain() method handles the complete tool execution loop: it detects tool call requests, executes them, and prompts the model again with results, potentially across dozens of iterations. The API supports both sync and async tools, running async tools concurrently when multiple are requested.
The feature's delayed release reflects Simon's design philosophy: he waited until vendor tool APIs converged on a consensus pattern rather than building on unstable foundations. The result is a system that makes "agents" (tools in a loop) accessible without framework overhead. The Datasette example demonstrates emergent behavior—the model guesses a SQL query, gets an error, fetches the schema, then constructs the correct query—all through a simple CLI invocation. This fundamentally shifts LLMs from knowledge retrieval to capability extension: if you can write a Python function for it, you can trigger it from a model.