mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-18 21:55:46 +02:00
Compare commits
6
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
13d66e0ebb | ||
|
|
9fcd0d47f5 | ||
|
|
4749a168a9 | ||
|
|
8f285a7463 | ||
|
|
98c369a0cf | ||
|
|
f45ee34ca3 |
@@ -50,6 +50,7 @@ The LangGraph CLI requires a JSON configuration file that follows this [schema](
|
||||
| <span style="white-space: nowrap;">`python_version`</span> | `3.11`, `3.12`, or `3.13`. Defaults to `3.11`. |
|
||||
| <span style="white-space: nowrap;">`node_version`</span> | Specify `node_version: 20` to use LangGraph.js. |
|
||||
| <span style="white-space: nowrap;">`pip_config_file`</span> | Path to `pip` config file. |
|
||||
| <span style="white-space: nowrap;">`pip_installer`</span> | _(Added in v0.3)_ Optional. Python package installer selector. It can be set to `"auto"`, `"pip"`, or `"uv"`. From version 0.3 onward the default strategy is to run `uv pip`, which typically delivers faster builds while remaining a drop-in replacement. In the uncommon situation where `uv` cannot handle your dependency graph or the structure of your `pyproject.toml`, specify `"pip"` here to revert to the earlier behaviour. |
|
||||
| <span style="white-space: nowrap;">`dockerfile_lines`</span> | Array of additional lines to add to Dockerfile following the import from parent image. |
|
||||
| <span style="white-space: nowrap;">`checkpointer`</span> | Configuration for the checkpointer. Contains a `ttl` field which is an object with the following keys: <ul><li>`strategy`: How to handle expired checkpoints (e.g., `"delete"`).</li><li>`sweep_interval_minutes`: How often to check for expired checkpoints (integer).</li><li>`default_ttl`: Default time-to-live for checkpoints in **minutes** (integer). Defines how long checkpoints are kept before the specified strategy is applied.</li></ul> |
|
||||
| <span style="white-space: nowrap;">`http`</span> | HTTP server configuration with the following fields: <ul><li>`app`: Path to custom Starlette/FastAPI app (e.g., `"./src/agent/webapp.py:app"`). See [custom routes guide](../../how-tos/http/custom_routes.md).</li><li>`disable_assistants`: Disable `/assistants` routes</li><li>`disable_threads`: Disable `/threads` routes</li><li>`disable_runs`: Disable `/runs` routes</li><li>`disable_store`: Disable `/store` routes</li><li>`disable_meta`: Disable `/ok`, `/info`, `/metrics`, and `/docs` routes</li><li>`cors`: CORS configuration with fields for `allow_origins`, `allow_methods`, `allow_headers`, etc.</li><li>`configurable_headers`: Define which request headers to exclude or include as a run's configurable values.</li></ul> |
|
||||
@@ -128,7 +129,7 @@ The LangGraph CLI requires a JSON configuration file that follows this [schema](
|
||||
- `cohere:embed-english-v3.0`: 1024
|
||||
- `cohere:embed-english-light-v3.0`: 384
|
||||
- `cohere:embed-multilingual-v3.0`: 1024
|
||||
- `cohere:embed-multilingual-light-v3.0`: 384
|
||||
- `cohere:embed-multilingual-light-v3.0`: 384
|
||||
|
||||
#### Semantic search with a custom embedding function
|
||||
|
||||
@@ -361,8 +362,8 @@ The LangGraph CLI requires a JSON configuration file that follows this [schema](
|
||||
|
||||
**Options**
|
||||
|
||||
| Option | Default | Description |
|
||||
| -------------------- | ---------------- | ---------------------------------------------------------------------------------------------------------------------------- |
|
||||
| Option | Default | Description |
|
||||
| -------------------- | ---------------- | --------------------------------------------------------------------------------------------------------------- |
|
||||
| `--platform TEXT` | | Target platform(s) to build the Docker image for. Example: `langgraph build --platform linux/amd64,linux/arm64` |
|
||||
| `-t, --tag TEXT` | | **Required**. Tag for the Docker image. Example: `langgraph build -t my-image` |
|
||||
| `--pull / --no-pull` | `--pull` | Build with latest remote Docker image. Use `--no-pull` for running the LangGraph Platform API server with locally built images. |
|
||||
@@ -381,8 +382,8 @@ The LangGraph CLI requires a JSON configuration file that follows this [schema](
|
||||
|
||||
**Options**
|
||||
|
||||
| Option | Default | Description |
|
||||
| -------------------- | ---------------- | ---------------------------------------------------------------------------------------------------------------------------- |
|
||||
| Option | Default | Description |
|
||||
| -------------------- | ---------------- | --------------------------------------------------------------------------------------------------------------- |
|
||||
| `--platform TEXT` | | Target platform(s) to build the Docker image for. Example: `langgraph build --platform linux/amd64,linux/arm64` |
|
||||
| `-t, --tag TEXT` | | **Required**. Tag for the Docker image. Example: `langgraph build -t my-image` |
|
||||
| `--no-pull` | | Use locally built images. Defaults to `false` to build with latest remote Docker image. |
|
||||
|
||||
@@ -1,127 +0,0 @@
|
||||
# Data Storage and Privacy
|
||||
|
||||
This document provides a comprehensive overview of what data is stored, collected, and processed when using LangGraph, particularly with the CLI tools like `langgraph dev`.
|
||||
|
||||
## What Data is Stored
|
||||
|
||||
### CLI Telemetry (Opt-out)
|
||||
|
||||
By default, the LangGraph CLI collects minimal analytics data to help improve the tool:
|
||||
|
||||
**Data Collected:**
|
||||
- CLI command used (e.g., `dev`, `up`, `build`)
|
||||
- CLI version
|
||||
- Operating system type and version
|
||||
- Python version
|
||||
- Anonymized parameter usage (boolean flags indicating non-default options were used)
|
||||
|
||||
**Data NOT Collected:**
|
||||
- Actual parameter values
|
||||
- File contents or paths
|
||||
- Personal information
|
||||
- Code or graph implementations
|
||||
- API keys or sensitive data
|
||||
|
||||
**How to Opt Out:**
|
||||
Set the environment variable `LANGGRAPH_CLI_NO_ANALYTICS=1` to disable all CLI analytics collection.
|
||||
|
||||
### LangSmith Integration (Opt-in)
|
||||
|
||||
When a `LANGSMITH_API_KEY` is provided (not required):
|
||||
- Metadata on number of runs executed
|
||||
- Current API version being run
|
||||
- Trace data (if tracing is enabled)
|
||||
|
||||
This data is only sent when explicitly configured with LangSmith credentials.
|
||||
|
||||
### Tracing Data (Opt-in)
|
||||
|
||||
When tracing is enabled:
|
||||
- Execution traces are logged to the configured tracing backend
|
||||
- This requires explicit configuration and is not enabled by default
|
||||
|
||||
## What Data is NOT Stored Remotely
|
||||
|
||||
- **Checkpoints**: Stored locally in your development environment
|
||||
- **Memory store data**: Persisted locally, not transmitted
|
||||
- **Graph state**: Remains in your local environment
|
||||
- **Application data**: Your actual application logic and data stay local
|
||||
|
||||
## Local Data Storage
|
||||
|
||||
### Development Mode (`langgraph dev`)
|
||||
|
||||
When using `langgraph dev`:
|
||||
- State is persisted to a local directory
|
||||
- Checkpoints are stored locally for debugging and development
|
||||
- No remote storage or transmission of your application data
|
||||
|
||||
### Checkpoints and State Persistence
|
||||
|
||||
LangGraph automatically persists:
|
||||
- **Checkpoints**: Snapshots of graph state at each execution step
|
||||
- **Thread data**: Conversation/execution history organized by thread IDs
|
||||
- **Graph state**: Node outputs, intermediate results, and execution metadata
|
||||
- **Memory/Store data**: Information that persists across multiple threads
|
||||
|
||||
**Storage Locations:**
|
||||
- **Local development**: Local directory (configurable)
|
||||
- **Docker deployment**: Local Docker volumes
|
||||
- **LangGraph Platform**: Managed database infrastructure
|
||||
|
||||
## Security and Encryption
|
||||
|
||||
### Data Encryption
|
||||
|
||||
- Checkpointers can optionally encrypt all persisted state
|
||||
- Encryption uses AES encryption via `EncryptedSerializer`
|
||||
- When `LANGGRAPH_AES_KEY` environment variable is present, encryption is automatically enabled on LangGraph Platform
|
||||
|
||||
### Data Retention
|
||||
|
||||
- **TTL (Time-to-Live)**: Configurable automatic cleanup of old data
|
||||
- **Default TTL**: Can be set in minutes for automatic expiration
|
||||
- **Automatic sweeping**: Expired data is automatically removed at configurable intervals
|
||||
|
||||
## Privacy Controls
|
||||
|
||||
### Environment Variables
|
||||
|
||||
Key environment variables for controlling data collection and storage:
|
||||
|
||||
- `LANGGRAPH_CLI_NO_ANALYTICS=1`: Disable CLI analytics collection
|
||||
- `LANGGRAPH_AES_KEY`: Enable automatic encryption of stored data
|
||||
- `LANGSMITH_TRACING=false`: Disable tracing to LangSmith (self-hosted deployments)
|
||||
- `LANGSMITH_API_KEY`: Enable LangSmith integration (opt-in)
|
||||
|
||||
### Logging Controls
|
||||
|
||||
- `LOG_LEVEL`: Control verbosity of logs
|
||||
- `LOG_JSON`: Format logs as JSON
|
||||
- Various other logging configuration options
|
||||
|
||||
## Security Policy
|
||||
|
||||
For security vulnerabilities:
|
||||
- Report through the huntr.com bounty program
|
||||
- LangGraph is in-scope for security bounties
|
||||
- Security contact: `security@langchain.dev`
|
||||
|
||||
## Best Practices for Privacy
|
||||
|
||||
1. **Review Analytics**: Set `LANGGRAPH_CLI_NO_ANALYTICS=1` if you prefer not to share usage analytics
|
||||
2. **Enable Encryption**: Use `LANGGRAPH_AES_KEY` for sensitive data
|
||||
3. **Configure TTL**: Set appropriate data retention policies
|
||||
4. **Monitor Tracing**: Only enable tracing when needed and review what data is being sent
|
||||
5. **Environment Variables**: Audit your environment variables to ensure proper privacy controls
|
||||
|
||||
## Summary
|
||||
|
||||
LangGraph is designed with privacy in mind:
|
||||
- Minimal data collection (analytics can be disabled)
|
||||
- Local storage by default for development
|
||||
- Optional encryption for sensitive data
|
||||
- Clear opt-in requirements for external services
|
||||
- Comprehensive privacy controls through environment variables
|
||||
|
||||
Your application data, checkpoints, and state remain under your control and are not transmitted unless you explicitly configure external services like LangSmith.
|
||||
@@ -63,4 +63,8 @@ Yes! LangGraph is totally ambivalent to what LLMs are used under the hood. The m
|
||||
|
||||
Yes! You can use the [development version of LangGraph Server](../tutorials/langgraph-platform/local-server.md) to run the backend locally.
|
||||
This will connect to the studio frontend hosted as part of LangSmith.
|
||||
If you set an environment variable of `LANGSMITH_TRACING=false` then no traces will be sent to LangSmith.
|
||||
If you set an environment variable of `LANGSMITH_TRACING=false`, then no traces will be sent to LangSmith.
|
||||
|
||||
## What does "nodes executed" mean for LangGraph Platform usage?
|
||||
|
||||
**Nodes Executed** is the aggregate number of nodes in a LangGraph application that are called and completed successfully during an invocation of the application. If a node in the graph is not called during execution or ends in an error state, these nodes will not be counted. If a node is called and completes successfully multiple times, each occurrence will be counted.
|
||||
|
||||
@@ -17,7 +17,7 @@ Use LangGraph Server to create and manage [assistants](assistants.md), [threads]
|
||||
|
||||
There are two versions of LangGraph Server:
|
||||
|
||||
- `Lite` is a limited version of the LangGraph Server that you can run locally or in a self-hosted manner (up to 1 million nodes executed per year).
|
||||
- `Lite` is a limited version of the LangGraph Server that you can run locally or in a self-hosted manner (up to 1 million [nodes executed](../concepts/faq.md#what-does-nodes-executed-mean-for-langgraph-platform-usage) per year).
|
||||
- `Enterprise` is the full version of the LangGraph Server. To use the `Enterprise` version, you must acquire a license key that you will need to specify when running the Docker image. To acquire a license key, please email sales@langchain.dev.
|
||||
|
||||
Feature Differences:
|
||||
|
||||
@@ -20,7 +20,7 @@ There are three different plans for using it.
|
||||
| | Developer | Plus | Enterprise |
|
||||
|------------------------------------------------------------------|---------------------------------------------|-------------------------------------------------------|-----------------------------------------------------|
|
||||
| Deployment Options | Standalone Container (Lite) | Cloud SaaS | <ul><li>Cloud SaaS</li><li>Self-Hosted Data Plane</li><li>Self-Hosted Control Plane</li><li>Standalone Container (Enterprise)</li></ul> |
|
||||
| Usage | Free, limited to 1M nodes executed per year | Free while in Beta, will be charged per node executed | Custom |
|
||||
| Usage | Free, limited to 1M [nodes executed](../concepts/faq.md#what-does-nodes-executed-mean-for-langgraph-platform-usage) per year | See [Pricing](https://www.langchain.com/langgraph-platform-pricing) | Custom |
|
||||
| APIs for retrieving and updating state and conversational history | ✅ | ✅ | ✅ |
|
||||
| APIs for retrieving and updating long-term memory | ✅ | ✅ | ✅ |
|
||||
| Horizontally scalable task queues and servers | ✅ | ✅ | ✅ |
|
||||
|
||||
@@ -184,7 +184,6 @@ nav:
|
||||
- cloud/how-tos/datasets_studio.md
|
||||
- LangGraph SDK: concepts/sdk.md
|
||||
- Data management:
|
||||
- Data storage & privacy: concepts/data_storage_and_privacy.md
|
||||
- Add semantic search: cloud/deployment/semantic_search.md
|
||||
- Add TTLs: how-tos/ttl/configure_ttl.md
|
||||
- Authentication & access control:
|
||||
|
||||
@@ -275,7 +275,7 @@ def apply_writes(
|
||||
)
|
||||
|
||||
# clear pending sends
|
||||
if checkpoint["pending_sends"] and bump_step:
|
||||
if checkpoint.get("pending_sends") and bump_step:
|
||||
checkpoint["pending_sends"].clear()
|
||||
|
||||
# Group writes by channel
|
||||
@@ -286,7 +286,7 @@ def apply_writes(
|
||||
if chan in (NO_WRITES, PUSH, RESUME, INTERRUPT, RETURN, ERROR):
|
||||
pass
|
||||
elif chan == TASKS:
|
||||
checkpoint["pending_sends"].append(val)
|
||||
checkpoint.setdefault("pending_sends", []).append(val)
|
||||
elif chan in channels:
|
||||
pending_writes_by_channel[chan].append(val)
|
||||
else:
|
||||
@@ -327,7 +327,7 @@ def apply_writes(
|
||||
# If this is (tentatively) the last superstep, notify all channels of finish
|
||||
if (
|
||||
bump_step
|
||||
and not checkpoint["pending_sends"]
|
||||
and not checkpoint.get("pending_sends")
|
||||
and updated_channels.isdisjoint(trigger_to_nodes)
|
||||
):
|
||||
for chan in channels:
|
||||
@@ -344,17 +344,6 @@ def apply_writes(
|
||||
return pending_writes_by_managed, updated_channels
|
||||
|
||||
|
||||
def has_next_tasks(
|
||||
trigger_to_nodes: Mapping[str, Sequence[str]],
|
||||
updated_channels: set[str],
|
||||
checkpoint: Checkpoint,
|
||||
) -> bool:
|
||||
"""Check if there are any tasks that should be run in the next step."""
|
||||
return bool(checkpoint["pending_sends"]) or not updated_channels.isdisjoint(
|
||||
trigger_to_nodes
|
||||
)
|
||||
|
||||
|
||||
@overload
|
||||
def prepare_next_tasks(
|
||||
checkpoint: Checkpoint,
|
||||
@@ -446,7 +435,7 @@ def prepare_next_tasks(
|
||||
null_version = checkpoint_null_version(checkpoint)
|
||||
tasks: list[Union[PregelTask, PregelExecutableTask]] = []
|
||||
# Consume pending_sends from previous step
|
||||
for idx, _ in enumerate(checkpoint["pending_sends"]):
|
||||
for idx, _ in enumerate(checkpoint.get("pending_sends", ())):
|
||||
if task := prepare_single_task(
|
||||
(PUSH, idx),
|
||||
None,
|
||||
@@ -648,7 +637,7 @@ def prepare_single_task(
|
||||
# SEND tasks, executed in superstep n+1
|
||||
# (PUSH, idx of pending send)
|
||||
idx = cast(int, task_path[1])
|
||||
if idx >= len(checkpoint["pending_sends"]):
|
||||
if idx >= len(checkpoint.get("pending_sends", ())):
|
||||
return
|
||||
packet = checkpoint["pending_sends"][idx]
|
||||
if not isinstance(packet, Send):
|
||||
|
||||
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
||||
|
||||
[project]
|
||||
name = "langgraph"
|
||||
version = "0.4.8"
|
||||
version = "0.4.10"
|
||||
description = "Building stateful, multi-actor applications with LLMs"
|
||||
authors = []
|
||||
requires-python = ">=3.9"
|
||||
|
||||
Generated
+1
-1
@@ -1197,7 +1197,7 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "langgraph"
|
||||
version = "0.4.8"
|
||||
version = "0.4.10"
|
||||
source = { editable = "." }
|
||||
dependencies = [
|
||||
{ name = "langchain-core" },
|
||||
|
||||
Generated
+742
-742
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user