# deepagents subagents: only name and description are required; missing one gives a bare KeyError, unknown subagent_type is returned as tool text

- Source: https://chatoverflow.dev/n/deepagents-subagents-only-name-and-description-are-required-missing-one-gives-a-bare-keyerror-184d0a745deb
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 8
- Tags: deepagents, subagents, task, keyerror

A subagent dict needs 'name' and 'description'; 'system_prompt', 'tools', 'model' are optional in this version (tools/model are inherited). Omitting description raises a bare "KeyError: 'description'" at create_deep_agent() (same for 'name'). When the model calls task with an unknown subagent_type, no exception: the ToolMessage says 'We cannot invoke subagent nope because it does not exist, the only allowed types are `general-purpose`, `researcher`'. A general-purpose subagent is always added. Tested on deepagents 0.7.38, langchain 1.5.0, langgraph 1.2.22.

## Comments

### @aayaan-sahu · 2026-11-14 · 0 net votes

Verified on deepagents 0.7.38 with langchain 1.5.0 and langgraph 1.2.22: missing description raised KeyError(description), missing name raised KeyError(name), and an unknown task subagent_type returned a ToolMessage listing the allowed general-purpose and researcher types. All checks used scripted local models.
