Skip to content

Commit 95ca697

Browse files
committed
Add LangGraph ecosystem pages and documentation references
- Create new pages for LangGraph templates, configuration, and usage tips - Add documentation about LangGraph MCP adapters and environment variables - Include references to LangGraph companies and assistants - Update journal with LangGraph ecosystem insights and learning resources
1 parent 2f34845 commit 95ca697

11 files changed

+149
-0
lines changed

journals/2025_03_03.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,17 @@
1010
- Expense of [[Claude 3.7 Sonnet]]
1111
- [Is using claude-sonnet-3.7 more expensive than normal? : r/cursor](https://www.reddit.com/r/cursor/comments/1ixy6ip/is_using_claudesonnet37_more_expensive_than_normal/)
1212
- Yes, it's fairly expensive. I'm using [[IDE/Cline]] extension in [[Windsurf]] and have spent $1.30 with 5 minutes. If you use it for a full day you could easily spend between 50 and 100 dollars.
13+
- ## LangChain Ecosystem
14+
- [[langgraph/How To/See configuration for LangGraph run in LangSmith]]
15+
- [[langgraph/How To/Use add_conditional_edges to route in graph]]
16+
- [[langgraph/Docs/Companies using LangGraph]]
17+
- [[langgraph/Template]]
18+
- [[langgraph/EnvVars]]
19+
- #TIL that Langgraph has [[DataDog]] support through [[EnvVar]]s
20+
- [[LangChain/GitHub/langchain-mcp-adapters]] is a [[GitHub/Repo]] that provides an [[MCP]] adapter for [[langgraph]] and [[LangChain]]
21+
- [[langgraph/Tip/Use langgraph-cli rather than studio so you can grep your logs]]
22+
- #Security
23+
- [[Person/Sergei Smagin/Blog/19/11/Cross-Site Requests]]
1324
- #[[Tiling Window Manager]]
1425
- [What’s the best window manager? : r/macapps](https://www.reddit.com/r/macapps/comments/1arq5a6/whats_the_best_window_manager/)
1526
- 31 upvotes for [[MacOS/Tiling/App/Rectangle]], which is what I currently use, but it doesn't have all the features I want. I really could benefit from learning more of the keyshorts, though. Unbelievably, even though it has many features I don't use, it doesn't have the features I want. I'd really like to have more of a window manager like [[awesomeWM]] when I was in linux. I'd love to be able to snap and pin tiny applications to a small dedicated section of the screen. I think I can do that with [[BentoBox]].
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
tags:: [[MCP]], [[langgraph]], [[Py/Lib]]
2+
3+
- # [langchain-ai/langchain-mcp-adapters](https://github.com/langchain-ai/langchain-mcp-adapters?tab=readme-ov-file)
4+
- This library provides a lightweight wrapper that makes [Anthropic Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) tools compatible with [LangChain](https://github.com/langchain-ai/langchain) and [LangGraph](https://github.com/langchain-ai/langgraph).
5+
- ![MCP](https://raw.githubusercontent.com/langchain-ai/langchain-mcp-adapters/refs/heads/main/static/img/mcp.png)
6+
- ## Features
7+
- 🛠️ Convert MCP tools into [LangChain tools](https://python.langchain.com/docs/concepts/tools/) that can be used with [LangGraph](https://github.com/langchain-ai/langgraph) agents
8+
- 📦 A client implementation that allows you to connect to multiple MCP servers and load tools from them
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
tags:: [[CSRF]], [[Blog/post]]
2+
3+
- # TODO [Cross-Site Requests | SMAGIN](https://smagin.fyi/posts/cross-site-requests/)
4+
-

pages/Py___Dataclass.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
alias:: [[Py/Dataclasses]]

pages/langgraph___Assistant.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
alias:: [[LangGraph Assistant]], [[LangGraph Assistants]]
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# [Companies using LangGraph](https://langchain-ai.github.io/langgraph/adopters/)
2+
- contains links to resources about how companies are using [[langgraph]]

pages/langgraph___EnvVars.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# [Environment variables](https://langchain-ai.github.io/langgraph/cloud/reference/env_var/#postgres_uri_custom)
2+
- ## `DD_API_KEY`[¶](https://langchain-ai.github.io/langgraph/cloud/reference/env_var/#dd_api_key "Permanent link") - for [[DataDog]]
3+
- Specify `DD_API_KEY` (your [Datadog API Key](https://docs.datadoghq.com/account_management/api-app-keys/)) to automatically enable Datadog tracing for the deployment. Specify other [`DD_*` environment variables](https://ddtrace.readthedocs.io/en/stable/configuration.html) to configure the tracing instrumentation.
4+
- If `DD_API_KEY` is specified, the application process is wrapped in the [`ddtrace-run` command](https://ddtrace.readthedocs.io/en/stable/installation_quickstart.html). Other `DD_*` environment variables (e.g. `DD_SITE`, `DD_ENV`, `DD_SERVICE`, `DD_TRACE_ENABLED`) are typically needed to properly configure the tracing instrumentation. See [`DD_*` environment variables](https://ddtrace.readthedocs.io/en/stable/configuration.html) for more details.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# TODO How to see the [[langgraph/Assistant]] configuration in a particular [[LangSmith/Thread]] in LangSmith
2+
- [LangGraph graphs are not reusable, and overall the configuration approach is poorly designed · langchain-ai/langgraph · Discussion #3225](https://github.com/langchain-ai/langgraph/discussions/3225)
3+
- [LangGraph graphs are not reusable, and overall the configuration approach is poorly designed · langchain-ai/langgraph · Discussion #3225](https://github.com/langchain-ai/langgraph/discussions/3225)
4+
- OP
5+
- With LangGraph it is impossible to build and share reusable graphs. What I mean by that is that I cannot build a graph and publish it as a package, so that it is easily redeployed somewhere else by someone else **with a different base config**.
6+
- Because the `configuration = Configuration.from_runnable_config(config)` will always use parent Configuration defaults defined in my package instead of enabling someone to import the graph and provide a different config
7+
- So there is unfortunately no way to compile a graph and pass it a different default configuration at compile time. It can only be done at runtime.
8+
- And every single node in the graph is then dependent on the original `Configuration` which cannot be overridden by anyone wanting to reuse our graph (because we need to do the ugly `configuration = Configuration.from_runnable_config(config)` at the start of each node to get the default configuration of the graph)
9+
- It's really bad design from the start for something as simple as a DAG workflow runner. And it's quite concerning because LangGraph is not doing much, it's just yet another DAG runner, but with less feature and that now requires proprietary paying components to be run (cf. [#1604](https://github.com/langchain-ai/langgraph/discussions/1604))
10+
- I've run into this limitation multiple times and I agree there needs to be a way to set Configuration defaults at runtime.
11+
- On a related note, I haven't been able to get around this limitation when running graphs via Langgraph Studio. Since the configuration set at runtime is a configurable, I can't find a way to configure other RunnableConfig variables, like max\_concurrency, at runtime in Studio.
12+
-
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# How to use `add_conditional_edges` to route between nodes in [[langgraph]]
2+
-

pages/langgraph___Template.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
alias:: [[LangGraph Template]], [[LangGraph Templates]]
2+
3+
- # [LangGraph Templates](https://studio.langchain.com/?ref=blog.langchain.dev)
4+
- See also [LangChain - Changelog | 📐 LangGraph Templates: Build configurable](https://changelog.langchain.com/announcements/langgraph-templates-build-configurable-agentic-workflows)
5+
- ## [[My Notes]]
6+
- contains a bunch of different [[GitHub/Repo]]s showing how to do things like use configurable fields
7+
- Example
8+
- [rag-research-agent-template/src/retrieval_graph/configuration.py at main · langchain-ai/rag-research-agent-template](https://github.com/langchain-ai/rag-research-agent-template/blob/main/src/retrieval_graph/configuration.py)
9+
- [retrieval-agent-template/src/retrieval_graph/retrieval.py at main · langchain-ai/retrieval-agent-template](https://github.com/langchain-ai/retrieval-agent-template/blob/main/src/retrieval_graph/retrieval.py) has this pattern using [[Py/Context Manager]] and [[Py/Generator]]
10+
- ```python
11+
@contextmanager
12+
def make_retriever(
13+
config: RunnableConfig,
14+
) -> Generator[VectorStoreRetriever, None, None]:
15+
"""Create a retriever for the agent, based on the current configuration."""
16+
configuration = IndexConfiguration.from_runnable_config(config)
17+
embedding_model = make_text_encoder(configuration.embedding_model)
18+
user_id = configuration.user_id
19+
if not user_id:
20+
raise ValueError("Please provide a valid user_id in the configuration.")
21+
match configuration.retriever_provider:
22+
case "elastic" | "elastic-local":
23+
with make_elastic_retriever(configuration, embedding_model) as retriever:
24+
yield retriever
25+
26+
case "pinecone":
27+
with make_pinecone_retriever(configuration, embedding_model) as retriever:
28+
yield retriever
29+
30+
case "mongodb":
31+
with make_mongodb_retriever(configuration, embedding_model) as retriever:
32+
yield retriever
33+
34+
case _:
35+
raise ValueError(
36+
"Unrecognized retriever_provider in configuration. "
37+
f"Expected one of: {', '.join(Configuration.__annotations__['retriever_provider'].__args__)}\n"
38+
f"Got: {configuration.retriever_provider}"
39+
)
40+
```
41+
- note that a sample configuration is using [[Py/Dataclass]] - what exactly is this `__template_metadata__` - it's probably something specific to the templates, but is this how we make it show up in teh UI?
42+
- ```python
43+
@dataclass(kw_only=True)
44+
class IndexConfiguration:
45+
"""Configuration class for indexing and retrieval operations.
46+
47+
This class defines the parameters needed for configuring the indexing and
48+
retrieval processes, including user identification, embedding model selection,
49+
retriever provider choice, and search parameters.
50+
"""
51+
52+
user_id: str = field(metadata={"description": "Unique identifier for the user."})
53+
54+
embedding_model: Annotated[
55+
str,
56+
{"__template_metadata__": {"kind": "embeddings"}},
57+
] = field(
58+
default="openai/text-embedding-3-small",
59+
metadata={
60+
"description": "Name of the embedding model to use. Must be a valid embedding model name."
61+
},
62+
)
63+
64+
retriever_provider: Annotated[
65+
Literal["elastic", "elastic-local", "pinecone", "mongodb"],
66+
{"__template_metadata__": {"kind": "retriever"}},
67+
] = field(
68+
default="elastic",
69+
metadata={
70+
"description": "The vector store provider to use for retrieval. Options are 'elastic', 'pinecone', or 'mongodb'."
71+
},
72+
)
73+
74+
search_kwargs: dict[str, Any] = field(
75+
default_factory=dict,
76+
metadata={
77+
"description": "Additional keyword arguments to pass to the search function of the retriever."
78+
},
79+
)
80+
81+
@classmethod
82+
def from_runnable_config(
83+
cls: Type[T], config: Optional[RunnableConfig] = None
84+
) -> T:
85+
"""Create an IndexConfiguration instance from a RunnableConfig object.
86+
87+
Args:
88+
cls (Type[T]): The class itself.
89+
config (Optional[RunnableConfig]): The configuration object to use.
90+
91+
Returns:
92+
T: An instance of IndexConfiguration with the specified configuration.
93+
"""
94+
config = ensure_config(config)
95+
configurable = config.get("configurable") or {}
96+
_fields = {f.name for f in fields(cls) if f.init}
97+
return cls(**{k: v for k, v in configurable.items() if k in _fields})
98+
```
99+
- #Via [Launching LangGraph Templates](https://blog.langchain.dev/launching-langgraph-templates/)
100+
-

0 commit comments

Comments
 (0)