[PR #4862] feat: add langgraph simple command to bypass langgraph.json requirement #4107

Closed
opened 2026-02-20 17:49:40 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langchain-ai/langgraph/pull/4862

State: closed
Merged: No


Summary

Added a new langgraph simple command that allows users to start the LangGraph development server without requiring a langgraph.json configuration file. This command takes a file path and object name directly as arguments and dynamically constructs the minimal configuration needed to run the server.

Changes

  • New CLI Command: Added langgraph simple <file:name> command to cli.py
  • Parameter Validation: Implemented parsing and validation for the file:name format with proper error handling
  • Minimal Config Creation: Bypasses langgraph.json validation by dynamically constructing a graphs dictionary
  • Server Integration: Uses the same run_server() function as the dev command with minimal configuration

Usage

# Instead of requiring langgraph.json:
langgraph dev

# Users can now run directly:
langgraph simple ./my_graph.py:my_graph_object

Key Features

  • No Configuration File Required: Eliminates the need for langgraph.json setup
  • Same Server Functionality: Uses identical server startup logic as langgraph dev
  • Full Option Support: Supports all the same CLI options (host, port, debug, etc.)
  • Proper Error Handling: Validates file existence and format with clear error messages

Implementation Details

The command dynamically creates a minimal graphs dictionary {"default": "file_path:object_name"} and passes None values for optional configuration parameters, allowing the server to start with just the essential graph definition while maintaining full compatibility with the existing server infrastructure.

**Original Pull Request:** https://github.com/langchain-ai/langgraph/pull/4862 **State:** closed **Merged:** No --- ## Summary Added a new `langgraph simple` command that allows users to start the LangGraph development server without requiring a `langgraph.json` configuration file. This command takes a file path and object name directly as arguments and dynamically constructs the minimal configuration needed to run the server. ## Changes - **New CLI Command**: Added `langgraph simple <file:name>` command to `cli.py` - **Parameter Validation**: Implemented parsing and validation for the `file:name` format with proper error handling - **Minimal Config Creation**: Bypasses `langgraph.json` validation by dynamically constructing a graphs dictionary - **Server Integration**: Uses the same `run_server()` function as the `dev` command with minimal configuration ## Usage ```bash # Instead of requiring langgraph.json: langgraph dev # Users can now run directly: langgraph simple ./my_graph.py:my_graph_object ``` ## Key Features - **No Configuration File Required**: Eliminates the need for `langgraph.json` setup - **Same Server Functionality**: Uses identical server startup logic as `langgraph dev` - **Full Option Support**: Supports all the same CLI options (host, port, debug, etc.) - **Proper Error Handling**: Validates file existence and format with clear error messages ## Implementation Details The command dynamically creates a minimal graphs dictionary `{"default": "file_path:object_name"}` and passes `None` values for optional configuration parameters, allowing the server to start with just the essential graph definition while maintaining full compatibility with the existing server infrastructure.
yindo added the pull-request label 2026-02-20 17:49:40 -05:00
yindo closed this issue 2026-02-20 17:49:40 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraph#4107