pyproject.toml vs requirements.txt
Modern Approach: pyproject.toml
Most projects in the repository usepyproject.toml (PEP 518/621).
- Single source of truth for project metadata
- Supports optional dependencies
- Better dependency resolution
- Standard format (PEP 621)
Legacy Approach: requirements.txt
- Working with older projects
- Deploying to platforms that only support requirements.txt
- Simple scripts without package structure
Installation Tools
pip (Standard)
Built-in Python package installer.Install from pyproject.toml
Install from requirements.txt
Upgrade All Packages
uv (Fast Alternative)
uv is a blazingly fast Python package installer, 10-100x faster than pip.
Install uv
Usage
Common Dependencies
AI Frameworks
Agno
Most common framework in the repository.AWS Strands
LangChain
LlamaIndex
CrewAI
Model Providers
Vector Databases
Web Tools
Utilities
Dependency Versioning
Version Specifiers
Recommended Practices
Lock Files
Generate Lock File
Lock files ensure reproducible installs.Using pip-tools
Using uv
Development Dependencies
Separate Dev and Prod
Install Optional Dependencies
Virtual Environment Management
Create Virtual Environment
Activate/Deactivate
Delete Virtual Environment
Project Examples
Simple Agent Project
Fromstarter_ai_agents/agno_starter/:
Advanced Multi-Agent Project
Fromadvance_ai_agents/content_team_agent/:
RAG Project with Vector DB
Fromrag_apps/contextual_ai_rag/:
Dependency Conflicts
Resolve Version Conflicts
Fix Conflicts
Updating Dependencies
Check for Updates
Update Safely
Update Lock File
Best Practices
1. Pin Production Dependencies
2. Separate Requirements Files
3. Use .gitignore
4. Document Dependencies
CreateDEPENDENCIES.md:
Conflicting Dependencies
Slow Installation
Migration Guide
From requirements.txt to pyproject.toml
Deployment
Docker
Cloud Platforms
Most platforms supportrequirements.txt:
Next Steps
Environment Setup
Set up complete development environment
API Keys
Configure credentials for dependencies
Best Practices
Production-ready patterns and code quality
Multi-Agent Patterns
Start building with installed dependencies