kalibr 1.2.4__py3-none-any.whl → 1.2.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {kalibr-1.2.4.dist-info → kalibr-1.2.5.dist-info}/METADATA +51 -97
- {kalibr-1.2.4.dist-info → kalibr-1.2.5.dist-info}/RECORD +6 -6
- {kalibr-1.2.4.dist-info → kalibr-1.2.5.dist-info}/LICENSE +0 -0
- {kalibr-1.2.4.dist-info → kalibr-1.2.5.dist-info}/WHEEL +0 -0
- {kalibr-1.2.4.dist-info → kalibr-1.2.5.dist-info}/entry_points.txt +0 -0
- {kalibr-1.2.4.dist-info → kalibr-1.2.5.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: kalibr
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.5
|
|
4
4
|
Summary: Unified LLM Observability & Multi-Model AI Integration Framework - Deploy to GPT, Claude, Gemini, Copilot with full telemetry.
|
|
5
5
|
Author-email: Kalibr Team <support@kalibr.systems>
|
|
6
6
|
License: Apache-2.0
|
|
@@ -65,17 +65,18 @@ Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
|
|
|
65
65
|
Requires-Dist: black>=23.0.0; extra == "dev"
|
|
66
66
|
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
67
67
|
|
|
68
|
-
# Kalibr
|
|
68
|
+
# Kalibr
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
Adaptive routing for AI agents. Kalibr learns which models, tools, and configs work best for each task and routes automatically.
|
|
71
|
+
|
|
72
|
+
[](https://pypi.org/project/kalibr/)
|
|
73
|
+
[](https://pypi.org/project/kalibr/)
|
|
74
|
+
[](LICENSE)
|
|
71
75
|
|
|
72
76
|
## Installation
|
|
73
77
|
```bash
|
|
74
78
|
pip install kalibr
|
|
75
79
|
```
|
|
76
|
-
```bash
|
|
77
|
-
export KALIBR_API_KEY=kal_xxx # Get from dashboard.kalibr.dev
|
|
78
|
-
```
|
|
79
80
|
|
|
80
81
|
## Quick Start
|
|
81
82
|
```python
|
|
@@ -83,42 +84,28 @@ from kalibr import Router
|
|
|
83
84
|
|
|
84
85
|
router = Router(
|
|
85
86
|
goal="book_meeting",
|
|
86
|
-
paths=["gpt-4o", "claude-
|
|
87
|
+
paths=["gpt-4o", "claude-sonnet-4-20250514", "gpt-4o-mini"],
|
|
87
88
|
success_when=lambda output: "confirmed" in output.lower()
|
|
88
89
|
)
|
|
89
90
|
|
|
90
91
|
response = router.completion(
|
|
91
92
|
messages=[{"role": "user", "content": "Book a meeting with John tomorrow"}]
|
|
92
93
|
)
|
|
93
|
-
|
|
94
|
-
print(response.choices[0].message.content)
|
|
95
94
|
```
|
|
96
95
|
|
|
97
|
-
|
|
98
|
-
- ✅ Picking the best model (Thompson Sampling)
|
|
99
|
-
- ✅ Making the API call
|
|
100
|
-
- ✅ Checking success
|
|
101
|
-
- ✅ Learning for next time
|
|
102
|
-
- ✅ Tracing everything
|
|
103
|
-
|
|
104
|
-
## How It Works
|
|
105
|
-
|
|
106
|
-
1. **Define a goal** - What is your agent trying to do?
|
|
107
|
-
2. **Register paths** - Which models/tools can achieve it?
|
|
108
|
-
3. **Report outcomes** - Did it work?
|
|
109
|
-
4. **Kalibr routes** - Traffic shifts to winners
|
|
96
|
+
Kalibr picks the best model, makes the call, checks success, and learns for next time.
|
|
110
97
|
|
|
111
98
|
## Paths
|
|
112
99
|
|
|
113
100
|
A path is a model + optional tools + optional params:
|
|
114
101
|
```python
|
|
115
|
-
#
|
|
116
|
-
paths = ["gpt-4o", "claude-
|
|
102
|
+
# Just models
|
|
103
|
+
paths = ["gpt-4o", "claude-sonnet-4-20250514"]
|
|
117
104
|
|
|
118
105
|
# With tools
|
|
119
106
|
paths = [
|
|
120
107
|
{"model": "gpt-4o", "tools": ["web_search"]},
|
|
121
|
-
{"model": "claude-
|
|
108
|
+
{"model": "claude-sonnet-4-20250514", "tools": ["web_search", "browser"]},
|
|
122
109
|
]
|
|
123
110
|
|
|
124
111
|
# With params
|
|
@@ -128,106 +115,73 @@ paths = [
|
|
|
128
115
|
]
|
|
129
116
|
```
|
|
130
117
|
|
|
131
|
-
##
|
|
132
|
-
|
|
133
|
-
### Auto-detect from output
|
|
134
|
-
```python
|
|
135
|
-
router = Router(
|
|
136
|
-
goal="summarize",
|
|
137
|
-
paths=["gpt-4o", "claude-3-sonnet"],
|
|
138
|
-
success_when=lambda output: len(output) > 100
|
|
139
|
-
)
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
### Manual reporting
|
|
118
|
+
## Manual Outcome Reporting
|
|
143
119
|
```python
|
|
144
|
-
router = Router(goal="book_meeting", paths=["gpt-4o", "claude-
|
|
145
|
-
|
|
120
|
+
router = Router(goal="book_meeting", paths=["gpt-4o", "claude-sonnet-4-20250514"])
|
|
146
121
|
response = router.completion(messages=[...])
|
|
147
122
|
|
|
148
|
-
# Your verification logic
|
|
149
123
|
meeting_created = check_calendar_api()
|
|
150
|
-
|
|
151
124
|
router.report(success=meeting_created)
|
|
152
125
|
```
|
|
153
126
|
|
|
154
|
-
##
|
|
155
|
-
|
|
156
|
-
|
|
127
|
+
## LangChain Integration
|
|
128
|
+
```bash
|
|
129
|
+
pip install kalibr[langchain]
|
|
130
|
+
```
|
|
157
131
|
```python
|
|
158
132
|
from kalibr import Router
|
|
159
133
|
|
|
160
|
-
router = Router(goal="summarize", paths=["gpt-4o", "claude-
|
|
134
|
+
router = Router(goal="summarize", paths=["gpt-4o", "claude-sonnet-4-20250514"])
|
|
161
135
|
llm = router.as_langchain()
|
|
162
136
|
|
|
163
137
|
chain = prompt | llm | parser
|
|
164
|
-
result = chain.invoke({"text": "..."})
|
|
165
138
|
```
|
|
166
139
|
|
|
167
|
-
|
|
168
|
-
```python
|
|
169
|
-
from kalibr import Router
|
|
140
|
+
## Auto-Instrumentation
|
|
170
141
|
|
|
171
|
-
|
|
142
|
+
Kalibr auto-instruments OpenAI, Anthropic, and Google SDKs when imported:
|
|
143
|
+
```python
|
|
144
|
+
import kalibr # Must be first import
|
|
145
|
+
from openai import OpenAI
|
|
172
146
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
...
|
|
177
|
-
)
|
|
147
|
+
client = OpenAI()
|
|
148
|
+
response = client.chat.completions.create(model="gpt-4o", messages=[...])
|
|
149
|
+
# Traced automatically
|
|
178
150
|
```
|
|
179
151
|
|
|
180
|
-
|
|
152
|
+
Disable with `KALIBR_AUTO_INSTRUMENT=false`.
|
|
181
153
|
|
|
182
|
-
|
|
154
|
+
## Other Integrations
|
|
155
|
+
```bash
|
|
156
|
+
pip install kalibr[crewai] # CrewAI
|
|
157
|
+
pip install kalibr[openai-agents] # OpenAI Agents SDK
|
|
158
|
+
```
|
|
183
159
|
|
|
184
|
-
|
|
185
|
-
- Latency (p50, p95, p99)
|
|
186
|
-
- Tool usage
|
|
187
|
-
- Errors with stack traces
|
|
160
|
+
## Configuration
|
|
188
161
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
162
|
+
| Variable | Description | Default |
|
|
163
|
+
|----------|-------------|---------|
|
|
164
|
+
| `KALIBR_API_KEY` | API key | Required |
|
|
165
|
+
| `KALIBR_TENANT_ID` | Tenant ID | `default` |
|
|
166
|
+
| `KALIBR_AUTO_INSTRUMENT` | Auto-instrument SDKs | `true` |
|
|
192
167
|
|
|
193
|
-
|
|
194
|
-
|
|
168
|
+
## Development
|
|
169
|
+
```bash
|
|
170
|
+
git clone https://github.com/kalibr-ai/kalibr-sdk-python.git
|
|
171
|
+
cd kalibr-sdk-python
|
|
172
|
+
pip install -e ".[dev]"
|
|
173
|
+
pytest
|
|
195
174
|
```
|
|
196
175
|
|
|
197
|
-
##
|
|
176
|
+
## Contributing
|
|
198
177
|
|
|
199
|
-
|
|
200
|
-
|------|-------------------|-------|
|
|
201
|
-
| Free | 1,000/month | $0 |
|
|
202
|
-
| Pro | 50,000/month | $49/month |
|
|
203
|
-
| Enterprise | Unlimited | Custom |
|
|
178
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
204
179
|
|
|
205
|
-
##
|
|
206
|
-
|
|
207
|
-
### Router
|
|
208
|
-
```python
|
|
209
|
-
Router(
|
|
210
|
-
goal: str, # Required: name of the goal
|
|
211
|
-
paths: List[str | dict], # Models/tools to route between
|
|
212
|
-
success_when: Callable, # Optional: auto-evaluate success
|
|
213
|
-
exploration_rate: float, # Optional: 0.0-1.0, default 0.1
|
|
214
|
-
)
|
|
215
|
-
```
|
|
180
|
+
## License
|
|
216
181
|
|
|
217
|
-
|
|
218
|
-
```python
|
|
219
|
-
router.completion(messages, **kwargs) # Make routed request
|
|
220
|
-
router.report(success, reason=None) # Report outcome manually
|
|
221
|
-
router.add_path(model, tools=None) # Add path dynamically
|
|
222
|
-
router.as_langchain() # Get LangChain-compatible LLM
|
|
223
|
-
```
|
|
182
|
+
Apache-2.0
|
|
224
183
|
|
|
225
184
|
## Links
|
|
226
185
|
|
|
227
|
-
- [
|
|
228
|
-
- [Dashboard](https://dashboard.kalibr.
|
|
229
|
-
- [GitHub](https://github.com/kalibr-ai/kalibr-sdk-python)
|
|
230
|
-
|
|
231
|
-
## License
|
|
232
|
-
|
|
233
|
-
MIT
|
|
186
|
+
- [Docs](https://kalibr.systems/docs)
|
|
187
|
+
- [Dashboard](https://dashboard.kalibr.systems)
|
|
@@ -43,9 +43,9 @@ kalibr_langchain/callback.py,sha256=SNM1aHOXdG55grHmGyTwbXOeM6hjZTub2REiZD2H-d8,
|
|
|
43
43
|
kalibr_langchain/chat_model.py,sha256=Y4xsZGx9gZpDUF8NP-edJuYam4k0NBySdA6B5484MKk,3190
|
|
44
44
|
kalibr_openai_agents/__init__.py,sha256=wL59LzGstptKigfQDrKKt_7hcMO1JGVQtVAsE0lz-Zw,1367
|
|
45
45
|
kalibr_openai_agents/processor.py,sha256=F550sdRf3rpguP1yOlgAUQWDLPBy4hSACV3-zOyCpOU,18257
|
|
46
|
-
kalibr-1.2.
|
|
47
|
-
kalibr-1.2.
|
|
48
|
-
kalibr-1.2.
|
|
49
|
-
kalibr-1.2.
|
|
50
|
-
kalibr-1.2.
|
|
51
|
-
kalibr-1.2.
|
|
46
|
+
kalibr-1.2.5.dist-info/LICENSE,sha256=5mwAnB38l3_PjmOQn6_L6cZnJvus143DUjMBPIH1yso,10768
|
|
47
|
+
kalibr-1.2.5.dist-info/METADATA,sha256=s8I7uKD4iE8n-JkMQ7kulsLv9uJ0ftWhKJnLJrf7dok,6113
|
|
48
|
+
kalibr-1.2.5.dist-info/WHEEL,sha256=beeZ86-EfXScwlR_HKu4SllMC9wUEj_8Z_4FJ3egI2w,91
|
|
49
|
+
kalibr-1.2.5.dist-info/entry_points.txt,sha256=Kojlc6WRX8V1qS9lOMdDPZpTUVHCtzGtHqXusErgmLY,47
|
|
50
|
+
kalibr-1.2.5.dist-info/top_level.txt,sha256=dIfBOWUnnHGFDwgz5zfIx5_0bU3wOUgAbYr4JcFHZmo,59
|
|
51
|
+
kalibr-1.2.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|