01Chapter 1: What a provider SDK gives youA provider SDK is the client library a model vendor publishes so you can call its API from your own code. This chapter covers what the OpenAI-style SDK does for you, where its responsibilities end, and which details cause errors in practice. Later chapters compare this baseline with frameworks, so i7 min read
02Chapter 2: Where a bare SDK starts to hurtThis chapter assumes you have used a provider SDK to send a chat request, as in the previous chapter. It also assumes you can read basic Python, including classes, exceptions, and type hints. You do not need any framework knowledge yet.5 min read
03Chapter 3: Structured output and validation with PydanticThis chapter covers how to get typed, validated data out of a model using a provider SDK and Pydantic, and what can still go wrong. It assumes you can write basic Python classes, have called a chat completions API before, and know what JSON is. You should have openai and pydantic installed in a 5 min read
04Chapter 4: Tool calling with the SDKThis chapter covers how tool calling works at the provider SDK level. It assumes you can call a chat completions endpoint, read JSON, and write basic Python functions. It also assumes you have seen structured output with Pydantic from the previous chapter.6 min read
05Chapter 5: Writing the agent loop yourselfThis chapter assumes you can call a chat completions API, read and write JSON, and write Python functions and classes. You should also know how the SDK returns a tool call as data, as in the previous chapter. Here you will write the loop that turns a single tool call into a working agent.5 min read
06Chapter 6: Retrieval-augmented generation by handThis chapter assumes you can write basic Python, have called a chat API, and know what an embedding is: a list of numbers that places a piece of text in a space where similar meanings sit close together. You will build a small retrieval-augmented generation (RAG) pipeline with only the OpenAI SDK an5 min read
07Chapter 7: What frameworks add, and what they costThis chapter assumes you can write basic Python and have called an LLM chat API at least once. It also assumes you have seen the manual versions of structured output, tool calling, an agent loop, and retrieval. The goal is to name what a framework gives you in exchange for what it takes, so you can 7 min read
08Chapter 8: LangChain: components and integrationsThis chapter assumes you can write basic Python, have called a chat API such as the OpenAI SDK, and know what a Pydantic model is. Earlier chapters showed the hand-written versions of structured output, tool calling, and retrieval. Here you see what LangChain does with the same tasks, and where its 6 min read
09Chapter 9: LlamaIndex: data-centric retrievalThis chapter covers what LlamaIndex does, how its pieces map to the hand-written retrieval pipeline from the earlier chapter, and where it saves code or gets in the way.5 min read
10Chapter 10: PydanticAI: typed, validated agentsPydanticAI is a Python agent framework built by the team behind Pydantic. Its central idea is that a model's reply should be a typed Python object, and that your tools and dependencies should be typed too. This chapter explains the working model, shows how it relates to the manual structured-output 6 min read
11Chapter 11: Seeing what the model was actually sentThis chapter assumes you can call a chat completion API from Python, read JSON, and install packages in a virtual environment. It also assumes you have read the earlier chapters on structured output, tool calling, and what frameworks add.6 min read
12Chapter 12: API churn and dependency weightThis chapter covers two maintenance costs of building on a framework: how often its public API changes, and how much code you install to use it. It assumes you can use a virtual environment and pip, read a requirements.txt file, and have called an LLM chat API. The earlier chapters on framework va6 min read
13Chapter 13: Choosing an approach for your projectThis chapter assumes you can call a chat API from Python, read Pydantic models, and know what retrieval-augmented generation (RAG) is. It also assumes you have seen the earlier chapters on structured output, tool calling, and what frameworks add and cost. Here you turn that knowledge into a decision7 min read
14Chapter 14: Migrating and mixing approachesThis chapter assumes you have read the earlier chapters of this tutorial. You should be comfortable with Python classes and virtual environments, have called a chat API, and know the basic shape of structured output, tool calling, and retrieval. It does not repeat how each library works. It covers h5 min read