blaxel 0.1.16rc60__py3-none-any.whl → 0.1.18__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.
- blaxel/authentication/clientcredentials.py +1 -1
- blaxel/client/api/jobs/__init__.py +0 -0
- blaxel/client/api/{default/get_template_file_contents.py → jobs/create_job.py} +57 -44
- blaxel/client/api/jobs/delete_job.py +154 -0
- blaxel/client/api/{default/get_template_contents.py → jobs/get_job.py} +43 -30
- blaxel/client/api/jobs/list_job_revisions.py +159 -0
- blaxel/client/api/jobs/list_jobs.py +135 -0
- blaxel/client/api/jobs/update_job.py +179 -0
- blaxel/client/models/__init__.py +34 -0
- blaxel/client/models/job.py +129 -0
- blaxel/client/models/job_execution_config.py +79 -0
- blaxel/client/models/job_metrics.py +199 -0
- blaxel/client/models/job_metrics_executions_chart.py +45 -0
- blaxel/client/models/job_metrics_executions_total.py +45 -0
- blaxel/client/models/job_metrics_tasks_chart.py +45 -0
- blaxel/client/models/job_metrics_tasks_total.py +45 -0
- blaxel/client/models/job_spec.py +208 -0
- blaxel/client/models/jobs_chart.py +94 -0
- blaxel/client/models/jobs_chart_value.py +70 -0
- blaxel/client/models/jobs_executions.py +88 -0
- blaxel/client/models/jobs_network_chart.py +94 -0
- blaxel/client/models/jobs_success_failed_chart.py +139 -0
- blaxel/client/models/jobs_tasks.py +88 -0
- blaxel/client/models/jobs_total.py +97 -0
- blaxel/client/models/preview_spec.py +55 -1
- blaxel/client/models/preview_spec_request_headers.py +48 -0
- blaxel/{sandbox/client/models/get_process_identifier_logs_response_200.py → client/models/preview_spec_response_headers.py} +6 -6
- blaxel/client/models/runtime.py +18 -0
- blaxel/client/models/serverless_config.py +9 -0
- blaxel/common/internal.py +0 -2
- blaxel/common/logger.py +14 -6
- blaxel/instrumentation/manager.py +1 -1
- blaxel/jobs/__init__.py +4 -8
- blaxel/sandbox/client/api/filesystem/delete_filesystem_path.py +4 -0
- blaxel/sandbox/client/api/filesystem/get_filesystem_path.py +4 -0
- blaxel/sandbox/client/api/filesystem/get_watch_filesystem_path.py +22 -1
- blaxel/sandbox/client/api/filesystem/put_filesystem_path.py +8 -4
- blaxel/sandbox/client/api/network/delete_network_process_pid_monitor.py +4 -0
- blaxel/sandbox/client/api/network/get_network_process_pid_ports.py +4 -0
- blaxel/sandbox/client/api/network/post_network_process_pid_monitor.py +4 -0
- blaxel/sandbox/client/api/process/delete_process_identifier.py +4 -0
- blaxel/sandbox/client/api/process/delete_process_identifier_kill.py +4 -0
- blaxel/sandbox/client/api/process/get_process_identifier_logs.py +16 -16
- blaxel/sandbox/client/api/process/get_process_identifier_logs_stream.py +4 -0
- blaxel/sandbox/client/api/process/get_ws_process_identifier_logs_stream.py +8 -8
- blaxel/sandbox/client/api/process/post_process.py +4 -0
- blaxel/sandbox/client/models/__init__.py +4 -2
- blaxel/sandbox/client/models/directory.py +9 -0
- blaxel/sandbox/client/models/file.py +9 -0
- blaxel/sandbox/client/models/file_with_content.py +9 -0
- blaxel/sandbox/client/models/process_logs.py +78 -0
- blaxel/sandbox/client/models/process_response.py +12 -4
- blaxel/sandbox/client/models/process_response_status.py +12 -0
- blaxel/sandbox/client/models/subdirectory.py +9 -0
- blaxel/sandbox/preview.py +13 -17
- blaxel/sandbox/process.py +8 -9
- blaxel-0.1.18.dist-info/METADATA +169 -0
- {blaxel-0.1.16rc60.dist-info → blaxel-0.1.18.dist-info}/RECORD +60 -37
- blaxel-0.1.16rc60.dist-info/METADATA +0 -397
- {blaxel-0.1.16rc60.dist-info → blaxel-0.1.18.dist-info}/WHEEL +0 -0
- {blaxel-0.1.16rc60.dist-info → blaxel-0.1.18.dist-info}/licenses/LICENSE +0 -0
@@ -2,7 +2,7 @@ blaxel/__init__.py,sha256=qmuJKjl5oGnjj4TbqHcJqUkKoxk4PvCsMb6-8rp67pE,159
|
|
2
2
|
blaxel/agents/__init__.py,sha256=RDWkvfICIXXaQxJuuSu63jsFj_F8NBAL4U752hfN4AE,5262
|
3
3
|
blaxel/authentication/__init__.py,sha256=tL9XKNCek5ixszTqjlKRBvidXMg4Nj6ODlBKlxxA9uk,3283
|
4
4
|
blaxel/authentication/apikey.py,sha256=nOgLVba7EfVk3V-qm7cj-30LAL-BT7NOMIlGL9Ni1jY,1249
|
5
|
-
blaxel/authentication/clientcredentials.py,sha256=
|
5
|
+
blaxel/authentication/clientcredentials.py,sha256=RmkmCoWXCvZHiSmuTsJFHW4goA7F0H8_0m8TBR0Tf70,3804
|
6
6
|
blaxel/authentication/devicemode.py,sha256=kWbArs4okIIDqW-ql5oV2eQRE_LpRwfadCB6LG83irw,5986
|
7
7
|
blaxel/authentication/oauth.py,sha256=Q5J0taIK1JrvGB6BC-zz3hM77HPCNu01DPGf4l7xjPQ,1417
|
8
8
|
blaxel/authentication/types.py,sha256=E3lmfbmZuJ4Bc_kGA0Kc0GZC02Sjha1_2CbabP7z6oo,1603
|
@@ -41,8 +41,6 @@ blaxel/client/api/configurations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRk
|
|
41
41
|
blaxel/client/api/configurations/get_configuration.py,sha256=3RVFsuSGg0Vpr3ov54zHqMdc_a6XisT3dxpifNRajJc,3096
|
42
42
|
blaxel/client/api/default/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
43
43
|
blaxel/client/api/default/get_template.py,sha256=02XH6fDwe6-MTQskM9P4Q4o8lWtWTuz5uIRRarjWFO4,3579
|
44
|
-
blaxel/client/api/default/get_template_contents.py,sha256=b0A0C0a5HmCjPXjJKzsekhmjpUv8ovc9Yk7fwuFznBo,3373
|
45
|
-
blaxel/client/api/default/get_template_file_contents.py,sha256=wPDrG8P8-OPwyy6XwtlfCE2-bf1aOx79wmMTZVC9Zbw,3638
|
46
44
|
blaxel/client/api/default/list_mcp_hub_definitions.py,sha256=RzT4kavg9P2w04DHiOqBNvuY5OeJegnUZ6geP3e1Ccw,3262
|
47
45
|
blaxel/client/api/default/list_sandbox_hub_definitions.py,sha256=mZ7SIcMrQWNn5gDk8ClBuv9t4vFNL_9WuVoFAG1RJTs,3318
|
48
46
|
blaxel/client/api/functions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -64,6 +62,13 @@ blaxel/client/api/integrations/list_integration_connections.py,sha256=pRUfJpkmP8
|
|
64
62
|
blaxel/client/api/integrations/update_integration_connection.py,sha256=wa2S0zJiLbU1ftlbR9JI8W5BNNmiKnqmCkV8AIgpRHY,4783
|
65
63
|
blaxel/client/api/invitations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
66
64
|
blaxel/client/api/invitations/list_all_pending_invitations.py,sha256=yuZuAQtb0EEdrEswywilAEgwU0rilwcmoXje1NWTPCY,4010
|
65
|
+
blaxel/client/api/jobs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
66
|
+
blaxel/client/api/jobs/create_job.py,sha256=JsMDW-6L1RhKqPlFaoBxgn9zVArsO5s2oBcyw3voe-w,3538
|
67
|
+
blaxel/client/api/jobs/delete_job.py,sha256=zaV9fDq48gOKs0tacDTLkUN22arRVt6l_KpG5MeEI5c,3358
|
68
|
+
blaxel/client/api/jobs/get_job.py,sha256=HvVodW6Zlgd4WFXGccMkdsC1oJ_gsIMmuwp6bnjSXtM,3369
|
69
|
+
blaxel/client/api/jobs/list_job_revisions.py,sha256=YyMO-Fgmrkh48dKvrrZzi39UR8LplOqa6W3ZlC336SU,3890
|
70
|
+
blaxel/client/api/jobs/list_jobs.py,sha256=j2rCm35rEnLDGHC39yCzcFekNA9YQQ9I43QNkqwaD8g,3372
|
71
|
+
blaxel/client/api/jobs/update_job.py,sha256=_zMi7lnA48lHU6z5udtYFh9ffDMGQ8rFuQB-EAhqlAs,3884
|
67
72
|
blaxel/client/api/knowledgebases/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
68
73
|
blaxel/client/api/knowledgebases/create_knowledgebase.py,sha256=w98anup5uOiL5KvxYj40LcYIq5B-4fbRqsQjj83FDlc,3892
|
69
74
|
blaxel/client/api/knowledgebases/delete_knowledgebase.py,sha256=6gf0msScMimEiId4h9EPAjGqawB-VA9r9leogGvvxqE,3798
|
@@ -118,7 +123,7 @@ blaxel/client/api/workspaces/list_workspaces.py,sha256=MuVb4Ubp4e8KZZyIpukiMHoLQ
|
|
118
123
|
blaxel/client/api/workspaces/remove_workspace_user.py,sha256=OZ_Q5zvV3eUSxsmSmbkJ05r3tJgaAZEE3FrsdOpAOYE,2578
|
119
124
|
blaxel/client/api/workspaces/update_workspace.py,sha256=GJZBydA4AzUOREpQ630b_S2-3zGLkVVhU364BH1luyY,4202
|
120
125
|
blaxel/client/api/workspaces/update_workspace_user_role.py,sha256=MU4Rp_yE07wvhFcYoLV7fx_trsk-TcTYSNs59siO_W4,4866
|
121
|
-
blaxel/client/models/__init__.py,sha256=
|
126
|
+
blaxel/client/models/__init__.py,sha256=dKaZIR3ItIsJHz2Eaam5111ZcnftKexpvBJBdyD_wkA,12596
|
122
127
|
blaxel/client/models/acl.py,sha256=tH67gsl_BMaviSbTaaIkO1g9cWZgJ6VgAnYVjQSzGZY,3952
|
123
128
|
blaxel/client/models/agent.py,sha256=VN2GMWsd7LSoWhthbezLIAqPZjQhsvMN6bqM09jZSuU,4359
|
124
129
|
blaxel/client/models/agent_spec.py,sha256=YzBpVhagqSqrEBG5oh9xO5F4nvzlZgaV3xieGRtaQDg,12260
|
@@ -167,6 +172,21 @@ blaxel/client/models/integration_organization.py,sha256=nabwlixDnJyaGiOGyaVVR719
|
|
167
172
|
blaxel/client/models/integration_query_params.py,sha256=TV5nepXLqsDw2ww7bv1g2AOPDYKScyY4BqvLi38s3gw,1292
|
168
173
|
blaxel/client/models/integration_repository.py,sha256=d1jn1UgTKYFfIEvpWwR20jkC2OuNx0ZIkv8iWXLxVns,2674
|
169
174
|
blaxel/client/models/invite_workspace_user_body.py,sha256=ITmKPCuOGKTHn4VjnZ2EjIj6PGPoGh-M_rzgo0VMgNM,1612
|
175
|
+
blaxel/client/models/job.py,sha256=dX-92frBvIkcfmwy6EGsaljtyWLnCjOiu-jMJP15PpI,4327
|
176
|
+
blaxel/client/models/job_execution_config.py,sha256=HNsQ8I-Tr8gCb8TpftCHaGVc4nkUItUgIN6zAwvBXfk,2488
|
177
|
+
blaxel/client/models/job_metrics.py,sha256=7MabRmMiJD5b-pArSlhjk-5MpqaD0jCheXPtXyD3Y8E,8173
|
178
|
+
blaxel/client/models/job_metrics_executions_chart.py,sha256=OGBEQu-6vvdQJfcE1nWEC5_FCdi45Y8rEFlPJJox1Dk,1302
|
179
|
+
blaxel/client/models/job_metrics_executions_total.py,sha256=YSaxHgDPP4G2y24zFKpz5AfSSZKOqsfphOaNdr0Hxzw,1302
|
180
|
+
blaxel/client/models/job_metrics_tasks_chart.py,sha256=fJ-Lr76ZF6L7UIhhU8vpRzlTpJ83XnCpmCXDlvb9204,1272
|
181
|
+
blaxel/client/models/job_metrics_tasks_total.py,sha256=MjCKjj81S2LHWrnbNHXLt6LUxdZY-8vmzqbEVQFVlWY,1272
|
182
|
+
blaxel/client/models/job_spec.py,sha256=4WHrx_xKcktXTrlJmrT1mgLvx95nHB_qRIO3ASmpVIA,8245
|
183
|
+
blaxel/client/models/jobs_chart.py,sha256=XbpoY1WLbP9yRlw7NAY8_XmeQFavP5RQ43OpmvczBdQ,2944
|
184
|
+
blaxel/client/models/jobs_chart_value.py,sha256=1yGN7zeMS7kC-97SwG5jQSQuvXSM2X-2xhC9HwaIURY,1888
|
185
|
+
blaxel/client/models/jobs_executions.py,sha256=e9ryxYNPRPlE9a4ObwdbTMBFPi3gveGbd4QFuxO5lNA,2410
|
186
|
+
blaxel/client/models/jobs_network_chart.py,sha256=ZfomaJhR3pXMGLwepoZc2ElOcE7luA7iCWdJjnEwC8A,2958
|
187
|
+
blaxel/client/models/jobs_success_failed_chart.py,sha256=gxhxyGYh8JPXmr55ylbcGYru52CXV9R-WLp0NU2w9g0,4765
|
188
|
+
blaxel/client/models/jobs_tasks.py,sha256=U566rBp_kwxBYrMBGtxEiLvvJ6UkuPP5iW9WZaMOfHk,2380
|
189
|
+
blaxel/client/models/jobs_total.py,sha256=qfC-O93n8axJ1KBPJjnV4NT7caC1KP16iuVv1GL_H_s,2661
|
170
190
|
blaxel/client/models/knowledgebase.py,sha256=BJRBRvsdA50TVfIGEN1zUtOtjf25LVrdx5efPW0toCw,4487
|
171
191
|
blaxel/client/models/knowledgebase_spec.py,sha256=RTYk7hOsnvW-dS759DZXY7xe3P7JKlRaRSPHK9LJx6A,6026
|
172
192
|
blaxel/client/models/knowledgebase_spec_options.py,sha256=iwpiJZqO4UuXAkZFLI5Vx9Fd74fRqUSjOEv5BrjoVlI,1316
|
@@ -203,7 +223,9 @@ blaxel/client/models/policy_spec.py,sha256=A6LX0Q4HbealhZP6O0mtT6SrhfnvQHBf_3bNH
|
|
203
223
|
blaxel/client/models/port.py,sha256=3mMRcMnQsrDWA07O6DmeOPzHY4z-knugDcMd0wZtYgw,2107
|
204
224
|
blaxel/client/models/preview.py,sha256=CF493_n0Gwgd3HDwI7c4fKeZmywY0fLp-J_JCzU06LQ,3024
|
205
225
|
blaxel/client/models/preview_metadata.py,sha256=vka-rLcyn7XHQfcz0HWSg7sVD4EzP340iBeLHwQCt08,4231
|
206
|
-
blaxel/client/models/preview_spec.py,sha256=
|
226
|
+
blaxel/client/models/preview_spec.py,sha256=KkHZOzg0Ru-HF34MxEmpUhe6-eOcHRa7jNQekfJiKcQ,5071
|
227
|
+
blaxel/client/models/preview_spec_request_headers.py,sha256=9Ao8WAnrZfX6lh625JSpXh_7AdGzDoBup6gDVdJBYJk,1413
|
228
|
+
blaxel/client/models/preview_spec_response_headers.py,sha256=BQwk-6BFtry4zg-LYjGtsxhNI7rxkjoYD7ZqNH3ra-0,1401
|
207
229
|
blaxel/client/models/preview_token.py,sha256=eSJ5ZmR-_Pu8CDNhz67KBpHiGkMeKDQsUQEqrYUTg4A,3142
|
208
230
|
blaxel/client/models/preview_token_metadata.py,sha256=x7Enkor1L96AoTwrzHMTBh2PdlI1K07iOHA_Nd8t1R8,2902
|
209
231
|
blaxel/client/models/preview_token_spec.py,sha256=vpuT9b36fO4cyNPhvsp-FGElM8_Smc2W0ZSDfv9Uh8A,2210
|
@@ -227,13 +249,13 @@ blaxel/client/models/resource_metrics_rps_per_code.py,sha256=FsftR1uU46I2_gxMCYp
|
|
227
249
|
blaxel/client/models/resource_metrics_rps_per_code_previous.py,sha256=n-KmFpDEL1W3BuSWCg3MA1uAz0T1p7ob2gtROD_4KYA,1420
|
228
250
|
blaxel/client/models/revision_configuration.py,sha256=ZkwRL8Ncuh5NBbqptv8I__Q06j8dY9K9XEP23PwfvCI,2546
|
229
251
|
blaxel/client/models/revision_metadata.py,sha256=mxP6LfQCb3AgcECcbwd6lOuiK8jw6Yxa6nBsa28KRW0,3750
|
230
|
-
blaxel/client/models/runtime.py,sha256=
|
252
|
+
blaxel/client/models/runtime.py,sha256=6szTZIO1T7GLjl--gxcPGV5YSdwZFM9HheQ9YeBc5Rk,10736
|
231
253
|
blaxel/client/models/runtime_configuration.py,sha256=iWeN7pwuYzVYpX3L8IuEAxggROLKnutBCNUYoprVH0E,1291
|
232
254
|
blaxel/client/models/runtime_startup_probe.py,sha256=5FUuyl3eUW_pceopzrSGO9iZeNLNf9j503RzX3AmatI,1307
|
233
255
|
blaxel/client/models/sandbox.py,sha256=8IVAthkCUzWDkC2-D-2qze3s8FXD74JN4x9yNdxalcg,4418
|
234
256
|
blaxel/client/models/sandbox_definition.py,sha256=H0yTvcZ6kz2EnnAqmXkMZr6k0N6k9slsHprEc8qqSlg,5962
|
235
257
|
blaxel/client/models/sandbox_spec.py,sha256=Z3bj-qrW8B1lcIZ8cgg72I2-Kx8YGRnAwX4B362DS0o,8269
|
236
|
-
blaxel/client/models/serverless_config.py,sha256=
|
258
|
+
blaxel/client/models/serverless_config.py,sha256=0yYDHi6n46LhvRVLZdJwiyPWhNMVPJvaXricUNf47ro,4021
|
237
259
|
blaxel/client/models/serverless_config_configuration.py,sha256=bKx1mGHbBjlPyxn34lttSo_h3PdjOMriazPfPen9Y7I,1339
|
238
260
|
blaxel/client/models/spec_configuration.py,sha256=oGmMqoZSVEGedarAou-102vfw16bFevHUp4C_OW6h1k,1970
|
239
261
|
blaxel/client/models/start_sandbox.py,sha256=TiP-YW94Lm97clikXP0MZHTWsgzaxkM9PkCNtFsSmCw,2810
|
@@ -262,15 +284,15 @@ blaxel/client/models/workspace_runtime.py,sha256=dxEpmwCFPOCRKHRKhY-iW7j6TbtL5qU
|
|
262
284
|
blaxel/client/models/workspace_user.py,sha256=70CcifQWYbeWG7TDui4pblTzUe5sVK0AS19vNCzKE8g,3423
|
263
285
|
blaxel/common/autoload.py,sha256=NFuK71-IHOY2JQyEBSjDCVfUaQ8D8PJsEUEryIdG4AU,263
|
264
286
|
blaxel/common/env.py,sha256=wTbzPDdNgz4HMJiS2NCZmQlN0qpxy1PQEYBaZgtvhoc,1247
|
265
|
-
blaxel/common/internal.py,sha256=
|
266
|
-
blaxel/common/logger.py,sha256=
|
287
|
+
blaxel/common/internal.py,sha256=6lZENUQrh3bvpMIPLaie6-g2upiNzf21QG-dQ0hGJWU,2371
|
288
|
+
blaxel/common/logger.py,sha256=TNuWqwFDU87TwPDHLLDTluwgEyw2axj-d0kPOkN5J8M,4489
|
267
289
|
blaxel/common/settings.py,sha256=7KTryuBdud0IfHqykX7xEEtpgq5M5h1Z8YEzYKsHB-Q,2327
|
268
290
|
blaxel/instrumentation/exporters.py,sha256=EoX3uaBVku1Rg49pSNXKFyHhgY5OV3Ih6UlqgjF5epw,1670
|
269
291
|
blaxel/instrumentation/log.py,sha256=RvQByRjZMoP_dRaAZu8oK6DTegsHs-xV4W-UIqis6CA,2461
|
270
|
-
blaxel/instrumentation/manager.py,sha256=
|
292
|
+
blaxel/instrumentation/manager.py,sha256=odiz9ew5eB3LnuG-pqU27Vf05V5ifjSbikZuLMZAj50,8974
|
271
293
|
blaxel/instrumentation/map.py,sha256=zZoiUiQHmik5WQZ4VCWNARSa6ppMi0r7D6hlb41N-Mg,1589
|
272
294
|
blaxel/instrumentation/span.py,sha256=X2lwfu_dyxwQTMQJT2vbXOrbVSChEhjRLc413QOxQJM,3244
|
273
|
-
blaxel/jobs/__init__.py,sha256=
|
295
|
+
blaxel/jobs/__init__.py,sha256=poA8uVN-3H_nKexavjKIC5WkLHXo_4m6KYwGqcX_yGo,6473
|
274
296
|
blaxel/mcp/__init__.py,sha256=KednMrtuc4Y0O3lv7u1Lla54FCk8UX9c1k0USjL3Ahk,69
|
275
297
|
blaxel/mcp/client.py,sha256=cFFXfpKXoMu8qTUly2ejF0pX2iBQkSNAxqwvDV1V6xY,4979
|
276
298
|
blaxel/mcp/server.py,sha256=GIldtA_NgIc2dzd7ZpPvpbhpIt_7AfKu5yS_YJ0bDGg,7310
|
@@ -287,8 +309,8 @@ blaxel/models/custom/llamaindex/cohere.py,sha256=Igj5Y1ozf1V4feIXfBHDdaTFU7od_wu
|
|
287
309
|
blaxel/models/custom/pydantic/gemini.py,sha256=rbsunh-M7EEKlD5ir3GlA-8a12JzPFcvsf6NISjzE5I,1052
|
288
310
|
blaxel/sandbox/base.py,sha256=J5rd2uJ8N9vrti97EU4D21TaEzP7Jyfwf7s0248XIZw,2285
|
289
311
|
blaxel/sandbox/filesystem.py,sha256=3dvg92owjHypv0aFmBdx6i9QfMSfp6z9Z0D93yKfeiQ,4653
|
290
|
-
blaxel/sandbox/preview.py,sha256=
|
291
|
-
blaxel/sandbox/process.py,sha256=
|
312
|
+
blaxel/sandbox/preview.py,sha256=2L9JVfyvD7-65YXqLlvj3rOjq3p-Q-ich9gVAjMbDPs,4893
|
313
|
+
blaxel/sandbox/process.py,sha256=Xma8fIMgDoJM8z-XZOeqU8R-0yjDFGDgnxW8Fi4YPJQ,2531
|
292
314
|
blaxel/sandbox/sandbox.py,sha256=xKxNmD3mNBWw48eHWCtBghNta8MGQIEl2rEnK50Zo00,3078
|
293
315
|
blaxel/sandbox/client/__init__.py,sha256=N26bD5o1jsTb48oExow6Rgivd8ylaU9jaWZfZsVilP8,128
|
294
316
|
blaxel/sandbox/client/client.py,sha256=tcP8cJ4Q3dV9aB3yQ01dDXO-ekfsa3WGGFz4DQAEf8I,7079
|
@@ -297,39 +319,40 @@ blaxel/sandbox/client/py.typed,sha256=8ZJUsxZiuOy1oJeVhsTWQhTG_6pTVHVXk5hJL79ebT
|
|
297
319
|
blaxel/sandbox/client/types.py,sha256=E1hhDh_zXfsSQ0NCt9-uw90_Mr5iIlsdfnfvxv5HarU,1005
|
298
320
|
blaxel/sandbox/client/api/__init__.py,sha256=zTSiG_ujSjAqWPyc435YXaX9XTlpMjiJWBbV-f-YtdA,45
|
299
321
|
blaxel/sandbox/client/api/filesystem/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
300
|
-
blaxel/sandbox/client/api/filesystem/delete_filesystem_path.py,sha256=
|
301
|
-
blaxel/sandbox/client/api/filesystem/get_filesystem_path.py,sha256=
|
302
|
-
blaxel/sandbox/client/api/filesystem/get_watch_filesystem_path.py,sha256=
|
322
|
+
blaxel/sandbox/client/api/filesystem/delete_filesystem_path.py,sha256=t83lLDhA78sf8u9ul6nSnRNgsQYl4ftuP50tkTd6Uoc,4911
|
323
|
+
blaxel/sandbox/client/api/filesystem/get_filesystem_path.py,sha256=zYaR0SDG-_-qDZ_IWisZiA6Tzosx00fb9icnih60M7Y,5139
|
324
|
+
blaxel/sandbox/client/api/filesystem/get_watch_filesystem_path.py,sha256=sNAl-9e1yI1ZI39Yn8rtyn7n-pFUAZBkOtGljUVH18c,4946
|
303
325
|
blaxel/sandbox/client/api/filesystem/get_ws_watch_filesystem_path.py,sha256=9odJ6wWJBjk5kiONo1f-n8A6E6smJaFL2U5ZbZcAgHo,4334
|
304
|
-
blaxel/sandbox/client/api/filesystem/put_filesystem_path.py,sha256=
|
326
|
+
blaxel/sandbox/client/api/filesystem/put_filesystem_path.py,sha256=jGtJnbef6Wm-n2hm_BGAyMcvOQveQd5gX2iBcfQHjKU,4896
|
305
327
|
blaxel/sandbox/client/api/network/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
306
|
-
blaxel/sandbox/client/api/network/delete_network_process_pid_monitor.py,sha256=
|
307
|
-
blaxel/sandbox/client/api/network/get_network_process_pid_ports.py,sha256=
|
308
|
-
blaxel/sandbox/client/api/network/post_network_process_pid_monitor.py,sha256=
|
328
|
+
blaxel/sandbox/client/api/network/delete_network_process_pid_monitor.py,sha256=Kj_TJobog1W9q45IHfnih9M0wIS3B9JDXYibyGUWkzM,4710
|
329
|
+
blaxel/sandbox/client/api/network/get_network_process_pid_ports.py,sha256=6akX0-oJAqJoBJLEbGoUF1oXomKTJgFBGsM4M8OYPoQ,4584
|
330
|
+
blaxel/sandbox/client/api/network/post_network_process_pid_monitor.py,sha256=ee-xWgw_r2sSusT_Rxi5Y9soAzfd0OWwZ9Sgvmk4C6o,5364
|
309
331
|
blaxel/sandbox/client/api/process/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
310
|
-
blaxel/sandbox/client/api/process/delete_process_identifier.py,sha256=
|
311
|
-
blaxel/sandbox/client/api/process/delete_process_identifier_kill.py,sha256=
|
332
|
+
blaxel/sandbox/client/api/process/delete_process_identifier.py,sha256=IRc7jRa5mQIk7MG6LD473QOhqYboPKcXOaihfyBWZ4Y,4308
|
333
|
+
blaxel/sandbox/client/api/process/delete_process_identifier_kill.py,sha256=dkfAoIKJ-2rN4AvS9hGdz-smds7bcXnJtBOVvbqWg4I,4987
|
312
334
|
blaxel/sandbox/client/api/process/get_process.py,sha256=XWf_hNFZLkS14eWjBjir22QwdtV313_llrQGExJ7lZo,3588
|
313
335
|
blaxel/sandbox/client/api/process/get_process_identifier.py,sha256=OqmxuKKHDGX6rwS0Mavn6nnL0X_7AasPUdS5RS04URc,4159
|
314
|
-
blaxel/sandbox/client/api/process/get_process_identifier_logs.py,sha256=
|
315
|
-
blaxel/sandbox/client/api/process/get_process_identifier_logs_stream.py,sha256=
|
316
|
-
blaxel/sandbox/client/api/process/get_ws_process_identifier_logs_stream.py,sha256=
|
317
|
-
blaxel/sandbox/client/api/process/post_process.py,sha256=
|
318
|
-
blaxel/sandbox/client/models/__init__.py,sha256=
|
336
|
+
blaxel/sandbox/client/api/process/get_process_identifier_logs.py,sha256=TPqSGrIb99fJW_CT5eALpK_Pvz7p_FMlDpC434zH47U,4314
|
337
|
+
blaxel/sandbox/client/api/process/get_process_identifier_logs_stream.py,sha256=Gk5hhmMsLzt0kNV5k8QrfkXEKHlhVd9RLQTKRRqFX7w,4766
|
338
|
+
blaxel/sandbox/client/api/process/get_ws_process_identifier_logs_stream.py,sha256=4n6anipxxJYvhnvu34Xx1cM43r6Hye7QtZcip_OIRkU,4450
|
339
|
+
blaxel/sandbox/client/api/process/post_process.py,sha256=wUTMYnrXreeMVCnKD_jHYVPNFKUbSt6IGLI61MZ0TLo,4656
|
340
|
+
blaxel/sandbox/client/models/__init__.py,sha256=GGznzjKvYVyPyHkGm1iHLdXLpfXragpEb0xQh29V05Q,1359
|
319
341
|
blaxel/sandbox/client/models/delete_network_process_pid_monitor_response_200.py,sha256=9cQgKDjG98sMridjXKgeR2oZzFKcQ0G9QIojhwYFosI,1376
|
320
|
-
blaxel/sandbox/client/models/directory.py,sha256=
|
342
|
+
blaxel/sandbox/client/models/directory.py,sha256=7ZLnVo94VWsvT0tI-ceDRsjYqrI483lNLhaL2WVviqU,3821
|
321
343
|
blaxel/sandbox/client/models/error_response.py,sha256=lI15zKBoD2X9yHzSiEaYGUn5TPTxWM7j1Tu5crtd23M,1581
|
322
|
-
blaxel/sandbox/client/models/file.py,sha256=
|
344
|
+
blaxel/sandbox/client/models/file.py,sha256=LXjXjnY2p3frh5utiptpVNQGlRSh3gCKhmDxlHAIN6w,3037
|
323
345
|
blaxel/sandbox/client/models/file_request.py,sha256=xOZSru-fae-En-_2YBgkHa_6iGbqbJsG3RLqBuajVY0,2227
|
324
|
-
blaxel/sandbox/client/models/file_with_content.py,sha256=
|
346
|
+
blaxel/sandbox/client/models/file_with_content.py,sha256=55vccuRO-n613Ej7W5DXAd7cifHqOUeSSSD27Vf7RP8,3355
|
325
347
|
blaxel/sandbox/client/models/get_network_process_pid_ports_response_200.py,sha256=x4uv80kK0GVroWO98l5sE84a6uwZ8pnUKTpGg81ipWA,1351
|
326
|
-
blaxel/sandbox/client/models/get_process_identifier_logs_response_200.py,sha256=pEs9vxD29oxrojOgeyppXXmFVvem7beWzm5_i4TkgDc,1343
|
327
348
|
blaxel/sandbox/client/models/port_monitor_request.py,sha256=LK7sjAK1TF1ojgG4vGytaKLVtV6-SNXxfZ3sxew1cRE,1698
|
328
349
|
blaxel/sandbox/client/models/post_network_process_pid_monitor_response_200.py,sha256=Y8BvNGKU8SlzTGqhaQZk_WWIrmFpNU0LVcmLFjNvqhA,1366
|
329
350
|
blaxel/sandbox/client/models/process_kill_request.py,sha256=TqhuOmVPm_yKZj52YFv3yyu2UA8eVgXEio4sgCVAR-0,1614
|
351
|
+
blaxel/sandbox/client/models/process_logs.py,sha256=2yMnJcEDBFX3nWqv-msVqGXLMQ_pfIJF-UVdO03a0DY,2100
|
330
352
|
blaxel/sandbox/client/models/process_request.py,sha256=7iWyPgIiV7HKO2IopPGyKoUFMYhOOUIWi05NQPdYGmU,3281
|
331
|
-
blaxel/sandbox/client/models/process_response.py,sha256=
|
332
|
-
blaxel/sandbox/client/models/
|
353
|
+
blaxel/sandbox/client/models/process_response.py,sha256=13UN4aTg0OZJnABCD-bzsHNzVRqkeJtsuqDaK0DsyBI,4011
|
354
|
+
blaxel/sandbox/client/models/process_response_status.py,sha256=hCE1gCtheV83T6PYURG3k-rPZSauvyTFhsxLEtudgYE,246
|
355
|
+
blaxel/sandbox/client/models/subdirectory.py,sha256=j1ORkqO74vAdPQ-oUMer85P8Gb2mAwky3P2gBCnqyGQ,1761
|
333
356
|
blaxel/sandbox/client/models/success_response.py,sha256=JQbCUIdVJy_TJ3mp8IuvCGbKgCm_iZQMMrqn8uZkxCk,1874
|
334
357
|
blaxel/tools/__init__.py,sha256=4lzqDt0FNWcO8L0DkFzY1KTHLNtgEux66id4Psq7sXY,11520
|
335
358
|
blaxel/tools/common.py,sha256=JGK052v_fvwWBFYnIArlBnFFViYyFrqdDn3gdVf53EU,1332
|
@@ -341,7 +364,7 @@ blaxel/tools/llamaindex.py,sha256=-gQ-C9V_h9a11J4ItsbWjXrCJOg0lRKsb98v9rVsNak,71
|
|
341
364
|
blaxel/tools/openai.py,sha256=GuFXkj6bXEwldyVr89jEsRAi5ihZUVEVe327QuWiGNs,653
|
342
365
|
blaxel/tools/pydantic.py,sha256=CvnNbAG_J4yBtA-XFI4lQrq3FYKjNd39hu841vZT004,1801
|
343
366
|
blaxel/tools/types.py,sha256=YPCGJ4vZDhqR0X2H_TWtc5chQScsC32nGTQdRKJlO8Y,707
|
344
|
-
blaxel-0.1.
|
345
|
-
blaxel-0.1.
|
346
|
-
blaxel-0.1.
|
347
|
-
blaxel-0.1.
|
367
|
+
blaxel-0.1.18.dist-info/METADATA,sha256=NxXf8kCAqhWeBYxVjwnw_MmxpU33V-JklAn29MLwl4k,6702
|
368
|
+
blaxel-0.1.18.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
369
|
+
blaxel-0.1.18.dist-info/licenses/LICENSE,sha256=p5PNQvpvyDT_0aYBDgmV1fFI_vAD2aSV0wWG7VTgRis,1069
|
370
|
+
blaxel-0.1.18.dist-info/RECORD,,
|
@@ -1,397 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.4
|
2
|
-
Name: blaxel
|
3
|
-
Version: 0.1.16rc60
|
4
|
-
Summary: Add your description here
|
5
|
-
Author-email: cploujoux <cploujoux@blaxel.ai>
|
6
|
-
License-File: LICENSE
|
7
|
-
Requires-Python: >=3.10
|
8
|
-
Requires-Dist: attrs>=21.3.0
|
9
|
-
Requires-Dist: httpx>=0.27.0
|
10
|
-
Requires-Dist: mcp<=1.7.1
|
11
|
-
Requires-Dist: opentelemetry-api>=1.28.0
|
12
|
-
Requires-Dist: opentelemetry-exporter-otlp>=1.28.0
|
13
|
-
Requires-Dist: opentelemetry-instrumentation-anthropic==0.40.6
|
14
|
-
Requires-Dist: opentelemetry-instrumentation-cohere==0.40.6
|
15
|
-
Requires-Dist: opentelemetry-instrumentation-fastapi==0.54b1
|
16
|
-
Requires-Dist: opentelemetry-instrumentation-ollama==0.40.6
|
17
|
-
Requires-Dist: opentelemetry-instrumentation-openai==0.40.6
|
18
|
-
Requires-Dist: opentelemetry-instrumentation-system-metrics
|
19
|
-
Requires-Dist: opentelemetry-sdk>=1.28.0
|
20
|
-
Requires-Dist: pydantic<2.11.0,>=2.10.3
|
21
|
-
Requires-Dist: pyjwt>=2.10.1
|
22
|
-
Requires-Dist: python-dateutil>=2.8.0
|
23
|
-
Requires-Dist: pyyaml<6.1.0,>=6.0.2
|
24
|
-
Requires-Dist: requests<2.33.0,>=2.32.3
|
25
|
-
Requires-Dist: tomli>=2.2.1
|
26
|
-
Requires-Dist: websockets<15.0.0
|
27
|
-
Provides-Extra: crewai
|
28
|
-
Requires-Dist: crewai>=0.120.1; extra == 'crewai'
|
29
|
-
Requires-Dist: opentelemetry-instrumentation-crewai>=0.40.6; extra == 'crewai'
|
30
|
-
Provides-Extra: google-adk
|
31
|
-
Requires-Dist: google-adk>=0.2.0; extra == 'google-adk'
|
32
|
-
Requires-Dist: litellm>=1.63.11; extra == 'google-adk'
|
33
|
-
Provides-Extra: langchain
|
34
|
-
Requires-Dist: langchain-anthropic>=0.3.10; extra == 'langchain'
|
35
|
-
Requires-Dist: langchain-cerebras>=0.5.0; extra == 'langchain'
|
36
|
-
Requires-Dist: langchain-cohere>=0.4.3; extra == 'langchain'
|
37
|
-
Requires-Dist: langchain-community<0.4.0,>=0.3.3; extra == 'langchain'
|
38
|
-
Requires-Dist: langchain-core<0.4.0,>=0.3.13; extra == 'langchain'
|
39
|
-
Requires-Dist: langchain-deepseek-official>=0.1.0.post1; extra == 'langchain'
|
40
|
-
Requires-Dist: langchain-openai>=0.3.10; extra == 'langchain'
|
41
|
-
Requires-Dist: langchain-xai>=0.2.2; extra == 'langchain'
|
42
|
-
Requires-Dist: langgraph<0.3.0,>=0.2.40; extra == 'langchain'
|
43
|
-
Requires-Dist: opentelemetry-instrumentation-langchain>=0.35.0; extra == 'langchain'
|
44
|
-
Requires-Dist: pillow>=10.0.0; extra == 'langchain'
|
45
|
-
Provides-Extra: livekit
|
46
|
-
Requires-Dist: livekit-agents[anthropic,cartesia,deepgram,elevenlabs,groq,openai,silero,turn-detector]~=1.0; extra == 'livekit'
|
47
|
-
Requires-Dist: livekit-plugins-noise-cancellation~=0.2; extra == 'livekit'
|
48
|
-
Provides-Extra: llamaindex
|
49
|
-
Requires-Dist: llama-index-llms-anthropic>=0.6.10; extra == 'llamaindex'
|
50
|
-
Requires-Dist: llama-index-llms-cerebras>=0.2.2; extra == 'llamaindex'
|
51
|
-
Requires-Dist: llama-index-llms-cohere>=0.4.0; extra == 'llamaindex'
|
52
|
-
Requires-Dist: llama-index-llms-deepseek>=0.1.1; extra == 'llamaindex'
|
53
|
-
Requires-Dist: llama-index-llms-google-genai>=0.1.7; extra == 'llamaindex'
|
54
|
-
Requires-Dist: llama-index-llms-groq>=0.3.1; extra == 'llamaindex'
|
55
|
-
Requires-Dist: llama-index-llms-mistralai>=0.4.0; extra == 'llamaindex'
|
56
|
-
Requires-Dist: llama-index-llms-openai>=0.3.28; extra == 'llamaindex'
|
57
|
-
Requires-Dist: llama-index>=0.12.26; extra == 'llamaindex'
|
58
|
-
Requires-Dist: opentelemetry-instrumentation-llamaindex>=0.35.0; extra == 'llamaindex'
|
59
|
-
Provides-Extra: openai-agents
|
60
|
-
Requires-Dist: openai-agents>=0.0.7; extra == 'openai-agents'
|
61
|
-
Provides-Extra: pydantic-ai
|
62
|
-
Requires-Dist: pydantic-ai>=0.0.48; extra == 'pydantic-ai'
|
63
|
-
Description-Content-Type: text/markdown
|
64
|
-
|
65
|
-
# Blaxel Python SDK
|
66
|
-
|
67
|
-
<p align="center">
|
68
|
-
<img src="https://blaxel.ai/logo.png" alt="Blaxel"/>
|
69
|
-
</p>
|
70
|
-
|
71
|
-
An SDK to connect your agent or tools with Blaxel platform.
|
72
|
-
Currently in preview, feel free to send us feedback or contribute to the project.
|
73
|
-
|
74
|
-
## Table of Contents
|
75
|
-
|
76
|
-
- [Features](#features)
|
77
|
-
- [Prerequisites](#prerequisites)
|
78
|
-
- [Start from an hello world example](#start-from-an-hello-world-example)
|
79
|
-
- [Integrate with a custom code](#integrate-with-a-custom-code)
|
80
|
-
- [Set-up blaxel observability](#set-up-blaxel-observability)
|
81
|
-
- [Connect tools and model from blaxel platform to your agent](#connect-tools-and-model-from-blaxel-platform-to-your-agent)
|
82
|
-
- [Agent Chaining](#agent-chaining)
|
83
|
-
- [Deploy on blaxel](#deploy-on-blaxel)
|
84
|
-
- [Advanced configuration](#advanced-configuration)
|
85
|
-
- [Create an MCP Server](#create-an-mcp-server)
|
86
|
-
- [Connect an existing MCP Server to blaxel](#connect-an-existing-mcp-server-to-blaxel)
|
87
|
-
- [How to use environment variables or secrets](#how-to-use-environment-variables-or-secrets)
|
88
|
-
- [Contributing](#contributing)
|
89
|
-
- [License](#license)
|
90
|
-
|
91
|
-
## Features
|
92
|
-
|
93
|
-
Supported AI frameworks:
|
94
|
-
|
95
|
-
- LangChain
|
96
|
-
- LlamaIndex
|
97
|
-
- CrewAI
|
98
|
-
- OpenAI Agents
|
99
|
-
|
100
|
-
Supported Tools frameworks:
|
101
|
-
|
102
|
-
- MCP (Model Context Protocol)
|
103
|
-
|
104
|
-
## Prerequisites
|
105
|
-
|
106
|
-
- **Python:** 3.10 or later
|
107
|
-
- **Blaxel CLI:** Ensure you have the Blaxel CLI installed. If not, install it globally:
|
108
|
-
```bash
|
109
|
-
curl -fsSL https://raw.githubusercontent.com/beamlit/toolkit/preview/install.sh | BINDIR=$HOME/.local/bin sh
|
110
|
-
```
|
111
|
-
- **Blaxel login:** Login to Blaxel platform
|
112
|
-
```bash
|
113
|
-
bl login YOUR-WORKSPACE
|
114
|
-
```
|
115
|
-
|
116
|
-
## Start from an hello world example
|
117
|
-
|
118
|
-
```bash
|
119
|
-
bl create-agent-app myfolder
|
120
|
-
cd myfolder
|
121
|
-
bl serve --hotreload
|
122
|
-
```
|
123
|
-
|
124
|
-
## Integrate with a custom code
|
125
|
-
|
126
|
-
### Set-up blaxel observability
|
127
|
-
|
128
|
-
It only needs an import of our SDK on top of your main entrypoint file.
|
129
|
-
It will directly plug our backend (when deployed on blaxel) with open telemetry standard.
|
130
|
-
|
131
|
-
```python
|
132
|
-
from blaxel import sdk
|
133
|
-
```
|
134
|
-
|
135
|
-
### Connect tools and model from blaxel platform to your agent
|
136
|
-
|
137
|
-
```python
|
138
|
-
from blaxel.models import bl_model
|
139
|
-
from blaxel.tools import bl_tools
|
140
|
-
```
|
141
|
-
|
142
|
-
Then you need to use it in your agent. Here are examples with different frameworks:
|
143
|
-
|
144
|
-
```python
|
145
|
-
# Example with LangChain
|
146
|
-
from langchain.agents import AgentExecutor, create_react_agent
|
147
|
-
from langchain.prompts import ChatPromptTemplate
|
148
|
-
from langchain.tools import Tool
|
149
|
-
from langchain_core.messages import HumanMessage
|
150
|
-
|
151
|
-
async def create_agent():
|
152
|
-
model = await bl_model("gpt-4o-mini").to_langchain()
|
153
|
-
async with bl_tools(["blaxel-search", "webcrawl"]) as t:
|
154
|
-
tools = t.to_langchain()
|
155
|
-
tools.append(
|
156
|
-
Tool(
|
157
|
-
name="weather",
|
158
|
-
description="Get the weather in a specific city",
|
159
|
-
func=lambda city: f"The weather in {city} is sunny"
|
160
|
-
)
|
161
|
-
)
|
162
|
-
|
163
|
-
prompt = ChatPromptTemplate.from_messages([
|
164
|
-
("system", "You are a helpful assistant."),
|
165
|
-
("human", "{input}")
|
166
|
-
])
|
167
|
-
|
168
|
-
agent = create_react_agent(model, tools, prompt)
|
169
|
-
return AgentExecutor(agent=agent, tools=tools)
|
170
|
-
|
171
|
-
# Example with LlamaIndex
|
172
|
-
from llama_index.core import SimpleDirectoryReader
|
173
|
-
from llama_index.core.agent import ReActAgent
|
174
|
-
from llama_index.core.tools import FunctionTool
|
175
|
-
|
176
|
-
async def create_llamaindex_agent():
|
177
|
-
model = await bl_model("gpt-4o-mini").to_llamaindex()
|
178
|
-
async with bl_tools(["blaxel-search", "webcrawl"]) as t:
|
179
|
-
tools = t.to_llamaindex()
|
180
|
-
tools.append(
|
181
|
-
FunctionTool.from_defaults(
|
182
|
-
fn=lambda city: f"The weather in {city} is sunny",
|
183
|
-
name="weather",
|
184
|
-
description="Get the weather in a specific city"
|
185
|
-
)
|
186
|
-
)
|
187
|
-
|
188
|
-
return ReActAgent.from_tools(
|
189
|
-
tools,
|
190
|
-
llm=model,
|
191
|
-
verbose=True
|
192
|
-
)
|
193
|
-
|
194
|
-
# Example with CrewAI
|
195
|
-
from crewai import Agent, Task, Crew
|
196
|
-
|
197
|
-
async def create_crewai_agent():
|
198
|
-
model = await bl_model("gpt-4o-mini").to_crewai()
|
199
|
-
async with bl_tools(["blaxel-search", "webcrawl"]) as t:
|
200
|
-
tools = t.to_crewai()
|
201
|
-
tools.append(
|
202
|
-
Tool(
|
203
|
-
name="weather",
|
204
|
-
description="Get the weather in a specific city",
|
205
|
-
func=lambda city: f"The weather in {city} is sunny"
|
206
|
-
)
|
207
|
-
)
|
208
|
-
|
209
|
-
agent = Agent(
|
210
|
-
role='Assistant',
|
211
|
-
goal='Help users with their queries',
|
212
|
-
backstory='I am a helpful AI assistant',
|
213
|
-
tools=tools,
|
214
|
-
llm=model
|
215
|
-
)
|
216
|
-
|
217
|
-
return agent
|
218
|
-
```
|
219
|
-
|
220
|
-
### Agent Chaining
|
221
|
-
|
222
|
-
You can call an agent from another agent to chain them.
|
223
|
-
This allows complex agentic logic, with multiple agents calling each other, orchestration, routing, etc.
|
224
|
-
|
225
|
-
```python
|
226
|
-
# Example of calling an agent, then putting its result inside a second one
|
227
|
-
from blaxel.agents import bl_agent
|
228
|
-
|
229
|
-
async def first_agent(input_text: str) -> dict:
|
230
|
-
# First agent that processes loan applications
|
231
|
-
response = await bl_agent("first-agent").run({
|
232
|
-
"inputs": input_text
|
233
|
-
})
|
234
|
-
return response
|
235
|
-
|
236
|
-
async def second_agent(input_text: str) -> dict:
|
237
|
-
# Second agent that evaluates the loan application
|
238
|
-
first_response = await first_agent(input_text)
|
239
|
-
|
240
|
-
model = await bl_model("gpt-4o-mini").to_langchain()
|
241
|
-
prompt = ChatPromptTemplate.from_messages([
|
242
|
-
("system", "You are a loan specialist. Based on the given json file with client data, your job is to decide if a client can be further processed."),
|
243
|
-
("human", "{input}")
|
244
|
-
])
|
245
|
-
|
246
|
-
response = await model.ainvoke(first_response)
|
247
|
-
return response
|
248
|
-
```
|
249
|
-
|
250
|
-
### Deploy on blaxel
|
251
|
-
|
252
|
-
To deploy on blaxel, we have only one requirement in each agent code.
|
253
|
-
We need an HTTP Server.
|
254
|
-
|
255
|
-
For example with FastAPI:
|
256
|
-
|
257
|
-
```python
|
258
|
-
from fastapi import FastAPI
|
259
|
-
from blaxel import sdk
|
260
|
-
import uvicorn
|
261
|
-
|
262
|
-
app = FastAPI()
|
263
|
-
|
264
|
-
@app.post("/")
|
265
|
-
async def root(inputs: str):
|
266
|
-
# Your agentic logic here
|
267
|
-
return {"response": "Your response here"}
|
268
|
-
|
269
|
-
if __name__ == "__main__":
|
270
|
-
port = int(os.getenv("BL_SERVER_PORT", "3000"))
|
271
|
-
host = os.getenv("BL_SERVER_HOST", "0.0.0.0")
|
272
|
-
uvicorn.run(app, host=host, port=port)
|
273
|
-
```
|
274
|
-
|
275
|
-
```bash
|
276
|
-
bl deploy
|
277
|
-
```
|
278
|
-
|
279
|
-
### Advanced configuration
|
280
|
-
|
281
|
-
You can add optionally a configuration file "blaxel.toml" in your project root.
|
282
|
-
|
283
|
-
```toml
|
284
|
-
name = "my-agent"
|
285
|
-
workspace = "my-workspace"
|
286
|
-
type = "agent"
|
287
|
-
|
288
|
-
functions = ["blaxel-search"]
|
289
|
-
models = ["sandbox-openai"]
|
290
|
-
```
|
291
|
-
|
292
|
-
It allows to customize the requirements for your agent, it can be useful if you have many models and functions in your workspace.
|
293
|
-
|
294
|
-
### Create an MCP Server
|
295
|
-
|
296
|
-
If you want to create an MCP Server for using it in multiple agents, you can bootstrap it with the following command:
|
297
|
-
|
298
|
-
```bash
|
299
|
-
bl create-mcp-server my-mcp-server
|
300
|
-
cd my-mcp-server
|
301
|
-
bl serve --hotreload
|
302
|
-
```
|
303
|
-
|
304
|
-
We follow current standard for tool development over MCP Server.
|
305
|
-
Example of a tool which is sending fake information about the weather:
|
306
|
-
|
307
|
-
```python
|
308
|
-
from blaxel.mcp.server import FastMCP
|
309
|
-
|
310
|
-
mcp = FastMCP("My Weather MCP server")
|
311
|
-
|
312
|
-
@mcp.tool()
|
313
|
-
def weather(city: str) -> str:
|
314
|
-
"""Get the weather for a city"""
|
315
|
-
return f"The weather in {city} is sunny"
|
316
|
-
|
317
|
-
if __name__ == "__main__":
|
318
|
-
if os.getenv("BL_SERVER_PORT"):
|
319
|
-
mcp.run(transport="ws")
|
320
|
-
else:
|
321
|
-
mcp.run(transport="stdio")
|
322
|
-
|
323
|
-
|
324
|
-
```
|
325
|
-
|
326
|
-
### Connect an existing MCP Server to blaxel
|
327
|
-
|
328
|
-
You need to have a "blaxel.toml" file in your project root:
|
329
|
-
|
330
|
-
```toml
|
331
|
-
name = "weather"
|
332
|
-
workspace = "my-workspace"
|
333
|
-
type = "function"
|
334
|
-
```
|
335
|
-
|
336
|
-
Connect the observability layer:
|
337
|
-
|
338
|
-
```python
|
339
|
-
from blaxel import sdk
|
340
|
-
```
|
341
|
-
|
342
|
-
Update your import of FastMCP
|
343
|
-
|
344
|
-
```python
|
345
|
-
from blaxel.mcp.server import FastMCP
|
346
|
-
```
|
347
|
-
|
348
|
-
Update your entrypoint to support our transport:
|
349
|
-
|
350
|
-
```python
|
351
|
-
def main():
|
352
|
-
mcp.run(transport="ws") if os.getenv("BL_SERVER_PORT") else mcp.run(transport="stdio")
|
353
|
-
```
|
354
|
-
|
355
|
-
### How to use environment variables or secrets
|
356
|
-
|
357
|
-
You can use the "blaxel.toml" config file to specify environment variables for your agent:
|
358
|
-
|
359
|
-
```toml
|
360
|
-
name = "weather"
|
361
|
-
workspace = "my-workspace"
|
362
|
-
type = "function"
|
363
|
-
|
364
|
-
[env]
|
365
|
-
DEFAULT_CITY = "San Francisco"
|
366
|
-
```
|
367
|
-
|
368
|
-
Then you can use it in your agent or function with the following syntax:
|
369
|
-
|
370
|
-
```python
|
371
|
-
from blaxel.env import env
|
372
|
-
print(env.DEFAULT_CITY) # San Francisco
|
373
|
-
```
|
374
|
-
|
375
|
-
You can also add secrets variables to a .env files in your project root. (goal is to not commit this file)
|
376
|
-
|
377
|
-
Example of a .env file:
|
378
|
-
|
379
|
-
```
|
380
|
-
# Secret variables can be stored here
|
381
|
-
DEFAULT_CITY_PASSWORD=123456
|
382
|
-
```
|
383
|
-
|
384
|
-
Then you can use it in your agent or function with the following syntax:
|
385
|
-
|
386
|
-
```python
|
387
|
-
from blaxel.env import env
|
388
|
-
print(env.DEFAULT_CITY_PASSWORD) # 123456
|
389
|
-
```
|
390
|
-
|
391
|
-
## Contributing
|
392
|
-
|
393
|
-
Contributions are welcome! Please feel free to submit a Pull Request.
|
394
|
-
|
395
|
-
## License
|
396
|
-
|
397
|
-
This project is licensed under the MIT License - see the LICENSE file for details.
|
File without changes
|
File without changes
|