Multi-Model AI Integration Framework
Project description
Kalibr SDK
Multi-Model AI Integration Framework
Write once. Deploy anywhere. Connect to any AI model.
Kalibr turns Python functions into APIs that work seamlessly with GPT, Claude, Gemini, and Copilot — automatically generating model-specific schemas and endpoints.
🚀 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 All Schemas
Kalibr now auto-detects your environment and generates the correct base URLs.
| Environment | Example Base URL |
|---|---|
| Local Dev | http://localhost:8000 |
| Fly.io | https://<app-name>.fly.dev |
| Custom Host | Use KALIBR_BASE_URL env var |
Then open:
<your-base-url>/gpt-actions.json # ChatGPT
<your-base-url>/mcp.json # Claude
<your-base-url>/schemas/gemini # Gemini
<your-base-url>/schemas/copilot # Copilot
🧠 What Kalibr Does
Kalibr turns your Python functions into production-ready multi-model APIs.
from kalibr import Kalibr
app = Kalibr(title="Inventory API")
@app.action("get_inventory", "Fetch inventory data")
def get_inventory(product_id: str):
return {"product_id": product_id, "stock": 42}
Result:
ChatGPT, Claude, Gemini, and Copilot can all call get_inventory() using their native protocols — no schema work required.
💪 Two Modes
Function-Level (Simple)
Ideal for one-off APIs or scripts.
from kalibr import Kalibr
app = Kalibr(title="My API")
@app.action("calculate_price", "Calculate price total")
def calculate_price(product_id: str, quantity: int):
return {"total": quantity * 19.99}
App-Level (Advanced)
Use KalibrApp for complete control — file uploads, sessions, streaming, and 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 session data")
async def save_data(session: Session, data: dict):
session.set("my_data", data)
return {"saved": True}
📚 Examples Included
After running kalibr-connect examples, you’ll get:
basic_kalibr_example.py– simple function-level demoenhanced_kalibr_example.py– full app with sessions, uploads, and streaming
🤖 AI Platform Integration
ChatGPT (GPT Actions)
- Copy schema URL:
https://<your-domain>/gpt-actions.json - In GPT Builder → Actions → Import from URL
- Done — ChatGPT can call your endpoints.
Claude (MCP)
Add to Claude Desktop config:
{
"mcp": {
"servers": {
"my-api": {
"url": "https://<your-domain>/mcp.json"
}
}
}
}
Gemini / Copilot
Use:
https://<your-domain>/schemas/gemini
https://<your-domain>/schemas/copilot
🎯 Common Use Cases
- Customer Service APIs — let AI handle orders or refunds
- Data Analysis — query your analytics through AI
- Document Processing — parse or summarize uploaded docs
- Business Automation — trigger internal workflows
- Internal Tools — expose secure internal logic to assistants
🔧 CLI Reference
kalibr-connect examples # Copy examples
kalibr-connect serve my_app.py # Run locally
kalibr-connect version # Show version
kalibr-connect --help # Full CLI
⚡ Key Features
✅ Multi-Model Support — GPT, Claude, Gemini, Copilot
✅ Automatic Schema Generation
✅ Environment-Aware Base URLs (v1.0.21+)
✅ File Uploads
✅ Session Management
✅ Streaming Responses
✅ Workflow Support
✅ Type-Safe API Generation
✅ Async / Await Ready
🔥 Why Kalibr?
Without Kalibr:
- Learn 4 model specs
- Maintain 4 codebases
- Duplicate effort
With Kalibr:
- One Python function
- Four schemas generated automatically
- Deploy anywhere
🆕 Version 1.0.21+
- Automatic Base-URL Detection
- Works with
KALIBR_BASE_URLorFLY_APP_NAME - Fixes all localhost references in deployed schemas
- Works with
- Ready for MCP ecosystem production use
- Drop-in backwards compatibility
🧩 License
MIT License — see LICENSE file for details.
Kalibr SDK — the unified layer between AI models and the real world.
Write once. Deploy anywhere. Integrate everything.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kalibr-1.0.22.tar.gz.
File metadata
- Download URL: kalibr-1.0.22.tar.gz
- Upload date:
- Size: 27.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79ba737811c5c749c8239292913f1a1fa20072d0f6e89640b02bdc3c1a58b298
|
|
| MD5 |
1ee6d394f6a5e7a5d0c692e36975234e
|
|
| BLAKE2b-256 |
93c6d47b9d0979ace77fdf55a6fdb3e3aa5481446cfbbd7b28569247dd5cb424
|
File details
Details for the file kalibr-1.0.22-py3-none-any.whl.
File metadata
- Download URL: kalibr-1.0.22-py3-none-any.whl
- Upload date:
- Size: 28.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e87085c2ee5bb576ce9397db9381aa5b2ed35192b8bbc315b815307d856ef165
|
|
| MD5 |
6584acea2ee0f7fca6f87893652ff290
|
|
| BLAKE2b-256 |
24ad2e28bee41a221e048312e21af54f1e6030a905732493deefcb15f6d93c0d
|