iCreatAI News
Skip to content
Trending storyWatching

Building an AI Agent from Scratch series adds a sub-agent mechanism

1 reports1 sources2 days agoUpdated

Understand this story

AI overview

Author ruxudev has added an optional agent and sub-agent mechanism to the "Building a Basic AI Agent from Scratch" tutorial series: use AgentDefinition to define system prompts, tool allowlists, permission modes, and derivable sub-agents, and support defining project-level custom agents via SOUL.md. Sub-agents run in an independent message list and planning state, returning only a length-limited final result to the parent agent, while sharing the Docker sandbox, cost tracking, and audit logs. The tutorial states that sub-agents cannot pause to ask the user questions; if an operation requires interactive permission confirmation, the harness will reject the operation and return the reason. Nesting depth is limited by --max-depth, concurrency is limited by --max-concurrent-subagents, and each agent can also have its own turn and tool-call limits.

AI overview based on source reports · Updated 2 days ago

Coverage timeline

Follow the coverage to explore different perspectives.

Nov 19
  1. Hacker News AI
    Build a Basic AI Agent from Scratch: Agents and Sub-Agents

    This installment of the series adds selectable specialist agents (general, plan, explore, build, review) defined via an AgentDefinition dataclass and custom SOUL.md files, letting users switch the active top-level agent while keeping the conversation. It also introduces sub-agents: a parent can call spawn_subagent with an agent name, description and self-contained prompt, and the child runs in its own context with its own scratchpad and to-do list, sharing the parent's sandbox, cost tracker and audit log, returning only a size-limited final answer. Delegation is bounded by max depth, per-agent turn and tool-call caps, and concurrency limits, and sub-agents cannot pause for interactive permission prompts.

Activity for this story

Current comparable activity
3
Peak comparable activity
10Nov 19 02:00
Change in the past 24 hours
-50%

Trends compare the same fully observed participants, which may cover fewer participants than current activity. Move the pointer or tap the chart to inspect hourly activity; use the left and right arrow keys with a keyboard.