Skip to content

Conversation

@mdrxy
Copy link
Collaborator

@mdrxy mdrxy commented Oct 31, 2025

Closes #915

@github-actions github-actions bot added langgraph For docs changes to LangGraph oss labels Oct 31, 2025
@github-actions
Copy link
Contributor

Mintlify preview ID generated: preview-mdrxyl-1761933163-3caa308

@github-actions
Copy link
Contributor

Mintlify preview ID generated: preview-mdrxyl-1761935042-5451e86

@mdrxy mdrxy marked this pull request as ready for review November 3, 2025 22:07
@mdrxy mdrxy requested a review from lnhsingh as a code owner November 3, 2025 22:07
Copilot AI review requested due to automatic review settings November 3, 2025 22:07
@mdrxy mdrxy requested a review from katmayb as a code owner November 3, 2025 22:07
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new conceptual guide comparing LangGraph's Graph API and Functional API to help users choose the appropriate approach for their use case.

Key Changes

  • Adds comprehensive guide explaining when to use Graph API vs Functional API
  • Includes practical code examples demonstrating different use cases for each API
  • Provides migration guidance between the two approaches

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/oss/langgraph/choosing-apis.mdx New conceptual guide with decision criteria, detailed comparisons, code examples, and migration strategies for choosing between LangGraph's Graph and Functional APIs
src/docs.json Adds new guide to both Python and JavaScript navigation under "LangGraph APIs" section

Comment on lines +37 to +57
# Graph API: Clear visualization of decision paths
from langgraph.graph import StateGraph
from typing import TypedDict

class AgentState(TypedDict):
messages: list
current_tool: str
retry_count: int

def should_continue(state):
if state["retry_count"] > 3:
return "end"
elif state["current_tool"] == "search":
return "process_search"
else:
return "call_llm"

workflow = StateGraph(AgentState)
workflow.add_node("call_llm", call_llm_node)
workflow.add_node("process_search", search_node)
workflow.add_conditional_edges("call_llm", should_continue)
Copy link

Copilot AI Nov 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This document contains only Python code examples but is referenced in both Python and JavaScript navigation paths. According to the custom coding guidelines (CodingGuidelineID: 1000000), files in /oss/ that contain language-specific content should use custom language fences (:::python and :::js) to generate language-specific outputs. All code blocks should be wrapped with :::python and ::: fences, and corresponding JavaScript/TypeScript examples should be added within :::js and ::: fences. This will ensure the build pipeline creates appropriate versions for both languages.

Copilot generated this review using guidance from repository custom instructions.
{
"group": "LangGraph APIs",
"pages": [
"oss/python/langgraph/choosing-apis",
Copy link

Copilot AI Nov 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file path references a language-specific directory (oss/python/langgraph/choosing-apis) but the actual file is located at src/oss/langgraph/choosing-apis.mdx without language-specific subdirectories. According to the build pipeline, files in /oss/langgraph/ with custom language fences are automatically processed to create language-specific outputs at paths like /oss/python/langgraph/ and /oss/javascript/langgraph/. Ensure the source file uses the custom language fences so the build pipeline can generate the correct language-specific versions.

Copilot generated this review using guidance from repository custom instructions.
{
"group": "LangGraph APIs",
"pages": [
"oss/javascript/langgraph/choosing-apis",
Copy link

Copilot AI Nov 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file path references a language-specific directory (oss/javascript/langgraph/choosing-apis) but the actual file is located at src/oss/langgraph/choosing-apis.mdx without language-specific subdirectories. According to the build pipeline, files in /oss/langgraph/ with custom language fences are automatically processed to create language-specific outputs at paths like /oss/python/langgraph/ and /oss/javascript/langgraph/. Ensure the source file uses the custom language fences so the build pipeline can generate the correct language-specific versions.

Copilot generated this review using guidance from repository custom instructions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

langgraph For docs changes to LangGraph oss

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[langgraph]: add APIs overview page

2 participants