TypeError: 'NoneType' when subagents is None in create_deep_agent #6

Closed
opened 2026-02-16 08:19:23 -05:00 by yindo · 2 comments
Owner

Originally created by @AyMENSARhane on GitHub (Jul 31, 2025).

When calling create_deep_agent() without explicitly passing a subagents argument , the function fails with a TypeError because subagents defaults to None , and _create_task_tool tries to iterate it over it directly

Originally created by @AyMENSARhane on GitHub (Jul 31, 2025). When calling create_deep_agent() without explicitly passing a subagents argument , the function fails with a TypeError because subagents defaults to None , and _create_task_tool tries to iterate it over it directly
yindo closed this issue 2026-02-16 08:19:23 -05:00
Author
Owner

@MatteoGentili commented on GitHub (Jul 31, 2025):

it worked on my side using this code bellow, isntanciate empty list for the subagents

agent = create_deep_agent(
[internet_search],
research_instructions,
subagents=[])

@MatteoGentili commented on GitHub (Jul 31, 2025): it worked on my side using this code bellow, isntanciate empty list for the subagents agent = create_deep_agent( [internet_search], research_instructions, subagents=[])
Author
Owner

@hwchase17 commented on GitHub (Jul 31, 2025):

sorry, silly bug, fixed

@hwchase17 commented on GitHub (Jul 31, 2025): sorry, silly bug, fixed
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/deepagents#6