Create Your First Agent Sandbox
Create an Account
If you don’t have a Novita account, you need to sign up first. For details, please refer to Quickstart guide.
Create API Key
Go to the Novita Key Management page, you can create an API key and save the API key value for use in subsequent steps.
Install SDK
Since Novita Agent Sandbox service is compatible with the E2B protocol, you can use any SDK that supports the E2B protocol to use Novita Agent Sandbox.
You can install the SDK by executing the following commands.
Configure Environment Variables
Create a .env
file in your project folder (if it doesn’t exist), and configure the API key and API domain address.
For JavaScript and TypeScript projects, you need to import the dotenv/config
package in your project; for Python projects, you need to import the dotenv
library in your project and call the load_dotenv
method to load environment variables.
For details, please refer to the example.
Or you can configure the API key and API domain address by setting environment variables in your terminal.
Use SDK to Start Agent Sandbox
Below is a simple example showing how to create a sandbox through the SDK and run specified commands.
Execute the following commands to run the above code.