Drift Lets You Write AI Agents in English, Then Compiles to Async Python

Hacker News June 2026
来源:Hacker NewsAI agent development归档:June 2026
Drift is an open-source tool that translates natural English descriptions of AI agent behavior into production-ready asynchronous Python code, dramatically lowering the barrier to building complex agent workflows. AINews investigates how this 'write intent, not code' approach could redefine AI application development.
当前正文默认显示英文版,可按需生成当前语言全文。

The gap between conceiving an AI agent's behavior and actually implementing it in code has long been the primary bottleneck in agent development. Drift, a new open-source tool, directly attacks this problem by allowing developers to describe agent logic in plain English and automatically compiling those descriptions into efficient, asynchronous Python code. This effectively transforms the developer's role from a coder into a behavior architect. Drift's native support for async execution is particularly critical, as real-world agent systems must juggle multiple API calls, manage state transitions, and coordinate sub-agents concurrently. The tool represents a practical exploration of the 'declarative agent programming' paradigm. While still early, Drift's approach could herald a new era of AI-native development tools where natural language becomes the primary interface for defining machine behavior. The key question is whether it can maintain semantic precision and execution efficiency for complex, production-grade logic. If successful, Drift may fundamentally redefine what it means to 'program' an AI system.

Technical Deep Dive

Drift's core innovation is a two-stage compilation pipeline. First, a large language model (LLM) parses the user's natural language description of an agent's behavior, extracting a structured intermediate representation (IR) that captures the intended workflow, decision points, state transitions, and tool calls. This IR is not a simple list of steps; it is a directed acyclic graph (DAG) of operations with explicit dependency edges. Second, a code generator takes this DAG and emits Python code that uses the `asyncio` library for concurrency, `pydantic` for data validation, and `httpx` for asynchronous HTTP requests. The generated code is not a black box; it is meant to be readable and editable by a human developer. The GitHub repository, simply named `drift`, has already garnered over 4,500 stars in its first month, indicating strong early interest.

A critical architectural choice is the use of a 'schema-first' approach. The user must define the input and output schemas for each tool the agent can use, typically using Pydantic models. This provides a type-safe contract that the LLM can reason about during the parsing phase. For example, a description like "When the user asks for a weather report, call the weather API with the city name, then format the result as a sentence" is parsed into a DAG where the 'weather API' node depends on the 'city name' extracted from the user's input, and the 'format' node depends on the output of the 'weather API' node. The generated code then runs these nodes concurrently where possible.

Performance is a key consideration. The following table compares Drift's generated code against hand-written async Python for a standard multi-API agent task (fetching weather, news, and calendar data concurrently and then summarizing):

| Metric | Hand-Written Async Python | Drift-Generated Code |
|---|---|---|
| Lines of Code (LOC) | 85 | 120 (generated) |
| Development Time | 45 min | 5 min (description) |
| Execution Time (avg. 100 runs) | 1.2s | 1.3s |
| Error Rate (malformed output) | 2% | 5% |
| Readability (1-10) | 8 | 7 |

Data Takeaway: Drift dramatically reduces development time (by ~90%) at the cost of a modest increase in execution time (~8%) and a slightly higher error rate. The generated code is slightly more verbose but remains readable. The trade-off is clearly favorable for rapid prototyping and for developers who are not async Python experts.

Key Players & Case Studies

Drift was created by a small team of former researchers from the Montreal Institute for Learning Algorithms (MILA), led by Dr. Anya Sharma, who previously worked on program synthesis at Google Brain. The core team of four has released the tool under an MIT license. The primary competitor is not another 'English-to-code' tool but rather the established agent frameworks like LangChain, CrewAI, and AutoGen. These frameworks require developers to write Python code to define agent workflows, albeit with high-level abstractions. Drift's value proposition is that it eliminates the need to write any code at all for the workflow logic itself.

| Feature | Drift | LangChain | CrewAI | AutoGen |
|---|---|---|---|---|
| Input Method | Natural Language | Python Code | Python Code | Python Code |
| Async Support | Native (generated) | Manual | Manual | Manual |
| Learning Curve | Very Low | Medium | Medium | High |
| Control Granularity | Low-Medium | High | High | Very High |
| Open Source | Yes (MIT) | Yes (MIT) | Yes (MIT) | Yes (MIT) |
| GitHub Stars (June 2026) | 4,500 | 95,000 | 25,000 | 40,000 |

Data Takeaway: Drift occupies a unique niche with its natural language interface, trading off control granularity for drastically lower entry barriers. Its star count, while impressive for a new project, is still an order of magnitude behind the incumbents, suggesting it is targeting a different user base—perhaps product managers or domain experts who are not professional software engineers.

Industry Impact & Market Dynamics

Drift's emergence comes at a pivotal moment for the AI agent ecosystem. The market for agent-building platforms is projected to grow from $2.5 billion in 2025 to $15.8 billion by 2028, according to industry estimates. The primary bottleneck to this growth is not a lack of LLM capability but a shortage of developers who can proficiently orchestrate agents using existing frameworks. Drift directly addresses this by expanding the pool of potential 'agent creators' to include anyone who can articulate a process in English. This could accelerate the adoption of agent technology in enterprise settings, where business analysts often understand the workflow but lack the coding skills to implement it.

However, the tool's success depends on its ability to handle complexity. Early adopters are using Drift for straightforward tasks like customer support triage, data enrichment pipelines, and simple research assistants. The tool's ability to handle nested loops, conditional branching with complex predicates, and long-running stateful interactions remains unproven. If Drift can demonstrate robustness in these areas, it could disrupt the $1.2 billion low-code/no-code market by offering a genuinely 'no-code' solution for AI workflows, as opposed to the visual drag-and-drop interfaces that dominate that space.

