[PR #4876] feat: add 'simple' command to run LangGraph without langgraph.json #4121

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

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

State: closed
Merged: No


Summary

Adds a new langgraph simple command that allows users to run LangGraph applications directly from a file:object reference without requiring a langgraph.json configuration file.

Changes

  • New CLI Command: Implemented langgraph simple $file:$object command in cli.py
  • Direct Graph Loading: Bypasses langgraph.json requirement by dynamically creating minimal configuration
  • Parameter Validation: Includes proper validation of file:object format with informative error messages
  • Server Integration: Leverages existing run_server infrastructure with all standard server options (host, port, reload, debug, etc.)
  • Error Handling: Robust error handling for missing dependencies with clear installation instructions

Usage

langgraph simple ./my_graph.py:my_graph_object
langgraph simple ./my_graph.py:my_graph_object --port 8080 --host 0.0.0.0

Benefits

  • Simplified Development: Eliminates need for langgraph.json during development and testing
  • Quick Prototyping: Enables rapid iteration without configuration overhead
  • Consistent CLI: Follows established patterns and integrates seamlessly with existing commands
  • Full Feature Support: Supports all standard server options (reload, debug, browser launch, etc.)

This enhancement significantly improves developer experience by removing configuration barriers while maintaining full functionality and following established CLI patterns.

**Original Pull Request:** https://github.com/langchain-ai/langgraph/pull/4876 **State:** closed **Merged:** No --- ## Summary Adds a new `langgraph simple` command that allows users to run LangGraph applications directly from a file:object reference without requiring a langgraph.json configuration file. ## Changes - **New CLI Command**: Implemented `langgraph simple $file:$object` command in `cli.py` - **Direct Graph Loading**: Bypasses langgraph.json requirement by dynamically creating minimal configuration - **Parameter Validation**: Includes proper validation of file:object format with informative error messages - **Server Integration**: Leverages existing `run_server` infrastructure with all standard server options (host, port, reload, debug, etc.) - **Error Handling**: Robust error handling for missing dependencies with clear installation instructions ## Usage ```bash langgraph simple ./my_graph.py:my_graph_object langgraph simple ./my_graph.py:my_graph_object --port 8080 --host 0.0.0.0 ``` ## Benefits - **Simplified Development**: Eliminates need for langgraph.json during development and testing - **Quick Prototyping**: Enables rapid iteration without configuration overhead - **Consistent CLI**: Follows established patterns and integrates seamlessly with existing commands - **Full Feature Support**: Supports all standard server options (reload, debug, browser launch, etc.) This enhancement significantly improves developer experience by removing configuration barriers while maintaining full functionality and following established CLI patterns.
yindo added the pull-request label 2026-02-20 17:49:41 -05:00
yindo closed this issue 2026-02-20 17:49:41 -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#4121