environmental preparation
首先需要确保系统已安装 Python 3.8 或更高版本。这是运行 LangGraph CodeAct 的基础要求。
Installation steps
- clone warehouse: Run it in the terminal
git clone https://github.com/langchain-ai/langgraph-codeact.git
- Go to the project directory: Implementation
cd langgraph-codeact
- Installing core dependencies: Run
pip install langgraph-codeact
Model Configuration
若需要使用 Claude 模型(官方推荐):
- fulfillment
pip install langchain langchain-anthropic
- Setting environment variables
export ANTHROPIC_API_KEY="你的密钥"
Tool Extension
如果需要运行特定示例,可以根据项目文档安装相应工具包。安装完成后,建议创建一个 Python 脚本来测试基本功能。
This answer comes from the articleLangGraph CodeAct: generating code to help intelligences solve complex tasksThe