Skip to main content

ai-bridge-kit

ai-bridge-kit is a Python library to integrate AI providers through one clean API.

You can:

  • Switch providers without rewriting app logic.
  • Register your own local AI functions.
  • Use retries and timeouts consistently.
  • Keep your invention logic inside a reusable, package-ready SDK.

Install

pip install -e .

With OpenAI support:

pip install -e ".[openai]"

With Anthropic support:

pip install -e ".[anthropic]"

Install all provider extras:

pip install -e ".[all]"

For development:

pip install -e ".[dev,all]"

Quick Start

from ai_bridge_kit import AIClient

client = AIClient()

# Uses built-in local provider by default.
chat = client.chat("Explain AI integration in one line.")
print(chat.content)

emb = client.embed(["hello world"])
print(len(emb.vectors[0]))

Register your own AI functions

from ai_bridge_kit import AIClient
from ai_bridge_kit.providers import LocalFunctionProvider

provider = LocalFunctionProvider(name="my-ai")
provider.register("chat", lambda payload: "Custom answer")
provider.set_chat_function("chat")

client = AIClient()
client.register_provider(provider, set_default=True)

print(client.chat("hi").content)

OpenAI Provider (optional)

import os
from ai_bridge_kit import AIClient
from ai_bridge_kit.providers import OpenAIProvider

client = AIClient()
client.register_provider(
    OpenAIProvider(api_key=os.environ["OPENAI_API_KEY"]),
    set_default=True,
)

resp = client.chat("Give 3 startup names for an AI integration SDK.", model="gpt-4o-mini")
print(resp.content)

Additional Provider Adapters

Anthropic

import os
from ai_bridge_kit import AIClient
from ai_bridge_kit.providers import AnthropicProvider

client = AIClient()
client.register_provider(
    AnthropicProvider(api_key=os.environ["ANTHROPIC_API_KEY"]),
    set_default=True,
)
print(client.chat("Summarize agentic AI in one sentence.").content)

Ollama (local)

from ai_bridge_kit import AIClient
from ai_bridge_kit.providers import OllamaProvider

client = AIClient()
client.register_provider(
    OllamaProvider(base_url="http://localhost:11434", default_chat_model="llama3.2"),
    set_default=True,
)
print(client.chat("Explain RAG briefly.").content)

OpenAI-compatible APIs (OpenRouter/Groq/Together)

import os
from ai_bridge_kit import AIClient
from ai_bridge_kit.providers import OpenAICompatibleProvider

client = AIClient()
client.register_provider(
    OpenAICompatibleProvider.for_openrouter(api_key=os.environ["OPENROUTER_API_KEY"]),
    set_default=True,
)
print(client.chat("Give 3 names for an AI bridge SDK.").content)

CLI

ai-bridge providers
ai-bridge chat --message "What is retrieval augmented generation?"
ai-bridge embed --text "ai" --text "python"
ai-bridge call --function echo --arguments "{}"

Run tests

python -m pytest

Publish to PyPI

Use RELEASE.md for the full build + twine process.

Patent workflow support

Use PATENT_DISCLOSURE_TEMPLATE.md to document your technical novelty before filing.

Release files for ai-bridge-kit 0.1.2

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

Source distribution (sdist)

Source distribution for ai-bridge-kit 0.1.2
File Size Uploaded
ai_bridge_kit-0.1.2.tar.gz 15.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ai-bridge-kit 0.1.2
File Interpreter ABI Platform
ai_bridge_kit-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 35.3 kB

Release files / ai_bridge_kit-0.1.2.tar.gz

Download URL ai_bridge_kit-0.1.2.tar.gz
Size 15.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e22c5a22303df70ea7a04ccb0732061df3d3e1fc79b60cbcefb503987336f015
BLAKE2b-256 checksum
How to use checksums
4ec7a9f88f621ce0a9fb124e00e5bd927825cb2b751c967522f05a407008000f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 10, 2026.

Transparency log

Release files / ai_bridge_kit-0.1.2-py3-none-any.whl

Download URL ai_bridge_kit-0.1.2-py3-none-any.whl
Size 19.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
30e37963a6eb65abe692c4613f433bd44e3c2e1d7930bbf1526765bc60626551
BLAKE2b-256 checksum
How to use checksums
fe4a844944b3bd2fa8401fab8273b14d979eed63540d5500ac808190b31d0a52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 10, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

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