Urgent.News

What's breaking now, across thousands of outlets.

AI

LLM Apps in Python: A Production Stack Without Framework Bloat

LLM Apps in Python: A Production Stack Without Framework Bloat The first LLM feature I shipped that actually paid for itself was about 200 lines of Python and one SDK. The one that cost me a weekend of debugging was a framework-based pipeline where I could not tell which layer had swallowed a retry. Since then I have built agents, RAG pipelines and scheduled workers that run unattended, and my…

Building Production-Ready LLM Apps in Python: A Stack Without Framework Overhead

The author shares their experience shipping their first LLM feature, which paid for itself with just 200 lines of Python and one SDK. In contrast, a framework-based pipeline that cost them a weekend to debug proved that a minimal stack could be effective.

Starting with the raw SDK and understanding the specific problems a framework would solve is advised. Most LLM apps consist of an HTTP call with structured input, a loop over tool calls, and some state, making the core code relatively small. Owning this core means being in control of failures, which can be challenging in framework-based solutions.

A simple agent example is provided, showcasing how a framework can obscure the inner workings. The max_turns cap is essential to prevent unbounded spending loops. The author reaches for frameworks only when dealing with complex requirements, such as durable graphs, human-in-the-loop pauses, or when a team needs a shared vocabulary for orchestration.

The default stack consists of using the raw SDK for single-purpose LLM features or multi-step agents running unattended. For longer workflows with pauses and approvals, an orchestration layer is used. The core principles involve treating prompts and tool calls as versioned artifacts with a typed contract. Pydantic is used for validation, ensuring structured, bounded results. Errors should be returned as tool results with a message for the model to act upon, rather than raising exceptions.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in AI

Galaxa - Building a BBC Micro game with AI

As a kid I made a BBC Micro game that got published in Computer and Video Games magazine (C&VG) in 1983 called Caterpillar.

  • Paul Newell created BBC Micro game Caterpillar in 1983.
  • Used AI tools Claude and Opus 5.5 to rewrite Galaxa.
  • Galaxa available online with source code on GitHub.

How AI Is Changing Healthcare in 2026 - And Why Developers Should Pay Attention

How AI Is Changing Healthcare in 2026 - And Why Developers Should Pay Attention Healthcare was slow to change for 20 years. In 2026, AI changed it in just 12 months.

  • AI medical assistants save doctors up to 10+ hours weekly, enabling them to see more patients.
  • AI chatbots reduce missed calls by 40% and increase patient satisfaction for clinics.

Six mistakes in introducing AI automation in SMBs

Six mistakes when introducing AI automation in SMBs Over the past few years, I've been seeing the same pattern. A company of twenty people buys a license, someone builds an impressive demo, everyone…

  • Small companies purchase AI licenses without process clarity
  • Most mistakes occur before coding begins, not during implementation
  • Detailed process table with frequency, time, performer, and error handling prevents failures

More from Thursday 5 November →