Skip to main content

Unified LLM Observability & Multi-Model AI Integration Framework - Deploy to GPT, Claude, Gemini, Copilot with full telemetry.

Project description

Kalibr

Adaptive routing for AI agents. Kalibr learns which models, tools, and configs work best for each task and routes automatically.

PyPI Python License

Installation

pip install kalibr

Quick Start

from kalibr import Router

router = Router(
    goal="book_meeting",
    paths=["gpt-4o", "claude-sonnet-4-20250514", "gpt-4o-mini"],
    success_when=lambda output: "confirmed" in output.lower()
)

response = router.completion(
    messages=[{"role": "user", "content": "Book a meeting with John tomorrow"}]
)

Kalibr picks the best model, makes the call, checks success, and learns for next time.

Paths

A path is a model + optional tools + optional params:

# Just models
paths = ["gpt-4o", "claude-sonnet-4-20250514"]

# With tools
paths = [
    {"model": "gpt-4o", "tools": ["web_search"]},
    {"model": "claude-sonnet-4-20250514", "tools": ["web_search", "browser"]},
]

# With params
paths = [
    {"model": "gpt-4o", "params": {"temperature": 0.7}},
    {"model": "gpt-4o", "params": {"temperature": 0.2}},
]

Manual Outcome Reporting

router = Router(goal="book_meeting", paths=["gpt-4o", "claude-sonnet-4-20250514"])
response = router.completion(messages=[...])

meeting_created = check_calendar_api()
router.report(success=meeting_created)

LangChain Integration

pip install kalibr[langchain]
from kalibr import Router

router = Router(goal="summarize", paths=["gpt-4o", "claude-sonnet-4-20250514"])
llm = router.as_langchain()

chain = prompt | llm | parser

Auto-Instrumentation

Kalibr auto-instruments OpenAI, Anthropic, and Google SDKs when imported:

import kalibr  # Must be first import
from openai import OpenAI

client = OpenAI()
response = client.chat.completions.create(model="gpt-4o", messages=[...])
# Traced automatically

Disable with KALIBR_AUTO_INSTRUMENT=false.

Other Integrations

pip install kalibr[crewai]        # CrewAI
pip install kalibr[openai-agents] # OpenAI Agents SDK

Configuration

Variable Description Default
KALIBR_API_KEY API key Required
KALIBR_TENANT_ID Tenant ID default
KALIBR_AUTO_INSTRUMENT Auto-instrument SDKs true

Development

git clone https://github.com/kalibr-ai/kalibr-sdk-python.git
cd kalibr-sdk-python
pip install -e ".[dev]"
pytest

Contributing

See CONTRIBUTING.md.

License

Apache-2.0

Links

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.2.5.tar.gz (86.7 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.2.5-py3-none-any.whl (99.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kalibr-1.2.5.tar.gz
  • Upload date:
  • Size: 86.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for kalibr-1.2.5.tar.gz
Algorithm Hash digest
SHA256 c5b819cca7c26bb527a4b128916e9bd83ce749a65d7ead7a0dddf67923da3b77
MD5 1d88aeba84f5bddb2507adbcdc6bf992
BLAKE2b-256 1c35d51828d86d17dc65b86b28c1c66ca8630dae1252fb0af4f4bc8b5c17f000

See more details on using hashes here.

Provenance

The following attestation bundles were made for kalibr-1.2.5.tar.gz:

Publisher: publish.yml on kalibr-ai/kalibr-sdk-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: kalibr-1.2.5-py3-none-any.whl
  • Upload date:
  • Size: 99.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for kalibr-1.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 cd604ee215cf99e3d5d1156ae9f467d3b3510232fff3e48ebc08a6b2d7f6692f
MD5 bf22aa20b21907f67167930d775124d3
BLAKE2b-256 762665a1792d9dc0df74c862a4e5cc2c2ed09d9984f6355aaa1f3d9de3305056

See more details on using hashes here.

Provenance

The following attestation bundles were made for kalibr-1.2.5-py3-none-any.whl:

Publisher: publish.yml on kalibr-ai/kalibr-sdk-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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