npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

create-langgraph

v1.1.5

Published

Create a new LangGraph project

Readme

create-langgraph

npm version License: MIT

The official scaffolding tool for LangGraph.js projects. Quickly bootstrap new LangGraph applications from curated templates or generate configuration files for existing projects.

Quick Start

Create a new LangGraph project with a single command:

# Using npm
npm init langgraph@latest

# Using yarn
yarn create langgraph

# Using pnpm
pnpm create langgraph

# Using pnpm
pnpm create langgraph

# Using bun
bunx create-langgraph

Follow the interactive prompts to select a template and configure your project.

Templates

Choose from a variety of production-ready templates:

| Template | Description | | ------------------------------------------------------------------------------------ | --------------------------------------------------------------- | | New LangGraph Project | A simple, minimal chatbot with memory | | ReAct Agent | A flexible agent that can be extended with many tools | | Memory Agent | A ReAct-style agent with persistent memory across conversations | | Retrieval Agent | An agent with retrieval-based question-answering | | Data-enrichment Agent | An agent that performs web searches and organizes findings |

Using a Specific Template

Skip the interactive prompt by specifying a template directly:

npx create-langgraph@latest my-project --template react-agent-js

Available template IDs:

  • new-langgraph-project-js
  • react-agent-js
  • memory-agent-js
  • retrieval-agent-js
  • data-enrichment-js

Commands

create-langgraph [path]

Creates a new LangGraph project at the specified path.

npx create-langgraph@latest my-awesome-agent

Options:

  • -t, --template <template> — Use a specific template (skips interactive selection)

What it does:

  1. Downloads the selected template from GitHub
  2. Extracts it to your target directory
  3. Optionally initializes a Git repository
  4. Provides next steps for getting started

create-langgraph config [path]

Scans your project for LangGraph agents and generates a langgraph.json configuration file.

# In your project directory
npx create-langgraph@latest config

# Or specify a path
npx create-langgraph@latest config ./my-project

This command is useful when:

  • You have an existing project and want to add LangGraph Platform support
  • You've added new agents and need to update your configuration
  • You want to automatically detect all agents in your codebase

Agent Detection

The config command automatically detects LangGraph agents defined using these patterns:

ESM (ES Modules)

// Using createAgent
export const agent = createAgent({ model, tools });

// Using StateGraph
export const graph = new StateGraph(annotation).compile();

// Using workflow builder pattern
export const app = workflow.compile();

CommonJS

// Using module.exports
module.exports.agent = createAgent({ model, tools });
module.exports.graph = workflow.compile();

// Using exports shorthand
exports.myAgent = createAgent({ model, tools });

What Gets Detected

The scanner looks for:

  • createAgent() function calls
  • new StateGraph(...).compile() patterns
  • workflow.compile() or builder.compile() patterns

Important: Only exported agents are included in the generated configuration. Unexported agents will be listed as warnings so you can add the export keyword if needed.

Generated Configuration

The config command generates a langgraph.json file like this:

{
  "node_version": "20",
  "graphs": {
    "agent": "./src/agent.ts:agent",
    "searchAgent": "./src/search.ts:searchAgent"
  },
  "env": ".env"
}

The configuration includes:

  • node_version — Detected from your current Node.js version
  • graphs — Map of agent names to their file paths and export names
  • env — Path to .env file (if one exists)

Project Structure

After scaffolding, your project will have this structure:

my-project/
├── src/
│   └── agent.ts       # Your LangGraph agent
├── langgraph.json     # LangGraph configuration
├── package.json
├── tsconfig.json
└── .env.example       # Environment variables template

Next Steps After Creating a Project

# Navigate to your project
cd my-project

# Install dependencies
npm install  # or yarn, pnpm, bun

# Start the LangGraph development server
npx @langchain/langgraph-cli@latest dev

The development server provides:

  • A local API server for your agents
  • Hot reloading during development
  • Built-in debugging tools

Analytics

This CLI collects anonymous usage analytics to help improve the tool. The following information is collected:

  • Operating system and version
  • Node.js version
  • CLI version
  • Command executed

No personal information, project details, or code is ever collected.

To opt out of analytics, set the environment variable:

export LANGGRAPH_CLI_NO_ANALYTICS=1

Requirements

  • Node.js 18 or later
  • npm, yarn, pnpm, or bun

Related Packages

License

MIT © LangChain