# 智能体需要控制流，而不是更多的提示

- 来源：Hacker News 热门（buzzing.cc 中文翻译）
- 作者：bsuh
- 发布时间：2026-05-08 03:17
- AIHOT 分数：61
- AIHOT 链接：https://aihot.virxact.com/items/cmovw0fge00rlslcx7fw5gldy
- 原文链接：https://bsuh.bearblog.dev/agents-need-control-flow

## AI 摘要

当前AI智能体的开发过度依赖提示工程，导致系统复杂且脆弱。文章主张智能体应转向采用编程中的控制流结构，如条件判断、循环和函数调用，以实现更可靠、可维护的决策与行动序列。这一转变能减少提示长度和调试负担，提升智能体处理复杂、多步骤任务的能力，是构建下一代实用AI助手的关键。

## 正文

agents need control flow, not more prompts

07 May, 2026

Thesis: reliable agents tackling complex tasks need deterministic control flow encoded in software, not increasingly elaborate prompt chains

If you’ve ever resorted to MANDATORY or DO NOT SKIP, you’ve hit the ceiling of prompting.

Imagine a programming language where statements are suggestions and functions return “Success” while hallucinating. Reasoning becomes impossible; reliability collapses as complexity grows.

Software scales through recursive composability: systems built from libraries, modules, and functions. It’s code all the way down. Code exposes predictable behavior, enabling local reasoning. Prompt chains lack this property. While useful for narrow tasks, prompts are non-deterministic, weakly specified, and difficult to verify.

Reliability requires moving logic out of prose and into runtime. We need deterministic scaffolds: explicit state transitions and validation checkpoints that treat the LLM as a component, not the system.

But deterministic orchestration is only half the battle. In a system prone to silent failure, an agent without aggressive error detection is just a fast way to reach the wrong conclusion. Without programmatic verification, we are left with three options:

Babysitter: Keep a human in the loop to catch errors before they propagate.

Auditor: Perform exhaustive end-to-end verification after the run.

Prayer: Vibe accept the outputs.
