langgraph本地运行
1、安装(官方文档):
pip install -U "langgraph-cli[inmem]"
2、创建项目骨架(交互式):
langgraph new path/to/your/app
3、安装项目依赖:
cd path/to/your/app
pip install -e .
4、配置.env文件:
# To separate your traces from other application
LANGSMITH_PROJECT=new-agent
# Add API keys for connecting to LLM providers, data sources, and other integrations here
# 要去langsmith搞个账号获取api秘钥
LANGSMITH_API_KEY=xxxxx
5、运行:
langgraph dev
注意事项:
windows环境下powershell,运行前设置
$env:PYTHONIOENCODING="utf-8"
$env:PYTHONUTF8="1"