Skip to content
中文

Release agent phone

Code Mode: praxis.agent.agents.phone.release

HTTP: POST /agent/v1/agents/{agent_id}/phone/release

Ask for the agent’s cloud phone to go, and answer its state afterwards. The phone is not killed here: its app state is packed first (state archiving), then the instance is killed and the row cleared, so the state answers releasing until that sweep finishes and the next use builds a fresh instance and restores the archive. The configuration is never deleted — the phone block stays and turning the phone off is agents.update with phone null, a different door. With no phone configured, or one that was never built (state none), the call changes nothing and answers none, so it is safe to repeat; repeating it while a release is pending is idempotent. A BYOD phone (the organization’s own device) is not the platform’s to kill, so the call changes nothing and answers online or offline. Only a general or assume agent may have a phone: a service agent, an agent of another organization and a missing agent all answer 404 AGENT_NOT_FOUND. This operation is for people and their tools — the model cannot call it.

Signature

praxis.agent.agents.phone.release(args:{path:{agent_id:string}}):Promise<{/** Object type, always agent_phone. */ object:"agent_phone";/** The agent's public id (agent_…), the agent this phone belongs to. */ agent_id:string;/** Whether this agent has a phone configured at all. */ configured:boolean;/** What the phone is doing now. */ state:"none"|"starting"|"booting"|"restoring"|"running"|"archiving"|"releasing"|"online"|"offline";/** The sandbox SKU a cloud phone is built from (for example android-2c4g), or null when no phone is configured. */ sku:string|null;/** A BYOD phone's device id (byd_…), or null for a cloud phone. */ byod_device:string|null;/** What people and the model call this phone, or null when no phone is configured. */ name:string|null;/** The public sandbox id of the running instance, or null when there is no instance. */ sandbox_id:string|null;/** When the current instance's lease runs out, in RFC 3339; the sandbox kills the phone then. */ lease_ends_at:string|null;/** When the app state was last packed for this phone, in RFC 3339; null when it never was. */ archived_at:string|null;/** Why the last app-state archive failed, or null. */ archive_error:string|null}>;

Parameters

NameInTypeRequiredDescription
agent_idpathstringyesAgent id from agent creation or listing, the eight character identity number or the handle. A service agent never has a phone and answers not found. Also accepts an 8-character identity number (0–9, A–Z); malformed, absent and foreign references return 404, and response ids always use agent_….

Responses

StatusContent typesDescription
200application/jsonThe phone with the release recorded: state releasing, or none when there was nothing to release.
400INVALID_PARAMS: the agent_id is missing or malformed.
401application/jsonUNAUTHENTICATED (or INVALID_API_KEY, API_KEY_DISABLED, API_KEY_EXPIRED, INVALID_API_TOKEN, API_TOKEN_EXPIRED, API_TOKEN_REVOKED): the API key is missing, invalid or revoked. Send a valid key as X-API-Key or as a Bearer token.
403application/jsonpermission_error: the credential’s role or bound resources do not allow this operation. Use a key with access to the agent domain and its resources.
404AGENT_NOT_FOUND: no agent with this reference belongs to your organization, this credential cannot see it, or it is a service agent (which never has a phone).
502Agent service failed
503Agent service unavailable