返回资讯中心
外部精选
软件工程
#开发者实时流

Toolang:将智能体循环定义为可组合函数的开源语言

来源标题:Show HN: Toolang – What if agent loops were functions?

Toolang 是一个把智能体循环(agent loop)写成函数的新语言,支持将这些函数组合起来完成复杂任务并实现细粒度控制。它用自然语言编写,人类和智能体都可读写,运行时也可直接执行,支持 models.dev 上的云模型以及 Ollama、llama.cpp 的本地模型,仅运行于 macOS 和 Linux。

Hacker News 最新xby2026/11/3 · 14 天前6 分钟阅读

以下正文由 AI 翻译自 Hacker News 最新(原文版权归原站所有),可能存在偏差,重要内容请以原文为准。

把 agent 循环定义为函数。将它们组合起来,以细粒度控制完成复杂任务。 一切皆用自然语言,人类和 agent 都能读写,运行时也能执行。 uv tool install toolang pip install toolang 支持 macOS 和 Linux。Windows 未测试。 Toolang 支持 models.dev 上列出的云端模型,以及由 Ollama 和 llama.cpp 提供的本地模型。 把 agent 循环、控制流和可复用的 cap 汇聚到一门人类、LLM 和运行时共享的语言中。 Agic 相当于传统编程语言中函数的对应物——一个可复用的 agent 循环,具有结构化的输入和输出。 agic translate(, lang): Translate {{}} into {{lang}}. Return only the translation. struct WeatherReport: city: Text condition: Text agic check_weather(city) -> WeatherReport: Get current weather for {{city}} from wttr.in. Flow 按顺序、并行或循环编排 agic——支持同步或异步。让步骤保持明确,让推理保持自主。 flow research: let question = {{}} run -> Text[]: Propose 8 focused research tasks for {{question}}. map in 4 lanes: Research {{}} to help answer {{question}}. Find and read sources; return findings with URLs. Answer {{question}} concisely based on {{}}. Cite sources; merge duplicates; flag conflicts. Caps 通过引用或内联定义,用可组合的 agent 原语——psyche、skill、service 和 prompt——扩展 agent。 with psyche gh:briceyan/concise with skill gh:anthropics/frontend-design service figma: description = Create and edit Figma designs. transport = http target = https://mcp.figma.com/mcp prompt polish: Polish this UI text: {{}}. Program 一个 Toolang 程序用自然语言定义 agent 的核心要素。作为纯文本文件,它易于编辑和分享。 在本地计算机或沙箱中执行 agic 和 flow,可查看活跃运行和执行的历​​史记录。 试试共享的创建你自己的作为脚本运行 too https://toolang.ai/lex.too chat too gh:briceyan/hak chat too new gus too clone gh:briceyan/hak too init . too aid.too --help Toolang agent 是 .too 文件,你可以编辑、分享和运行。 进一步了解该语言和运行时:

正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。

打开原文
去社区讨论 →