{
  "id": 15273044,
  "title": "Write your agent as functions first, add a framework later",
  "url": "https://urgent.news/2026/10/17/write-your-agent-as-functions-first-add-a-framework-later",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-17T20:30:08.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/conorbronsdon/write-your-agent-as-functions-first-add-a-framework-later-284h"
  },
  "original_language": "en",
  "account": "The article argues that when building AI agents, starting with plain functions before adding a framework can be beneficial. It suggests using structured model outputs rather than free text, which is more useful for code-based systems. The author provides a simple example of an agent as functions with structured outputs, demonstrating a planning function that returns an action and optional query or reply. The workflow then executes tools deterministically based on the plan.\n\nThe article outlines scenarios where a framework might be worth considering, such as when the agent needs robust debugging capabilities, can benefit from durable checkpoints and job resumption, requires complex branching logic, or needs flexible retrieval mechanisms. These are \"upgrade signals\" indicating that the hand-rolled approach may be insufficient.\n\nThe article then compares the hand-rolled approach to a framework-based solution, pointing out that frameworks provide abstractions for common concerns like orchestration, state management, and tool plumbing. However, it cautions that these features often come at the cost of added complexity and abstraction layers that may not be necessary for simpler agent workflows.\n\nUltimately, the author advises evaluating frameworks based on the specific pain points your agent faces. If the hand-rolled implementation is sufficient, there may be no need for a framework. But for agents with more complex requirements, a framework could provide valuable abstractions to streamline development. The decision should be made by comparing the two implementations on the same workflow, assessing factors like error handling, tool orchestration, and retrieval flexibility.",
  "summary": "Plenty of agent tutorials open with a framework import. I'd start with ordinary functions that call a model, return structured data, and invoke tools in an order you can read top to bottom. A single model call is rarely the whole product. A compound AI system wires model calls, retrieval, tools, validation, and control logic into one pipeline, and quality depends on how those pieces fit together…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}