Documentation Index
Fetch the complete documentation index at: https://hexelstudio.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Initialize
import { Hexel } from "hexel-sdk";
const client = new Hexel({ apiKey: "your_api_key" });
Execute Code in a Sandbox
const sandbox = await client.compute.sandbox.create({ tier: "standard" });
// Execute code
const result = await client.compute.sandbox.execute(sandbox.vm_id, {
code: "print('Hello from Hexel!')",
language: "python",
});
// Release
await client.compute.sandbox.release(sandbox.vm_id, { recycle: true });
Deploy and Call an Agent
const agent = await client.compute.agent.register({
name: "my-agent",
image: "ghcr.io/org/agent:v1",
capabilities: ["chat"],
});
const instance = await client.compute.instance.deploy(agent.id);
console.log(`Endpoint: ${instance.endpoint}`);
Full Reference
| Client | Methods |
|---|
client.compute.sandbox | create, list, get, execute, renew, release, delete |
client.compute.agent | register, list, get, update, delete, search |
client.compute.instance | deploy, list, get, stop, redeploy, delete |