Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Your AI Agent Needs No Framework: A 200-Line TypeScript Harness

Описание и применение

Минимальный harness на TypeScript, состоящий из 200 строк, демонстрирует, что для простого агента достаточно цикла, реестра инструментов, ограничений и одобрения, без использования фреймворков.

Задача

Developers often start agent projects with a framework, leading to debugging inside abstractions and unnecessary complexity.

Результат

The harness successfully enforces max turns, max cost, repeated‑call guard, and approval gate, proving that a minimal loop can replace a framework for simple agents.

Рабочий процесс

  • Define Message, ToolCall, ModelResponse, ToolDef, Limits, AgentResult types
  • Implement sameCall guard for repeated calls
  • Create runAgent function that loops: send messages to model, process tool calls, enforce limits, verify final answer, and handle approval gate

Доказательства

Your agent does not need a framework. It needs a loop, a tool registry, three limits, and one approval gate.

Источник

I ran it against a stub model before writing this post to confirm the turn limit, the cost budget, the repeated-call guard, and the approval gate all fire as described.

Источник

  • Дата записи: 2026-11-01T10:29:15.850Z