-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Expand file tree
/
Copy pathlink_map.py
More file actions
628 lines (617 loc) Β· 43.9 KB
/
link_map.py
File metadata and controls
628 lines (617 loc) Β· 43.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
"""Link mapping for cross-reference resolution across different scopes.
This module provides link mappings for different language/framework scopes
to resolve @[link_name] references to actual URLs.
"""
from collections.abc import Mapping
from typing import TypedDict
class LinkMap(TypedDict):
"""Typed mapping describing each link map entry."""
host: str
scope: str
links: Mapping[str, str]
LINK_MAPS: list[LinkMap] = [
{
"host": "https://reference.langchain.com/python/",
"scope": "python",
"links": {
# Module pages
"langchain": "langchain/",
"langchain.agents": "langchain/agents",
"langchain.messages": "langchain/messages",
"langchain.tools": "langchain/tools",
"langchain.chat_models": "langchain/models",
"langchain.embeddings": "langchain/embeddings",
"langchain_core": "langchain-core/",
"langchain-core": "langchain-core/",
"langchain-text-splitters": "langchain-text-splitters/",
"langchain_text_splitters": "langchain-text-splitters/",
# Deep Agents
"create_deep_agent": "deepagents/graph/create_deep_agent",
# Agents
"create_agent": "langchain/agents/factory/create_agent",
"create_agent(tools)": "langchain/agents/factory/create_agent",
"create_agent(response_format)": "langchain/agents/factory/create_agent",
"create_agent(name)": "langchain/agents/factory/create_agent",
"system_prompt": "langchain/agents/#langchain.agents.create_agent(system_prompt)",
"AgentState": "langchain/agents/middleware/types/AgentState",
"ModelRequest": "langchain/agents/middleware/types/ModelRequest",
"ModelResponse": "langchain/agents/middleware/types/ModelResponse",
"ExtendedModelResponse": "langchain/agents/middleware/types/ExtendedModelResponse",
"@dynamic_prompt": "langchain/agents/middleware/types/dynamic_prompt",
"@before_agent": "langchain/agents/middleware/types/before_agent",
"@before_model": "langchain/agents/middleware/types/before_model",
"@after_model": "langchain/agents/middleware/types/after_model",
"@after_agent": "langchain/agents/middleware/types/after_agent",
"@wrap_tool_call": "langchain/agents/middleware/types/wrap_tool_call",
"@wrap_model_call": "langchain/agents/middleware/types/wrap_model_call",
# Middleware
"AgentMiddleware": "langchain/agents/middleware/types/AgentMiddleware",
"state_schema": "langchain/middleware/#langchain.agents.middleware.AgentMiddleware.state_schema",
"PIIMiddleware": "langchain/agents/middleware/pii/PIIMiddleware",
"SummarizationMiddleware": "langchain/agents/middleware/summarization/SummarizationMiddleware",
"HumanInTheLoopMiddleware": "langchain/agents/middleware/human_in_the_loop/HumanInTheLoopMiddleware",
"ModelCallLimitMiddleware": "langchain/agents/middleware/model_call_limit/ModelCallLimitMiddleware",
"ToolCallLimitMiddleware": "langchain/agents/middleware/tool_call_limit/ToolCallLimitMiddleware",
"ModelFallbackMiddleware": "langchain/agents/middleware/model_fallback/ModelFallbackMiddleware",
"TodoListMiddleware": "langchain/agents/middleware/todo/TodoListMiddleware",
"LLMToolSelectorMiddleware": "langchain/agents/middleware/tool_selection/LLMToolSelectorMiddleware",
"ToolRetryMiddleware": "langchain/agents/middleware/tool_retry/ToolRetryMiddleware",
"ModelRetryMiddleware": "langchain/agents/middleware/model_retry/ModelRetryMiddleware",
"LLMToolEmulator": "langchain/agents/middleware/tool_emulator/LLMToolEmulator",
"ContextEditingMiddleware": "langchain/agents/middleware/context_editing/ContextEditingMiddleware",
"ClearToolUsesEdit": "langchain/agents/middleware/context_editing/ClearToolUsesEdit",
"ContextEdit": "langchain/agents/middleware/context_editing/ContextEdit",
"InterruptOnConfig": "langchain/agents/middleware/human_in_the_loop/InterruptOnConfig",
"ShellToolMiddleware": "langchain/agents/middleware/shell_tool/ShellToolMiddleware",
"FilesystemFileSearchMiddleware": "langchain/agents/middleware/file_search/FilesystemFileSearchMiddleware",
"ClaudeBashToolMiddleware": "langchain-anthropic/middleware/bash/ClaudeBashToolMiddleware",
"StateClaudeTextEditorMiddleware": "langchain-anthropic/middleware/anthropic_tools/StateClaudeTextEditorMiddleware",
"FilesystemClaudeTextEditorMiddleware": "langchain-anthropic/middleware/anthropic_tools/FilesystemClaudeTextEditorMiddleware",
"StateClaudeMemoryMiddleware": "langchain-anthropic/middleware/anthropic_tools/StateClaudeMemoryMiddleware",
"FilesystemClaudeMemoryMiddleware": "langchain-anthropic/middleware/anthropic_tools/FilesystemClaudeMemoryMiddleware",
"StateFileSearchMiddleware": "langchain-anthropic/middleware/file_search/StateFileSearchMiddleware",
"OpenAIModerationMiddleware": "langchain-openai/middleware/openai_moderation/OpenAIModerationMiddleware",
"ContextSize": "langchain/agents/middleware/summarization/ContextSize",
# Messages
"AIMessage": "langchain-core/messages/ai/AIMessage",
"AIMessage.tool_calls": "langchain/messages/#langchain.messages.AIMessage.tool_calls",
"AIMessageChunk": "langchain-core/messages/ai/AIMessageChunk",
"ToolMessage": "langchain-core/messages/tool/ToolMessage",
"SystemMessage": "langchain-core/messages/system/SystemMessage",
"HumanMessage": "langchain-core/messages/human/HumanMessage",
"trim_messages": "langchain-core/messages/utils/trim_messages",
"UsageMetadata": "langchain-core/messages/ai/UsageMetadata",
"InputTokenDetails": "langchain-core/messages/ai/InputTokenDetails",
"MessageLikeRepresentation": "langchain-core/messages/utils/MessageLikeRepresentation",
# Content blocks
"BaseMessage": "langchain-core/messages/base/BaseMessage",
"BaseMessage(content)": "langchain-core/messages/base/BaseMessage",
"BaseMessage(content_blocks)": "langchain-core/messages/base/BaseMessage",
"content_blocks": "langchain_core/language_models/#langchain_core.messages.BaseMessage.content_blocks",
"ContentBlock": "langchain-core/messages/content/ContentBlock",
"TextContentBlock": "langchain-core/messages/content/TextContentBlock",
"ReasoningContentBlock": "langchain-core/messages/content/ReasoningContentBlock",
"NonStandardContentBlock": "langchain-core/messages/content/NonStandardContentBlock",
"ImageContentBlock": "langchain-core/messages/content/ImageContentBlock",
"VideoContentBlock": "langchain-core/messages/content/VideoContentBlock",
"AudioContentBlock": "langchain-core/messages/content/AudioContentBlock",
"PlainTextContentBlock": "langchain-core/messages/content/PlainTextContentBlock",
"FileContentBlock": "langchain-core/messages/content/FileContentBlock",
"ToolCall": "langchain-core/messages/tool/ToolCall",
"ToolCallChunk": "langchain-core/messages/tool/ToolCallChunk",
"ServerToolCall": "langchain-core/messages/content/ServerToolCall",
"ServerToolCallChunk": "langchain-core/messages/content/ServerToolCallChunk",
"ServerToolResult": "langchain-core/messages/content/ServerToolResult",
# Integrations
# langchain-openai
"langchain-openai": "langchain-openai/",
"BaseChatOpenAI": "langchain-openai/chat_models/base/BaseChatOpenAI",
"ChatOpenAI": "langchain-openai/chat_models/base/ChatOpenAI",
"AzureChatOpenAI": "langchain-openai/chat_models/azure/AzureChatOpenAI",
"OpenAI": "langchain-openai/llms/base/OpenAI",
"AzureOpenAI": "langchain-openai/llms/azure/AzureOpenAI",
"OpenAIEmbeddings": "langchain-openai/embeddings/base/OpenAIEmbeddings",
"AzureOpenAIEmbeddings": "langchain-openai/embeddings/azure/AzureOpenAIEmbeddings",
# langchain-openrouter
"langchain-openrouter": "integrations/langchain_openrouter",
"ChatOpenRouter": "integrations/langchain_openrouter",
# langchain-anthropic
"langchain-anthropic": "langchain-anthropic/",
"ChatAnthropic": "langchain-anthropic/chat_models/ChatAnthropic",
"ChatAnthropic.bind_tools": "langchain-anthropic/chat_models/ChatAnthropic/bind_tools",
"ChatAnthropic.get_num_tokens_from_messages": "langchain-anthropic/chat_models/ChatAnthropic/get_num_tokens_from_messages",
"AnthropicLLM": "langchain-anthropic/llms/AnthropicLLM",
"AnthropicPromptCachingMiddleware": "langchain-anthropic/middleware/prompt_caching/AnthropicPromptCachingMiddleware",
# langchain-aws
"BedrockPromptCachingMiddleware": "langchain-aws/middleware/prompt_caching/BedrockPromptCachingMiddleware",
# langchain-google
"langchain-google": "integrations/langchain_google",
"langchain-google-genai": "langchain-google-genai/",
"ChatGoogleGenerativeAI": "langchain-google-genai/chat_models/ChatGoogleGenerativeAI",
"langchain-google-vertexai": "langchain-google-vertexai/",
"ChatVertexAI": "langchain-community/chat_models/vertexai/ChatVertexAI",
"langchain-google-community": "langchain-google-community/",
# langchain-ollama
"langchain-ollama": "langchain-ollama/",
"ChatOllama": "langchain-community/chat_models/ollama/ChatOllama",
# langchain-xai
"langchain-xai": "langchain-xai/",
"ChatXAI": "langchain-xai/chat_models/ChatXAI",
# langchain-groq
"langchain-groq": "langchain-groq/",
"ChatGroq": "langchain-groq/chat_models/ChatGroq",
# langchain-deepseek
"langchain-deepseek": "langchain-deepseek/",
"ChatDeepSeek": "langchain-deepseek/chat_models/ChatDeepSeek",
# langchain-parallel
"langchain-parallel": "langchain-parallel/",
"ChatParallelWeb": "langchain-parallel/chat_models/ChatParallelWeb",
"ParallelWebSearchTool": "langchain-parallel/search_tool/ParallelWebSearchTool",
"ParallelExtractTool": "langchain-parallel/extract_tool/ParallelExtractTool",
# langchain-amazon-nova
"langchain-amazon-nova": "langchain-amazon-nova/",
"ChatAmazonNova": "langchain-amazon-nova/chat_models/ChatAmazonNova",
"langchain_amazon_nova": "langchain-amazon-nova/",
# Models
"init_chat_model": "langchain/chat_models/base/init_chat_model",
"init_chat_model(model)": "langchain/chat_models/base/init_chat_model",
"BaseChatModel": "langchain-core/language_models/chat_models/BaseChatModel",
"BaseChatModel.invoke": "langchain-core/language_models/chat_models/BaseChatModel/invoke",
"BaseChatModel.stream": "langchain-core/language_models/chat_models/BaseChatModel/stream",
"BaseChatModel.astream_events": "langchain_core/language_models/#langchain_core.language_models.chat_models.BaseChatModel.astream_events",
"BaseChatModel.batch": "langchain_core/language_models/#langchain_core.language_models.chat_models.BaseChatModel.batch",
"BaseChatModel.batch_as_completed": "langchain_core/language_models/#langchain_core.language_models.chat_models.BaseChatModel.batch_as_completed",
"BaseChatModel.bind_tools": "langchain-core/language_models/chat_models/BaseChatModel/bind_tools",
"BaseChatModel.configurable_fields": "langchain_core/language_models/#langchain_core.language_models.chat_models.BaseChatModel.configurable_fields",
"BaseChatModel.with_structured_output": "langchain-core/language_models/chat_models/BaseChatModel/with_structured_output",
"BaseChatModel.with_structured_output(include_raw)": "langchain-core/language_models/chat_models/BaseChatModel/with_structured_output",
"BaseChatModel.with_retry": "langchain_core/language_models/#langchain_core.language_models.BaseChatModel.with_retry",
# ??
"ChatPromptTemplate": "langchain-core/prompts/chat/ChatPromptTemplate",
"GenericFakeChatModel": "langchain-core/language_models/fake_chat_models/GenericFakeChatModel",
# Tools
"@tool": "langchain-core/tools/convert/tool",
"BaseTool": "langchain-core/tools/base/BaseTool",
"ToolRuntime": "langchain/tools/#langchain.tools.ToolRuntime",
"convert_to_openai_tool": "langchain-core/utils/function_calling/convert_to_openai_tool",
# Embeddings
"init_embeddings": "langchain/embeddings/base/init_embeddings",
"Embeddings": "langchain-core/embeddings/embeddings/Embeddings",
# Documents
"Document": "langchain-core/documents/base/Document",
# Document loaders
"BaseLoader": "langchain-core/document_loaders/base/BaseLoader",
# Text splitters
"CharacterTextSplitter": "langchain-text-splitters/character/CharacterTextSplitter",
"RecursiveCharacterTextSplitter": "langchain-text-splitters/character/RecursiveCharacterTextSplitter",
"TokenTextSplitter": "langchain-text-splitters/base/TokenTextSplitter",
# Runnables
"Runnable": "langchain-core/runnables/base/Runnable",
"RunnableConfig": "langchain-core/runnables/config/RunnableConfig",
"RunnableLambda": "langchain-core/runnables/base/RunnableLambda",
"RunnableConfig(max_concurrency)": "langchain-core/runnables/config/RunnableConfig",
# Retrievers
"Retrievers": "langchain-core/retrievers/BaseRetriever",
# VectorStores
"VectorStore": "langchain-core/vectorstores/base/VectorStore",
"VectorStore.max_marginal_relevance_search": "langchain-core/vectorstores/base/VectorStore/max_marginal_relevance_search",
# Key-value stores
"BaseStore": "langchain-core/stores/BaseStore",
"BaseStore.put": "langgraph/store/#langgraph.store.base.BaseStore.put",
"InMemoryStore": "langchain-core/stores/InMemoryStore",
# Callbacks
"on_llm_new_token": "langchain-core/callbacks/base/AsyncCallbackHandler/on_llm_new_token",
# Rate limiters
"InMemoryRateLimiter": "langchain-core/rate_limiters/InMemoryRateLimiter",
# LangSmith SDK
"langsmith": "langsmith/",
"langsmith-python": "langsmith/observability/sdk/",
"langsmith-js": "https://reference.langchain.com/javascript/modules/langsmith.html",
"wrapGemini": "https://reference.langchain.com/javascript/functions/langsmith.wrappers_gemini.wrapGemini.html",
"expect": "langsmith/observability/sdk/expect/",
"Client": "langsmith/client/Client",
"Client.evaluate": "langsmith/client/Client/evaluate",
"Client.aevaluate": "langsmith/client/Client/aevaluate",
"Client.get_experiment_results": "langsmith/client/Client/get_experiment_results",
"ExperimentResults": "langsmith/schemas/ExperimentResults",
"create_feedback": "langsmith/client/Client/create_feedback",
"create_feedback_config": "langsmith/client/Client/create_feedback_config",
"list_feedback_configs": "langsmith/client/Client/list_feedback_configs",
"update_feedback_config": "langsmith/client/Client/update_feedback_config",
"delete_feedback_config": "langsmith/client/Client/delete_feedback_config",
"create_annotation_queue": "langsmith/client/Client/create_annotation_queue",
"update_annotation_queue": "langsmith/client/Client/update_annotation_queue",
"wrap_openai": "langsmith/wrappers/_openai/wrap_openai",
"wrap_anthropic": "langsmith/wrappers/_anthropic/wrap_anthropic",
"wrap_gemini": "langsmith/wrappers/_gemini/wrap_gemini",
"traceable": "langsmith/run_helpers/traceable",
"@traceable": "langsmith/run_helpers/traceable",
"tracing_context": "langsmith/run_helpers/tracing_context",
"tracingEnabled": "https://reference.langchain.com/javascript/classes/langsmith.run_trees.RunTree.html#tracingenabled",
"langsmith_extra": "langsmith/run_helpers/SupportsLangsmithExtra",
"SupportsLangsmithExtra": "langsmith/run_helpers/SupportsLangsmithExtra",
# LangGraph
"RemoteGraph": "langgraph/pregel/remote/RemoteGraph",
"RemoteGraph.as_tool": "langsmith/deployment/remote_graph/#langgraph.pregel.remote.RemoteGraph.as_tool",
"get_stream_writer": "langgraph/config/get_stream_writer",
"get_state": "langgraph/graphs/#langgraph.graph.state.CompiledStateGraph.get_state",
"StateGraph": "langgraph/graph/state/StateGraph",
"StateGraph.compile": "langgraph/graph/state/StateGraph/compile",
"add_edge": "langgraph/pregel/_draw/add_edge",
"add_conditional_edges": "langgraph/graph/state/StateGraph/add_conditional_edges",
"add_node": "langgraph/graph/state/StateGraph/add_node",
"add_messages": "langgraph/graph/message/add_messages",
"CompiledStateGraph": "langgraph/graph/state/CompiledStateGraph",
"CompiledStateGraph.astream": "langgraph/graphs/#langgraph.graph.state.CompiledStateGraph.astream",
"CompiledStateGraph.invoke": "langgraph/graphs/#langgraph.graph.state.CompiledStateGraph.invoke",
"CompiledStateGraph.stream": "langgraph/graphs/#langgraph.graph.state.CompiledStateGraph.stream",
"get_state_history": "langgraph/graphs/#langgraph.graph.state.CompiledStateGraph.get_state_history",
"update_state": "langgraph/graphs/#langgraph.graph.state.CompiledStateGraph.update_state",
"InjectedState": "langgraph/agents/#langgraph.prebuilt.tool_node.InjectedState",
"InjectedStore": "langgraph/agents/#langgraph.prebuilt.tool_node.InjectedStore",
"InjectedToolCallId": "langchain-core/tools/base/InjectedToolCallId",
"get_runtime": "langgraph/runtime/get_runtime",
"Command": "langgraph/types/Command",
"CachePolicy": "langgraph/types/CachePolicy",
"interrupt": "langgraph/types/interrupt",
"ToolNode": "langgraph/agents/#langgraph.prebuilt.tool_node.ToolNode",
"tools_condition": "langgraph/agents/#langgraph.prebuilt.tool_node.tools_condition",
"AsyncPostgresSaver": "langgraph/checkpoints/#langgraph.checkpoint.postgres.aio.AsyncPostgresSaver",
"AsyncSqliteSaver": "langgraph/checkpoints/#langgraph.checkpoint.sqlite.aio.AsyncSqliteSaver",
"BaseCheckpointSaver": "langgraph/checkpoints/#langgraph.checkpoint.base.BaseCheckpointSaver",
"BinaryOperatorAggregate": "langgraph/channels/binop/BinaryOperatorAggregate",
"CipherProtocol": "langgraph/checkpoints/#langgraph.checkpoint.serde.base.CipherProtocol",
"EncryptedSerializer": "langgraph/checkpoints/#langgraph.checkpoint.serde.encrypted.EncryptedSerializer",
"from_pycryptodome_aes": "langgraph/checkpoints/#langgraph.checkpoint.serde.encrypted.EncryptedSerializer.from_pycryptodome_aes",
"InMemorySaver": "langgraph/checkpoints/#langgraph.checkpoint.memory.InMemorySaver",
"SerializerProtocol": "langgraph/checkpoints/#langgraph.checkpoint.serde.base.SerializerProtocol",
"SqliteSaver": "langgraph/checkpoints/#langgraph.checkpoint.sqlite.SqliteSaver",
"JsonPlusSerializer": "langgraph/checkpoints/#langgraph.checkpoint.serde.jsonplus.JsonPlusSerializer",
"PostgresSaver": "langgraph/checkpoints/#langgraph.checkpoint.postgres.PostgresSaver",
"PostgresStore": "langgraph/store/#langgraph.store.postgres.PostgresStore",
"create_react_agent": "langchain-classic/agents/react/agent/create_react_agent",
"LastValue": "langgraph/channels/last_value/LastValue",
"START": "langgraph/constants/START",
"Pregel": "langgraph/pregel/main/Pregel",
"Pregel.astream": "langgraph/pregel/#langgraph.pregel.Pregel.astream",
"Pregel.stream": "langgraph/pregel/#langgraph.pregel.Pregel.stream",
"Runtime": "langgraph/runtime/Runtime",
"Send": "langgraph/types/Send",
"GraphOutput": "langgraph/types/GraphOutput",
"StreamPart": "langgraph/types/StreamPart",
"ValuesStreamPart": "langgraph/types/ValuesStreamPart",
"UpdatesStreamPart": "langgraph/types/UpdatesStreamPart",
"MessagesStreamPart": "langgraph/types/MessagesStreamPart",
"CustomStreamPart": "langgraph/types/CustomStreamPart",
"CheckpointStreamPart": "langgraph/types/CheckpointStreamPart",
"TasksStreamPart": "langgraph/types/TasksStreamPart",
"DebugStreamPart": "langgraph/types/DebugStreamPart",
"Topic": "langgraph/channels/topic/Topic",
# LangSmith Deployment SDK
# Main client
"get_client": "langchain-core/tracers/langchain/get_client",
"get_sync_client": "langgraph-sdk/_sync/client/get_sync_client",
"LangGraphClient": "langgraph-sdk/_async/client/LangGraphClient",
# HTTP clients
"HttpClient": "langgraph-sdk/_async/http/HttpClient",
"SyncHttpClient": "langgraph-sdk/_sync/http/SyncHttpClient",
# Resource clients - Async
"AssistantsClient": "langgraph-sdk/_async/assistants/AssistantsClient",
"AssistantsClient.create": "langsmith/deployment/sdk/#langgraph_sdk.client.AssistantsClient.create",
"AssistantsClient.update": "langsmith/deployment/sdk/#langgraph_sdk.client.AssistantsClient.update",
"LangGraphSDK": "langsmith/deployment/sdk/",
"ThreadsClient": "langgraph-sdk/_async/threads/ThreadsClient",
"ThreadsClient.create": "langsmith/deployment/sdk/#langgraph_sdk.client.ThreadsClient.create",
"ThreadsClient.copy": "langsmith/deployment/sdk/#langgraph_sdk.client.ThreadsClient.copy",
"ThreadsClient.get": "langsmith/deployment/sdk/#langgraph_sdk.client.ThreadsClient.get",
"ThreadsClient.get_state": "langsmith/deployment/sdk/#langgraph_sdk.client.ThreadsClient.get_state",
"ThreadsClient.search": "langsmith/deployment/sdk/#langgraph_sdk.client.ThreadsClient.search",
"ThreadsClient.get_history": "langsmith/deployment/sdk/#langgraph_sdk.client.ThreadsClient.get_history",
"RunsClient": "langgraph-sdk/_async/runs/RunsClient",
"RunsClient.stream": "langsmith/deployment/sdk/#langgraph_sdk.client.RunsClient.stream",
"CronClient": "langgraph-sdk/_async/cron/CronClient",
"StoreClient": "langgraph-sdk/_async/store/StoreClient",
# Resource clients - Sync
"SyncAssistantsClient": "langgraph-sdk/_sync/assistants/SyncAssistantsClient",
"SyncThreadsClient": "langgraph-sdk/_sync/threads/SyncThreadsClient",
"SyncRunsClient": "langgraph-sdk/_sync/runs/SyncRunsClient",
"SyncCronClient": "langgraph-sdk/_sync/cron/SyncCronClient",
"SyncStoreClient": "langgraph-sdk/_sync/store/SyncStoreClient",
# Client methods
"client.runs.stream": "langsmith/deployment/sdk/#langgraph_sdk.client.RunsClient.stream",
"client.runs.wait": "langsmith/deployment/sdk/#langgraph_sdk.client.RunsClient.wait",
"client.threads.get_history": "langsmith/deployment/sdk/#langgraph_sdk.client.ThreadsClient.get_history",
"client.threads.update_state": "langsmith/deployment/sdk/#langgraph_sdk.client.ThreadsClient.update_state",
# Schema types - Enumerations
"RunStatus": "langgraph-sdk/schema/RunStatus",
"ThreadStatus": "langgraph-sdk/schema/ThreadStatus",
"StreamMode": "langgraph-sdk/schema/StreamMode",
"DisconnectMode": "langgraph-sdk/schema/DisconnectMode",
"MultitaskStrategy": "langgraph-sdk/schema/MultitaskStrategy",
"OnConflictBehavior": "langgraph-sdk/schema/OnConflictBehavior",
# Schema types - Data models
"Assistant": "langgraph-sdk/schema/Assistant",
"AssistantVersion": "langgraph-sdk/schema/AssistantVersion",
"Thread": "langgraph-sdk/schema/Thread",
"Run": "langsmith/schemas/Run",
"Cron": "langgraph-sdk/schema/Cron",
"Config": "langgraph-cli/schemas/Config",
"Checkpoint": "langgraph-sdk/schema/Checkpoint",
"GraphSchema": "langgraph-sdk/schema/GraphSchema",
"Item": "langgraph-sdk/schema/Item",
"SearchItem": "langgraph-sdk/schema/SearchItem",
"ThreadState": "langgraph-sdk/schema/ThreadState",
# Auth types
"Auth": "langgraph-sdk/auth/Auth",
"Auth.authenticate": "langgraph-sdk/auth/Auth/authenticate",
"Auth.on": "langgraph-sdk/auth/Auth/on",
"AuthContext": "langgraph-sdk/auth/types/AuthContext",
"BaseUser": "langgraph-sdk/auth/types/BaseUser",
"StudioUser": "langgraph-sdk/auth/types/StudioUser",
"MinimalUserDict": "langgraph-sdk/auth/types/MinimalUserDict",
"HTTPException": "langgraph-sdk/auth/exceptions/HTTPException",
# Auth types - Threads
"ThreadsCreate": "langgraph-sdk/auth/types/ThreadsCreate",
"ThreadsRead": "langgraph-sdk/auth/types/ThreadsRead",
"ThreadsUpdate": "langgraph-sdk/auth/types/ThreadsUpdate",
"ThreadsDelete": "langgraph-sdk/auth/types/ThreadsDelete",
"ThreadsSearch": "langgraph-sdk/auth/types/ThreadsSearch",
# Auth types - Assistants
"AssistantsCreate": "langgraph-sdk/auth/types/AssistantsCreate",
"AssistantsRead": "langgraph-sdk/auth/types/AssistantsRead",
"AssistantsUpdate": "langgraph-sdk/auth/types/AssistantsUpdate",
"AssistantsDelete": "langgraph-sdk/auth/types/AssistantsDelete",
"AssistantsSearch": "langgraph-sdk/auth/types/AssistantsSearch",
# Auth types - Runs
"RunsCreate": "langgraph-sdk/auth/types/RunsCreate",
# Auth types - Crons
"CronsCreate": "langgraph-sdk/auth/types/CronsCreate",
"CronsRead": "langgraph-sdk/auth/types/CronsRead",
"CronsUpdate": "langgraph-sdk/auth/types/CronsUpdate",
"CronsDelete": "langgraph-sdk/auth/types/CronsDelete",
"CronsSearch": "langgraph-sdk/auth/types/CronsSearch",
# Schema create types
"RunCreate": "langgraph-sdk/schema/RunCreate",
"RunCreateMetadata": "langgraph-sdk/schema/RunCreateMetadata",
# Functional API
"task": "langgraph/func/task",
"@task": "langgraph/func/task",
"@entrypoint": "langgraph/func/entrypoint",
"entrypoint.final": "langgraph/func/entrypoint/final",
# Configuration
"langgraph.json": "cloud/reference/cli/#configuration-file",
# MCP stuff
"MultiServerMCPClient": "langchain-mcp-adapters/client/MultiServerMCPClient",
"load_mcp_tools": "langchain-mcp-adapters/tools/load_mcp_tools",
"load_mcp_prompt": "langchain-mcp-adapters/prompts/load_mcp_prompt",
"load_mcp_resources": "langchain-mcp-adapters/resources/load_mcp_resources",
"MCPToolArtifact": "langchain-mcp-adapters/tools/MCPToolArtifact",
"ToolCallInterceptor": "langchain-mcp-adapters/interceptors/ToolCallInterceptor",
"CallbackContext": "langchain-mcp-adapters/callbacks/CallbackContext",
"Callbacks": "langchain-core/callbacks/base/Callbacks",
"Connection": "langchain-mcp-adapters/sessions/Connection",
"McpHttpClientFactory": "langchain-mcp-adapters/sessions/McpHttpClientFactory",
"StdioConnection": "langchain-mcp-adapters/sessions/StdioConnection",
"StreamableHttpConnection": "langchain-mcp-adapters/sessions/StreamableHttpConnection",
"WebsocketConnection": "langchain-mcp-adapters/sessions/WebsocketConnection",
# JS-only references added here for cross-scope compatibility
"createAgent": "https://reference.langchain.com/javascript/langchain/index/createAgent",
# LangSmith SDK - Vitest/Jest references (JS-only, but added here for cross-scope compatibility)
"langsmith.vitest": "https://reference.langchain.com/javascript/modules/langsmith.vitest.html",
"langsmith/vitest": "https://reference.langchain.com/javascript/modules/langsmith.vitest.html",
"langsmith.jest": "https://reference.langchain.com/javascript/modules/langsmith.jest.html",
"langsmith/jest": "https://reference.langchain.com/javascript/modules/langsmith.jest.html",
"ls.describe": "https://reference.langchain.com/javascript/modules/langsmith.vitest.html#describe",
"ls.test": "https://reference.langchain.com/javascript/modules/langsmith.vitest.html#test",
"ls.test.each": "https://reference.langchain.com/javascript/modules/langsmith.vitest.html#test",
"ls.wrapEvaluator": "https://reference.langchain.com/javascript/modules/langsmith.vitest.html#wrapEvaluator",
"ls.logOutputs": "https://reference.langchain.com/javascript/modules/langsmith.vitest.html#logOutputs",
"ls.logFeedback": "https://reference.langchain.com/javascript/modules/langsmith.vitest.html#logFeedback",
"Client.listExamples": "https://reference.langchain.com/javascript/classes/langsmith.client.Client.html#listexamples",
"Example": "https://reference.langchain.com/javascript/interfaces/langsmith.Example.html",
},
},
{
"host": "https://reference.langchain.com/javascript/",
"scope": "js",
"links": {
# @langchain/core references
"AIMessage": "langchain-core/messages/AIMessage",
"AIMessageChunk": "langchain-core/messages/AIMessageChunk",
"BaseMessage": "langchain-core/messages/BaseMessage",
"HumanMessage": "langchain-core/messages/HumanMessage",
"SystemMessage": "langchain-core/messages/SystemMessage",
"SystemMessage.concat": "langchain-core/utils/stream/concat",
"ToolMessage": "langchain-core/messages/ToolMessage",
"ToolCallChunk": "langchain-core/messages/ContentBlock/Tools/ToolCallChunk",
"BaseChatModel": "langchain-core/language_models/chat_models/BaseChatModel",
"BaseChatModel.invoke": "classes/_langchain_core.language_models_chat_models.BaseChatModel.html#invoke",
"BaseChatModel.stream": "classes/_langchain_core.language_models_chat_models.BaseChatModel.html#stream",
"BaseChatModel.streamEvents": "classes/_langchain_core.language_models_chat_models.BaseChatModel.html#streamEvents",
"BaseChatModel.batch": "classes/_langchain_core.language_models_chat_models.BaseChatModel.html#batch",
"BaseChatModel.bindTools": "classes/_langchain_core.language_models_chat_models.BaseChatModel.html#bindTools",
"BaseChatModel.with_structured_output": "classes/_langchain_core.language_models_chat_models.BaseChatModel.html#withStructuredOutput",
"BaseChatModel.with_structured_output(include_raw)": "classes/_langchain_core.language_models_chat_models.BaseChatModel.html#withStructuredOutput",
"BaseTool": "classes/_langchain_core.tools.StructuredTool.html",
"ContentBlock": "langchain-core/messages/ContentBlock",
"ChatOpenAI": "langchain-openai/ChatOpenAI",
"AzureChatOpenAI": "langchain-openai/AzureChatOpenAI",
"Document": "langchain-core/documents/Document",
"Embeddings": "langchain-core/embeddings/Embeddings",
"initChatModel": "langchain/chat_models/universal/initChatModel",
"Runnable": "langchain-core/runnables/Runnable",
"RunnableConfig": "langchain-core/runnables/RunnableConfig",
"Retrievers": "interfaces/_langchain_core.retrievers.BaseRetriever.html",
"VectorStore": "langchain-core/vectorstores/VectorStore",
"VectorStore.maxMarginalRelevanceSearch": "classes/_langchain_core.vectorstores.VectorStore.html#maxMarginalRelevanceSearch",
"tool": "langchain-core/tools/tool",
"UsageMetadata": "langchain-core/messages/UsageMetadata",
"BaseLoader": "classes/_langchain_core.document_loaders_base.BaseDocumentLoader.html",
"getContextVariable": "langchain-core/context/getContextVariable",
"astream_events": "classes/_langchain_core.runnables.Runnable.html#streamEvents",
"on_llm_new_token": "interfaces/_langchain_core.callbacks_base.BaseCallbackHandlerMethods.html#onLlmNewToken",
"langchain.messages": "modules/_langchain_core.messages.html",
"BaseMessage(content)": "langchain-core/messages/BaseMessage",
# Text splitters
"RecursiveCharacterTextSplitter": "langchain-textsplitters/RecursiveCharacterTextSplitter",
"TokenTextSplitter": "langchain-textsplitters/TokenTextSplitter",
# LangSmith SDK
"langsmith": "langsmith/",
"langsmith-js": "modules/langsmith.html",
"langsmith-python": "https://reference.langchain.com/python/langsmith/observability/sdk/",
"tracingEnabled": "classes/langsmith.run_trees.RunTree.html#tracingenabled",
"wrapGemini": "functions/langsmith.wrappers_gemini.wrapGemini.html",
# LangGraph SDK references
"Auth": "langchain-langgraph-sdk/auth/Auth",
"client.runs.stream": "classes/_langchain_langgraph-sdk.client.RunsClient.html#stream",
"client.runs.wait": "classes/_langchain_langgraph-sdk.client.RunsClient.html#wait",
"client.threads.get_history": "classes/_langchain_langgraph-sdk.client.ThreadsClient.html#getHistory",
"client.threads.update_state": "classes/_langchain_langgraph-sdk.client.ThreadsClient.html#updateState",
# LangGraph checkpoint references
"BaseCheckpointSaver": "langchain-langgraph/index/BaseCheckpointSaver",
"BaseStore": "langchain-core/stores/BaseStore",
"BaseStore.put": "langchain-langgraph-checkpoint/BaseStore/put",
"InMemoryStore": "langchain-core/stores/InMemoryStore",
"InMemorySaver": "classes/_langchain_langgraph-checkpoint.MemorySaver.html",
"MemorySaver": "langchain-langgraph/index/MemorySaver",
"AsyncPostgresSaver": "classes/_langchain_langgraph-checkpoint-postgres.AsyncPostgresSaver.html",
"PostgresSaver": "langchain-langgraph-checkpoint-postgres/index/PostgresSaver",
"PostgresStore": "langchain-langgraph-checkpoint-postgres/store/PostgresStore",
"protocol": "interfaces/_langchain_langgraph-checkpoint.SerializerProtocol.html",
"SerializerProtocol": "langchain-langgraph-checkpoint/SerializerProtocol",
"SqliteSaver": "langchain-langgraph-checkpoint-sqlite/SqliteSaver",
# LangGraph core references
"StateGraph": "langchain-langgraph/index/StateGraph",
"StateGraph.compile": "classes/_langchain_langgraph.index.StateGraph.html#compile",
"add_conditional_edges": "classes/_langchain_langgraph.index.StateGraph.html#addConditionalEdges",
"addConditionalEdges": "classes/_langchain_langgraph.index.StateGraph.html#addConditionalEdges",
"add_edge": "classes/_langchain_langgraph.index.StateGraph.html#addEdge",
"addEdge": "classes/_langchain_langgraph.index.StateGraph.html#addEdge",
"add_node": "classes/_langchain_langgraph.index.StateGraph.html#addNode",
"add_messages": "functions/_langchain_langgraph.index.messagesStateReducer.html",
"LastValue": "classes/_langchain_langgraph.channels.LastValue.html",
"Topic": "langchain-langgraph/channels/Topic",
"BinaryOperatorAggregate": "langchain-langgraph/channels/BinaryOperatorAggregate",
"Command": "langchain-langgraph/index/Command",
"CompiledStateGraph": "langchain-langgraph/index/CompiledStateGraph",
"createAgent": "langchain/index/createAgent",
"fakeModel": "langchain/index/fakeModel",
"createDeepAgent": "deepagents/agent/createDeepAgent",
"createMiddleware": "langchain/index/createMiddleware",
"createReactAgent": "langchain-langgraph/prebuilt/createReactAgent",
"createSupervisor": "langchain-langgraph-supervisor/createSupervisor",
"entrypoint": "langchain-langgraph/index/entrypoint",
"entrypoint.final": "functions/_langchain_langgraph.index.entrypoint.html#final",
"get_state_history": "classes/_langchain_langgraph.pregel.Pregel.html#getStateHistory",
"getStateHistory": "classes/_langchain_langgraph.pregel.Pregel.html#getStateHistory",
"HumanInterrupt": "langchain-langgraph/prebuilt/HumanInterrupt",
"interrupt": "langchain-langgraph/index/interrupt",
"CompiledStateGraph.invoke": "classes/_langchain_langgraph.index.CompiledStateGraph.html#invoke",
"langgraph.json": "cloud/reference/cli/#configuration-file",
"messagesStateReducer": "langchain-langgraph/index/messagesStateReducer",
"Pregel": "langchain-langgraph/index/Pregel",
"Pregel.stream": "classes/_langchain_langgraph.pregel.Pregel.html#stream",
"Send": "langchain-langgraph/index/Send",
"START": "langchain-langgraph/index/START",
"CompiledStateGraph.stream": "classes/_langchain_langgraph.index.CompiledStateGraph.html#stream",
"task": "langchain-langgraph/index/task",
"update_state": "classes/_langchain_langgraph.pregel.Pregel.html#updateState",
"updateState": "classes/_langchain_langgraph.pregel.Pregel.html#updateState",
"Runtime": "langchain/index/Runtime",
"ToolNode": "langchain-langgraph/prebuilt/ToolNode",
# Python-named aliases for cross-scope compatibility
"get_state": "classes/_langchain_langgraph.pregel.Pregel.html#getState",
"create_agent": "langchain/index/createAgent",
"init_chat_model": "langchain/chat_models/universal/initChatModel",
"tools_condition": "langchain-langgraph/prebuilt/toolsCondition",
"ToolRuntime": "langchain/index/Runtime",
"RunnableLambda": "langchain-core/runnables/RunnableLambda",
# LangSmith Deployment SDK - JS
"LangGraphSDK": "langgraph-sdk/",
"ThreadsClient": "langchain-langgraph-sdk/client/ThreadsClient",
"ThreadsClient.create": "langchain-node-vfs/node-vfs-polyfill/create",
"ThreadsClient.copy": "classes/_langchain_langgraph-sdk.client.ThreadsClient.html#copy",
"ThreadsClient.get": "langchain-community/utils/convex/get",
"ThreadsClient.get_state": "classes/_langchain_langgraph-sdk.client.ThreadsClient.html#getstate",
"ThreadsClient.search": "classes/_langchain_langgraph-sdk.client.ThreadsClient.html#search",
"ThreadsClient.get_history": "classes/_langchain_langgraph-sdk.client.ThreadsClient.html#gethistory",
"ThreadsClient.getHistory": "classes/_langchain_langgraph-sdk.client.ThreadsClient.html#gethistory",
"AssistantsClient": "langchain-langgraph-sdk/client/AssistantsClient",
"AssistantsClient.create": "langchain-node-vfs/node-vfs-polyfill/create",
"AssistantsClient.update": "classes/_langchain_langgraph-sdk.client.AssistantsClient.html#update",
"AssistantsClient.search": "classes/_langchain_langgraph-sdk.client.AssistantsClient.html#search",
"RunsClient": "langchain-langgraph-sdk/client/RunsClient",
"RunsClient.stream": "classes/_langchain_langgraph-sdk.client.RunsClient.html#stream",
"ClearToolUsesEdit": "langchain/index/ClearToolUsesEdit",
"ContextEdit": "langchain/index/ContextEdit",
"toolRetryMiddleware": "langchain/index/toolRetryMiddleware",
"modelRetryMiddleware": "langchain/index/modelRetryMiddleware",
"systemPrompt": "types/langchain.index.CreateAgentParams.html#systemprompt",
"openAIModerationMiddleware": "langchain/index/openAIModerationMiddleware",
# LangSmith SDK - Vitest references
"langsmith.vitest": "modules/langsmith.vitest.html",
"langsmith/vitest": "modules/langsmith.vitest.html",
"ls.describe": "langsmith/jest/describe",
"ls.test": "langsmith/jest/test",
"ls.test.each": "langsmith/jest/test",
"ls.wrapEvaluator": "langsmith/jest/wrapEvaluator",
"ls.logOutputs": "langsmith/jest/logOutputs",
"ls.logFeedback": "langsmith/jest/logFeedback",
"wrapVitest": "langsmith/vitest/wrapVitest",
# LangSmith SDK - Jest references
"langsmith.jest": "modules/langsmith.jest.html",
"langsmith/jest": "modules/langsmith.jest.html",
"wrapJest": "langsmith/jest/wrapJest",
# LangSmith SDK - Core client references
"Client.listExamples": "classes/langsmith.client.Client.html#listexamples",
"Example": "langchain-core/prompts/Example",
},
},
{
# LangSmith Deployment Agent Server API - Python scope
"host": "https://langchain-ai.github.io/langgraph/cloud/reference/api/",
"scope": "python",
"links": {
"AssistantsAPI": "api_ref.html#tag/assistants",
"ThreadsAPI": "api_ref.html#tag/threads",
"ThreadsAPI.create": "api_ref.html#tag/threads/post/threads",
"ThreadsAPI.copy": "api_ref.html#tag/threads/post/threads/{thread_id}/copy",
"ThreadsAPI.get": "api_ref.html#tag/threads/get/threads/{thread_id}",
"ThreadsAPI.get_state": "api_ref.html#tag/threads/get/threads/{thread_id}/state",
"ThreadsAPI.search": "api_ref.html#tag/threads/post/threads/search",
"ThreadsAPI.get_history": "api_ref.html#tag/threads/post/threads/{thread_id}/history",
},
},
{
# LangSmith Deployment Agent Server API - JS scope
"host": "https://langchain-ai.github.io/langgraph/cloud/reference/api/",
"scope": "js",
"links": {
"AssistantsAPI": "api_ref.html#tag/assistants",
"ThreadsAPI": "api_ref.html#tag/threads",
"ThreadsAPI.create": "api_ref.html#tag/threads/post/threads",
"ThreadsAPI.copy": "api_ref.html#tag/threads/post/threads/{thread_id}/copy",
"ThreadsAPI.get": "api_ref.html#tag/threads/get/threads/{thread_id}",
"ThreadsAPI.get_state": "api_ref.html#tag/threads/get/threads/{thread_id}/state",
"ThreadsAPI.search": "api_ref.html#tag/threads/post/threads/search",
"ThreadsAPI.get_history": "api_ref.html#tag/threads/post/threads/{thread_id}/history",
},
},
]
def _enumerate_links(scope: str) -> dict[str, str]:
result = {}
for link_map in LINK_MAPS:
if link_map["scope"] == scope:
links = link_map["links"]
for key, value in links.items():
if not value.startswith("http"):
result[key] = f"{link_map['host']}{value}"
else:
result[key] = value
return result
# Global scope is assembled from the Python and JS mappings
# Combined mapping by scope
SCOPE_LINK_MAPS = {
"python": _enumerate_links("python"),
"js": _enumerate_links("js"),
}