Ir al contenido

Actualizar los campos editables de un agente (por ahora: display_name).

PATCH/api/public/v1/agents/{agent_id}

Ventana de terminal
curl --fail-with-body -X PATCH 'https://app.openlatch.ai/api/public/v1/agents/<agent_id>' \
-H "Authorization: Bearer $OPENLATCH_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"display_name":"release-bot"}'
Rol en la organizaciónEste punto de conexión
ownerPermitido
adminPermitido
editorPermitido
viewerNo permitido

Una clave tiene el rol que su propietario ocupa en la organización. Consulte Autenticación.

Ámbito de la clave de API: agents:write

ParámetroTipoDescripción
agent_idstringObligatorio.
ParámetroTipoDescripción
Idempotency-Keystring or nullOptional. Makes the request safe to retry: the same key and the same request, within 24 hours, returns the stored response with Idempotent-Replayed: true and runs once.
CampoTipoDescripción
categorystring or null
display_namestring or null
environmentstring — one of production, staging, development, unknown or null
CampoTipoDescripción
action_mixobjectDomain / file / command action counts rolled up from the agent_action_* tables, scoped to the window supplied by the caller (defaults to 24h). Zero across the board means no actionable events were extracted in the window.
action_mix.commandsinteger
action_mix.domainsinteger
action_mix.filesinteger
agent_idstringObligatorio.
assigned_zone_idstring or nullThe zone governing this agent: its manual pin, else the one the resolver gives it.
assigned_zone_labelstring or nullThe assigned zone's org-unit name — the label every zone surface shows.
assigned_zone_unit_idstring or nullThe org unit the assigned zone hangs off.
assignment_sourcestring — one of auto, manualmanual — pinned to a zone by hand; auto — the resolver decides.
budget_sourcestringWhich scope produced budget_usd: agent | subscription_default | org_default | none.
budget_usdstring or nullThe resolved monthly budget - this agent's own row, else the default of the declared subscription that makes it Sanctioned, else the org default. Null when none is set.
capabilitiesobject or nullWhat the agent's binding can do (prompt, show a notice, observe execution, which tools its refusals reach), as the install reported it. null before the install's first v3 bundle request: unknown, never a limit (AZ-4 handoff gap 1).
capabilities.askbooleanObligatorio. Can show its own prompt to the developer.
capabilities.enforcesstringObligatorio. all, or shell_only: which tools its refusals actually reach.
capabilities.noticebooleanObligatorio. Can show a non-blocking message.
capabilities.observes_executionbooleanObligatorio. Emits a post-execution event, so an answer can be inferred.
categorystring or nullOpen category string; known values coding | analysis | ops | content | service.
control_levelstringenforced (fetched a bundle in the last 24h — evaluating policy locally) | monitored (sent events, no bundle — we see it and cannot stop it) | known (neither). Derived per request, never stored.
display_namestring or null
environmentstringFrozen Environment — production | staging | development | unknown.
first_seen_atstring (date-time)Obligatorio.
functionstring or nullBusiness function (frozen enum; wire name for the ORM's business_function). 'unknown' = not yet classified; null while the resolver has not yet run.
host_idstring or null
instance_qualifierobject or nullWhat tells this agent apart from the other agents of its platform on its host, shown beside the name and never inside it; null for a host's first OS user in their default profile.
instance_qualifier.os_userstring or nullThe OS user captured on a later user's agent; null for a host's first user, when identity capture is off, when nothing was captured, or on a zone's agent rows for a key without agents:read.
instance_qualifier.profile_suffixstring or nullThe first 4 characters of the instance's profile part; null for a default profile.
instance_qualifier.user_suffixstring or nullThe first 4 characters of the instance's user part; null for a host's first user.
last_seen_atstring (date-time)Obligatorio. When the agent last sent activity. For an agent that has never been active (found by discovery, never run since), this is first_seen_at and never_active is true.
latest_agent_versionstring or null
latest_archstring or null
latest_client_versionstring or null
latest_hook_versionstring or null
latest_local_ipv4string or null
latest_local_ipv6string or null
latest_osstring or null
latest_public_ipv4string or null
latest_public_ipv6string or null
mtd_consumption_usdstring or nullMonth-to-date consumption for this agent (pricebook-weighted cost_total, every billing mode). What the budget is measured against. Null when the surface did not compute it; 0 means the agent really has not spent.
never_activebooleanTrue when the agent has never sent any activity (found by discovery and not run since): last_seen_at then repeats first_seen_at and is not a sighting of activity.
org_unit_pathstring or nullSlash-joined path of the agent's placement unit: the human owner's unit, else the service-accountable person's unit, else the service-accountable unit. Null when none applies.
owner_display_namestring or nullThe owner person's display name; null when there is no (or an orphaned) owner person.
owner_kindstring or nullOwnership verdict: human | service | unattributed; null while the resolver has not yet run.
owner_person_idstring or nullThe resolved human owner's directory_people id — the value the owner filter of GET /agents takes (it cannot filter by display name). Null for service / unattributed / resolving.
owner_statusstring or nullThe owner person's directory status (active | inactive); null when there is no owner person.
platformstringObligatorio.
proxy_as_ofstring (date-time) or nullTimestamp of the latest event that actually CARRIED the proxy attributes — not of the latest event overall, so a stale shape is never reported as freshly confirmed. Null until the first carrying event.
proxy_sourcestring or nullHow the client found that route: manual | env | windows | macos | gnome | pac | wpad. Null under the same conditions as proxy_type. Open string, same reason.
proxy_tls_interceptedboolean or nullWhether the client observed the proxy terminating and re-issuing TLS. Null is NOT false: null = never observed (the client omits the attribute until a TLS handshake has actually completed), false = observed and clean.
proxy_typestring or nullEgress proxy type last reported by this agent's client: http | https | socks5 | pac. Null = the agent egresses direct, or never reported one. Open string: the client owns the vocabulary, so an unknown value is stored and returned verbatim rather than rejected.
sessions_countintegerDistinct session count for this agent over the same rolling window as action_mix (defaults to 24h): how many sessions blend into one agent identity, without a per-agent sessions call. Zero means no sessions were active in the window.
stalebooleanThis install's latest compatibility evidence (I-15 plan 02) does not intersect what the platform currently retains. NOT a fourth control level: a stale agent keeps whatever level its last bundle earned it, because 'we stopped serving it' and 'it is not under control' are different facts.
total_events_lifetimeintegerLifetime event count for this agent — sum of event_stats_daily.event_count across every day, never zero-floored to a 24h window. Gives an accurate count for agents idle longer than 24h, for which verdicts_24h shows 0 even when the agent has many events in older sessions.
used_pctnumber or nullmtd_consumption_usd as a percent of budget_usd. Null when there is no budget. A zero budget reports 100 when nothing was spent and 999 otherwise.
verdicts_24hobjectVerdict counts over the last 24h. Zero if no activity.
verdicts_24h.allowintegerActions the policy allowed
verdicts_24h.askintegerActions the policy sent to Ask
verdicts_24h.blockintegerActions the policy blocked
verdicts_24h.totalintegerTotal events in the 24h window
window_consumption_usdstring or nullConsumption for this agent over the request's window (pricebook-weighted cost_total, every billing mode) — the figure the fleet tile prints. Never compare it to budget_usd: a budget is a calendar month. Null when the surface did not compute it; 0 means the agent really has not spent in the window.
{
"action_mix": {
"commands": 0,
"domains": 0,
"files": 0
},
"agent_id": "agt_01jbwa2k1vfrn9y42xhgxhmzj2",
"assigned_zone_id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10",
"assigned_zone_label": "string",
"assigned_zone_unit_id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10",
"assignment_source": "auto",
"budget_source": "none",
"budget_usd": "string",
"capabilities": {
"ask": false,
"enforces": "string",
"notice": false,
"observes_execution": false
},
"category": "string",
"control_level": "known",
"display_name": "release-bot",
"environment": "production",
"first_seen_at": "2026-01-15T14:32:05Z",
"function": "string",
"host_id": "hst_01jbwa2k1vfrn9y42xhgxhmzj2",
"instance_qualifier": {
"os_user": "string",
"profile_suffix": "string",
"user_suffix": "string"
},
"last_seen_at": "2026-01-15T14:32:05Z",
"latest_agent_version": "string",
"latest_arch": "string",
"latest_client_version": "string",
"latest_hook_version": "string",
"latest_local_ipv4": "string",
"latest_local_ipv6": "string",
"latest_os": "string",
"latest_public_ipv4": "string",
"latest_public_ipv6": "string",
"mtd_consumption_usd": "string",
"never_active": false,
"org_unit_path": "Engineering / Platform",
"owner_display_name": "release-bot",
"owner_kind": "string",
"owner_person_id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10",
"owner_status": "string",
"platform": "string",
"proxy_as_of": "2026-01-15T14:32:05Z",
"proxy_source": "string",
"proxy_tls_intercepted": false,
"proxy_type": "string",
"sessions_count": 0,
"stale": false,
"total_events_lifetime": 0,
"used_pct": 0.25,
"verdicts_24h": {
"allow": 0,
"ask": 0,
"block": 0,
"total": 0
},
"window_consumption_usd": "string"
}