Skip to main content
This guide walks through deploying a real agent end to end: preparing a compliant image, registering it, deploying an instance, calling it, and managing its lifecycle.

Concepts

How it works

When you deploy, Hexel pulls your image, starts it always-on with CPU throttling (idle instances cost almost nothing and wake in milliseconds), and assigns a permanent endpoint based on a hash of the agent and its configuration.

Step 1 — Prepare your image

Your Docker image must implement the agent contract. The platform handles authentication; your code never validates tokens. Listen on the port given by the AGENT_PORT environment variable (default 8080). See Compute → Agents for the full contract and manifest format.

Step 2 — Register the agent

For images in a private registry, provide pull credentials at registration. See Compute → Agents.

Step 3 — Deploy an instance

Deploying an instance is done via the REST API or CLI. The SDK does not have a deploy method on client.compute.instance.
object
Key-value pairs injected as environment variables into the instance. Keep secrets in a secret manager and reference them at runtime.
string
Compute tier for the instance: micro, standard, large, or gpu. Defaults to standard.
The response includes the permanent endpoint and the instance ID:
string
Unique identifier for the deployed instance.
string
Permanent URL in the form https://agent-<name>-<hash>.compute.hexelstudio.com.
string
Initial state, typically deploying.

Step 4 — Call your agent

Step 5 — Manage the lifecycle

Use the SDK or CLI for instance management (list, get, stop, redeploy, delete):
Instances recover automatically if the underlying infrastructure fails, and the endpoint stays the same throughout. See Compute → Instances for instance states and Compute → Scaling to adjust capacity.

Common mistakes

  • Image missing the agent contract. Health checks fail and the instance stays in deploying. Verify /health and the manifest first.
  • Expecting a new URL per deploy. Identical configuration returns the same endpoint by design; change configuration to get a new one.
  • Putting secrets in capabilities or the image. Pass runtime configuration through env and use a secret manager for sensitive values.

Best practices

  • Tag images with explicit versions (:v1, :v2) rather than :latest.
  • Keep a separate environment for staging and production deployments.
  • Use redeploy to roll out revisions so the endpoint stays stable for callers.

Agents

The agent contract and registration options.

Instances

Endpoints, states, and instance management.

Scaling

Adjust capacity for production load.

Orchestration

Coordinate multiple agents with fleets and tasks.

Next steps

Explore Core Concepts to understand how agents, fleets, tasks, and tools fit together, or follow the New User learning path to production readiness.