Quickstart
Welcome there! 👋 Make sure you have created an account on Blaxel (here → https://app.blaxel.ai), and created a first workspace (you’ll need the workspace ID).1
Install Blaxel CLI
Install on Mac
Install on Mac
To install Blaxel CLI, you must use Homebrew: make sure it is installed on your machine. We are currently in the process of supporting additional installers. Check out the cURL method down below for general installation.
Install on Linux
Install on Linux
Install Blaxel CLI by running the following command in a terminal (non-sudo alternatives below):If you need a non-sudo alternative (it will ask you questions to configure):If you need to install a specific version (e.g. v0.1.21):
Install with cURL
Install with cURL
Install Blaxel CLI by running the following command in a terminal (non-sudo alternatives below):If you need a non-sudo alternative (it will ask you questions to configure):If you need to install a specific version (e.g. v0.1.21):
Install on Windows
Install on Windows
For the most reliable solution, we recommend adapting the aforementioned Linux commands by using Windows Subsystem for Linux.First install WSL (Windows Subsystem for Linux) if not already installed. This can be done by:
- Opening PowerShell as Administrator
- Running:
wsl --install -d Ubuntu-20.04
- Restarting the computer
- From the Microsoft Store, install the Ubuntu app
- Run the command line using the aforementioned Linux installation process. Make sure to install using sudo.
2
Login
Login to Blaxel via the CLI.
Login to Blaxel via the CLI.
Open a terminal and login to Blaxel using this command:
Learn more about authentication on Blaxel
Learn more about authentication on Blaxel
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)
3
Create your first resource
Blaxel is the ultimate toolkit for AI agent builders. Our flagship product is the Sandbox, though you can also run the rest of your agentic workloads on our cloud.
Or deploy another type of resource:
Create a sandbox
Create a sandbox
Sandboxes can be created programmatically using Blaxel SDK. Install the SDK:Create your first sandbox:
Learn how to manage sandboxes
Read the complete guide for creating & connecting to sandboxes using Blaxel SDK.
Deploy an agent, batch job or MCP server
Deploy an agent, batch job or MCP server
Deploy your agent’s components on a purpose-built computing infrastructure for agentics.
Let’s initialize a first app. The following command initializes a new pre-scaffolded local repository ready for developing and deploying your agent on Blaxel.You can now develop your agent application using any framework you want (or none), and use the Blaxel SDK to leverage other Blaxel deployments. A placeholder HTTP API server is already preconfigured in
Let’s initialize a first batch job definition. The following command initializes a new pre-scaffolded local repository ready for developing and deploying your job on Blaxel.You can now develop your job and use the Blaxel SDK to leverage other Blaxel deployments in
You can quickly initialize a new MCP server from scratch by using CLI command You can now develop your MCP server using the Blaxel SDK in
1
Create the resource
Create an agent app
Create an agent app
In Python, you will need to have pip installed; in TypeScript, you will need to have npm installed for this.
/src/main.py
or /src/main.ts
.Create a batch job
Create a batch job
In Python, you will need to have pip installed; in TypeScript, you will need to have npm installed for this.
/src/index.py
or /src/index.ts
.Create an MCP server
Create an MCP server
In Python, you will need to have pip installed; in TypeScript, you will need to have npm installed for this.
bl new
. This initializes a new pre-scaffolded local repo where your entire code can be added./src/server.py
or /src/server.ts
.2
Test and deploy your workload
Run the following command to serve your workload locally, replacing
To push to Blaxel, run the following command. Blaxel will handle the build and deployment:Your workload is made available as a serverless auto scalable global endpoint 🌎 .
<<DIRECTORY-NAME>>
with the name of the workload’s root directory:Agent: send a test invocation
Agent: send a test invocation
Query your agent locally by making a POST request to this endpoint:
http://localhost:1338
with the following payload format: {"inputs": "Hello world!"}
:Job: execute the job locally
Job: execute the job locally
Execute your job locally by making a POST request to this endpoint:
http://localhost:1338
with the following payload format: {"tasks": [{"param1": "value1"}]}
MCP server: test the server
MCP server: test the server
You can test it by running the following command which launches both the MCP server and a web application to query it (MCP Inspector, managed by MCP) locally.The web application is accessible at: http://127.0.0.1:6274. Alternatively, you can just simply serve the server locally by running
bl serve --hotreload
.3
Query your deployment
Agent: send an invocation request
Agent: send an invocation request
Run an inference from a terminal with the following command:This gives you a chat-like interface where you can interact with your agent. To use this when serving locally, just add option
--local
.Alternatively, just call the global endpoint.Job: execute the job
Job: execute the job
Trigger an execution of your batch job from a terminal by running:Alternatively, just call the global endpoint.
MCP server: test the server
MCP server: test the server
When you deploy an MCP server on Blaxel, a WebSocket endpoint is generated on Global Agentics Network to connect to the server.The server endpoint looks like this:Read more about how to connect to the server here.
Connect to an MCP server
Next steps
You are ready to run AI with Blaxel! Here’s a curated list of guides which may be helpful for you to make the most of Blaxel, but feel free to explore the product on your own!Create agentic code sandboxes
Complete guide for spawning sandboxed VMs for your agents to access.
Schedule and execute batch tasks
Complete guide for creating and running batch jobs from your agents.
Host serverless agents
Complete guide for deploying AI agents on Blaxel.
Enforce policies
Complete guide for managing deployment and routing policies on the Global Agentics Network.