blaxel 0.1.22rc70__py3-none-any.whl → 0.2.0rc2__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.
Files changed (419) hide show
  1. blaxel/__init__.py +6 -3
  2. blaxel/core/__init__.py +44 -0
  3. blaxel/{agents → core/agents}/__init__.py +30 -50
  4. blaxel/{authentication → core/authentication}/apikey.py +1 -0
  5. blaxel/{authentication → core/authentication}/clientcredentials.py +6 -2
  6. blaxel/{client → core/client}/api/agents/create_agent.py +1 -1
  7. blaxel/{client → core/client}/api/agents/update_agent.py +1 -1
  8. blaxel/{client → core/client}/api/compute/create_sandbox.py +1 -1
  9. blaxel/{client → core/client}/api/compute/create_sandbox_preview.py +1 -1
  10. blaxel/{client → core/client}/api/compute/create_sandbox_preview_token.py +1 -1
  11. blaxel/{client → core/client}/api/compute/update_sandbox.py +1 -1
  12. blaxel/{client → core/client}/api/compute/update_sandbox_preview.py +1 -1
  13. blaxel/{client → core/client}/api/functions/create_function.py +1 -1
  14. blaxel/{client → core/client}/api/functions/update_function.py +1 -1
  15. blaxel/{client → core/client}/api/integrations/create_integration_connection.py +1 -1
  16. blaxel/{client → core/client}/api/integrations/update_integration_connection.py +1 -1
  17. blaxel/{client → core/client}/api/jobs/create_job.py +1 -1
  18. blaxel/{client → core/client}/api/jobs/update_job.py +1 -1
  19. blaxel/{client → core/client}/api/knowledgebases/create_knowledgebase.py +1 -1
  20. blaxel/{client → core/client}/api/knowledgebases/update_knowledgebase.py +1 -1
  21. blaxel/{client → core/client}/api/models/create_model.py +1 -1
  22. blaxel/{client → core/client}/api/models/update_model.py +1 -1
  23. blaxel/{client → core/client}/api/policies/create_policy.py +1 -1
  24. blaxel/{client → core/client}/api/policies/update_policy.py +1 -1
  25. blaxel/{client → core/client}/api/service_accounts/create_api_key_for_service_account.py +1 -1
  26. blaxel/{client → core/client}/api/service_accounts/create_workspace_service_account.py +1 -1
  27. blaxel/{client → core/client}/api/service_accounts/update_workspace_service_account.py +1 -1
  28. blaxel/{client → core/client}/api/workspaces/check_workspace_availability.py +1 -1
  29. blaxel/{client → core/client}/api/workspaces/create_worspace.py +1 -1
  30. blaxel/{client → core/client}/api/workspaces/invite_workspace_user.py +1 -1
  31. blaxel/{client → core/client}/api/workspaces/update_workspace.py +1 -1
  32. blaxel/{client → core/client}/api/workspaces/update_workspace_user_role.py +1 -1
  33. blaxel/{client → core/client}/models/agent.py +1 -1
  34. blaxel/{client → core/client}/models/agent_spec.py +2 -2
  35. blaxel/{client → core/client}/models/core_spec.py +1 -1
  36. blaxel/{client → core/client}/models/function.py +1 -1
  37. blaxel/{client → core/client}/models/function_schema_properties.py +1 -1
  38. blaxel/{client → core/client}/models/function_spec.py +2 -2
  39. blaxel/{client → core/client}/models/integration.py +2 -2
  40. blaxel/{client → core/client}/models/integration_endpoints.py +1 -1
  41. blaxel/{client → core/client}/models/job.py +1 -1
  42. blaxel/{client → core/client}/models/job_spec.py +1 -1
  43. blaxel/{client → core/client}/models/knowledgebase.py +1 -1
  44. blaxel/{client → core/client}/models/location_response.py +1 -1
  45. blaxel/{client → core/client}/models/model.py +1 -1
  46. blaxel/{client → core/client}/models/model_spec.py +1 -1
  47. blaxel/{client → core/client}/models/policy_spec.py +2 -2
  48. blaxel/{client → core/client}/models/resource_metrics.py +3 -3
  49. blaxel/{client → core/client}/models/runtime.py +1 -1
  50. blaxel/{client → core/client}/models/sandbox.py +1 -1
  51. blaxel/{client → core/client}/models/sandbox_definition.py +1 -1
  52. blaxel/{client → core/client}/models/sandbox_spec.py +1 -1
  53. blaxel/{client → core/client}/models/store_agent.py +1 -1
  54. blaxel/{client → core/client}/models/store_configuration.py +1 -1
  55. blaxel/{client → core/client}/models/template.py +1 -1
  56. blaxel/core/common/__init__.py +6 -0
  57. blaxel/core/common/autoload.py +21 -0
  58. blaxel/{common → core/common}/internal.py +33 -62
  59. blaxel/core/common/logger.py +131 -0
  60. blaxel/{jobs → core/jobs}/__init__.py +40 -60
  61. blaxel/core/mcp/__init__.py +4 -0
  62. blaxel/{mcp → core/mcp}/client.py +13 -7
  63. blaxel/{mcp → core/mcp}/server.py +4 -30
  64. blaxel/core/models/__init__.py +52 -0
  65. blaxel/core/sandbox/__init__.py +29 -0
  66. blaxel/core/sandbox/action.py +79 -0
  67. blaxel/{sandbox → core/sandbox}/client/api/filesystem/put_filesystem_path.py +1 -1
  68. blaxel/{sandbox → core/sandbox}/client/api/network/post_network_process_pid_monitor.py +1 -1
  69. blaxel/core/sandbox/client/api/process/__init__.py +0 -0
  70. blaxel/{sandbox → core/sandbox}/client/api/process/post_process.py +1 -1
  71. blaxel/{sandbox → core/sandbox}/client/models/directory.py +2 -2
  72. blaxel/core/sandbox/filesystem.py +280 -0
  73. blaxel/core/sandbox/network.py +10 -0
  74. blaxel/{sandbox → core/sandbox}/preview.py +45 -17
  75. blaxel/core/sandbox/process.py +159 -0
  76. blaxel/{sandbox → core/sandbox}/sandbox.py +62 -5
  77. blaxel/core/sandbox/session.py +124 -0
  78. blaxel/core/sandbox/types.py +103 -0
  79. blaxel/{tools → core/tools}/__init__.py +62 -90
  80. blaxel/crewai/__init__.py +4 -0
  81. blaxel/{models/crewai.py → crewai/model.py} +4 -2
  82. blaxel/crewai/py.typed +0 -0
  83. blaxel/crewai/tools.py +26 -0
  84. blaxel/googleadk/__init__.py +4 -0
  85. blaxel/{models/googleadk.py → googleadk/model.py} +8 -2
  86. blaxel/googleadk/py.typed +0 -0
  87. blaxel/googleadk/tools.py +72 -0
  88. blaxel/langgraph/__init__.py +4 -0
  89. blaxel/{models/langchain.py → langgraph/model.py} +8 -4
  90. blaxel/langgraph/py.typed +0 -0
  91. blaxel/{tools/langchain.py → langgraph/tools.py} +7 -3
  92. blaxel/livekit/__init__.py +4 -0
  93. blaxel/{models/livekit.py → livekit/model.py} +7 -1
  94. blaxel/livekit/py.typed +0 -0
  95. blaxel/{tools/livekit.py → livekit/tools.py} +8 -1
  96. blaxel/llamaindex/__init__.py +4 -0
  97. blaxel/{models/llamaindex.py → llamaindex/model.py} +6 -3
  98. blaxel/llamaindex/py.typed +0 -0
  99. blaxel/{tools/llamaindex.py → llamaindex/tools.py} +7 -4
  100. blaxel/openai/__init__.py +4 -0
  101. blaxel/{models/openai.py → openai/model.py} +4 -2
  102. blaxel/openai/py.typed +0 -0
  103. blaxel/{tools/openai.py → openai/tools.py} +7 -3
  104. blaxel/pydantic/__init__.py +4 -0
  105. blaxel/{models/custom/pydantic → pydantic/custom}/gemini.py +0 -1
  106. blaxel/{models/pydantic.py → pydantic/model.py} +6 -4
  107. blaxel/pydantic/py.typed +0 -0
  108. blaxel/{tools/pydantic.py → pydantic/tools.py} +6 -3
  109. blaxel/telemetry/__init__.py +6 -0
  110. blaxel/telemetry/instrumentation/blaxel_core.py +124 -0
  111. blaxel/telemetry/instrumentation/blaxel_langgraph.py +74 -0
  112. blaxel/telemetry/instrumentation/blaxel_langgraph_gemini.py +360 -0
  113. blaxel/telemetry/instrumentation/blaxel_llamaindex.py +89 -0
  114. blaxel/telemetry/instrumentation/map.py +61 -0
  115. blaxel/telemetry/instrumentation/utils.py +74 -0
  116. blaxel/{common → telemetry/log}/logger.py +6 -12
  117. blaxel/{instrumentation → telemetry}/manager.py +20 -12
  118. blaxel/telemetry/py.typed +0 -0
  119. blaxel/{instrumentation → telemetry}/span.py +12 -1
  120. blaxel-0.2.0rc2.dist-info/METADATA +224 -0
  121. blaxel-0.2.0rc2.dist-info/RECORD +408 -0
  122. blaxel/common/autoload.py +0 -9
  123. blaxel/instrumentation/map.py +0 -49
  124. blaxel/mcp/__init__.py +0 -3
  125. blaxel/models/__init__.py +0 -104
  126. blaxel/sandbox/base.py +0 -67
  127. blaxel/sandbox/filesystem.py +0 -104
  128. blaxel/sandbox/process.py +0 -56
  129. blaxel/tools/crewai.py +0 -22
  130. blaxel/tools/googleadk.py +0 -66
  131. blaxel-0.1.22rc70.dist-info/METADATA +0 -169
  132. blaxel-0.1.22rc70.dist-info/RECORD +0 -379
  133. /blaxel/{authentication → core/authentication}/__init__.py +0 -0
  134. /blaxel/{authentication → core/authentication}/devicemode.py +0 -0
  135. /blaxel/{authentication → core/authentication}/oauth.py +0 -0
  136. /blaxel/{authentication → core/authentication}/types.py +0 -0
  137. /blaxel/{cache → core/cache}/__init__.py +0 -0
  138. /blaxel/{cache → core/cache}/cache.py +0 -0
  139. /blaxel/{client → core/client}/__init__.py +0 -0
  140. /blaxel/{client → core/client}/api/__init__.py +0 -0
  141. /blaxel/{client → core/client}/api/agents/__init__.py +0 -0
  142. /blaxel/{client → core/client}/api/agents/delete_agent.py +0 -0
  143. /blaxel/{client → core/client}/api/agents/get_agent.py +0 -0
  144. /blaxel/{client → core/client}/api/agents/list_agent_revisions.py +0 -0
  145. /blaxel/{client → core/client}/api/agents/list_agents.py +0 -0
  146. /blaxel/{client → core/client}/api/compute/__init__.py +0 -0
  147. /blaxel/{client → core/client}/api/compute/delete_sandbox.py +0 -0
  148. /blaxel/{client → core/client}/api/compute/delete_sandbox_preview.py +0 -0
  149. /blaxel/{client → core/client}/api/compute/delete_sandbox_preview_token.py +0 -0
  150. /blaxel/{client → core/client}/api/compute/get_sandbox.py +0 -0
  151. /blaxel/{client → core/client}/api/compute/get_sandbox_preview.py +0 -0
  152. /blaxel/{client → core/client}/api/compute/list_sandbox_preview_tokens.py +0 -0
  153. /blaxel/{client → core/client}/api/compute/list_sandbox_previews.py +0 -0
  154. /blaxel/{client → core/client}/api/compute/list_sandboxes.py +0 -0
  155. /blaxel/{client → core/client}/api/compute/start_sandbox.py +0 -0
  156. /blaxel/{client → core/client}/api/compute/stop_sandbox.py +0 -0
  157. /blaxel/{client → core/client}/api/configurations/__init__.py +0 -0
  158. /blaxel/{client → core/client}/api/configurations/get_configuration.py +0 -0
  159. /blaxel/{client → core/client}/api/default/__init__.py +0 -0
  160. /blaxel/{client → core/client}/api/default/get_template.py +0 -0
  161. /blaxel/{client → core/client}/api/default/list_mcp_hub_definitions.py +0 -0
  162. /blaxel/{client → core/client}/api/default/list_sandbox_hub_definitions.py +0 -0
  163. /blaxel/{client → core/client}/api/functions/__init__.py +0 -0
  164. /blaxel/{client → core/client}/api/functions/delete_function.py +0 -0
  165. /blaxel/{client → core/client}/api/functions/get_function.py +0 -0
  166. /blaxel/{client → core/client}/api/functions/list_function_revisions.py +0 -0
  167. /blaxel/{client → core/client}/api/functions/list_functions.py +0 -0
  168. /blaxel/{client → core/client}/api/integrations/__init__.py +0 -0
  169. /blaxel/{client → core/client}/api/integrations/delete_integration_connection.py +0 -0
  170. /blaxel/{client → core/client}/api/integrations/get_integration.py +0 -0
  171. /blaxel/{client → core/client}/api/integrations/get_integration_connection.py +0 -0
  172. /blaxel/{client → core/client}/api/integrations/get_integration_connection_model.py +0 -0
  173. /blaxel/{client → core/client}/api/integrations/get_integration_connection_model_endpoint_configurations.py +0 -0
  174. /blaxel/{client → core/client}/api/integrations/list_integration_connection_models.py +0 -0
  175. /blaxel/{client → core/client}/api/integrations/list_integration_connections.py +0 -0
  176. /blaxel/{client → core/client}/api/invitations/__init__.py +0 -0
  177. /blaxel/{client → core/client}/api/invitations/list_all_pending_invitations.py +0 -0
  178. /blaxel/{client → core/client}/api/jobs/__init__.py +0 -0
  179. /blaxel/{client → core/client}/api/jobs/delete_job.py +0 -0
  180. /blaxel/{client → core/client}/api/jobs/get_job.py +0 -0
  181. /blaxel/{client → core/client}/api/jobs/list_job_revisions.py +0 -0
  182. /blaxel/{client → core/client}/api/jobs/list_jobs.py +0 -0
  183. /blaxel/{client → core/client}/api/knowledgebases/__init__.py +0 -0
  184. /blaxel/{client → core/client}/api/knowledgebases/delete_knowledgebase.py +0 -0
  185. /blaxel/{client → core/client}/api/knowledgebases/get_knowledgebase.py +0 -0
  186. /blaxel/{client → core/client}/api/knowledgebases/list_knowledgebase_revisions.py +0 -0
  187. /blaxel/{client → core/client}/api/knowledgebases/list_knowledgebases.py +0 -0
  188. /blaxel/{client → core/client}/api/locations/__init__.py +0 -0
  189. /blaxel/{client → core/client}/api/locations/list_locations.py +0 -0
  190. /blaxel/{client → core/client}/api/models/__init__.py +0 -0
  191. /blaxel/{client → core/client}/api/models/delete_model.py +0 -0
  192. /blaxel/{client → core/client}/api/models/get_model.py +0 -0
  193. /blaxel/{client → core/client}/api/models/list_model_revisions.py +0 -0
  194. /blaxel/{client → core/client}/api/models/list_models.py +0 -0
  195. /blaxel/{client → core/client}/api/policies/__init__.py +0 -0
  196. /blaxel/{client → core/client}/api/policies/delete_policy.py +0 -0
  197. /blaxel/{client → core/client}/api/policies/get_policy.py +0 -0
  198. /blaxel/{client → core/client}/api/policies/list_policies.py +0 -0
  199. /blaxel/{client → core/client}/api/privateclusters/__init__.py +0 -0
  200. /blaxel/{client → core/client}/api/privateclusters/create_private_cluster.py +0 -0
  201. /blaxel/{client → core/client}/api/privateclusters/delete_private_cluster.py +0 -0
  202. /blaxel/{client → core/client}/api/privateclusters/get_private_cluster.py +0 -0
  203. /blaxel/{client → core/client}/api/privateclusters/get_private_cluster_health.py +0 -0
  204. /blaxel/{client → core/client}/api/privateclusters/list_private_clusters.py +0 -0
  205. /blaxel/{client → core/client}/api/privateclusters/update_private_cluster.py +0 -0
  206. /blaxel/{client → core/client}/api/privateclusters/update_private_cluster_health.py +0 -0
  207. /blaxel/{client → core/client}/api/service_accounts/__init__.py +0 -0
  208. /blaxel/{client → core/client}/api/service_accounts/delete_api_key_for_service_account.py +0 -0
  209. /blaxel/{client → core/client}/api/service_accounts/delete_workspace_service_account.py +0 -0
  210. /blaxel/{client → core/client}/api/service_accounts/get_workspace_service_accounts.py +0 -0
  211. /blaxel/{client → core/client}/api/service_accounts/list_api_keys_for_service_account.py +0 -0
  212. /blaxel/{client → core/client}/api/templates/__init__.py +0 -0
  213. /blaxel/{client → core/client}/api/templates/list_templates.py +0 -0
  214. /blaxel/{client → core/client}/api/workspaces/__init__.py +0 -0
  215. /blaxel/{client → core/client}/api/workspaces/accept_workspace_invitation.py +0 -0
  216. /blaxel/{client → core/client}/api/workspaces/decline_workspace_invitation.py +0 -0
  217. /blaxel/{client → core/client}/api/workspaces/delete_workspace.py +0 -0
  218. /blaxel/{client → core/client}/api/workspaces/get_workspace.py +0 -0
  219. /blaxel/{client → core/client}/api/workspaces/leave_workspace.py +0 -0
  220. /blaxel/{client → core/client}/api/workspaces/list_workspace_users.py +0 -0
  221. /blaxel/{client → core/client}/api/workspaces/list_workspaces.py +0 -0
  222. /blaxel/{client → core/client}/api/workspaces/remove_workspace_user.py +0 -0
  223. /blaxel/{client → core/client}/client.py +0 -0
  224. /blaxel/{client → core/client}/errors.py +0 -0
  225. /blaxel/{client → core/client}/models/__init__.py +0 -0
  226. /blaxel/{client → core/client}/models/acl.py +0 -0
  227. /blaxel/{client → core/client}/models/api_key.py +0 -0
  228. /blaxel/{client → core/client}/models/billable_time_metric.py +0 -0
  229. /blaxel/{client → core/client}/models/check_workspace_availability_body.py +0 -0
  230. /blaxel/{client → core/client}/models/configuration.py +0 -0
  231. /blaxel/{client → core/client}/models/continent.py +0 -0
  232. /blaxel/{client → core/client}/models/core_event.py +0 -0
  233. /blaxel/{client → core/client}/models/core_spec_configurations.py +0 -0
  234. /blaxel/{client → core/client}/models/country.py +0 -0
  235. /blaxel/{client → core/client}/models/create_api_key_for_service_account_body.py +0 -0
  236. /blaxel/{client → core/client}/models/create_workspace_service_account_body.py +0 -0
  237. /blaxel/{client → core/client}/models/create_workspace_service_account_response_200.py +0 -0
  238. /blaxel/{client → core/client}/models/delete_sandbox_preview_token_response_200.py +0 -0
  239. /blaxel/{client → core/client}/models/delete_workspace_service_account_response_200.py +0 -0
  240. /blaxel/{client → core/client}/models/entrypoint.py +0 -0
  241. /blaxel/{client → core/client}/models/entrypoint_env.py +0 -0
  242. /blaxel/{client → core/client}/models/flavor.py +0 -0
  243. /blaxel/{client → core/client}/models/form.py +0 -0
  244. /blaxel/{client → core/client}/models/form_config.py +0 -0
  245. /blaxel/{client → core/client}/models/form_oauth.py +0 -0
  246. /blaxel/{client → core/client}/models/form_secrets.py +0 -0
  247. /blaxel/{client → core/client}/models/function_kit.py +0 -0
  248. /blaxel/{client → core/client}/models/function_schema.py +0 -0
  249. /blaxel/{client → core/client}/models/function_schema_not.py +0 -0
  250. /blaxel/{client → core/client}/models/function_schema_or_bool.py +0 -0
  251. /blaxel/{client → core/client}/models/get_workspace_service_accounts_response_200_item.py +0 -0
  252. /blaxel/{client → core/client}/models/histogram_bucket.py +0 -0
  253. /blaxel/{client → core/client}/models/histogram_stats.py +0 -0
  254. /blaxel/{client → core/client}/models/integration_additional_infos.py +0 -0
  255. /blaxel/{client → core/client}/models/integration_connection.py +0 -0
  256. /blaxel/{client → core/client}/models/integration_connection_spec.py +0 -0
  257. /blaxel/{client → core/client}/models/integration_connection_spec_config.py +0 -0
  258. /blaxel/{client → core/client}/models/integration_connection_spec_secret.py +0 -0
  259. /blaxel/{client → core/client}/models/integration_endpoint.py +0 -0
  260. /blaxel/{client → core/client}/models/integration_endpoint_token.py +0 -0
  261. /blaxel/{client → core/client}/models/integration_headers.py +0 -0
  262. /blaxel/{client → core/client}/models/integration_model.py +0 -0
  263. /blaxel/{client → core/client}/models/integration_organization.py +0 -0
  264. /blaxel/{client → core/client}/models/integration_query_params.py +0 -0
  265. /blaxel/{client → core/client}/models/integration_repository.py +0 -0
  266. /blaxel/{client → core/client}/models/invite_workspace_user_body.py +0 -0
  267. /blaxel/{client → core/client}/models/job_execution_config.py +0 -0
  268. /blaxel/{client → core/client}/models/job_metrics.py +0 -0
  269. /blaxel/{client → core/client}/models/job_metrics_executions_chart.py +0 -0
  270. /blaxel/{client → core/client}/models/job_metrics_executions_total.py +0 -0
  271. /blaxel/{client → core/client}/models/job_metrics_tasks_chart.py +0 -0
  272. /blaxel/{client → core/client}/models/job_metrics_tasks_total.py +0 -0
  273. /blaxel/{client → core/client}/models/jobs_chart.py +0 -0
  274. /blaxel/{client → core/client}/models/jobs_chart_value.py +0 -0
  275. /blaxel/{client → core/client}/models/jobs_executions.py +0 -0
  276. /blaxel/{client → core/client}/models/jobs_network_chart.py +0 -0
  277. /blaxel/{client → core/client}/models/jobs_success_failed_chart.py +0 -0
  278. /blaxel/{client → core/client}/models/jobs_tasks.py +0 -0
  279. /blaxel/{client → core/client}/models/jobs_total.py +0 -0
  280. /blaxel/{client → core/client}/models/knowledgebase_spec.py +0 -0
  281. /blaxel/{client → core/client}/models/knowledgebase_spec_options.py +0 -0
  282. /blaxel/{client → core/client}/models/last_n_requests_metric.py +0 -0
  283. /blaxel/{client → core/client}/models/latency_metric.py +0 -0
  284. /blaxel/{client → core/client}/models/logs_response.py +0 -0
  285. /blaxel/{client → core/client}/models/logs_response_data.py +0 -0
  286. /blaxel/{client → core/client}/models/mcp_definition.py +0 -0
  287. /blaxel/{client → core/client}/models/mcp_definition_entrypoint.py +0 -0
  288. /blaxel/{client → core/client}/models/mcp_definition_form.py +0 -0
  289. /blaxel/{client → core/client}/models/memory_allocation_by_name.py +0 -0
  290. /blaxel/{client → core/client}/models/memory_allocation_metric.py +0 -0
  291. /blaxel/{client → core/client}/models/metadata.py +0 -0
  292. /blaxel/{client → core/client}/models/metadata_labels.py +0 -0
  293. /blaxel/{client → core/client}/models/metric.py +0 -0
  294. /blaxel/{client → core/client}/models/metrics.py +0 -0
  295. /blaxel/{client → core/client}/models/metrics_models.py +0 -0
  296. /blaxel/{client → core/client}/models/metrics_request_total_per_code.py +0 -0
  297. /blaxel/{client → core/client}/models/metrics_rps_per_code.py +0 -0
  298. /blaxel/{client → core/client}/models/model_private_cluster.py +0 -0
  299. /blaxel/{client → core/client}/models/o_auth.py +0 -0
  300. /blaxel/{client → core/client}/models/owner_fields.py +0 -0
  301. /blaxel/{client → core/client}/models/pending_invitation.py +0 -0
  302. /blaxel/{client → core/client}/models/pending_invitation_accept.py +0 -0
  303. /blaxel/{client → core/client}/models/pending_invitation_render.py +0 -0
  304. /blaxel/{client → core/client}/models/pending_invitation_render_invited_by.py +0 -0
  305. /blaxel/{client → core/client}/models/pending_invitation_render_workspace.py +0 -0
  306. /blaxel/{client → core/client}/models/pending_invitation_workspace_details.py +0 -0
  307. /blaxel/{client → core/client}/models/pod_template_spec.py +0 -0
  308. /blaxel/{client → core/client}/models/policy.py +0 -0
  309. /blaxel/{client → core/client}/models/policy_location.py +0 -0
  310. /blaxel/{client → core/client}/models/policy_max_tokens.py +0 -0
  311. /blaxel/{client → core/client}/models/port.py +0 -0
  312. /blaxel/{client → core/client}/models/preview.py +0 -0
  313. /blaxel/{client → core/client}/models/preview_metadata.py +0 -0
  314. /blaxel/{client → core/client}/models/preview_spec.py +0 -0
  315. /blaxel/{client → core/client}/models/preview_spec_request_headers.py +0 -0
  316. /blaxel/{client → core/client}/models/preview_spec_response_headers.py +0 -0
  317. /blaxel/{client → core/client}/models/preview_token.py +0 -0
  318. /blaxel/{client → core/client}/models/preview_token_metadata.py +0 -0
  319. /blaxel/{client → core/client}/models/preview_token_spec.py +0 -0
  320. /blaxel/{client → core/client}/models/private_cluster.py +0 -0
  321. /blaxel/{client → core/client}/models/private_location.py +0 -0
  322. /blaxel/{client → core/client}/models/repository.py +0 -0
  323. /blaxel/{client → core/client}/models/request_duration_over_time_metric.py +0 -0
  324. /blaxel/{client → core/client}/models/request_duration_over_time_metrics.py +0 -0
  325. /blaxel/{client → core/client}/models/request_total_by_origin_metric.py +0 -0
  326. /blaxel/{client → core/client}/models/request_total_by_origin_metric_request_total_by_origin.py +0 -0
  327. /blaxel/{client → core/client}/models/request_total_by_origin_metric_request_total_by_origin_and_code.py +0 -0
  328. /blaxel/{client → core/client}/models/request_total_metric.py +0 -0
  329. /blaxel/{client → core/client}/models/request_total_metric_request_total_per_code.py +0 -0
  330. /blaxel/{client → core/client}/models/request_total_metric_rps_per_code.py +0 -0
  331. /blaxel/{client → core/client}/models/request_total_response_data.py +0 -0
  332. /blaxel/{client → core/client}/models/resource.py +0 -0
  333. /blaxel/{client → core/client}/models/resource_log.py +0 -0
  334. /blaxel/{client → core/client}/models/resource_log_chart.py +0 -0
  335. /blaxel/{client → core/client}/models/resource_log_response.py +0 -0
  336. /blaxel/{client → core/client}/models/resource_metrics_request_total_per_code.py +0 -0
  337. /blaxel/{client → core/client}/models/resource_metrics_request_total_per_code_previous.py +0 -0
  338. /blaxel/{client → core/client}/models/resource_metrics_rps_per_code.py +0 -0
  339. /blaxel/{client → core/client}/models/resource_metrics_rps_per_code_previous.py +0 -0
  340. /blaxel/{client → core/client}/models/resource_trace.py +0 -0
  341. /blaxel/{client → core/client}/models/revision_configuration.py +0 -0
  342. /blaxel/{client → core/client}/models/revision_metadata.py +0 -0
  343. /blaxel/{client → core/client}/models/runtime_configuration.py +0 -0
  344. /blaxel/{client → core/client}/models/runtime_startup_probe.py +0 -0
  345. /blaxel/{client → core/client}/models/serverless_config.py +0 -0
  346. /blaxel/{client → core/client}/models/serverless_config_configuration.py +0 -0
  347. /blaxel/{client → core/client}/models/spec_configuration.py +0 -0
  348. /blaxel/{client → core/client}/models/start_sandbox.py +0 -0
  349. /blaxel/{client → core/client}/models/stop_sandbox.py +0 -0
  350. /blaxel/{client → core/client}/models/store_agent_labels.py +0 -0
  351. /blaxel/{client → core/client}/models/store_configuration_option.py +0 -0
  352. /blaxel/{client → core/client}/models/template_variable.py +0 -0
  353. /blaxel/{client → core/client}/models/time_fields.py +0 -0
  354. /blaxel/{client → core/client}/models/time_to_first_token_over_time_metrics.py +0 -0
  355. /blaxel/{client → core/client}/models/token_rate_metric.py +0 -0
  356. /blaxel/{client → core/client}/models/token_rate_metrics.py +0 -0
  357. /blaxel/{client → core/client}/models/token_total_metric.py +0 -0
  358. /blaxel/{client → core/client}/models/trace_ids_response.py +0 -0
  359. /blaxel/{client → core/client}/models/trigger.py +0 -0
  360. /blaxel/{client → core/client}/models/trigger_configuration.py +0 -0
  361. /blaxel/{client → core/client}/models/update_workspace_service_account_body.py +0 -0
  362. /blaxel/{client → core/client}/models/update_workspace_service_account_response_200.py +0 -0
  363. /blaxel/{client → core/client}/models/update_workspace_user_role_body.py +0 -0
  364. /blaxel/{client → core/client}/models/websocket_channel.py +0 -0
  365. /blaxel/{client → core/client}/models/websocket_message.py +0 -0
  366. /blaxel/{client → core/client}/models/workspace.py +0 -0
  367. /blaxel/{client → core/client}/models/workspace_labels.py +0 -0
  368. /blaxel/{client → core/client}/models/workspace_runtime.py +0 -0
  369. /blaxel/{client → core/client}/models/workspace_user.py +0 -0
  370. /blaxel/{client → core/client}/py.typed +0 -0
  371. /blaxel/{client → core/client}/types.py +0 -0
  372. /blaxel/{common → core/common}/env.py +0 -0
  373. /blaxel/{common → core/common}/settings.py +0 -0
  374. /blaxel/{sandbox/client/api/filesystem/__init__.py → core/py.typed} +0 -0
  375. /blaxel/{sandbox → core/sandbox}/client/__init__.py +0 -0
  376. /blaxel/{sandbox → core/sandbox}/client/api/__init__.py +0 -0
  377. /blaxel/{sandbox/client/api/network → core/sandbox/client/api/filesystem}/__init__.py +0 -0
  378. /blaxel/{sandbox → core/sandbox}/client/api/filesystem/delete_filesystem_path.py +0 -0
  379. /blaxel/{sandbox → core/sandbox}/client/api/filesystem/get_filesystem_path.py +0 -0
  380. /blaxel/{sandbox → core/sandbox}/client/api/filesystem/get_watch_filesystem_path.py +0 -0
  381. /blaxel/{sandbox → core/sandbox}/client/api/filesystem/get_ws_watch_filesystem_path.py +0 -0
  382. /blaxel/{sandbox/client/api/process → core/sandbox/client/api/network}/__init__.py +0 -0
  383. /blaxel/{sandbox → core/sandbox}/client/api/network/delete_network_process_pid_monitor.py +0 -0
  384. /blaxel/{sandbox → core/sandbox}/client/api/network/get_network_process_pid_ports.py +0 -0
  385. /blaxel/{sandbox → core/sandbox}/client/api/process/delete_process_identifier.py +0 -0
  386. /blaxel/{sandbox → core/sandbox}/client/api/process/delete_process_identifier_kill.py +0 -0
  387. /blaxel/{sandbox → core/sandbox}/client/api/process/get_process.py +0 -0
  388. /blaxel/{sandbox → core/sandbox}/client/api/process/get_process_identifier.py +0 -0
  389. /blaxel/{sandbox → core/sandbox}/client/api/process/get_process_identifier_logs.py +0 -0
  390. /blaxel/{sandbox → core/sandbox}/client/api/process/get_process_identifier_logs_stream.py +0 -0
  391. /blaxel/{sandbox → core/sandbox}/client/api/process/get_ws_process_identifier_logs_stream.py +0 -0
  392. /blaxel/{sandbox → core/sandbox}/client/client.py +0 -0
  393. /blaxel/{sandbox → core/sandbox}/client/errors.py +0 -0
  394. /blaxel/{sandbox → core/sandbox}/client/models/__init__.py +0 -0
  395. /blaxel/{sandbox → core/sandbox}/client/models/delete_network_process_pid_monitor_response_200.py +0 -0
  396. /blaxel/{sandbox → core/sandbox}/client/models/error_response.py +0 -0
  397. /blaxel/{sandbox → core/sandbox}/client/models/file.py +0 -0
  398. /blaxel/{sandbox → core/sandbox}/client/models/file_request.py +0 -0
  399. /blaxel/{sandbox → core/sandbox}/client/models/file_with_content.py +0 -0
  400. /blaxel/{sandbox → core/sandbox}/client/models/get_network_process_pid_ports_response_200.py +0 -0
  401. /blaxel/{sandbox → core/sandbox}/client/models/port_monitor_request.py +0 -0
  402. /blaxel/{sandbox → core/sandbox}/client/models/post_network_process_pid_monitor_response_200.py +0 -0
  403. /blaxel/{sandbox → core/sandbox}/client/models/process_logs.py +0 -0
  404. /blaxel/{sandbox → core/sandbox}/client/models/process_request.py +0 -0
  405. /blaxel/{sandbox → core/sandbox}/client/models/process_request_env.py +0 -0
  406. /blaxel/{sandbox → core/sandbox}/client/models/process_response.py +0 -0
  407. /blaxel/{sandbox → core/sandbox}/client/models/process_response_status.py +0 -0
  408. /blaxel/{sandbox → core/sandbox}/client/models/subdirectory.py +0 -0
  409. /blaxel/{sandbox → core/sandbox}/client/models/success_response.py +0 -0
  410. /blaxel/{sandbox → core/sandbox}/client/py.typed +0 -0
  411. /blaxel/{sandbox → core/sandbox}/client/types.py +0 -0
  412. /blaxel/{tools → core/tools}/common.py +0 -0
  413. /blaxel/{tools → core/tools}/types.py +0 -0
  414. /blaxel/{models/custom/langchain → langgraph/custom}/gemini.py +0 -0
  415. /blaxel/{models/custom/llamaindex → llamaindex/custom}/cohere.py +0 -0
  416. /blaxel/{instrumentation → telemetry}/exporters.py +0 -0
  417. /blaxel/{instrumentation → telemetry/log}/log.py +0 -0
  418. {blaxel-0.1.22rc70.dist-info → blaxel-0.2.0rc2.dist-info}/WHEEL +0 -0
  419. {blaxel-0.1.22rc70.dist-info → blaxel-0.2.0rc2.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,61 @@
1
+ from typing import Dict, List
2
+
3
+ from pydantic import BaseModel
4
+
5
+
6
+ class InstrumentationMapping(BaseModel):
7
+ module_path: str
8
+ class_name: str
9
+ required_packages: List[str]
10
+ ignore_if_packages: List[str]
11
+
12
+ MAPPINGS: Dict[str, InstrumentationMapping] = {
13
+ "anthropic": InstrumentationMapping(
14
+ module_path="opentelemetry.instrumentation.anthropic",
15
+ class_name="AnthropicInstrumentor",
16
+ required_packages=["anthropic"],
17
+ ignore_if_packages=[]
18
+ ),
19
+ "cohere": InstrumentationMapping(
20
+ module_path="opentelemetry.instrumentation.cohere",
21
+ class_name="CohereInstrumentor",
22
+ required_packages=["cohere"],
23
+ ignore_if_packages=[]
24
+ ),
25
+ "openai": InstrumentationMapping(
26
+ module_path="opentelemetry.instrumentation.openai",
27
+ class_name="OpenAIInstrumentor",
28
+ required_packages=["openai"],
29
+ ignore_if_packages=[]
30
+ ),
31
+ "gemini": InstrumentationMapping(
32
+ module_path="opentelemetry.instrumentation.google_generativeai",
33
+ class_name="GoogleGenerativeAIInstrumentor",
34
+ required_packages=["google-generativeai"],
35
+ ignore_if_packages=[]
36
+ ),
37
+ "blaxel.core": InstrumentationMapping(
38
+ module_path="blaxel_telemetry.instrumentation.blaxel.core",
39
+ class_name="BlaxelCoreInstrumentor",
40
+ required_packages=["blaxel.core"],
41
+ ignore_if_packages=[]
42
+ ),
43
+ "blaxel_langgraph": InstrumentationMapping(
44
+ module_path="blaxel_telemetry.instrumentation.blaxel_langgraph",
45
+ class_name="BlaxelLanggraphInstrumentor",
46
+ required_packages=["blaxel_langgraph"],
47
+ ignore_if_packages=[]
48
+ ),
49
+ "blaxel_langgraph_gemini": InstrumentationMapping(
50
+ module_path="blaxel_telemetry.instrumentation.blaxel_langgraph_gemini",
51
+ class_name="BlaxelLanggraphGeminiInstrumentor",
52
+ required_packages=["blaxel_langgraph"],
53
+ ignore_if_packages=[]
54
+ ),
55
+ "blaxel_llamaindex": InstrumentationMapping(
56
+ module_path="blaxel_telemetry.instrumentation.blaxel_llamaindex",
57
+ class_name="BlaxelLlamaIndexInstrumentor",
58
+ required_packages=["blaxel_llamaindex"],
59
+ ignore_if_packages=[]
60
+ ),
61
+ }
@@ -0,0 +1,74 @@
1
+ import dataclasses
2
+ import json
3
+ import logging
4
+ import os
5
+ import traceback
6
+ from contextlib import asynccontextmanager
7
+
8
+ from opentelemetry.semconv_ai import SpanAttributes
9
+
10
+
11
+ def dont_throw(func):
12
+ # Obtain a logger specific to the function's module
13
+ logger = logging.getLogger(func.__module__)
14
+
15
+ def wrapper(*args, **kwargs):
16
+ try:
17
+ return func(*args, **kwargs)
18
+ except Exception:
19
+ logger.debug(
20
+ "Instrumentation failed to trace in %s, error: %s",
21
+ func.__name__,
22
+ traceback.format_exc(),
23
+ )
24
+
25
+ return wrapper
26
+
27
+
28
+ def with_tracer_wrapper(func):
29
+ def _with_tracer(tracer):
30
+ def wrapper(wrapped, instance, args, kwargs):
31
+ return func(tracer, wrapped, instance, args, kwargs)
32
+
33
+ return wrapper
34
+
35
+ return _with_tracer
36
+
37
+
38
+ @asynccontextmanager
39
+ async def start_as_current_span_async(tracer, *args, **kwargs):
40
+ with tracer.start_as_current_span(*args, **kwargs) as span:
41
+ yield span
42
+
43
+ class JSONEncoder(json.JSONEncoder):
44
+ def default(self, o):
45
+ if dataclasses.is_dataclass(o):
46
+ return dataclasses.asdict(o)
47
+ elif hasattr(o, "json"):
48
+ return o.json()
49
+ elif hasattr(o, "to_json"):
50
+ return o.to_json()
51
+ return super().default(o)
52
+
53
+
54
+ def should_send_prompts():
55
+ return (
56
+ os.getenv("TRACELOOP_TRACE_CONTENT") or "true"
57
+ ).lower() == "true"
58
+
59
+ @dont_throw
60
+ def process_request(span, args, kwargs):
61
+ if should_send_prompts():
62
+ span.set_attribute(
63
+ SpanAttributes.TRACELOOP_ENTITY_INPUT,
64
+ json.dumps({"args": args, "kwargs": kwargs}, cls=JSONEncoder),
65
+ )
66
+
67
+
68
+ @dont_throw
69
+ def process_response(span, res):
70
+ if should_send_prompts():
71
+ span.set_attribute(
72
+ SpanAttributes.TRACELOOP_ENTITY_OUTPUT,
73
+ json.dumps(res, cls=JSONEncoder),
74
+ )
@@ -6,7 +6,7 @@ import json
6
6
  import logging
7
7
  import os
8
8
 
9
- from opentelemetry.trace import get_current_span
9
+ from opentelemetry import trace
10
10
 
11
11
 
12
12
  class JsonFormatter(logging.Formatter):
@@ -35,18 +35,12 @@ class JsonFormatter(logging.Formatter):
35
35
  self.labels_name: {}
36
36
  }
