Installation
This guide covers installation scenarios for LangCrew, from basic setup to development.
Basic Installation
Section titled “Basic Installation”Using pip
Section titled “Using pip”The simplest way to install LangCrew:
pip install langcrewUsing uv (Recommended)
Section titled “Using uv (Recommended)”For faster, more reliable installations:
uv add langcrewVerify Installation
Section titled “Verify Installation”import langcrewprint(f"LangCrew version: {langcrew.__version__}")LLM Configuration
Section titled “LLM Configuration”LangCrew requires an LLM provider. Configure your API keys as environment variables:
OpenAI
Section titled “OpenAI”export OPENAI_API_KEY=your_openai_keyexport OPENAI_BASE_URL=https://api.openai.com/v1 # Optionalfrom langchain_openai import ChatOpenAI
llm = ChatOpenAI(model="gpt-4o")Anthropic
Section titled “Anthropic”export ANTHROPIC_API_KEY=your_anthropic_keyfrom langchain_anthropic import ChatAnthropic
llm = ChatAnthropic(model="claude-3-5-sonnet-20241022")DashScope (Alibaba)
Section titled “DashScope (Alibaba)”export DASHSCOPE_API_KEY=your_dashscope_keyfrom langchain_community.chat_models import ChatTongyi
llm = ChatTongyi(model="qwen-max")Google Gemini
Section titled “Google Gemini”export GOOGLE_API_KEY=your_google_keyfrom langchain_google_genai import ChatGoogleGenerativeAI
llm = ChatGoogleGenerativeAI(model="gemini-pro")Troubleshooting
Section titled “Troubleshooting”Common Issues
Section titled “Common Issues”Import Error: Cannot import langcrew
Section titled “Import Error: Cannot import langcrew”Solution: Ensure you’re in the correct virtual environment and LangCrew is installed:
pip install --upgrade langcrewLLM API Key Not Found
Section titled “LLM API Key Not Found”Solution: Verify environment variables are set:
echo $OPENAI_API_KEYIf empty, set it:
export OPENAI_API_KEY=your_keyNext Steps
Section titled “Next Steps”- Quick Start Guide - Build your first agent crew
- Core Concepts - Understand the framework fundamentals
- Memory Guide - Configure persistence and memory