Repository navigation
Set up Cursor Cloud dev environment + AGENTS.md notes - #7
Conversation
Co-authored-by: jnyross <jnyross@users.noreply.github.com>
📝 WalkthroughWalkthroughAdded Cursor Cloud-specific setup and operational guidance to ChangesCursor Cloud guidance
Estimated code review effort: 1 (Trivial) | ~3 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-authored-by: jnyross <jnyross@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@AGENTS.md`:
- Around line 138-142: Update the automatic search backend guidance in AGENTS.md
to document the actual auto precedence: Tavily first, then Firecrawl CLI, then
DuckDuckGo/ddgs. Replace the existing Firecrawl/DuckDuckGo-only wording while
preserving the surrounding environment-variable and fallback guidance.
- Around line 149-151: Update the “Agent HITL resume” guidance to instruct
scripts to construct the graph via build_graph() with a checkpointer instead of
using the module-level graph, which is a Studio export without a custom
checkpointer. State that Command(resume=...) must reuse the exact config,
including the same configurable thread_id, from the initial paused run when
resuming the interrupted act node.
- Around line 143-148: Update the HITL example in examples/hitl_basic.py so the
request passed to AgentState.messages uses an OpenAI-style message dictionary
with role "human" and the request content, rather than a HumanMessage object.
Remove the HumanMessage import if it becomes unused, while preserving the
existing demo behavior.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
| Leave `META_LEGAL_SEARCH_BACKEND=auto` / `META_LEGAL_FETCH_BACKEND=auto` so | ||
| Firecrawl is preferred when the key is present, with DuckDuckGo as fallback. | ||
| Without `OPENROUTER_API_KEY`, research workers produce no findings (planner + | ||
| dossier path still runs). If OpenRouter rejects the rolling alias, pin | ||
| `OPENROUTER_MODEL=deepseek/deepseek-v4-flash-0731`. |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
rg -n -C 8 \
'META_LEGAL_SEARCH_BACKEND|TAVILY_API_KEY|FIRECRAWL_API_KEY|firecrawl_cli|DuckDuckGo|DDG' \
.env.example src examples scripts AGENTS.mdRepository: jnyross/langgraph-graph
Length of output: 28384
Update the automatic search precedence in AGENTS.md.
.env.example documents Tavily before DuckDuckGo, and src/langgraph_graph/meta_legal/tools/search.py:auto runs Tavily first, then firecrawl CLI, then ddgs/DuckDuckGo. Replace the existing Firecrawl/DuckDuckGo fallback wording with the full auto order, including firecrawl_cli.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@AGENTS.md` around lines 138 - 142, Update the automatic search backend
guidance in AGENTS.md to document the actual auto precedence: Tavily first, then
Firecrawl CLI, then DuckDuckGo/ddgs. Replace the existing
Firecrawl/DuckDuckGo-only wording while preserving the surrounding
environment-variable and fallback guidance.
| - **`AgentState.messages` must be OpenAI-style dicts** (`{"role", "content"}`), | ||
| not LangChain `Message` objects. Invoking the `agent` graph with | ||
| `HumanMessage(...)` (as `examples/hitl_basic.py` does) raises a pydantic | ||
| `dict_type` error under the installed `langchain-core`. Pass dict messages | ||
| when driving the graph directly (e.g. via the dev-server `/runs` API or a | ||
| script). |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
rg -n -C 8 \
'HumanMessage|AgentState|messages|dict_type' \
examples src AGENTS.mdRepository: jnyross/langgraph-graph
Length of output: 31290
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== pyproject dependency versions =="
if [ -f pyproject.toml ]; then
sed -n '1,220p' pyproject.toml | rg -n "langgraph|langchain-core|langchain|pydantic|langchain-openai|dev-dependencies|package-system|python" -C 2 || true
fi
echo "== lockfile dependency entries =="
for f in poetry.lock uv.lock lock.txt requirements.txt requirements*.txt; do
[ -f "$f" ] && { echo "--- $f"; rg -n "langgraph|langchain-core|langchain|pydantic|version\s*=|:" "$f" | head -120 || true; }
done
echo "== lockfile lock files =="
git ls-files | rg '(^|/)(poetry\.lock|uv\.lock|requirements.*\.txt|pyproject\.toml)$'Repository: jnyross/langgraph-graph
Length of output: 36764
🌐 Web query:
LangChain Core 0.3.30 HumanMessage model_dump JSON schema dict_type pydantic
💡 Result:
In LangChain Core 0.3.30, HumanMessage inherits from BaseMessage, which is a Pydantic model [1][2]. As a Pydantic V2 model, HumanMessage supports the model_dump() method [3], which is the recommended way to export the message data to a dictionary, replacing the deprecated dict() method [3]. Key details regarding model_dump and serialization: 1. Method Usage: You can call message.model_dump() to convert the HumanMessage instance into a standard Python dictionary [1][3]. By default, this dictionary will contain the fields defined in the schema, such as content, additional_kwargs, response_metadata, type, name, and id [1][4]. 2. Serialization and JSON Schema: Because BaseMessage (and by extension HumanMessage) is a Pydantic model, it supports standard Pydantic serialization features. You can generate a JSON schema for a HumanMessage object using the model_json_schema() method provided by Pydantic [1]. 3. dict_type and Customization: When using model_dump(), you can control the output dictionary format by passing parameters such as include, exclude, or by_alias. For instance, if you need to exclude specific fields when serializing a message, you can use: message.model_dump(exclude={"type"}) [5] 4. Integration: LangChain core utilities often use these methods for message processing. For example, message_to_dict(message: BaseMessage) internally returns {"type": message.type, "data": message.model_dump()} [1]. If you are working with older LangChain versions or migrating code, ensure you are using model_dump() rather than dict() to avoid Pydantic deprecation warnings, as dict() is removed in Pydantic V3 [3].
Citations:
- 1: https://github.com/langchain-ai/langchain/blob/master/libs/core/langchain_core/messages/base.py
- 2: https://github.com/langchain-ai/langchain/blob/master/libs/core/langchain_core/messages/human.py
- 3: The
dictmethod is deprecated; usemodel_dumpinstead [pydantic] langchain-ai/langchain#15997 - 4: https://github.com/langchain-ai/langchain/blob/e3f30b4cdebf750175e1764c969e6d56921c865d/libs/core/langchain_core/messages/base.py
- 5: https://github.com/langchain-ai/langchain/blob/langchain-core==0.3.28/libs/core/langchain_core/messages/utils.py
🏁 Script executed:
#!/bin/bash
set -euo pipefail
python3 - <<'PY'
try:
import langchain_core, pydantic
print("langchain_core_version", getattr(langchain_core, "__version__", "unknown"))
print("pydantic_version", getattr(pydantic, "__version__", "unknown"))
except Exception as exc:
print("IMPORT_FAILED", type(exc).__name__, str(exc))
raise SystemExit(0)
from langchain_core.messages import HumanMessage
from typing import Any
from pydantic import BaseModel, Field
class AgentState(BaseModel):
input: str = Field(default="")
messages: list[dict[str, Any]] = Field(default_factory=list)
message = HumanMessage(content="remind")
print("HumanMessage_type", type(message))
print("HumanMessage_dict_keys", list(message.model_dump().keys()))
print("is_dict", isinstance(message, dict))
try:
result = AgentState.model_validate({"input": "request", "messages": [message]})
print("parsing_result_messages_type", type(result.messages))
print("parsing_result_messages", result.messages)
except Exception as exc:
print("validation_error_type", type(exc).__name__)
print("validation_error_repr", repr(exc))
PYRepository: jnyross/langgraph-graph
Length of output: 228
🌐 Web query:
Pydantic V2 list[dict] accepts non-dict custom BaseModel model_dump
💡 Result:
In Pydantic V2, the model_dump() method on a BaseModel is designed to recursively convert models into dictionaries by default [1][2][3]. However, if you are using a RootModel, or if you have customized serialization using @model_serializer, the output of model_dump() is not guaranteed to be a dict [4][5][6]. Key points regarding this behavior: 1. RootModel behavior: When you use RootModel[T], the model_dump() method returns the dumped representation of the root type T [4][6]. If T is a list, model_dump() will return a list rather than a dict [4][6]. This is intended behavior, as the model acts as a container for the root type [2][4]. 2. Custom Serializers: If you use the @model_serializer decorator, you can explicitly override the return value of model_dump() to return any Python object, such as a str, list, or even a custom object [5][6]. 3. Type Hinting Inconsistencies: Because model_dump() can return types other than dict[str, Any] (especially in RootModel scenarios), you may encounter type-checking warnings in IDEs or tools like mypy [4][6][7]. Pydantic developers have noted that the type hints for model_dump are often generic or generalized as dict[str, Any] for standard models, which does not always match the runtime reality for RootModel [4][6][7]. 4. Recommended Workaround: If you need precise type checking for a RootModel or a model with a custom serializer, you can override the model_dump method signature within an if TYPE_CHECKING: block in your class definition [1][5][7]. This allows you to inform static type checkers of the actual return type without affecting runtime behavior [5][7]. Example of overriding for type checkers: from typing import TYPE_CHECKING, Literal from pydantic import BaseModel, model_serializer class MyModel(BaseModel): data: list[str] @model_serializer def custom_dump(self) -> list[str]: return self.data if TYPE_CHECKING: def model_dump(self, kwargs) -> list[str]:... [5][7]
Citations:
- 1: https://pydantic.dev/docs/validation/2.11/concepts/serialization
- 2: https://pydantic.dev/docs/validation/2.10/concepts/models/
- 3: https://github.com/pydantic/pydantic/blob/main/docs/concepts/serialization.md
- 4: RootModel.model_dump type-hints its return as original input model object instead of json/dict pydantic/pydantic#8620
- 5: https://pydantic.dev/docs/validation/2.2/usage/serialization/
- 6:
model_dump()not accurate return type pydantic/pydantic#6190 - 7: The return type hint of
model.model_dumpis mismatched with the runtime type pydantic/pydantic#7708
🌐 Web query:
Pydantic 2.9 list[dict] dict_type validation error BaseModel model dict
💡 Result:
In Pydantic 2.9, if you encounter a validation error when working with a list of dictionaries, the solution depends on whether you are trying to validate the list as a field within a BaseModel or as a standalone object [1][2]. A dict_type or model_type validation error typically occurs when the input data structure does not match the expected type definition (e.g., passing a list where a dict is expected, or vice versa) [3][4]. To correctly validate a list of dictionaries, use one of the following approaches: 1. Use TypeAdapter for Top-Level Lists If you have a list of dictionaries that is not wrapped in a parent model, use TypeAdapter [5][2]. This is the recommended way to validate top-level lists [2]. from pydantic import TypeAdapter, BaseModel from typing import List class Item(BaseModel): id: int name: str # Validate a list of dicts directly adapter = TypeAdapter(List[Item]) items = adapter.validate_python([{'id': 1, 'name': 'Test'}]) 2. Use a Container Model If your list of dictionaries is part of a larger data structure (e.g., an API response), define a container model that holds the list as a field [1][2]. class Container(BaseModel): items: List[Item] # Validate the entire structure data = {"items": [{'id': 1, 'name': 'Test'}]} container = Container.model_validate(data) Common Pitfalls: - Incorrect Type Hinting: Ensure you are using list[dict] or List[Dict[str, Any]] correctly within your model definitions [4]. Pydantic requires explicit types for nested dictionaries to perform validation; using a generic dict will skip validation for its contents [3]. - Input Mismatch: A dict_type error specifically indicates that the input received is not a dictionary. If you are seeing this, verify that your source data is not already a list or another unexpected type at the point of validation [3][4]. - Performance: For large datasets, prefer model_validate_json over model_validate(json.loads(...)) as it is more efficient by utilizing Pydantic's internal Rust parser [2][6]. Top results: [3][4][5][1][2]
Citations:
- 1: https://www.pythontutorials.net/blog/how-to-parse-list-of-models-with-pydantic/
- 2: https://jsonic.io/guides/json-to-pydantic
- 3: https://pydantic.dev/docs/validation/2.9/errors/validation_errors/
- 4: https://pydantic.dev/docs/validation/2.9/concepts/models/
- 5: https://pydantic.dev/docs/validation/2.9/concepts/type_adapter/
- 6: https://pydantic.dev/docs/validation/2.9/concepts/performance/
🌐 Web query:
LangGraph PydanticModel config schema dict fields messages list[dict] StateGraph AgentState
💡 Result:
In LangGraph, you can use a Pydantic BaseModel as the state schema for a StateGraph to enable run-time validation and complex data structures [1][2][3]. When using Pydantic, it is common to define the state as a class inheriting from BaseModel [3][4]. To handle a list of messages, such as those found in an agent, you typically use the Annotated type with a reducer function like add_messages [5][3][4]. This ensures that when nodes update the state, messages are appended to the list rather than overwriting it [3][4]. Example usage with Pydantic: from typing import Annotated, Sequence from pydantic import BaseModel, Field from langgraph.graph.message import add_messages from langchain_core.messages import BaseMessage from langgraph.graph import StateGraph class AgentState(BaseModel): messages: Annotated[Sequence[BaseMessage], add_messages] = Field(default_factory=list) # Add other fields as needed user_id: str = "default" graph = StateGraph(AgentState) Key Considerations: - Pydantic models in LangGraph provide robust validation but can be less performant than TypedDict or dataclasses [1][2]. - The config_schema parameter in StateGraph is deprecated; use context_schema for run-scoped context instead [6]. - While you can define a list[dict] in your Pydantic schema, using specialized types like BaseMessage with the add_messages reducer is the recommended pattern for message handling in LangGraph [3][4]. - Pydantic validation generally occurs on inputs to the first node in the graph, rather than on every internal update [1][3].
Citations:
- 1: https://docs.langchain.com/oss/python/langgraph/use-graph-api
- 2: https://docs.langchain.com/oss/python/langgraph/graph-api.md
- 3: https://www.baihezi.com/mirrors/langgraph/how-tos/state-model/index.html
- 4: https://langchain-ai-langgraph-40.mintlify.app/concepts/state
- 5: https://github.com/langchain-ai/langgraph/blob/83dd61feaca993d2ee428706ad04c869895ce400/libs/prebuilt/langgraph/prebuilt/chat_agent_executor.py
- 6: https://reference.langchain.com/python/langgraph/graph/state/StateGraph
🌐 Web query:
source "https://pypi.org/simple" name "langchain-core" version "0.3.39" uv.lock
💡 Result:
The version 0.3.39 of langchain-core was released on February 24, 2025 [1][2]. This release was tracked in the LangChain repository under pull request #29966 [3], which included updates to the package version in both pyproject.toml and the uv.lock file [4][2]. The uv.lock file entry for langchain-core 0.3.39 specifically records the version bump from 0.3.38 to 0.3.39 as part of the repository's dependency management [2].
Citations:
- 1: https://deps.dev/pypi/langchain-core/0.3.39
- 2: naveencloud/langchain@5437ee3
- 3: core[patch]: release 0.3.39 langchain-ai/langchain#29966
- 4: langchain-ai/langchain@5437ee3
🌐 Web query:
LangGraph AgentState pydantic fields serialization model_validate non-dict type
💡 Result:
In LangGraph, using a Pydantic BaseModel as a state schema involves specific serialization and validation behaviors that differ from standard Pydantic usage [1][2]. LangGraph primarily uses internal coercion and validation mechanisms to manage state updates [3][4]. Key considerations regarding Pydantic fields, serialization, and non-dict types: 1. State Updates and Serialization: When you use a Pydantic BaseModel as your StateSchema, LangGraph internally handles state updates [3][4]. It is important to note that state updates in LangGraph are often serialized and deserialized (e.g., when interacting with checkpointers) [5]. If your model relies on custom init logic or complex generic types, these processes can sometimes trigger unexpected behavior, such as re-initialization or incomplete validation of nested types [5][6]. 2. Validation Behavior: LangGraph does not always perform full Pydantic model validation on every state update in the same way a direct call to BaseModel.model_validate would [6][7]. Specifically: - Validation is often focused on verifying the schema rather than performing data coercion or applying field_validator modifications [7]. - If you use a Pydantic model as the state schema, LangGraph may verify the input dictionary against the model structure but might not apply the same transformations or mutations that Pydantic would perform during a standard object instantiation [7]. - For this reason, if you use @field_validator to modify values, those modifications might not be applied to the state held by the graph [7]. 3. Handling Non-Dict Types: If you encounter validation errors when passing non-dict types (such as Pydantic models) into nodes or tools, it is often due to LangGraph's expectation of dictionary-like updates or its interaction with Pydantic serialization [8][9]. - If you are using Annotated[State, InjectedState] in tool definitions, ensure you are not passing an incompatible type that triggers unnecessary validation [9]. - If you need to bypass strict validation in certain contexts (like tool parameters), users have sometimes opted to use a plain dict instead of the custom Pydantic state class to avoid schema mismatch errors [9]. 4. Performance and Best Practices: Pydantic is less performant than TypedDict or dataclasses for graph states due to this recursive validation overhead [1]. If your application is performance-sensitive, consider these alternatives unless you explicitly require Pydantic's recursive validation features [1]. Additionally, when using Pydantic models, it is generally recommended to ensure all fields are optional or have defaults if they are not always provided by every node to avoid missing field errors [8]. In summary, while LangGraph supports Pydantic models for state, it acts as a wrapper around the schema rather than a standard Pydantic usage environment [3][2]. If you experience discrepancies between manual model_validate results and graph state behavior, it is likely due to LangGraph's internal handling of state updates and serialization [6][7].
Citations:
- 1: https://docs.langchain.com/oss/python/langgraph/graph-api.md
- 2: https://docs.langchain.com/oss/python/langgraph/use-graph-api
- 3: https://github.com/langchain-ai/langgraph/blob/8c0e498eaf8477c7215ad661b4fa79f95d9205b5/libs/langgraph/langgraph/graph/state.py
- 4: https://github.com/langchain-ai/langgraph/blob/a3823395cf0516f0c03ac8c20798328c8cee9abe/libs/langgraph/langgraph/graph/state.py
- 5: LangGraph Checkpointer fails to track changes made to pydantic model object in the state when calling get_state langchain-ai/langgraph#1320
- 6: Incorrect state validation when there's generic types in
pydantic.BaseModelstate schema langchain-ai/langgraph#4060 - 7:
field_validatorin state schema can raise error but won't apply modification on values. langchain-ai/langgraph#4074 - 8: ValidationError: validation error for State (Before task with name) langchain-ai/langgraph#5659
- 9: LangGraph CLI treats InjectedState as required tool parameter and fails the validation langchain-ai/langgraph#6241
Fix the HITL demo to match the documented state contract.
examples/hitl_basic.py passes HumanMessage(...) into AgentState.messages, which is typed as list[dict] and described as OpenAI-style message dicts. Update the example to pass {"role": "human", "content": request} instead, or remove it from the runnable demo instructions.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@AGENTS.md` around lines 143 - 148, Update the HITL example in
examples/hitl_basic.py so the request passed to AgentState.messages uses an
OpenAI-style message dictionary with role "human" and the request content,
rather than a HumanMessage object. Remove the HumanMessage import if it becomes
unused, while preserving the existing demo behavior.
| - **Agent HITL resume:** after the run pauses at the `act` node `interrupt()`, | ||
| resume with `graph.invoke(Command(resume=True), config=cfg)` (approve) to run | ||
| the bound tool; `resume=False` rejects it. |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
rg -n -C 8 \
'def build_graph|MemorySaver|^graph\s*=|Command\(resume|thread_id|checkpointer' \
src examples AGENTS.mdRepository: jnyross/langgraph-graph
Length of output: 34333
🏁 Script executed:
#!/bin/bash
set -euo pipefail
python3 - <<'PY'
import ast
from pathlib import Path
import re
files = [
Path("src/langgraph_graph/graph.py"),
Path("src/langgraph_graph/meta_legal/graph.py"),
Path("src/langgraph_graph/news_radar/graph.py"),
Path("src/langgraph_graph/jurisdiction_catalog/graph.py"),
Path("src/langgraph_plot/jurisdiction/graph.py"), if False else Path("src/langgraph_graph/jurisdiction/graph.py"),
Path("examples/hitl_basic.py"),
]
for p in [files[-1], Path("src/langgraph_graph/graph.py"), Path("src/langgraph_graph/meta_legal/graph.py"), Path("src/langgraph_graph/news_radar/graph.py"), Path("src/langgraph_graph/jurisdiction/catalog/graph.py")]:
pass
P = files[-1].parents
for p in list(files)[-1]:
pass
# Use AST to extract build_graph and module graph compile call shapes without running repository code.
targets = [
Path("src/langgraph_graph/graph.py"),
Path("src/langgraph_graph/meta_legal/graph.py"),
Path("src/langgraph_graph/news_radar/graph.py"),
Path("src/langgraph_graph/jurisdiction_catalog/graph.py"),
Path("src/langgraph_graph/jurisdiction/graph.py"),
]
for path in targets:
src = path.read_text()
tree = ast.parse(src)
print(f"\n--- {path} ---")
for node in tree.body:
if isinstance(node, ast.FunctionDef) and node.name == "build_graph":
print("build_graph:")
print(" args:", [a.arg for a in node.args.args[1:]])
print(" returns:", ast.unparse(node.body[-1].value) if isinstance(node.body[-1], ast.Return) else None)
if isinstance(node, ast.Assign):
names = [n.id for n in node.targets if isinstance(n, ast.Name)]
if "graph" in names:
print("module graph assignment:", ast.unparse(node.value))
print("\n--- examples/hitl_basic.py relevant lines ---")
p = Path("examples/hitl_basic.py")
lines = p.read_text().splitlines()
for i in range(30, min(70, len(lines)) + 1):
print(f"{i:03d}: {lines[i-1]}")
PYRepository: jnyross/langgraph-graph
Length of output: 390
Document the graph construction path and thread-identity requirement for resume.
For scripts, use build_graph() with a checkpointer; the module-level graph has no custom checkpointer and is a Studio export. Command(resume=...) must reuse the same config = {"configurable": {"thread_id": <value>}} from the initial paused run, otherwise LangGraph cannot resume the interrupted act node.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@AGENTS.md` around lines 149 - 151, Update the “Agent HITL resume” guidance to
instruct scripts to construct the graph via build_graph() with a checkpointer
instead of using the module-level graph, which is a Studio export without a
custom checkpointer. State that Command(resume=...) must reuse the exact config,
including the same configurable thread_id, from the initial paused run when
resuming the interrupted act node.
Source: MCP tools
Summary
Sets up the development environment for this LangGraph project so a Cloud Agent can lint, test, build, and run all product surfaces. The only code change is documentation: a
## Cursor Cloud specific instructionssection inAGENTS.mdcapturing non-obvious startup caveats discovered during setup (LLM/search secret names,AgentState.messagesdict requirement, HITL resume pattern, Law Matrix data-source behavior).Environment
uv(astral installer,~/.local/bin) and Python 3.12.13.uv sync --extra dev.uv sync --extra dev.What was verified
uv run ruff check .uv run pytestuv run langgraph dev --no-browser --no-reload --port 2024/ok→ 200; all 5 graphs registeredagentHITL graphbuild_graph()→interrupt()→Command(resume=True)send_messagetool executedmeta_legalresearch graphuv run python examples/meta_legal_smoke.py --jurisdictions "European Union" --domains privacyaccepted=6, dossier written todata/dossiers/<run_id>/python -m langgraph_graph.web.server/api/matrixaggregates the live dossier → EU × privacy, 6 laws, 100% coverageEnd-to-end demos
agentHITL graph (the project's core feature): planned a request, paused at theactnodeinterrupt()for approval, and after approval executed the bound tool.meta_legalresearch pipeline → Law Matrix UI: ran the research graph for EU × privacy, which wrote a dossier (GDPR, ePrivacy Directive, Law Enforcement Directive, Data Governance Act, Data Act), then served it through the repo's own aggregating API and browsed it in the UI.Full static Law Matrix (prebuilt
web/data/matrix.json, 957 laws across 228 jurisdictions):LLM / search backends
OPENROUTER_API_KEY/OPENROUTER_BASE_URL/OPENROUTER_MODEL(default~deepseek/deepseek-v4-flash-latest) andFIRECRAWL_API_KEY. A non-secret.envwith these settings is staged (gitignored; keys are never written there).meta_legalaccepted findings came from the graph's deterministic seed-harvest path. Swapping to OpenRouter DeepSeek V4 Flash + Firecrawl requires only the secrets on a fresh VM boot — no code changes.Summary by CodeRabbit