Skip to main content
This quickstart shows you how to set up a LangGraph application locally for testing and development.

Prerequisites

Before you begin, ensure you have an API key for LangSmith (free to sign up).

1. Install the LangGraph CLI

2. Create a LangGraph app

Create a new app from the 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.
Additional templates
If you use 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.

3. Install dependencies

In the root of your new LangGraph app, install the dependencies in edit mode so your local changes are used by the server:

4. Create a .env file

You will find a .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:

5. Launch Agent Server

Start the Agent Server locally:
Sample output:
The langgraph dev command starts Agent Server in an in-memory mode. This mode is suitable for development and testing purposes.
For production use, deploy Agent Server with a persistent storage backend. For more information, refer to the LangSmith platform options.To understand when to use langgraph dev vs langgraph up, see the Local development & testing guide.

6. Test the API

  1. Install the LangGraph Python SDK:
  1. Send a message to the assistant (threadless run):

Next steps

Now that you have a LangGraph app running locally, you’re ready to deploy it: Choose a hosting option for LangSmith:
  • Cloud: Fastest setup, fully managed (recommended).
  • Hybrid: in your cloud, managed by LangChain.
  • Self-hosted: Full control in your infrastructure.
For more details, refer to the Platform setup comparison. Then deploy your app: Explore features:
Connect these docs programmatically to Claude, VSCode, and more via MCP for real-time answers.