Skip to main content

llm-tool-runtime

A lightweight, extensible runtime for calling LLM tools and chaining them together. Installable from PyPI for easy integration into your Python projects.

Installation

Install the core package:

pip install llm-tool-runtime

Optional Model Support

Some LLM providers require extra dependencies. You can install them with extras:

  • Google Gemma:
    pip install "llm-tool-runtime[google]"
    
  • OpenAI:
    pip install "llm-tool-runtime[openai]"
    
  • Anthropic:
    pip install "llm-tool-runtime[anthropic]"
    
  • Ollama:
    pip install "llm-tool-runtime[ollama]"
    
  • Together:
    pip install "llm-tool-runtime[together]"
    
  • All supported providers:
    pip install "llm-tool-runtime[all]"
    

Usage

Import and use the runtime in your Python code:

from llm_tool_runtime import ToolRuntime
from langchain_google_genai import ChatGoogleGenerativeAI
llm = ChatGoogleGenerativeAI(model="gemma-3-27b-it")
runtime = ToolRuntime(llm, verbose=True)

@runtime.tool
def add(a: int, b: int) -> int:
    """Add two numbers together."""
    return a + b

result = runtime.run("What is 15 + 27?")
print(result)  # "The result of 15 + 27 is 42."

See example.py and example_chain.py for usage examples.

Features

  • Register and call tools with LLMs
  • Chain tools together for complex workflows
  • Extensible registry for custom tools
  • Error handling and type safety

Documentation

Contributing

Contributions are welcome! Please see the main README for guidelines.

License

This project is licensed under the terms of the MIT License. See the LICENSE file for details.

Support

For issues, suggestions, or questions, please open an issue on the GitHub repository.

Metadata

Release files for llm-tool-runtime 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llm-tool-runtime 0.1.5
File Size Uploaded
llm_tool_runtime-0.1.5.tar.gz 19.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for llm-tool-runtime 0.1.5
File Interpreter ABI Platform
llm_tool_runtime-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 32.2 kB

Release files / llm_tool_runtime-0.1.5.tar.gz

Download URL llm_tool_runtime-0.1.5.tar.gz
Size 19.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a85ae984403b8d3bc0bb40a37a5205ad19bdd75799ca4cb09023ef30c335d20b
BLAKE2b-256 checksum
How to use checksums
33f6ec7df99898aa148d8d7f231d9354e30d0708edd3dfc74bef3728dae62639
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / llm_tool_runtime-0.1.5-py3-none-any.whl

Download URL llm_tool_runtime-0.1.5-py3-none-any.whl
Size 12.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
95ee913f82cbbbc666dd4d68dca41e074710494c5c3c0c6ebe93fa488cdc9231
BLAKE2b-256 checksum
How to use checksums
8c397bc83d97031477f77b70a06a304126bb126a08e2c2eeb45605d44c591515
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page