Skip to main content

Multi-Model AI Integration Framework

Project description

Kalibr SDK

Multi-Model AI Integration Framework

Write once. Deploy anywhere. Connect to any AI model.

Kalibr lets you expose Python functions as APIs that work with GPT, Claude, Gemini, and Copilot automatically.

PyPI version Python 3.11+ License: MIT


🚀 Quick Start (2 minutes)

1. Install

pip install kalibr

2. Get Examples

kalibr-connect examples

This copies example files to ./kalibr_examples/ in your current directory.

3. Run Demo

kalibr-connect serve kalibr_examples/basic_kalibr_example.py

4. See Multi-Model Schemas

Open your browser to see all 4 AI model schemas auto-generated:

http://localhost:8000/                    # API info
http://localhost:8000/gpt-actions.json    # For ChatGPT
http://localhost:8000/mcp.json            # For Claude
http://localhost:8000/schemas/gemini      # For Gemini
http://localhost:8000/schemas/copilot     # For Copilot
http://localhost:8000/docs                # Interactive docs

That's it! One Python file, four AI platform schemas. 🎯


🎯 What Does This Do?

Kalibr turns your Python functions into APIs that AI assistants can call:

from kalibr import Kalibr

app = Kalibr(title="My Business API")

@app.action("get_inventory", "Check product stock")
def get_inventory(product_id: str):
    # Your business logic
    return {"product_id": product_id, "stock": 42}

Result: ChatGPT, Claude, Gemini, and Copilot can all call your get_inventory function!


💪 Two Modes

Function-Level (Simple)

Perfect for exposing business logic:

from kalibr import Kalibr

app = Kalibr(title="My API")

@app.action("calculate_price", "Calculate product price")
def calculate_price(product_id: str, quantity: int):
    return {"total": quantity * get_price(product_id)}

App-Level (Advanced)

Full framework with file uploads, sessions, streaming, workflows:

from kalibr import KalibrApp
from kalibr.types import FileUpload, Session

app = KalibrApp(title="Advanced API")

@app.file_handler("analyze_doc", [".pdf", ".docx"])
async def analyze_doc(file: FileUpload):
    return {"filename": file.filename, "analysis": "..."}

@app.session_action("save_data", "Save to session")
async def save_data(session: Session, data: dict):
    session.set("my_data", data)
    return {"saved": True}

@app.stream_action("live_feed", "Stream real-time data")
async def live_feed(count: int = 10):
    for i in range(count):
        yield {"item": i, "timestamp": "..."}

📚 Examples Included

After running kalibr-connect examples, you get:

  • basic_kalibr_example.py - Simple function-level example
  • enhanced_kalibr_example.py - Advanced app-level example with all features

🤖 AI Platform Integration

Once your Kalibr app is running, integrate with AI platforms:

ChatGPT (GPT Actions)

  1. Copy schema from http://localhost:8000/gpt-actions.json
  2. Go to GPT Builder → Actions → Import from URL
  3. Done! ChatGPT can now call your functions

Claude (MCP)

  1. Add to Claude Desktop config:
{
  "mcp": {
    "servers": {
      "my-api": {
        "url": "http://localhost:8000/mcp.json"
      }
    }
  }
}
  1. Done! Claude can now call your functions

Gemini & Copilot

Similar simple setup using their respective schema endpoints.


🎯 Use Cases

  • Customer Service APIs - Let AI assistants look up orders, process refunds
  • Data Analysis APIs - Let AI query your analytics and generate insights
  • Document Processing - Let AI analyze uploaded documents
  • Business Automation - Let AI trigger workflows in your systems
  • Internal Tools - Give your team AI-powered access to internal systems

📖 Documentation

  • Quick Start: You're reading it!
  • Full Docs: See KALIBR_SDK_COMPLETE.md in the package
  • Examples: Run kalibr-connect examples
  • CLI Help: kalibr-connect --help

🔧 CLI Commands

kalibr-connect examples          # Copy example files to current dir
kalibr-connect serve my_app.py   # Run your app locally
kalibr-connect version           # Show version info
kalibr-connect --help            # Show all commands

⚡ Key Features

  • Multi-Model Support - Works with GPT, Claude, Gemini, Copilot
  • Automatic Schemas - No manual schema writing
  • File Uploads - Handle document uploads
  • Sessions - Stateful conversations
  • Streaming - Real-time data streaming
  • Workflows - Multi-step processes
  • Type Safe - Full Python type hints
  • Fast - Async/await support

🔥 Why Kalibr?

Without Kalibr:

  • Learn 4 different API specs
  • Write 4 different schemas
  • Maintain 4 codebases
  • = Weeks of work

With Kalibr:

  • Write Python functions once
  • Kalibr generates all 4 schemas
  • Single codebase
  • = One day of work

💡 Simple Example

# my_app.py
from kalibr import Kalibr

app = Kalibr(title="Weather API")

@app.action("get_weather", "Get current weather")
def get_weather(city: str):
    # Your logic here
    return {"city": city, "temp": 72, "condition": "sunny"}
# Run it
kalibr-connect serve my_app.py

# Now ALL these work:
# ✅ ChatGPT can call get_weather()
# ✅ Claude can call get_weather()
# ✅ Gemini can call get_weather()
# ✅ Copilot can call get_weather()

🚀 Get Started Now

pip install kalibr
kalibr-connect examples
kalibr-connect serve kalibr_examples/basic_kalibr_example.py

Open http://localhost:8000 and see your multi-model API in action! 🎯


📝 License

MIT License - see LICENSE file for details.


Kalibr SDK - Transform how you build AI-integrated applications! 🚀

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

kalibr-1.0.20.tar.gz (28.4 kB view details)

Uploaded Source

Built Distribution

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

kalibr-1.0.20-py3-none-any.whl (30.2 kB view details)

Uploaded Python 3

File details

Details for the file kalibr-1.0.20.tar.gz.

File metadata

  • Download URL: kalibr-1.0.20.tar.gz
  • Upload date:
  • Size: 28.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for kalibr-1.0.20.tar.gz
Algorithm Hash digest
SHA256 0b71400fb9526bbd30ef6cd761b4850fbf7edfaf754654eaa94c7c50ddc90326
MD5 aa20f3ea3a8605ae80a4e92afec5afc8
BLAKE2b-256 2e3dd3fa21379708e10a032a46f0dad7e37f64bb0399c689b8349b8534fea8a7

See more details on using hashes here.

File details

Details for the file kalibr-1.0.20-py3-none-any.whl.

File metadata

  • Download URL: kalibr-1.0.20-py3-none-any.whl
  • Upload date:
  • Size: 30.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for kalibr-1.0.20-py3-none-any.whl
Algorithm Hash digest
SHA256 a03aa23eabc535c041e2e1bc429948e169089f3ae0597411381dc0e9de3f0121
MD5 a605589e7290b38d94213dcd31daaa07
BLAKE2b-256 dce0b889a89a1511acbd1a1bce5f0596d370ce46917677514e08200ab8262fb9

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