new-langgraph-project-python template or new-langgraph-project-js template. This template demonstrates a single-node application you can extend with your own logic.new-langgraph-project-python 模板或 new-langgraph-project-js 模板创建一个新应用。该模板展示了一个单节点应用,你可以通过自己的逻辑进行扩展。
langgraph new without specifying a template, you will be presented with an interactive menu that will allow you to choose from a list of available templates.langgraph new 而未指定模板,系统将显示一个交互式菜单,允许您从可用模板列表中选择。edit mode so your local changes are used by the server:edit 模式安装依赖项,以便服务器使用您的本地更改:
.env file.env 文件.env.example in the root of your new LangGraph app. Create a .env file in the root of your new LangGraph app and copy the contents of the .env.example file into it, filling in the necessary API keys:.env.example 。在新 LangGraph 应用的根目录下创建一个 .env 文件,并将 .env.example 文件的内容复制到其中,填写必要的 API 密钥:
langgraph dev command starts LangGraph Server in an in-memory mode. This mode is suitable for development and testing purposes. For production use, deploy LangGraph Server with access to a persistent storage backend. For more information, see Deployment options.langgraph dev 命令以内存模式启动 LangGraph Server。此模式适用于开发和测试目的。在生产环境中,请部署具有持久化存储后端访问权限的 LangGraph Server。更多详情,请参阅部署选项。
langgraph dev command:langgraph dev 命令输出中提供的 URL,在 LangGraph Studio 中测试您的图:
Safari compatibility Safari 兼容性
--tunnel flag with your command to create a secure tunnel, as Safari has limitations when connecting to localhost servers: