Create decide
Approves or rejects a proposed role candidate.
POST /v1/agent/proposals/{id}/decide
| Address | https://api.hanzo.ai/v1/agent/proposals/{id}/decide |
| Method | POST |
| Operation | post_agent_proposals_by_id_decide |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Approves or rejects a proposed role candidate. Approving a proposal creates the specialist agent under its reporting line once (and is idempotent on repeated approval); rejecting records the rejection without creating an agent.
Request
4 fields, body application/json (required).
| Field | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | ID is the proposal handle (prop_...) from the URL path. |
decision | body | string | — | Decision is the operator's verdict: "approve" (creates the agent role once) or "reject" (records rejection without creating an agent). |
id | body | string | — | ID is the proposal handle (prop_...) from the URL path. |
reason | body | string | — | Reason is an optional operator note explaining the approval or rejection. |
Response
| Status | Body | Meaning |
|---|---|---|
200 | agent.RoleProposal | ok |
default | problem-details | refused |
200 body — 20 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
agentId | body | string | — | AgentID is the created agent's handle (agent_...) once the proposal has been approved; empty when pending or rejected. |
cap_micro_usd | body | integer (int64) | — | CapMicroUSD is the period budget cap in integer micro-USD that will be set on the created agent. |
createdAt | body | integer (int64) | — | CreatedAt is when the proposal was generated, as Unix seconds. |
decidedAt | body | integer (int64) | — | DecidedAt is when the proposal was approved or rejected, as Unix seconds. |
decidedBy | body | string | — | DecidedBy records the subject who approved or rejected the proposal. |
decisionReason | body | string | — | DecisionReason records the operator's note when approving or rejecting. |
estimatedMicroUsd | body | integer (int64) | — | EstimatedMicroUSD is the estimated monthly spend for this role in integer micro-USD. |
examples | body | string[] | — | Examples are the concrete failed runs, unsupported claims, or review bottlenecks backing the proposal. |
function | body | string | — | Function is the studio function this role candidate belongs to. |
id | body | string | — | ID is the stable proposal identifier (prop_...). |
instructions | body | string | — | Instructions is the system prompt that will govern the proposed role. |
max_task_micro_usd | body | integer (int64) | — | MaxTaskMicroUSD is the single-run budget ceiling in integer micro-USD that will be set on the created agent. |
name | body | string | — | Name is the org-unique agent handle that will be created if the proposal is approved. |
period | body | string | — | Period is the budget reset window: day, week, or month. |
rationale | body | string | — | Rationale explains why the nightly review proposed this role candidate. |
reportingLine | body | string | — | ReportingLine is the manager agent handle (parent) the proposed role reports to. |
status | body | string | — | Status is the proposal's decision state: pending, approved, or rejected. |
title | body | string | — | Title is the human-readable title of the proposed role. |
tools | body | string[] | — | Tools are the MCP tool names the proposed role will be granted. |
venture | body | string | — | Venture is the venture slug the role candidate is proposed for. |
Failure carries the platform error shape — see Errors.
Examples
hanzo agent proposals decide <id>import { Configuration, AgentApi } from 'hanzoai';
const api = new AgentApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.postAgentProposalsByIdDecide({ id: 'id', decision: "<decision>", id: "<id>" });from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import AgentApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = AgentApi(client).post_agent_proposals_by_id_decide(id='id', decision="<decision>", id="<id>")cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)
resp, _, err := client.AgentAPI.PostAgentProposalsByIdDecide(context.Background()).Execute()
if err != nil {
return err
}use hanzo_client::apis::{configuration::Configuration, agent_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = agent_api::post_agent_proposals_by_id_decide(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.AgentApi;
ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));
var result = new AgentApi(client).postAgentProposalsByIdDecide();The method above is the one at the current release of the document. [email protected] (npm) and [email protected] (PyPI) were generated from an earlier release, where this operation carried a different id, so it spells the method differently — regenerating the clients is what makes the two agree. SDKs →
curl -X POST https://api.hanzo.ai/v1/agent/proposals/<id>/decide \
-H "Authorization: Bearer $HANZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"decision": "<decision>",
"id": "<id>"
}'MCP reaches agent through the agent tool, which names its 51 operations with its own verbs — this one among them, under a name only MCP declares. describe explains any of them:
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "describe",
"arguments": {
"op": "list_agents"
}
}
}'