Skip to main content

One post tagged with "node"

View All Tags

How AWS threat-designer decides its LangGraph agent is done: a deterministic validate node, not the model, and a quiet floor of 25 threats

· 8 min read
Vadim Nicolai
Senior Software Engineer

Nothing the model says ends a threat-designer run. When the agent stops calling tools, it has not finished. It has only reached a plain Python function that decides whether it may finish.

Through a precondition buried in a tool, that function also rejects any catalog smaller than 25 threats (constants.py L124). I found that rule nowhere stated as a product requirement.

My claim is that this is the right design for deciding who controls the exit. It is also a crude way to define what "done" means. If you believe the model should orchestrate its own loop, you will disagree with the first half.