List agents

Returns every agent↔machine binding in the caller's org — which machines are running which cloud Agent, with vm's own reconciled status.

GET /v1/compute/machines/agents

Addresshttps://api.hanzo.ai/v1/compute/machines/agents
MethodGET
OperationlistMachineAgents
AuthAuthorization: Bearer $HANZO_API_KEY

Returns every agent↔machine binding in the caller's org — which machines are running which cloud Agent, with vm's own reconciled status.

Request

GET /v1/compute/machines/agents takes no parameters and no body — the credential is the whole request.

Response

StatusBodyMeaning
200compute.bindingListok
defaultproblem-detailsrefused

200 body — 13 fields.

FieldInTypeAlwaysDescription
agentBindingsbodycompute.agentBinding[]—AgentBindings is one row per bound machine, emitted verbatim as vm reports it.
agentBindings[].agentNamebodystring—AgentName is the cloud Agent (/v1/agent) this machine runs — the agent a message to the bot is actually run against.
agentBindings[].botVersionbodystring—BotVersion pins the @hanzo/bot runtime version the machine runs.
agentBindings[].createdTimebodystring—CreatedTime is when the binding was first made.
agentBindings[].machineIdbodystring—MachineId is the bound machine as vm addresses it, owner-qualified ("<org>/<machine>").
agentBindings[].messagebodystring—Message is vm's human-readable detail on Status ("machine provisioning; @hanzo/bot runtime not yet confirmed") — the reason behind the state, not a second state.
agentBindings[].namebodystring—Name is the binding's own key, which is the machine's id: a machine hosts at most one agent, so the binding is named for it.
agentBindings[].orgbodystring—Org is the Hanzo tenant the binding belongs to.
agentBindings[].ownerbodystring—Owner is the tenant vm filed the binding under, resolved from the ?owner it was called with — which is the caller's validated org and never a body field.
agentBindings[].providerbodystring—Provider is the cloud the bound machine runs on, carried here so a bindings list says where each bot lives without a second read per machine.
agentBindings[].publicIpbodystring—PublicIp is the bound machine's public address as vm recorded it on the binding.
agentBindings[].statusbodystring—Status is the binding's lifecycle in VM's OWN words — "Pending" while the machine provisions and the runtime is unconfirmed, "running" once vm has confirmed it.
agentBindings[].updatedTimebodystring—UpdatedTime is when vm last reconciled it — the age of Status.

Failure carries the platform error shape — see Errors.

Examples

hanzo compute machines agents
import { Configuration, ComputeApi } from 'hanzoai';

const api = new ComputeApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.listMachineAgents();
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import ComputeApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = ComputeApi(client).list_machine_agents()
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.ComputeAPI.ListMachineAgents(context.Background()).Execute()
if err != nil {
	return err
}
use hanzo_client::apis::{configuration::Configuration, compute_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = compute_api::list_machine_agents(&cfg, Default::default()).await?;
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.ComputeApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new ComputeApi(client).listMachineAgents();
curl https://api.hanzo.ai/v1/compute/machines/agents \
  -H "Authorization: Bearer $HANZO_API_KEY"

Tool compute, op listMachineAgents — POST the JSON-RPC envelope to https://api.hanzo.ai/v1/mcp.

curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "compute",
         "arguments": {
           "op": "listMachineAgents",
           "input": {}
         }
       }
     }'

Compute API · All Hanzo APIs · Interactive reference

Was this page useful?