OpenapiVisor
Returns one of the caller org's bot machines with its agent binding.
Returns one of the caller org's bot machines with its agent binding.
GET /v1/visor/compute/bots/{id}
| Address | https://api.hanzo.ai/v1/visor/compute/bots/{id} |
| Method | GET |
| Operation | getBot |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Returns one of the caller org's bot machines with its agent binding.
A machine counts as a Bot if it carries the hanzo-kind:bot tag OR has an agent binding — either signal is authoritative, so a bot resolves even before its cloud-init has stamped every tag. A machine that is neither is 404: this route answers for bots, not for machines.
Request
1 field.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | ID is the bot machine's id — the same id the machines surface addresses it by. |
Response
| Status | Body | Meaning |
|---|---|---|
200 | botView | ok |
200 body — 28 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
agent | body | string | — | Agent is the cloud Agent this machine runs, lifted out of the binding so a list of bots reads without following one. |
binding | body | agentBinding | — | |
binding.agentName | body | string | — | AgentName is the cloud Agent (/v1/agents) this machine runs — the agent a message to the bot is actually run against. |
binding.botVersion | body | string | — | BotVersion pins the @hanzo/bot runtime version the machine runs. |
binding.createdTime | body | string | — | CreatedTime is when the binding was first made. |
binding.machineId | body | string | — | MachineId is the bound machine as vm addresses it, owner-qualified ("<org>/<machine>"). |
binding.message | body | string | — | 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… |
binding.name | body | string | — | 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. |
binding.org | body | string | — | Org is the Hanzo tenant the binding belongs to. |
binding.owner | body | string | — | 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. |
binding.provider | body | string | — | 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. |
binding.publicIp | body | string | — | PublicIp is the bound machine's public address as vm recorded it on the binding. |
binding.status | body | string | — | 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… |
binding.updatedTime | body | string | — | UpdatedTime is when vm last reconciled it — the age of Status. |
createdTime | body | string | — | |
gpu | body | string | — | |
id | body | string | — | |
image | body | string | — | |
mem | body | string | — | |
name | body | string | — | |
os | body | string | — | |
privateIp | body | string | — | |
provider | body | string | — | |
publicIp | body | string | — | |
region | body | string | — | |
status | body | string | — | |
type | body | string | — | |
vcpu | body | integer | — |
Failure carries the platform error shape — see Errors.
Examples
hanzo has no subcommand for this operation — the CLI serves only what cloud's live route table confirms. Use HTTP or an SDK.
import { Configuration, VisorApi } from 'hanzoai';
const api = new VisorApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getBot({ id: 'id' });from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import VisorApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = VisorApi(client).get_bot(id='id')cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.VisorAPI.GetBot(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, visor_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = visor_api::get_bot(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.VisorApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new VisorApi(client).getBot();curl https://api.hanzo.ai/v1/visor/compute/bots/<id> \
-H "Authorization: Bearer $HANZO_API_KEY"Tool visor, op getBot — 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": "visor",
"arguments": {
"op": "getBot",
"input": {
"id": "<id>"
}
}
}
}'How is this guide?