RemoteGraph not supported as agent in createSupervisor #319

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

Originally created by @MartijnLeplae on GitHub (Jul 29, 2025).

Checked other resources

  • I added a very descriptive title to this issue.
  • I searched the LangGraph.js documentation with the integrated search.
  • I used the GitHub search to find a similar question and didn't find it.
  • I am sure that this is a bug in LangGraph.js rather than my code.
  • The bug is not resolved by updating to the latest stable version of LangGraph (or the specific integration package).

Example Code

import { createSupervisor } from "@langchain/langgraph-supervisor";
import { RemoteGraph } from "@langchain/langgraph/remote";
import { AzureChatOpenAI } from "@langchain/openai";

const remoteGraph = new RemoteGraph(
    {
        graphId: "agent",
        url: "http://localhost:2024",
        config: {
            configurable: {
              foo: "bar",
              threadId: "thread_id_1",
            },
          },
    }
)

const model = new AzureChatOpenAI({
    azureOpenAIApiKey: process.env.AZURE_OPENAI_API_KEY,
    azureOpenAIApiVersion: process.env.AZURE_OPENAI_API_VERSION || "2024-02-01",
    azureOpenAIEndpoint: process.env.AZURE_OPENAI_API_URL,
    azureOpenAIApiDeploymentName: process.env.AZURE_OPENAI_DEPLOYMENT_NAME || 'gpt-4o-mini',
    modelName: 'gpt-4o-mini'
  });

const graph = createSupervisor({
    prompt: "You are a remote agent!",
    llm: model,
    agents: [remoteGraph],
});

Error Message and Stack Trace (if applicable)

Type 'RemoteGraph<StrRecord<string, PregelNode<any, any>>, StrRecord<string, ManagedValueSpec | BaseChannel<unknown, unknown, unknown>>, StrRecord<...>>' is missing the following properties from type 'CompiledStateGraph<StateType<{ messages: BinaryOperatorAggregate<BaseMessage[], Messages>; }>, UpdateType<{ messages: BinaryOperatorAggregate<BaseMessage[], Messages>; }>, string, { ...; }, { ...; }, StateDefinition>': builder, _metaRegistry, attachNode, attachEdge, and 25 more.ts(2740)

Description

  • I'm trying to create a supervisor agent, that can supervise other agents on LangGraph Platform
  • I tried setting this up analogous to the Python implementation of the Open Agent Platform Supervisor
  • The RemoteGraph type, however, is not accepted as an agent.
  • I did try to refactor the createSupervisor code to make the type checking more lenient, but I did stumble on another issue related to the RemoteGraph code related to the sanitization of the config when testing trough langgraph server locally. Related issue: https://github.com/langchain-ai/langgraphjs/issues/1446

System Info

├── @langchain/community@0.3.49
├── @langchain/core@0.3.66
├── @langchain/langgraph-cli@0.0.51
├── @langchain/langgraph-sdk@0.0.101
├── @langchain/langgraph-supervisor@0.0.15
├── @langchain/langgraph@0.3.11
├── @langchain/mcp-adapters@0.5.4
├── @langchain/openai@0.5.18
├── concurrently@9.2.0
├── langchain@0.3.30
├── langsmith@0.3.48
├── llamaindex@0.11.15
├── tsx@4.20.3
├── turbo@2.5.4
├── typescript@5.8.3
└── zod@3.25.76
Originally created by @MartijnLeplae on GitHub (Jul 29, 2025). ### Checked other resources - [x] I added a very descriptive title to this issue. - [x] I searched the LangGraph.js documentation with the integrated search. - [x] I used the GitHub search to find a similar question and didn't find it. - [x] I am sure that this is a bug in LangGraph.js rather than my code. - [x] The bug is not resolved by updating to the latest stable version of LangGraph (or the specific integration package). ### Example Code ```typescript import { createSupervisor } from "@langchain/langgraph-supervisor"; import { RemoteGraph } from "@langchain/langgraph/remote"; import { AzureChatOpenAI } from "@langchain/openai"; const remoteGraph = new RemoteGraph( { graphId: "agent", url: "http://localhost:2024", config: { configurable: { foo: "bar", threadId: "thread_id_1", }, }, } ) const model = new AzureChatOpenAI({ azureOpenAIApiKey: process.env.AZURE_OPENAI_API_KEY, azureOpenAIApiVersion: process.env.AZURE_OPENAI_API_VERSION || "2024-02-01", azureOpenAIEndpoint: process.env.AZURE_OPENAI_API_URL, azureOpenAIApiDeploymentName: process.env.AZURE_OPENAI_DEPLOYMENT_NAME || 'gpt-4o-mini', modelName: 'gpt-4o-mini' }); const graph = createSupervisor({ prompt: "You are a remote agent!", llm: model, agents: [remoteGraph], }); ``` ### Error Message and Stack Trace (if applicable) ``` Type 'RemoteGraph<StrRecord<string, PregelNode<any, any>>, StrRecord<string, ManagedValueSpec | BaseChannel<unknown, unknown, unknown>>, StrRecord<...>>' is missing the following properties from type 'CompiledStateGraph<StateType<{ messages: BinaryOperatorAggregate<BaseMessage[], Messages>; }>, UpdateType<{ messages: BinaryOperatorAggregate<BaseMessage[], Messages>; }>, string, { ...; }, { ...; }, StateDefinition>': builder, _metaRegistry, attachNode, attachEdge, and 25 more.ts(2740) ``` ### Description - I'm trying to create a supervisor agent, that can supervise other agents on LangGraph Platform - I tried setting this up analogous to the Python implementation of the [Open Agent Platform Supervisor](https://github.com/langchain-ai/oap-agent-supervisor/blob/07d7c150b949c45e9541a55fc2f671f318826046/oap_supervisor/agent.py#L206) - The `RemoteGraph` type, however, is not accepted as an agent. - I did try to refactor the `createSupervisor` code to make the type checking more lenient, but I did stumble on another issue related to the `RemoteGraph` code related to the sanitization of the config when testing trough langgraph server locally. Related issue: https://github.com/langchain-ai/langgraphjs/issues/1446 ### System Info ```shell ├── @langchain/community@0.3.49 ├── @langchain/core@0.3.66 ├── @langchain/langgraph-cli@0.0.51 ├── @langchain/langgraph-sdk@0.0.101 ├── @langchain/langgraph-supervisor@0.0.15 ├── @langchain/langgraph@0.3.11 ├── @langchain/mcp-adapters@0.5.4 ├── @langchain/openai@0.5.18 ├── concurrently@9.2.0 ├── langchain@0.3.30 ├── langsmith@0.3.48 ├── llamaindex@0.11.15 ├── tsx@4.20.3 ├── turbo@2.5.4 ├── typescript@5.8.3 └── zod@3.25.76 ```
yindo closed this issue 2026-02-15 18:15:53 -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#319