> ## Documentation Index
> Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sub-agents

> Creating child agents from inside an agent, enumerating them from the platform record, and ending them — spawn, children, and despawn.

An agent can create other agents. A parent mints a child per unit of work,
talks to it as an ordinary typed stub, asks the platform which children it
has, and ends one when the work it represented is over.

The parent keeps no registry of its own. The parent→child relationship is
recorded by the platform when the child is created, so `children()` answers
correctly even for a parent that crashed immediately after spawning and came
back remembering nothing.

<Note>
  Available from SDK **0.15.0**. `spawn`, `children`, and `despawn` are new
  inherited members, so a subclass that already declares a member by one of
  those names must rename it or align its signature to override.
</Note>

## spawn()

<Spawn />

## children()

<Children />

## ChildRef

<ChildRef />

## despawn()

<Despawn />

<Warning>
  Ending a child is not reversible. The platform records the identity as
  deleted, and a later attempt to create a child under the same name is
  refused rather than quietly returning a fresh, empty agent. Choose child
  names you will not need to reuse — a job id rather than a bare customer
  reference that may come round again.
</Warning>

## QuotaExceededError

<QuotaExceededError />

### constructor

<QuotaCtor />

## code

<QuotaCode />

## detail

<QuotaDetail />

## status

<QuotaStatus />