37
37
 
38
- # Get current active span - equivalent to trace.getActiveSpan() in JS
39
- current_span = get_current_span()
40
-
41
- # Check if span exists and has valid context (equivalent to 'if (currentSpan)' in JS)
42
- if current_span and current_span.get_span_context().is_valid:
38
+ # Add trace context if available
39
+ current_span = trace.get_current_span()
40
+ if current_span.is_recording():
43
41
  span_context = current_span.get_span_context()
44
- # Format trace_id and span_id as hex strings (like JS does)
45
- trace_id_hex = format(span_context.trace_id, '032x')
46
- span_id_hex = format(span_context.span_id, '016x')
47
-
48
- log_entry[self.trace_id_name] = f"{self.trace_id_prefix}{trace_id_hex}"
49
- log_entry[self.span_id_name] = f"{self.span_id_prefix}{span_id_hex}"
42
+ log_entry[self.trace_id_name] = f"{self.trace_id_prefix}{span_context.trace_id}"
43
+ log_entry[self.span_id_name] = f"{self.span_id_prefix}{span_context.span_id}"
50
44
 
51
45
  # Add task ID if available
52
46
  task_id = os.environ.get(self.task_index)
@@ -21,16 +21,16 @@ from opentelemetry.sdk.trace import TracerProvider
21
21
  from opentelemetry.sdk.trace.export import BatchSpanProcessor
