Chapter 0
10 min read
Section 1 of 175

What You Need to Know

Prerequisites and Setup

Introduction

Before we dive into building AI agents, let's ensure you have the foundational knowledge needed to get the most out of this book. Building agentic AI systems requires a blend of programming skills, understanding of large language models, and familiarity with API-based architectures.

Don't worry if you're not an expert in all of these areas. We'll explain concepts as we go, but having a baseline understanding will help you follow along more smoothly and allow you to focus on the agentic aspects rather than fundamentals.

Who This Book Is For: Developers who want to build production-ready AI agents. Whether you're a software engineer curious about agentic AI, a data scientist looking to build autonomous systems, or an AI enthusiast ready to move beyond simple chatbots.

Programming Skills

Python (Primary)

The majority of examples in this book are in Python. You should be comfortable with:

  • Basic syntax: Variables, functions, classes, control flow
  • Data structures: Lists, dictionaries, sets, tuples
  • Object-oriented programming: Classes, inheritance, methods
  • Package management: pip, virtual environments (venv, conda)
  • Type hints: Basic understanding of Python type annotations
🐍python_basics.py
1# You should be comfortable with code like this:
2from typing import Optional, List, Dict
3from dataclasses import dataclass
4
5@dataclass
6class Tool:
7    name: str
8    description: str
9    parameters: Dict[str, str]
10
11    def execute(self, **kwargs) -> str:
12        """Execute the tool with given parameters."""
13        raise NotImplementedError
14
15class FileReadTool(Tool):
16    def execute(self, file_path: str) -> str:
17        with open(file_path, 'r') as f:
18            return f.read()
19
20# Using the tool
21tools: List[Tool] = [
22    FileReadTool(
23        name="read_file",
24        description="Read contents of a file",
25        parameters={"file_path": "Path to the file to read"}
26    )
27]

TypeScript (Secondary)

Some examples, particularly those involving MCP (Model Context Protocol) and frontend integrations, will use TypeScript. You should have basic familiarity with:

  • TypeScript/JavaScript syntax
  • Async/await patterns
  • Node.js basics
  • npm package management

Don't know TypeScript?

If you're primarily a Python developer, you can still follow along. Most TypeScript examples have Python equivalents, and we'll explain TypeScript-specific concepts when they appear.

LLM Fundamentals

You should have a working understanding of large language models and how to interact with them:

Core Concepts

ConceptWhat You Should Know
PromptsHow to write effective prompts, system vs user messages
TokensWhat tokens are, why context windows matter
TemperatureHow it affects output randomness
API CallsMaking requests to LLM APIs (OpenAI, Anthropic)
StreamingBasic understanding of streaming responses

Prior Experience Helpful

If you've done any of the following, you're well-prepared:

  • Built a chatbot using OpenAI or Claude API
  • Experimented with prompt engineering
  • Used LangChain, LlamaIndex, or similar libraries
  • Created RAG (Retrieval-Augmented Generation) applications
🐍llm_basics.py
1# You should understand code like this:
2from anthropic import Anthropic
3
4client = Anthropic()
5
6response = client.messages.create(
7    model="claude-sonnet-4-20250514",
8    max_tokens=1024,
9    system="You are a helpful assistant.",
10    messages=[
11        {"role": "user", "content": "What is an AI agent?"}
12    ]
13)
14
15print(response.content[0].text)

New to LLM APIs?

If you haven't used LLM APIs before, spend an hour with the OpenAI or Anthropic documentation. Create a simple chatbot. This hands-on experience will make the agentic concepts much clearer.

API Knowledge

Agents interact with the world through APIs. You should understand:

REST APIs

  • HTTP methods: GET, POST, PUT, DELETE
  • Request/Response: Headers, body, status codes
  • JSON: Parsing and constructing JSON data
  • Authentication: API keys, tokens, basic auth

Making API Calls

🐍api_basics.py
1import requests
2import json
3
4# You should be comfortable with patterns like this:
5def call_api(endpoint: str, payload: dict) -> dict:
6    headers = {
7        "Authorization": f"Bearer {API_KEY}",
8        "Content-Type": "application/json"
9    }
10
11    response = requests.post(
12        endpoint,
13        headers=headers,
14        json=payload
15    )
16
17    response.raise_for_status()  # Raise on 4xx/5xx
18    return response.json()
19
20# Error handling
21try:
22    result = call_api("/api/data", {"query": "example"})
23except requests.HTTPError as e:
24    print(f"API error: {e}")

Async Programming

Modern agents often handle multiple operations concurrently. Basic understanding of async patterns is helpful:

Python asyncio

🐍async_basics.py
1import asyncio
2from typing import List
3
4# You should understand this pattern:
5async def fetch_data(url: str) -> dict:
6    """Fetch data asynchronously."""
7    # Simulating async API call
8    await asyncio.sleep(0.1)
9    return {"url": url, "data": "result"}
10
11async def process_urls(urls: List[str]) -> List[dict]:
12    """Process multiple URLs concurrently."""
13    tasks = [fetch_data(url) for url in urls]
14    results = await asyncio.gather(*tasks)
15    return results
16
17# Running async code
18async def main():
19    urls = ["http://api1.com", "http://api2.com", "http://api3.com"]
20    results = await process_urls(urls)
21    print(results)
22
23asyncio.run(main())

Don't worry if async is new

We'll explain async patterns when they appear. For most of the book, synchronous code works fine. Async becomes important when building production agents that need to handle multiple tasks efficiently.

Optional But Helpful

These skills aren't required but will enrich your learning:

SkillWhere It Helps
DockerSandboxing agents, deployment
GitVersion control, agent coding features
SQLDatabase agents, memory systems
Vector DatabasesBuilding memory and RAG systems
Web ScrapingResearch agents, web automation
TestingBuilding reliable, production-ready agents

Self-Assessment Checklist

Rate yourself on each area (1 = Beginner, 2 = Familiar, 3 = Comfortable, 4 = Expert):

AreaMinimumIdealYour Level
Python programming23___
REST APIs23___
LLM APIs (OpenAI/Anthropic)12___
Async programming12___
TypeScript/JavaScript12___
Git and version control12___

Don't let gaps stop you

If you're at level 1 or 2 in most areas, you can still follow this book. We'll explain concepts as we go. The best way to learn is by doing - you'll pick up what you need as you build.

Quick Skill Boost Resources

If you need to quickly brush up on any area:

  • Python: Python official tutorial, Real Python
  • LLM APIs: OpenAI Cookbook, Anthropic documentation
  • Async Python: "asyncio in Python" tutorial
  • REST APIs: "REST API Tutorial" on restfulapi.net

Summary

To get the most out of this book, you should have:

  1. Solid Python skills - Classes, functions, data structures
  2. Basic LLM understanding - Prompts, tokens, API calls
  3. REST API familiarity - HTTP methods, JSON, requests
  4. Basic async awareness - Understanding of concurrent patterns
Ready to start? If you can read and understand the code examples in this section, you're ready to build AI agents. Let's set up your development environment in the next section.