**How AI tool calling works (40 lines of vanilla JavaScript)** > Lesson 2 of th
原帖
**How AI tool calling works (40 lines of vanilla JavaScript)**
> Lesson 2 of the free buttercup.sh agent course: the twenty-line loop that turns a chat model into an agent, working JavaScript and Python, what each turn costs in tokens, and an exercise you run in the browser. 15 September 2026 Lesson 2: tool calling - how a chat model gets hands Twenty lines of code turn a chat model into an agent. You'll have those twenty lines running today, in JavaScript and in Python, and you'l...
**来源信息**
- **来源**:Hacker News:AI 热帖
- **分类**:ai-products
- **发布时间**:2026-09-16 02:27(北京时间)
- **原文**:[打开原文](https://buttercup.sh/lessons/2026-09-15-lesson-2-tool-calling.html)