Skip to main content

Logo


license PRs welcome made with hearth by

Table of Contents

About

aitools-bridge is a minimalist framework (or a decorator) designed to seamlessly integrate existing tools with the advanced AI ecosystem. The goal is to make it easier for users to wrap AI-compatible functions. As an adaptive bridge, it brings current tools into the AI era while expanding the capabilities of AI.

preview

Getting Started

Usage


  1. Install
pip install aitools-bridge
  1. Find any function you want to integrate with AI and make a small change

if your function has a complete docstring, following Google, NumPy, or Sphinx style.

from bridge import ToolsBridge

@ToolsBridge.register()
def get_weather(location: str):
    """Get current temperature for a given location.

    Args:
        location: City and country e.g. Bogotá, Colombia
    """
    pass

if not, please use args: description & param_descriptions.

from bridge import ToolsBridge

@ToolsBridge.register(
  description="Get current temperature for a given location",
  param_descriptions={
    "location": "City and country e.g. Bogotá, Colombia"
  }
)
def get_weather(location: str):
    pass
  1. Export the tools to AI API and enjoy the experience!
completion = openai.OpenAI().chat.completions.create(
  ...
  tools=ToolsBridge.get_tools(),
)

print(completion.choices[0].message.tool_calls)

output

[{
    "id": "call_*",
    "type": "function",
    "function": {
        "name": "get_weather",
        "arguments": "{\"location\":\"Paris, France\"}"
    }
}]

Example


Prerequisites

Make sure you have installed both Poetry and Ollama.

poetry -V

ollama list
  1. Install dependencies
make sync
  1. Run examples
make examples

examples

tool.py is just an ordinary Python function. However, after adding ToolsBridge.register, this function evolves into an AI tool (ai_tool.py) that can be passed to an LLM for collaborative processing, allowing it to demonstrate its capabilities (or intelligence) in the right context. This transforms it from a pure code-level function call into an interactive conversation between humans and AI. Instead of merely returning a function output, the user receives meaningful answers.

Development


This project welcomes contributions and suggestions. Before making any changes, please follow the steps below

make sync

make tests  # tests
make format # formatter
make lint   # linter

License


This project is licensed under the Apache License V2.0. See LICENSE for more information.

Acknowledgements


​A special thanks to these outstanding open-source community.

Citation


If you use aitools-bridge in your project, please cite:

@software{aitools-bridge2025,
  author = {m0reA1},
  title = {aitools-bridge: a minimalist framework designed to seamlessly integrate existing tools with the advanced AI ecosystem},
  year = {2025},
  publisher = {GitHub},
  url = {https://github.com/m0reA1/aitools-bridge}
}

Contacts


If you have any questions, please contact us at more.aitools@gmail.com.

Metadata

Release files for aitools-bridge 0.0.1

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

Built distribution (wheel)

Table of built distributions (wheels) for aitools-bridge 0.0.1
File Interpreter ABI Platform Actions
aitools_bridge-0.0.1-py3-none-any.whl Python 3 none any Details for aitools_bridge-0.0.1-py3-none-any.whl

Release files / aitools_bridge-0.0.1-py3-none-any.whl

Download URL aitools_bridge-0.0.1-py3-none-any.whl
Size 9.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a086729fc362660e015f6247aee648a4eb38eabb3ab4a197e8d3421756c8328f
BLAKE2b-256 checksum
How to use checksums
8f39996e501eab3ec159398e209dc518f7dd06cea558805a368fa38d9b7bb68c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.1 CPython/3.10.16 Linux/6.10.14-linuxkit

Security for aitools-bridge 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

1 release file No provenance

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