No project description provided
Project description
LangGraph API
This package implements the LangGraph API for rapid development and testing. Build and iterate on LangGraph agents with a tight feedback loop. The sesrver is backed by a predominently in-memory data store that is persisted to local disk when the server is restarted.
For production use, see the various deployment options for the LangGraph API, which are backed by a production-grade database.
Installation
Install the langgraph-cli
package with the inmem
extra. Your CLI version must be no lower than 0.1.55
.
pip install -U langgraph-cli[inmem]
Quickstart
-
(Optional) Clone a starter template:
langgraph new --template new-langgraph-project-python ./my-project cd my-project
(Recommended) Use a virtual environment and install dependencies:
python -m venv .venv source .venv/bin/activate python -m pip install .
-
Start the development server:
langgraph dev --config ./langgraph.json
-
The server will launch, opening a browser window with the graph UI. Interact with your graph or make code edits; the server automatically reloads on changes.
Usage
Start the development server:
langgraph dev
Your agent's state (threads, runs, assistants) persists in memory while the server is running - perfect for development and testing. Each run's state is tracked and can be inspected, making it easy to debug and improve your agent's behavior.
How-To
Attaching a debugger
Debug mode lets you attach your IDE's debugger to the LangGraph API server to set breakpoints and step through your code line-by-line.
-
Install debugpy:
pip install debugpy
-
Start the server in debug mode:
langgraph dev --debug-port 5678
-
Configure your IDE:
- VS Code: Add this launch configuration:
{ "name": "Attach to LangGraph", "type": "debugpy", "request": "attach", "connect": { "host": "0.0.0.0", "port": 5678 }, }
- PyCharm: Use "Attach to Process" and select the langgraph process
- VS Code: Add this launch configuration:
-
Set breakpoints in your graph code and start debugging.
CLI options
langgraph dev [OPTIONS]
Options:
--debug-port INTEGER Enable remote debugging on specified port
--no-browser Skip opening browser on startup
--n-jobs-per-worker INTEGER Maximum concurrent jobs per worker process
--config PATH Custom configuration file path
--no-reload Disable code hot reloading
--port INTEGER HTTP server port (default: 8000)
--host TEXT HTTP server host (default: localhost)
License
This project is licensed under the Elastic License 2.0 - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file langgraph_api-0.0.2.tar.gz
.
File metadata
- Download URL: langgraph_api-0.0.2.tar.gz
- Upload date:
- Size: 145.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.29
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b751afca96cb6db67fe2f48e798ada27a4df068f0df86b36d2b8eee52344bbf0 |
|
MD5 | 6244274fb72b9b8d2f269e054cb4457f |
|
BLAKE2b-256 | 4b8fc3e7594893ac432136c856ab6bdf3fcd673de4af8f59ab4197f8e61da4d4 |
File details
Details for the file langgraph_api-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: langgraph_api-0.0.2-py3-none-any.whl
- Upload date:
- Size: 168.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.29
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a30fb21987572eacc93dd1c69c2155c17957afed71dde18d6f47992b3124d65 |
|
MD5 | 734ca7196acc0d01cab6296b97c34134 |
|
BLAKE2b-256 | a49f344fc4f513e6babe88dbdcd24a5fa62f0bca5710fc00f69ae10b140db8be |