Eliminar agente
Elimina un agente de forma permanente. Antes de borrar, el CLI carga el agente, muestra su ID, nombre y descripción, y pide confirmación mostrando su nombre.
bash
01plazbot agent delete <agentId> [options]
Parámetros
| Parámetro | Flag | Requerido | Descripción |
|---|---|---|---|
agentId | (posicional) | Sí | ID del agente a eliminar. |
| JSON | --json | No | Imprime el resultado como JSON ({"id","name","deleted"}). Por defecto: false. |
| Confirmar | -y, --yes | No | Omite la confirmación (scripts y CI). Alias: --confirm. Por defecto: false. |
Ejemplos
bash
01# Eliminar un agente (pide confirmación)02plazbot agent delete age_AbcDef1230304# Eliminar sin preguntar (scripts y CI)05plazbot agent delete age_AbcDef123 --yes0607# Eliminar y obtener el resultado en JSON08plazbot agent delete age_AbcDef123 --yes --json
Resultado
text
01 You are about to delete the following agent:02 ID: age_AbcDef12303 Name: Sales Plazbot04 Description: Asistente virtual de ventas0506? Delete agent "Sales Plazbot" (age_AbcDef123)? This cannot be undone. (y/N) y07✔ Agent "Sales Plazbot" deleted
Si respondes que no, se imprime Aborted. y el comando termina con código 1.
Salida JSON
json
01{02 "id": "age_AbcDef123",03 "name": "Sales Plazbot",04 "deleted": true05}
La eliminación no se puede deshacer. Si podrías necesitar el agente otra vez, expórtalo antes: plazbot agent export age_AbcDef123 -o agent.json (ver export).
Errores comunes
| Mensaje | Causa | Solución |
|---|---|---|
This action needs confirmation and there is no interactive terminal. | Se ejecutó sin terminal (CI, pipes) o con --json y sin --yes. | Agrega --yes. |
Resource not found. | El ID no existe en el workspace activo. | Revisa el ID con plazbot agent list. |
You are not signed in. | No hay sesión activa. | Ejecuta plazbot login. |