[PR #205] [MERGED] Export CompiledStateGraph type #574

Closed
opened 2026-02-15 19:15:05 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/langgraphjs/pull/205
Author: @jacoblee93
Created: 6/5/2024
Status: Merged
Merged: 6/5/2024
Merged by: @jacoblee93

Base: mainHead: jacob/types


📝 Commits (1)

  • 9fb6848 Export CompiledStateGraph type

📊 Changes

2 files changed (+6 additions, -1 deletions)

View changed files

📝 langgraph/src/graph/index.ts (+5 -1)
📝 langgraph/src/index.ts (+1 -0)

📄 Description

Enables patterns like this:

let agent: CompiledStateGraph;

export async function call(input: string): Promise<string> {
  if (agent === undefined) {
    agent = await buildGraph();
  }

  const res = await agent.invoke({ input });
  console.log(res);

  return res.agentOutcome.returnValues.output;
}

@nfcampos


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/langgraphjs/pull/205 **Author:** [@jacoblee93](https://github.com/jacoblee93) **Created:** 6/5/2024 **Status:** ✅ Merged **Merged:** 6/5/2024 **Merged by:** [@jacoblee93](https://github.com/jacoblee93) **Base:** `main` ← **Head:** `jacob/types` --- ### 📝 Commits (1) - [`9fb6848`](https://github.com/langchain-ai/langgraphjs/commit/9fb68481953816d911851b872e5ea7cdf1488ca3) Export CompiledStateGraph type ### 📊 Changes **2 files changed** (+6 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `langgraph/src/graph/index.ts` (+5 -1) 📝 `langgraph/src/index.ts` (+1 -0) </details> ### 📄 Description Enables patterns like this: ```ts let agent: CompiledStateGraph; export async function call(input: string): Promise<string> { if (agent === undefined) { agent = await buildGraph(); } const res = await agent.invoke({ input }); console.log(res); return res.agentOutcome.returnValues.output; } ``` @nfcampos --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-15 19:15:05 -05:00
yindo closed this issue 2026-02-15 19:15:05 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraphjs#574