# remove()

Canonical URL: https://developers.iagenify.com/sdk/ref/agents/subagents/remove/
Language: en

`api.agents.subagents.remove(name) → Promise<{ ok: true }>`

Removes a subagent from the account. One that exists only on a disk is refused, with its path.

Status: the account only · item_on_computer · may remove task

```javascript
await api.agents.subagents.remove("explore");   // { ok: true }
```

## Removing the last one removes a tool {#last}

> **With an empty library there is no task tool**
>
> The agent loses the ability to delegate, and the « Subagents » section leaves the system prompt. Nothing fails — but a run that used to fan out now does everything itself, which is slower and uses more of its own context.

## A computer subagent is refused {#on-disk}

`item_on_computer`, naming the folder. The API cannot touch that file, and reporting a deletion that did not happen would be worse.

## Removing the account's copy reveals the disk's {#shadowed}

If both existed, the computer's comes back into the list.

## Errors {#errors}

| Code | Status | When |
| --- | --- | --- |
| item_on_computer | 409 | It exists only on this computer. |
| not_found | 404 | In neither source. |

- [save()](/sdk/ref/agents/subagents/save): Putting one back.
- [task](/sdk/agent/tools/task): What depends on this library.

```python
api.agents.subagents.remove("explore")   # {"ok": True}
```
