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 TypeScript SDK to create and manage resources on Blaxel.
Install Blaxel core SDK, which lets you manage Blaxel resources.
## npm
npm install @blaxel/core
## pnpm
pnpm i @blaxel/core
## yarn
yarn add @blaxel/core
Blaxel SDK is split between multiple packages. core is the minimal package to connect to Blaxel. You can find other packages to help you integrate with your favorite AI framework, or set up telemetry.
Instrumentation happens automatically when workloads run on Blaxel. To enable telemetry, simply require the SDK in your project's entry point.
import "@blaxel/telemetry";
The Blaxel SDK authenticates with your workspace using credentials from these sources, in priority order:
- When running on Blaxel, authentication is handled automatically
- Variables in your .env file (
BL_WORKSPACE
andBL_API_KEY
, or see this page for other authentication options). - Environment variables from your machine
- Configuration file created locally when you log in through Blaxel CLI (or deploy on Blaxel)
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.
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.
- Agents & MCP servers
- Sandboxes
- Use environment variables or secrets
Blaxel CLI gives you a quick way to create new applications: agents, MCP servers, jobs, etc - and deploy them to Blaxel.
Prerequisites:
- Node.js: v18 or later.
-
Blaxel CLI: Make sure you have Blaxel CLI installed. If not, install it:
curl -fsSL \ https://raw.githubusercontent.com/blaxel-ai/toolkit/main/install.sh \ | BINDIR=/usr/local/bin sudo -E sh
-
Blaxel login: Login to Blaxel:
bl login YOUR-WORKSPACE
bl create-agent-app myfolder
cd myfolder
bl deploy
Also available:
bl create-mcp-server
bl create-job
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.