The Dev Environment
Learning Path
Hands-on Labs
Each objective has a coding lab that opens in VS Code in your browser
Set up Python virtual environments for isolated agent development
You will create and manage virtual environments using venv and Poetry, understanding how isolation prevents dependency conflicts between different agent projects. Build a `GeminiEnvironmentValidator` dataclass that uses the Gemini SDK to verify your environment setup, checking Python version, installed packages, and API connectivity. Implement `validate_gemini_setup()` with proper error handling using Python Typing for type safety. Learn to structure validation results as typed dataclasses for consistent reporting across your agent projects.
Configure modern package management with Poetry
You will install and configure Poetry for dependency management, creating pyproject.toml with proper dependency groups for development, testing, and production. Build a `DependencyAnalyzer` class using Pydantic-style dataclasses to parse and validate TOML configurations. Implement `validate_gemini_dependency()` to verify SDK installation status and `suggest_dependencies_with_gemini()` to get AI-powered recommendations for missing packages. Use Python Typing throughout to ensure type-safe dependency specifications and catch configuration errors early.
Master Git version control for agent projects
You will configure Git with proper identity settings and master the staging/commit/push workflow for agent development. Build a `CommitMessageGenerator` dataclass that uses the Gemini SDK to analyze staged changes and generate conventional commit messages. Implement `generate_commit_message_with_gemini()` with proper error handling for API failures, using Python Pathlib for file operations and Python Typing for type-safe git status parsing. Learn to structure commit metadata as typed dataclasses for audit logging.
Implement secure API key management for LLM providers
You will implement production-grade secret management for agent projects. Build a `SecretManager` dataclass using Python Typing that handles API keys for OpenAI, Anthropic, and Google. Use Python Pathlib to safely manage .env files and .gitignore patterns, preventing accidental secret exposure. Implement `validate_gemini_key()` that returns a typed `GeminiKeyValidation` dataclass with connection status, quota info, and error details. Learn security NFRs: never log secrets, use SecretStr patterns, and implement key rotation awareness.
Configure VS Code for professional agent development
You will configure VS Code for production agent development with proper debugging and observability support. Build a `VSCodeConfigGenerator` dataclass that uses the Gemini SDK to analyze your project and recommend optimal settings. Implement `suggest_settings_with_gemini()` to generate settings.json and launch.json configurations based on your agent project structure. Use Python JSON module for safe config file manipulation and Python Typing to define typed configuration schemas. Set up debugging configurations that support async agent workflows with proper breakpoint handling.
Set up pre-commit hooks for code quality and security
You will implement automated code quality and security checks using pre-commit hooks. Build an `IssueExplainer` dataclass that uses the Gemini SDK to analyze linting errors and provide actionable fix suggestions. Implement `explain_issue_with_gemini()` that takes Ruff or mypy output and returns typed `IssueDiagnosis` dataclasses with root cause analysis. Configure secret detection hooks to catch exposed API keys before commits. Use Python JSON for hook configuration and Python Typing for type-safe issue parsing. Learn the security NFR of defense-in-depth through multiple automated checks.