hanzo_client/models/create_agent_in.rs
1/*
2 * Hanzo Cloud API
3 *
4 * The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
5 *
6 * The version of the OpenAPI document: v1
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct CreateAgentIn {
16 /// ComputeRef optionally binds this bot to a visor machine. Opaque here, bounded at 256 characters, and not resolved — this package stores the reference and the binding's lifecycle belongs elsewhere.
17 #[serde(rename = "computeRef", skip_serializing_if = "Option::is_none")]
18 pub compute_ref: Option<String>,
19 /// Description is the one line published as the description of the `agent_<name>` tool, which is how another agent decides whether to call this one. Optional, and worth writing for exactly that reason.
20 #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
21 pub description: Option<String>,
22 /// ExecutionMode is one-shot or long-running. Empty takes one-shot, which runs only when something POSTs to it. long-running additionally requires Schedule, and counts against a per-org cap that answers 409 when it is full.
23 #[serde(rename = "executionMode", skip_serializing_if = "Option::is_none")]
24 pub execution_mode: Option<String>,
25 /// Instructions is the system prompt, up to 32 KiB, stored verbatim. This is what the model reads; Description is what other CALLERS read.
26 #[serde(rename = "instructions", skip_serializing_if = "Option::is_none")]
27 pub instructions: Option<String>,
28 /// Model names the model to run on. Omit it to take the deployment's configured default; name one and it is checked against the gateway's served catalogue here, so a model this deployment cannot serve is refused now rather than at the first run. Stored under our own name for it, whatever spelling arrives.
29 #[serde(rename = "model", skip_serializing_if = "Option::is_none")]
30 pub model: Option<String>,
31 /// Name is the agent's org-unique handle and the only required field. It must match ^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$, and a name already taken in this org is a 409 rather than an overwrite. It is permanent: no update route moves it.
32 #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
33 pub name: Option<String>,
34 /// Schedule is the 5-field cron a long-running agent fires on, parsed here so a bad expression is a 400 and not an agent that silently never runs. Required with long-running; DISCARDED for one-shot rather than stored unused.
35 #[serde(rename = "schedule", skip_serializing_if = "Option::is_none")]
36 pub schedule: Option<String>,
37 /// ServiceAccountID optionally names the IAM agent service account (<org>-<agent>) a scheduled run should be billed AS, so an autonomous run is attributable to a principal rather than only to the org. Same 256-character bound, also unresolved here.
38 #[serde(rename = "serviceAccountId", skip_serializing_if = "Option::is_none")]
39 pub service_account_id: Option<String>,
40 /// Tools are the tool names this agent may call. Omitted or empty grants NONE — that default is the agent's authority and is not widened anywhere. The single entry \"*\" means whatever the fleet's MCP server serves at the time of each run.
41 #[serde(rename = "tools", skip_serializing_if = "Option::is_none")]
42 pub tools: Option<Vec<String>>,
43}
44
45impl CreateAgentIn {
46 pub fn new() -> CreateAgentIn {
47 CreateAgentIn {
48 compute_ref: None,
49 description: None,
50 execution_mode: None,
51 instructions: None,
52 model: None,
53 name: None,
54 schedule: None,
55 service_account_id: None,
56 tools: None,
57 }
58 }
59}
60