Skip to main content

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.

Prerequisites

You need a Hexel Studio account and an API key. Create both at console.hexelstudio.com. Generate an API key under IAM → Service Users → Create API Key.

Install

pip install hexel

Run code in a sandbox

Sandboxes are isolated environments allocated instantly.
from hexel import Hexel

client = Hexel(api_key="your_api_key")

sandbox = client.compute.sandbox.create(tier="standard")
print(sandbox["vm_id"])

client.compute.sandbox.execute(
    sandbox["vm_id"],
    code="print('Hello from Hexel')",
    language="python"
)

client.compute.sandbox.release(sandbox["vm_id"])

Deploy an agent

Register a Docker image and deploy it with a permanent endpoint.
from hexel import Hexel

client = Hexel(api_key="your_api_key")

agent = client.compute.agent.register(
    name="my-agent",
    image="ghcr.io/your-org/agent:v1",
    capabilities=["chat", "streaming"],
)

instance = client.compute.instance.deploy(
    agent["id"],
    env={"MODEL": "gpt-4"}
)

print(instance["endpoint"])
# https://zeal-isle-a620.compute.hexelstudio.com
Your agent is live at a permanent URL. Same configuration always produces the same endpoint.

Call your agent

curl -N https://zeal-isle-a620.compute.hexelstudio.com/stream \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"query": "Hello"}'

Next steps

Sandboxes

Isolated execution environments.

Agents

Register and manage agent images.

Instances

Deploy with permanent endpoints.