You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
deploymentUrl: "http://localhost:<port>", // the URL from LangGraph Studio
72
-
agents: [
73
-
{
74
-
// the name of the graph defined in the `agent/langgraph.json` file
75
-
name: 'travel',
76
-
description: 'A travel assistant that can help with planning trips.'
77
-
}
78
-
]
79
-
}),
80
-
],
88
+
// [!code ++:13]
89
+
const runtime =newCopilotRuntime({
90
+
remoteEndpoints: [
91
+
langGraphPlatformEndpoint({
92
+
deploymentUrl: "http://localhost:<port_number>",
93
+
langsmithApiKey: "your-langsmith-api-key",
94
+
agents: [{
95
+
name: 'travel',
96
+
description: 'A travel assistant that can help with planning trips.'
97
+
}]
98
+
}),
99
+
],
81
100
});
82
101
83
102
// ...
@@ -115,9 +134,8 @@ Want to learn more about multi-agent routing? Checkout out the [multi-agent conc
115
134
</CopilotKit>
116
135
```
117
136
118
-
This will ensure that every request is sent to the `travel` agent. Its worth noting that agent should be
119
-
the same name as defined in `agent/langgraph.json` and in step 1.
120
-
137
+
This will ensure that every request is sent to the `travel` agent. The `travel` name is defined in the [agents/langgraph.json](https://github.com/CopilotKit/CopilotKit/blob/main/examples/coagents-travel/agent/langgraph.json)
138
+
file. When we deploy our agent to Copilot Cloud this is automatically handled for us. When self-hosting, we need to specify the name of the agent in the `langGraphPlatformEndpoint` constructor.
0 commit comments