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

# Subagent Stop Input • AI Agent SDK

> SubagentStopInput: Input for SUBAGENT_STOP hooks (a spawned subagent reached a terminal state).

# SubagentStopInput

> Defined in the [**events**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/events.md) module.

AI Agent

Input for SUBAGENT\_STOP hooks (a spawned subagent reached a terminal state).

Emitted from the single completion chokepoint in
`tools/subagent_tool.py`, so it covers every path: synchronous spawns,
`background=True` jobs, resolver-routed named agents, generic factory
spawns, and failures. `success` is False (with `error` populated) when
the subagent raised.

`agent_name` on the base :class:`HookInput` carries the subagent name.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#8B0000', 'primaryTextColor': '#fff', 'primaryBorderColor': '#710101', 'lineColor': '#189AB4', 'secondaryColor': '#189AB4', 'tertiaryColor': '#fff' }}}%%

graph LR
    input["Input Data"] --> agent["Agent: SubagentStopInput"]
    agent --> output["Output Result"]
    style agent fill:#8B0000,color:#fff
    style input fill:#8B0000,color:#fff
    style output fill:#8B0000,color:#fff
```

## Properties

**task** `str`

No description available.

**success** `bool`

No description available.

**output** `Any`

No description available.

**error** `Optional[str]`

No description available.

**llm** `Optional[str]`

No description available.

**permission\_mode** `Optional[str]`

No description available.

**depth** `int`

No description available.

**duration\_ms** `float`

No description available.

> **Internal & Generic Methods**
>
> * **to\_dict**: Generic utility method.

## Source

> **[View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/hooks/events.py#L614)**
>
> `praisonaiagents/hooks/events.py` at line 614

***

## Related Documentation

> **[Agents Concept](https://praison.ai/docs/docs/concepts/agents)**

> **[Single Agent Guide](https://praison.ai/docs/docs/guides/single-agent)**

> **[Multi-Agent Guide](https://praison.ai/docs/docs/guides/multi-agent)**

> **[Agent Configuration](https://praison.ai/docs/docs/configuration/agent-config)**

> **[Auto Agents](https://praison.ai/docs/docs/features/autoagents)**


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.