Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Chapter 2: Development Environment Setup

A well-sharpened tool makes the work easier. A well-configured development environment will make your Agent development twice as efficient.


Chapter Overview

This chapter walks you through setting up a professional Agent development environment from scratch. From Python virtual environment management, to secure API Key storage, to your first runnable Agent — follow along and you'll have a workbench ready to start developing at any time.

Chapter Goals

After completing this chapter, you will be able to:

  • ✅ Manage Python environments and dependencies using uv or conda
  • ✅ Install and verify core libraries like LangChain and the OpenAI SDK
  • ✅ Securely manage API Keys to prevent key leakage
  • ✅ Run your first real Agent!

Chapter Structure

SectionContentEstimated Time
2.1 Python Environment & Dependency Managementvenv, conda, uv comparison and usage20 min
2.2 Key Library InstallationLangChain, OpenAI SDK, etc.15 min
2.3 API Key Management.env files, environment variable best practices10 min
2.4 Hello Agent!Your first complete Agent30 min

Prerequisites

  • Python 3.10 or higher installed
  • Basic command-line experience
  • An OpenAI account registered (or another LLM service)

Tool Selection Guide

ToolPurposeRecommendation
uvPython package management (newest, fastest)⭐⭐⭐⭐⭐ Highly recommended
condaEnvironment management (common in data science)⭐⭐⭐⭐ Recommended
venvBuilt-in virtual environment⭐⭐⭐ Sufficient
VS CodeCode editor⭐⭐⭐⭐⭐ Recommended
JupyterInteractive development and experimentation⭐⭐⭐⭐ Recommended

🔗 Learning Path

Prerequisites: Chapter 1: What is an Agent?

Recommended next steps:


Next section: 2.1 Python Environment & Dependency Management