Skip to main content

aitools-bridge is a minimalist framework (or a decorator) designed to seamlessly integrate existing tools with the advanced AI ecosystem.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aitools_bridge-0.0.1-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file aitools_bridge-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: aitools_bridge-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.10.16 Linux/6.10.14-linuxkit

File hashes

Hashes for aitools_bridge-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a086729fc362660e015f6247aee648a4eb38eabb3ab4a197e8d3421756c8328f
MD5 00a24f0ccc50f6c2f353619bb0091501
BLAKE2b-256 8f39996e501eab3ec159398e209dc518f7dd06cea558805a368fa38d9b7bb68c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page