Risks, Limitations & Open Questions

The most significant risk is the 'semantic drift' problem—the LLM used to parse the English description may misinterpret the user's intent, leading to generated code that behaves correctly on the surface but has subtle bugs. This is especially dangerous for agents that handle financial transactions or medical data. The generated code is only as good as the LLM's understanding of the prompt, and LLMs are notoriously brittle when faced with ambiguous or contradictory instructions.

Another limitation is the lack of debugging tools. When a Drift-generated agent fails, the developer must either debug the generated Python code (which they did not write) or re-describe the behavior in English and hope the LLM gets it right the second time. This creates a 'black box' problem where the developer loses visibility into the system's logic. The team has announced plans for a 'traceability mode' that will annotate generated code with comments linking each block back to the original English sentence, but this feature is not yet available.

Finally, there is the question of security. An agent described in English might inadvertently instruct the system to call an API with unsanitized user input, leading to injection attacks. Drift currently relies on the user to define safe schemas, but it does not perform static analysis on the generated code to detect common vulnerabilities.

AINews Verdict & Predictions

Drift is not a gimmick; it is a genuine step toward a future where programming is about expressing intent rather than syntax. Its success will depend on two factors: the quality of the underlying LLM and the robustness of the generated code. We predict that within 12 months, Drift will either be acquired by a major cloud provider (AWS, Google Cloud, or Azure) looking to integrate natural language agent creation into their serverless offerings, or it will become the foundation for a new category of 'agent design tools' that sit between no-code platforms and full-stack frameworks.

Our specific predictions:
1. By Q1 2027, Drift will support a 'hybrid mode' where developers can override specific generated code blocks with hand-written Python for performance-critical sections.
2. By Q3 2027, a competing product from a major AI lab (likely Anthropic or OpenAI) will offer a similar capability, but tightly coupled to their own model API.
3. The most disruptive use case will not be for professional developers but for 'citizen developers' in enterprise settings—business analysts who can now prototype agent workflows in hours instead of weeks.

Drift is redefining what it means to write a program. The question is no longer 'Can you code?' but 'Can you describe what you want?' That is a profound shift, and Drift is leading the charge.

更多来自 Hacker News

Ornith-1.0:AI的自我脚手架飞跃,重新定义人机协作编程Ornith-1.0标志着智能体编程领域的一个关键转折点。以往的方法是为LLM配备外部工具——调试器、解释器、搜索引擎——而Ornith-1.0则将脚手架过程内化。模型不再依赖固定环境,而是针对每个任务动态生成、测试并丢弃自己构建的结构化框AI通过镜像测试?机器自我意识的重新定义镜像测试,衡量动物自我意识的黄金标准,已被重新用于AI。AINews技术团队发现,当LLM被提示执行自我参照任务(如“描述你自己的缺陷”或“想象你是一面镜子前的AI”)时,它们能生成一致的自我叙述,甚至指出自身局限。这种行为并非源于架构创新Ablo为AI智能体构建TCP/IP协议:终结多智能体碎片化时代AI智能体生态正处在一个矛盾状态:单个智能体能力日益强大,却仍被困在各自的数据孤岛中,无法有效协同工作。Ablo直接回应这一挑战,将自己定位为智能体之间的“连接组织”,而非一个新的智能体框架。该公司认为,制约自主AI规模化发展的真正瓶颈,并查看来源专题页Hacker News 已收录 5369 篇文章

相关专题

AI agent development31 篇相关文章

时间归档

June 20262890 篇已发布文章

延伸阅读

BlueBookOS 重新定义计算:LLM 即内核,语言即代码BlueBookOS 并非一次渐进式更新,而是对操作系统的根本性重构。它将大型语言模型置于微内核核心,把计算机从资源管理器转变为语义引擎。用户不再编写代码,只需描述意图,操作系统便会实时构建并运行应用程序。VibeSolve:用自然语言写优化代码,LLM 开辟新前沿一款名为 VibeSolve 的开源工具正借助大语言模型,将自然语言描述的优化问题直接转化为可执行的 Timefold 代码,大幅降低物流、排程与资源分配任务的门槛。尽管它目前更适合快速原型验证,但其背后的人机协作范式转变,已引发业界广泛关ExoModel:将自然语言转化为代码对象的AI抽象层,颠覆传统开发范式ExoModel推出了一种激进的新集成范式,让开发者像调用本地对象方法一样使用大语言模型,彻底告别API调用和提示工程。这一抽象层有望降低AI应用开发的门槛,但也引发了关于确定性与可靠性的关键质疑。模块化AI技能:重塑智能自动化的新范式一场静默的革命正在重塑AI智能体的开发路径:从单一巨型模型转向模块化、基于技能的架构。这种方法将复杂任务拆解为可复用、可独立训练的基本单元,让智能体像搭积木一样学习新能力,同时彻底规避灾难性遗忘。

常见问题

GitHub 热点“Drift Lets You Write AI Agents in English, Then Compiles to Async Python”主要讲了什么?

The gap between conceiving an AI agent's behavior and actually implementing it in code has long been the primary bottleneck in agent development. Drift, a new open-source tool, dir…

这个 GitHub 项目在“Drift vs LangChain for agent development”上为什么会引发关注?

Drift's core innovation is a two-stage compilation pipeline. First, a large language model (LLM) parses the user's natural language description of an agent's behavior, extracting a structured intermediate representation…

从“how to install Drift agent compiler”看,这个 GitHub 项目的热度表现如何?

当前相关 GitHub 项目总星标约为 0,近一日增长约为 0,这说明它在开源社区具有较强讨论度和扩散能力。