Skip to content

Commit cdf4c72

Browse files
committed
feat(langgraph-fastapi): introduce TS langgraph http agent
1 parent 8455fe6 commit cdf4c72

File tree

3 files changed

+849
-846
lines changed

3 files changed

+849
-846
lines changed

typescript-sdk/apps/dojo/src/agents.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@ import { MastraClient } from "@mastra/client-js";
88
import { MastraAgent } from "@ag-ui/mastra";
99
import { VercelAISDKAgent } from "@ag-ui/vercel-ai-sdk";
1010
import { openai } from "@ai-sdk/openai";
11-
import { LangGraphAgent } from "@ag-ui/langgraph";
11+
import { LangGraphAgent, LangGraphHttpAgent } from "@ag-ui/langgraph";
1212
import { AgnoAgent } from "@ag-ui/agno";
1313
import { LlamaIndexAgent } from "@ag-ui/llamaindex";
1414
import { CrewAIAgent } from "@ag-ui/crewai";
1515
import { mastra } from "./mastra";
16-
import { HttpAgent } from "@ag-ui/client";
1716

1817
export const agentsIntegrations: AgentIntegrationConfig[] = [
1918
{
@@ -118,22 +117,22 @@ export const agentsIntegrations: AgentIntegrationConfig[] = [
118117
id: "langgraph-fastapi",
119118
agents: async () => {
120119
return {
121-
agentic_chat: new HttpAgent({
120+
agentic_chat: new LangGraphHttpAgent({
122121
url: "http://localhost:8000/agent/agentic_chat",
123122
}),
124-
agentic_generative_ui: new HttpAgent({
123+
agentic_generative_ui: new LangGraphHttpAgent({
125124
url: "http://localhost:8000/agent/agentic_generative_ui",
126125
}),
127-
human_in_the_loop: new HttpAgent({
126+
human_in_the_loop: new LangGraphHttpAgent({
128127
url: "http://localhost:8000/agent/human_in_the_loop",
129128
}),
130-
predictive_state_updates: new HttpAgent({
129+
predictive_state_updates: new LangGraphHttpAgent({
131130
url: "http://localhost:8000/agent/predictive_state_updates",
132131
}),
133-
shared_state: new HttpAgent({
132+
shared_state: new LangGraphHttpAgent({
134133
url: "http://localhost:8000/agent/shared_state",
135134
}),
136-
tool_based_generative_ui: new HttpAgent({
135+
tool_based_generative_ui: new LangGraphHttpAgent({
137136
url: "http://localhost:8000/agent/tool_based_generative_ui",
138137
}),
139138
};

0 commit comments

Comments
 (0)