Web Development

Build web apps and services with tested examples: HTTP, REST APIs, servers, routing, and templating across the Python and Groovy tutorials.

How to Add AI to an Existing App Without Breaking It

When you add AI to existing app code, the danger is almost never the model itself. It is everything the model touches on the way in and out: the endpoint you wired it into, the request that now hangs for ten seconds, the bill that arrives at the end of the month. “Add the new thing at the edge, where you can rip it out again, not through the middle where it fuses to everything.” Advice worth more than most ... Read More

LLM Tool Calling: Build a Raw Agent Loop From Scratch

LLM tool calling is what turns a chatbot into something that does real work: the model reads a request, decides it needs one of your functions, and hands that decision back as JSON for your code to run. Frameworks like LangGraph and CrewAI wrap this in nice classes, but underneath they all run one small loop. Here we build that loop by hand, about sixty lines of plain Python. “An agent is a model calling tools in a loop. Everything ... Read More

Python Chatbot Project: Multi-Provider Chat App with Costs

One day a provider changes its API and half the chat tutorials on the internet quietly break. This Python chatbot project is built to survive that: a command line app that talks to any provider through one adapter layer, remembers the conversation, streams the reply as it arrives, returns typed data with Pydantic, and prints exactly what each turn cost. “Program to an interface, not an implementation.” Gang of Four, Design Patterns Last Updated: July 2026 | Tested on: Python ... Read More