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.
🚀 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 exampleenhanced_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)
- Copy schema from
http://localhost:8000/gpt-actions.json - Go to GPT Builder → Actions → Import from URL
- Done! ChatGPT can now call your functions
Claude (MCP)
- Add to Claude Desktop config:
{
"mcp": {
"servers": {
"my-api": {
"url": "http://localhost:8000/mcp.json"
}
}
}
}
- 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.mdin 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
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.21.tar.gz.
File metadata
- Download URL: kalibr-1.0.21.tar.gz
- Upload date:
- Size: 27.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2dad6843de8d39b6a4170b49d166f3df606a8237fd74ad233d22a84407ec9b8
|
|
| MD5 |
f92cb78d063701a1bed418b8f4281aa1
|
|
| BLAKE2b-256 |
ef5f11ab0e9999189cad44384ed21989bf6db246ddc6331385ce7fe49a8d8870
|
File details
Details for the file kalibr-1.0.21-py3-none-any.whl.
File metadata
- Download URL: kalibr-1.0.21-py3-none-any.whl
- Upload date:
- Size: 29.1 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 |
9f35016569f30968fdebc0ff14f1702feda179d17d55c009e33b5ca6346781ae
|
|
| MD5 |
cb1d125918b37e438e2ddadc53c56ebe
|
|
| BLAKE2b-256 |
ea058fa297c74c8ce04374c1c5785f41dd80b68eb41228ec40f33932eeb8305f
|