ai-agents

Guides to building AI agents in Python that can reason, use tools, and complete tasks.

GenAI: LLM APIs (OpenAI, Anthropic, Structured Output & Function Calling)

A chat tab is a demo; a product needs code. The moment you call an LLM (Large Language Model) from Python, three problems show up fast: streaming the reply, getting JSON you can trust, and letting the model trigger real tools. Function calling in Python solves that last one, and this guide covers all four building blocks with working OpenAI and Anthropic (Claude) code. “An API call to an LLM is just an HTTP request. The magic is in what ... Read More

GenAI: Building AI Agents with LangGraph, CrewAI, and Beyond

A chatbot answers one question and stops. Python AI agents keep going: they read a goal, pick a tool, run it, check the result, and repeat until the job is done. That loop, driven by an LLM (Large Language Model), is the entire idea. This post builds it bare in plain code, then shows the same loop inside LangGraph, CrewAI, and the OpenAI and Claude SDKs. You already met the first piece of this in the LLM API and function ... Read More