22
22
  from opentelemetry.trace import NoOpTracerProvider
23
23
 
24
- from blaxel.instrumentation.exporters import (
24
+ from blaxel.core.common import Settings
25
+
26
+ from .exporters import (
25
27
  DynamicHeadersLogExporter,
26
28
  DynamicHeadersMetricExporter,
27
29
  DynamicHeadersSpanExporter,
28
30
  )
29
- from blaxel.instrumentation.span import DefaultAttributesSpanProcessor
30
-
31
- from ..common.settings import Settings
32
- from .log import AsyncLogRecordProcessor
33
- from .map import MAPPINGS
31
+ from .instrumentation.map import MAPPINGS
32
+ from .log.log import AsyncLogRecordProcessor
33
+ from .span import DefaultAttributesSpanProcessor
34
34
 
35
35
  logger = logging.getLogger(__name__)
36
36
 
@@ -116,6 +116,7 @@ class TelemetryManager:
116
116
 
117
117
  def setup_signal_handler(self):
118
118
  """Set up signal handlers for graceful shutdown."""
119
+
119
120
  def handle_signal(signum, frame):
120
121
  logger.debug(f"Received signal {signum}")
121
122
  self.shutdown()
@@ -150,11 +151,15 @@ class TelemetryManager:
150
151
  # Set up the TracerProvider
151
152
  trace_provider = TracerProvider(resource=resource)
152
153
  span_processor = BatchSpanProcessor(self.get_span_exporter())
153
- trace_provider.add_span_processor(DefaultAttributesSpanProcessor({
154
- "workload.id": self.resource_name,
155
- "workload.type": self.resource_type,
156
- "workspace": self.resource_workspace,
157
- }))
154
+ trace_provider.add_span_processor(
155
+ DefaultAttributesSpanProcessor(
156
+ {
157
+ "workload.id": self.resource_name,
158
+ "workload.type": self.resource_type,
159
+ "workspace": self.resource_workspace,
160
+ }
161
+ )
162
+ )
158
163
  trace_provider.add_span_processor(span_processor)
159
164
  trace.set_tracer_provider(trace_provider)
160
165
  self.tracer = trace_provider.get_tracer(__name__)
@@ -217,10 +222,13 @@ class TelemetryManager:
217
222
  if time.time() - start_time < timeout:
218
223
  logger.debug("Instrumentation shutdown complete")
219
224
  else:
220
- logger.warning("Shutdown timed out after 5 seconds, skipping remaining shutdown tasks")
225
+ logger.warning(
226
+ "Shutdown timed out after 5 seconds, skipping remaining shutdown tasks"
227
+ )
221
228
 
222
229
  except Exception as error:
223
230
  logger.error(f"Error during shutdown: {error}")
224
231
 
232
+
225
233
  # Create a singleton instance
226
234
  telemetry_manager = TelemetryManager()
File without changes
@@ -10,7 +10,7 @@ from opentelemetry.sdk.trace import Span as SdkSpan
10
10
  from opentelemetry.sdk.trace.export import SpanProcessor
11
11
  from opentelemetry.trace import Span, Tracer
12
12
 
13
- from ..common.settings import settings
13
+ from blaxel.core import settings
14
14
 
15
15
  T = TypeVar('T')
16
16
 
@@ -45,6 +45,16 @@ class SpanManager:
45
45
  def __init__(self, name: str):
46
46
  self.tracer: Tracer = trace.get_tracer(name)
47
47
 
48
+ @staticmethod
49
+ def get_default_attributes() -> Dict[str, Any]:
50
+ """Get default attributes for the span."""
51
+ return {
52
+ "blaxel.environment": settings.env,
53
+ "workload.id": settings.name,
54
+ "workload.type": f"{settings.type}s",
55
+ "workspace": settings.workspace
56
+ }
57
+
48
58
  def create_active_span(self, name: str, attributes: Dict[str, Any], parent: Optional[Span] = None) -> ContextManager[Span]:
49
59
  """
50
60
  Creates an active span and executes the provided function within its context.
@@ -92,3 +102,4 @@ class SpanManager:
92
102
  if parent:
93
103
  context = trace.set_span_in_context(parent)
94
104
  return self.tracer.start_span(name, attributes=full_attributes, context=context)
105
+ return self.tracer.start_span(name, attributes=full_attributes, context=context)
@@ -0,0 +1,224 @@
1
+ Metadata-Version: 2.4
2
+ Name: blaxel
3
+ Version: 0.2.0rc2
4
+ Summary: Blaxel - AI development platform SDK
5
+ Project-URL: Homepage, https://blaxel.ai
6
+ Project-URL: Documentation, https://docs.blaxel.ai
7
+ Project-URL: Repository, https://github.com/blaxel-ai/sdk-python
8
+ Project-URL: Changelog, https://docs.blaxel.ai/changelog
9
+ Author-email: cploujoux <cploujoux@blaxel.ai>
10
+ License-File: LICENSE
11
+ Requires-Python: >=3.10
12
+ Requires-Dist: attrs>=21.3.0
13
+ Requires-Dist: httpx>=0.27.0
14
+ Requires-Dist: mcp<=1.7.1
15
+ Requires-Dist: pydantic>=2.0.0
16
+ Requires-Dist: pyjwt>=2.0.0
17
+ Requires-Dist: python-dateutil>=2.8.0
18
+ Requires-Dist: pyyaml>=6.0.0
19
+ Requires-Dist: requests>=2.32.3
20
+ Requires-Dist: tomli>=2.2.1
21
+ Requires-Dist: websockets<16.0.0
22
+ Provides-Extra: all
23
+ Requires-Dist: crewai>=0.120.1; extra == 'all'
24
+ Requires-Dist: google-adk>=1.1.1; extra == 'all'
25
+ Requires-Dist: langchain-anthropic>=0.3.10; extra == 'all'
26
+ Requires-Dist: langchain-cerebras>=0.5.0; extra == 'all'
27
+ Requires-Dist: langchain-cohere>=0.4.3; extra == 'all'
28
+ Requires-Dist: langchain-community<0.4.0,>=0.3.3; extra == 'all'
29
+ Requires-Dist: langchain-core<0.4.0,>=0.3.13; extra == 'all'
30
+ Requires-Dist: langchain-deepseek-official>=0.1.0.post1; extra == 'all'
31
+ Requires-Dist: langchain-openai>=0.3.10; extra == 'all'
32
+ Requires-Dist: langchain-xai>=0.2.2; extra == 'all'
33
+ Requires-Dist: langgraph<0.3.0,>=0.2.40; extra == 'all'
34
+ Requires-Dist: litellm>=1.63.11; extra == 'all'
35
+ Requires-Dist: livekit-agents[anthropic,cartesia,deepgram,elevenlabs,groq,openai,silero,turn-detector]~=1.0; extra == 'all'
36
+ Requires-Dist: livekit-plugins-noise-cancellation~=0.2; extra == 'all'
37
+ Requires-Dist: llama-index-llms-anthropic>=0.6.14; extra == 'all'
38
+ Requires-Dist: llama-index-llms-cerebras>=0.2.2; extra == 'all'
39
+ Requires-Dist: llama-index-llms-cohere>=0.4.1; extra == 'all'
40
+ Requires-Dist: llama-index-llms-deepseek>=0.1.1; extra == 'all'
41
+ Requires-Dist: llama-index-llms-google-genai>=0.1.13; extra == 'all'
42
+ Requires-Dist: llama-index-llms-groq>=0.3.1; extra == 'all'
43
+ Requires-Dist: llama-index-llms-mistralai>=0.4.0; extra == 'all'
44
+ Requires-Dist: llama-index-llms-openai>=0.3.42; extra == 'all'
45
+ Requires-Dist: llama-index>=0.12.37; extra == 'all'
46
+ Requires-Dist: openai-agents>=0.0.14; extra == 'all'
47
+ Requires-Dist: opentelemetry-exporter-otlp>=1.28.0; extra == 'all'
48
+ Requires-Dist: opentelemetry-instrumentation-anthropic==0.40.6; extra == 'all'
49
+ Requires-Dist: opentelemetry-instrumentation-cohere==0.40.6; extra == 'all'
50
+ Requires-Dist: opentelemetry-instrumentation-crewai>=0.40.6; extra == 'all'
51
+ Requires-Dist: opentelemetry-instrumentation-fastapi==0.54b1; extra == 'all'
52
+ Requires-Dist: opentelemetry-instrumentation-google-generativeai>=0.40.7; extra == 'all'
53
+ Requires-Dist: opentelemetry-instrumentation-langchain>=0.35.0; extra == 'all'
54
+ Requires-Dist: opentelemetry-instrumentation-llamaindex>=0.40.7; extra == 'all'
55
+ Requires-Dist: opentelemetry-instrumentation-ollama==0.40.6; extra == 'all'
56
+ Requires-Dist: opentelemetry-instrumentation-openai==0.40.6; extra == 'all'
57
+ Requires-Dist: pillow>=10.0.0; extra == 'all'
58
+ Requires-Dist: pydantic-ai>=0.0.48; extra == 'all'
59
+ Provides-Extra: core
60
+ Provides-Extra: crewai
61
+ Requires-Dist: crewai>=0.120.1; extra == 'crewai'
62
+ Requires-Dist: opentelemetry-instrumentation-crewai>=0.40.6; extra == 'crewai'
63
+ Provides-Extra: dev
64
+ Requires-Dist: pyright; extra == 'dev'
65
+ Requires-Dist: pytest; extra == 'dev'
66
+ Requires-Dist: ruff; extra == 'dev'
67
+ Requires-Dist: uv; extra == 'dev'
68
+ Provides-Extra: googleadk
69
+ Requires-Dist: google-adk>=1.1.1; extra == 'googleadk'
70
+ Requires-Dist: litellm>=1.63.11; extra == 'googleadk'
71
+ Provides-Extra: langgraph
72
+ Requires-Dist: langchain-anthropic>=0.3.10; extra == 'langgraph'
73
+ Requires-Dist: langchain-cerebras>=0.5.0; extra == 'langgraph'
74
+ Requires-Dist: langchain-cohere>=0.4.3; extra == 'langgraph'
75
+ Requires-Dist: langchain-community<0.4.0,>=0.3.3; extra == 'langgraph'
76
+ Requires-Dist: langchain-core<0.4.0,>=0.3.13; extra == 'langgraph'
77
+ Requires-Dist: langchain-deepseek-official>=0.1.0.post1; extra == 'langgraph'
78
+ Requires-Dist: langchain-openai>=0.3.10; extra == 'langgraph'
79
+ Requires-Dist: langchain-xai>=0.2.2; extra == 'langgraph'
80
+ Requires-Dist: langgraph<0.3.0,>=0.2.40; extra == 'langgraph'
81
+ Requires-Dist: opentelemetry-instrumentation-langchain>=0.35.0; extra == 'langgraph'
82
+ Requires-Dist: pillow>=10.0.0; extra == 'langgraph'
83
+ Provides-Extra: livekit
84
+ Requires-Dist: livekit-agents[anthropic,cartesia,deepgram,elevenlabs,groq,openai,silero,turn-detector]~=1.0; extra == 'livekit'
85
+ Requires-Dist: livekit-plugins-noise-cancellation~=0.2; extra == 'livekit'
86
+ Provides-Extra: llamaindex
87
+ Requires-Dist: llama-index-llms-anthropic>=0.6.14; extra == 'llamaindex'
88
+ Requires-Dist: llama-index-llms-cerebras>=0.2.2; extra == 'llamaindex'
89
+ Requires-Dist: llama-index-llms-cohere>=0.4.1; extra == 'llamaindex'
90
+ Requires-Dist: llama-index-llms-deepseek>=0.1.1; extra == 'llamaindex'
91
+ Requires-Dist: llama-index-llms-google-genai>=0.1.13; extra == 'llamaindex'
92
+ Requires-Dist: llama-index-llms-groq>=0.3.1; extra == 'llamaindex'
93
+ Requires-Dist: llama-index-llms-mistralai>=0.4.0; extra == 'llamaindex'
94
+ Requires-Dist: llama-index-llms-openai>=0.3.42; extra == 'llamaindex'
95
+ Requires-Dist: llama-index>=0.12.37; extra == 'llamaindex'
96
+ Requires-Dist: opentelemetry-instrumentation-llamaindex>=0.40.7; extra == 'llamaindex'
97
+ Provides-Extra: openai
98
+ Requires-Dist: openai-agents>=0.0.14; extra == 'openai'
99
+ Provides-Extra: pydantic
100
+ Requires-Dist: pydantic-ai>=0.0.48; extra == 'pydantic'
101
+ Provides-Extra: telemetry
102
+ Requires-Dist: opentelemetry-exporter-otlp>=1.28.0; extra == 'telemetry'
103
+ Requires-Dist: opentelemetry-instrumentation-anthropic==0.40.6; extra == 'telemetry'
104
+ Requires-Dist: opentelemetry-instrumentation-cohere==0.40.6; extra == 'telemetry'
105
+ Requires-Dist: opentelemetry-instrumentation-fastapi==0.54b1; extra == 'telemetry'
106
+ Requires-Dist: opentelemetry-instrumentation-google-generativeai>=0.40.7; extra == 'telemetry'
107
+ Requires-Dist: opentelemetry-instrumentation-ollama==0.40.6; extra == 'telemetry'
108
+ Requires-Dist: opentelemetry-instrumentation-openai==0.40.6; extra == 'telemetry'
109
+ Description-Content-Type: text/markdown
110
+
111
+ <p align="center">
112
+ <img src="https://blaxel.ai/logo.png" alt="Blaxel" width=500/>
113
+ </p>
114
+
115
+ # Python SDK
116
+
117
+ **Blaxel is a computing platform for AI agent builders, with all the services and infrastructure to build and deploy agents efficiently.** This repository contains the Python SDK to create and manage resources on Blaxel.
118
+
119
+ ## Table of Contents
120
+
121
+ - [Installation](#installation)
122
+ - [Authentication](#authentication)
123
+ - [Features](#features)
124
+ - [Quickstart](#quickstart)
125
+ - [Contributing](#contributing)
126
+ - [License](#license)
127
+
128
+
129
+
130
+ ## Installation
131
+
132
+ Install Blaxel SDK which lets you manage Blaxel resources.
133
+
134
+ ```bash
135
+ # Base package (core functionality)
136
+ pip install blaxel
137
+
138
+ # With specific modules
139
+ pip install "blaxel[telemetry]"
140
+ pip install "blaxel[core,telemetry,crewai]"
141
+
142
+ # Everything
143
+ pip install "blaxel[all]"
144
+ ```
145
+
146
+ ### Available modules
147
+
148
+ - `blaxel.core` - Core functionality (always available)
149
+ - `blaxel.telemetry` - Telemetry and monitoring
150
+ - `blaxel.crewai` - CrewAI integration
151
+ - `blaxel.openai` - OpenAI integration
152
+ - `blaxel.langgraph` - LangGraph integration
153
+ - `blaxel.livekit` - LiveKit integration
154
+ - `blaxel.llamaindex` - LlamaIndex integration
155
+ - `blaxel.pydantic` - Pydantic AI integration
156
+ - `blaxel.googleadk` - Google ADK integration
157
+
158
+
159
+
160
+ ### Authentication
161
+
162
+ The Blaxel SDK authenticates with your workspace using credentials from these sources, in priority order:
163
+ 1. When running on Blaxel, authentication is handled automatically
164
+ 2. Variables in your .env file (`BL_WORKSPACE` and `BL_API_KEY`, or see [this page](https://docs.blaxel.ai/Agents/Variables-and-secrets) for other authentication options).
165
+ 3. Environment variables from your machine
166
+ 4. Configuration file created locally when you log in through Blaxel CLI (or deploy on Blaxel)
167
+
168
+ When developing locally, the recommended method is to just log in to your workspace with Blaxel CLI. This allows you to run Blaxel SDK functions that will automatically connect to your workspace without additional setup. When you deploy on Blaxel, this connection persists automatically.
169
+
170
+ When running Blaxel SDK from a remote server that is not Blaxel-hosted, we recommend using environment variables as described in the third option above.
171
+
172
+
173
+
174
+ ## Features
175
+ - Agents & MCP servers
176
+ - [Create MCP servers](https://docs.blaxel.ai/Functions/Create-MCP-server)
177
+ - [Connect to MCP servers and model APIs hosted on Blaxel](https://docs.blaxel.ai/Agents/Develop-an-agent-ts)
178
+ - [Call agents from another agent](https://docs.blaxel.ai/Agents/Develop-an-agent-ts#connect-to-another-agent-multi-agent-chaining)
179
+ - [Deploy on Blaxel](https://docs.blaxel.ai/Agents/Deploy-an-agent)
180
+ - Sandboxes
181
+ - [Create and update sandboxes and sandbox previews](https://docs.blaxel.ai/Sandboxes/Overview)
182
+ - [Run filesystem operations and processes on a sandbox](https://docs.blaxel.ai/Sandboxes/Processes)
183
+ - [Use environment variables or secrets](https://docs.blaxel.ai/Agents/Variables-and-secrets)
184
+
185
+
186
+
187
+ ## Quickstart
188
+
189
+ Blaxel CLI gives you a quick way to create new applications: agents, MCP servers, jobs, etc - and deploy them to Blaxel.
190
+
191
+ **Prerequisites**:
192
+ - **Node.js:** v18 or later.
193
+ - **Blaxel CLI:** Make sure you have Blaxel CLI installed. If not, [install it](https://docs.blaxel.ai/cli-reference/introduction):
194
+ ```bash
195
+ curl -fsSL \
196
+ https://raw.githubusercontent.com/blaxel-ai/toolkit/main/install.sh \
197
+ | BINDIR=/usr/local/bin sudo -E sh
198
+ ```
199
+ - **Blaxel login:** Login to Blaxel:
200
+ ```bash
201
+ bl login YOUR-WORKSPACE
202
+ ```
203
+
204
+ ```bash
205
+ bl create-agent-app myfolder
206
+ cd myfolder
207
+ bl deploy
208
+ ```
209
+
210
+ Also available:
211
+ - `bl create-mcp-server`
212
+ - `bl create-job`
213
+
214
+
215
+
216
+ ## Contributing
217
+
218
+ Contributions are welcome! Please feel free to submit a Pull Request.
219
+
220
+
221
+
222
+ ## License
223
+
224
+ This project is licensed under the MIT License - see the LICENSE file for details.