@@ -12,9 +12,11 @@ import { LangGraphAgent, LangGraphHttpAgent } from "@ag-ui/langgraph";
12
12
import { AgnoAgent } from "@ag-ui/agno" ;
13
13
import { LlamaIndexAgent } from "@ag-ui/llamaindex" ;
14
14
import { CrewAIAgent } from "@ag-ui/crewai" ;
15
+ import getEnvVars from "./env" ;
15
16
import { mastra } from "./mastra" ;
16
17
import { PydanticAIAgent } from "@ag-ui/pydantic-ai" ;
17
18
19
+ const envVars = getEnvVars ( ) ;
18
20
export const agentsIntegrations : AgentIntegrationConfig [ ] = [
19
21
{
20
22
id : "middleware-starter" ,
@@ -29,22 +31,22 @@ export const agentsIntegrations: AgentIntegrationConfig[] = [
29
31
agents : async ( ) => {
30
32
return {
31
33
agentic_chat : new PydanticAIAgent ( {
32
- url : "http://localhost:9000/ agentic_chat/" ,
34
+ url : ` ${ envVars . pydanticAIUrl } / agentic_chat/` ,
33
35
} ) ,
34
36
agentic_generative_ui : new PydanticAIAgent ( {
35
- url : "http://localhost:9000/ agentic_generative_ui/" ,
37
+ url : ` ${ envVars . pydanticAIUrl } / agentic_generative_ui/` ,
36
38
} ) ,
37
39
human_in_the_loop : new PydanticAIAgent ( {
38
- url : "http://localhost:9000/ human_in_the_loop/" ,
40
+ url : ` ${ envVars . pydanticAIUrl } / human_in_the_loop/` ,
39
41
} ) ,
40
42
predictive_state_updates : new PydanticAIAgent ( {
41
- url : "http://localhost:9000/ predictive_state_updates/" ,
43
+ url : ` ${ envVars . pydanticAIUrl } / predictive_state_updates/` ,
42
44
} ) ,
43
45
shared_state : new PydanticAIAgent ( {
44
- url : "http://localhost:9000/ shared_state/" ,
46
+ url : ` ${ envVars . pydanticAIUrl } / shared_state/` ,
45
47
} ) ,
46
48
tool_based_generative_ui : new PydanticAIAgent ( {
47
- url : "http://localhost:9000/ tool_based_generative_ui/" ,
49
+ url : ` ${ envVars . pydanticAIUrl } / tool_based_generative_ui/` ,
48
50
} ) ,
49
51
} ;
50
52
} ,
@@ -53,7 +55,7 @@ export const agentsIntegrations: AgentIntegrationConfig[] = [
53
55
id : "server-starter" ,
54
56
agents : async ( ) => {
55
57
return {
56
- agentic_chat : new ServerStarterAgent ( { url : "http://localhost:8000/" } ) ,
58
+ agentic_chat : new ServerStarterAgent ( { url : envVars . serverStarterUrl } ) ,
57
59
} ;
58
60
} ,
59
61
} ,
@@ -62,22 +64,22 @@ export const agentsIntegrations: AgentIntegrationConfig[] = [
62
64
agents : async ( ) => {
63
65
return {
64
66
agentic_chat : new ServerStarterAllFeaturesAgent ( {
65
- url : "http://localhost:8000/ agentic_chat" ,
67
+ url : ` ${ envVars . serverStarterAllFeaturesUrl } / agentic_chat` ,
66
68
} ) ,
67
69
human_in_the_loop : new ServerStarterAllFeaturesAgent ( {
68
- url : "http://localhost:8000/ human_in_the_loop" ,
70
+ url : ` ${ envVars . serverStarterAllFeaturesUrl } / human_in_the_loop` ,
69
71
} ) ,
70
72
agentic_generative_ui : new ServerStarterAllFeaturesAgent ( {
71
- url : "http://localhost:8000/ agentic_generative_ui" ,
73
+ url : ` ${ envVars . serverStarterAllFeaturesUrl } / agentic_generative_ui` ,
72
74
} ) ,
73
75
tool_based_generative_ui : new ServerStarterAllFeaturesAgent ( {
74
- url : "http://localhost:8000/ tool_based_generative_ui" ,
76
+ url : ` ${ envVars . serverStarterAllFeaturesUrl } / tool_based_generative_ui` ,
75
77
} ) ,
76
78
shared_state : new ServerStarterAllFeaturesAgent ( {
77
- url : "http://localhost:8000/ shared_state" ,
79
+ url : ` ${ envVars . serverStarterAllFeaturesUrl } / shared_state` ,
78
80
} ) ,
79
81
predictive_state_updates : new ServerStarterAllFeaturesAgent ( {
80
- url : "http://localhost:8000/ predictive_state_updates" ,
82
+ url : ` ${ envVars . serverStarterAllFeaturesUrl } / predictive_state_updates` ,
81
83
} ) ,
82
84
} ;
83
85
} ,
@@ -86,7 +88,7 @@ export const agentsIntegrations: AgentIntegrationConfig[] = [
86
88
id : "mastra" ,
87
89
agents : async ( ) => {
88
90
const mastraClient = new MastraClient ( {
89
- baseUrl : "http://localhost:4111" ,
91
+ baseUrl : envVars . mastraUrl ,
90
92
} ) ;
91
93
92
94
return MastraAgent . getRemoteAgents ( {
@@ -113,27 +115,27 @@ export const agentsIntegrations: AgentIntegrationConfig[] = [
113
115
agents : async ( ) => {
114
116
return {
115
117
agentic_chat : new LangGraphAgent ( {
116
- deploymentUrl : "http://localhost:2024" ,
118
+ deploymentUrl : envVars . langgraphUrl ,
117
119
graphId : "agentic_chat" ,
118
120
} ) ,
119
121
agentic_generative_ui : new LangGraphAgent ( {
120
- deploymentUrl : "http://localhost:2024" ,
122
+ deploymentUrl : envVars . langgraphUrl ,
121
123
graphId : "agentic_generative_ui" ,
122
124
} ) ,
123
125
human_in_the_loop : new LangGraphAgent ( {
124
- deploymentUrl : "http://localhost:2024" ,
126
+ deploymentUrl : envVars . langgraphUrl ,
125
127
graphId : "human_in_the_loop" ,
126
128
} ) ,
127
129
predictive_state_updates : new LangGraphAgent ( {
128
- deploymentUrl : "http://localhost:2024" ,
130
+ deploymentUrl : envVars . langgraphUrl ,
129
131
graphId : "predictive_state_updates" ,
130
132
} ) ,
131
133
shared_state : new LangGraphAgent ( {
132
- deploymentUrl : "http://localhost:2024" ,
134
+ deploymentUrl : envVars . langgraphUrl ,
133
135
graphId : "shared_state" ,
134
136
} ) ,
135
137
tool_based_generative_ui : new LangGraphAgent ( {
136
- deploymentUrl : "http://localhost:2024" ,
138
+ deploymentUrl : envVars . langgraphUrl ,
137
139
graphId : "tool_based_generative_ui" ,
138
140
} ) ,
139
141
} ;
@@ -144,22 +146,22 @@ export const agentsIntegrations: AgentIntegrationConfig[] = [
144
146
agents : async ( ) => {
145
147
return {
146
148
agentic_chat : new LangGraphHttpAgent ( {
147
- url : "http://localhost:8000/ agent/agentic_chat" ,
149
+ url : ` ${ envVars . langgraphFastApiUrl } / agent/agentic_chat` ,
148
150
} ) ,
149
151
agentic_generative_ui : new LangGraphHttpAgent ( {
150
- url : "http://localhost:8000/ agent/agentic_generative_ui" ,
152
+ url : ` ${ envVars . langgraphFastApiUrl } / agent/agentic_generative_ui` ,
151
153
} ) ,
152
154
human_in_the_loop : new LangGraphHttpAgent ( {
153
- url : "http://localhost:8000/ agent/human_in_the_loop" ,
155
+ url : ` ${ envVars . langgraphFastApiUrl } / agent/human_in_the_loop` ,
154
156
} ) ,
155
157
predictive_state_updates : new LangGraphHttpAgent ( {
156
- url : "http://localhost:8000/ agent/predictive_state_updates" ,
158
+ url : ` ${ envVars . langgraphFastApiUrl } / agent/predictive_state_updates` ,
157
159
} ) ,
158
160
shared_state : new LangGraphHttpAgent ( {
159
- url : "http://localhost:8000/ agent/shared_state" ,
161
+ url : ` ${ envVars . langgraphFastApiUrl } / agent/shared_state` ,
160
162
} ) ,
161
163
tool_based_generative_ui : new LangGraphHttpAgent ( {
162
- url : "http://localhost:8000/ agent/tool_based_generative_ui" ,
164
+ url : ` ${ envVars . langgraphFastApiUrl } / agent/tool_based_generative_ui` ,
163
165
} ) ,
164
166
} ;
165
167
} ,
@@ -169,7 +171,7 @@ export const agentsIntegrations: AgentIntegrationConfig[] = [
169
171
agents : async ( ) => {
170
172
return {
171
173
agentic_chat : new AgnoAgent ( {
172
- url : "http://localhost:8000/ agui" ,
174
+ url : ` ${ envVars . agnoUrl } / agui` ,
173
175
} ) ,
174
176
} ;
175
177
} ,
@@ -179,16 +181,16 @@ export const agentsIntegrations: AgentIntegrationConfig[] = [
179
181
agents : async ( ) => {
180
182
return {
181
183
agentic_chat : new LlamaIndexAgent ( {
182
- url : "http://localhost:9000/ agentic_chat/run" ,
184
+ url : ` ${ envVars . llamaIndexUrl } / agentic_chat/run` ,
183
185
} ) ,
184
186
human_in_the_loop : new LlamaIndexAgent ( {
185
- url : "http://localhost:9000/ human_in_the_loop/run" ,
187
+ url : ` ${ envVars . llamaIndexUrl } / human_in_the_loop/run` ,
186
188
} ) ,
187
189
agentic_generative_ui : new LlamaIndexAgent ( {
188
- url : "http://localhost:9000/ agentic_generative_ui/run" ,
190
+ url : ` ${ envVars . llamaIndexUrl } / agentic_generative_ui/run` ,
189
191
} ) ,
190
192
shared_state : new LlamaIndexAgent ( {
191
- url : "http://localhost:9000/ shared_state/run" ,
193
+ url : ` ${ envVars . llamaIndexUrl } / shared_state/run` ,
192
194
} ) ,
193
195
} ;
194
196
} ,
@@ -198,22 +200,22 @@ export const agentsIntegrations: AgentIntegrationConfig[] = [
198
200
agents : async ( ) => {
199
201
return {
200
202
agentic_chat : new CrewAIAgent ( {
201
- url : "http://localhost:8000/ agentic_chat" ,
203
+ url : ` ${ envVars . crewAiUrl } / agentic_chat` ,
202
204
} ) ,
203
205
human_in_the_loop : new CrewAIAgent ( {
204
- url : "http://localhost:8000/ human_in_the_loop" ,
206
+ url : ` ${ envVars . crewAiUrl } / human_in_the_loop` ,
205
207
} ) ,
206
208
tool_based_generative_ui : new CrewAIAgent ( {
207
- url : "http://localhost:8000/ tool_based_generative_ui" ,
209
+ url : ` ${ envVars . crewAiUrl } / tool_based_generative_ui` ,
208
210
} ) ,
209
211
agentic_generative_ui : new CrewAIAgent ( {
210
- url : "http://localhost:8000/ agentic_generative_ui" ,
212
+ url : ` ${ envVars . crewAiUrl } / agentic_generative_ui` ,
211
213
} ) ,
212
214
shared_state : new CrewAIAgent ( {
213
- url : "http://localhost:8000/ shared_state" ,
215
+ url : ` ${ envVars . crewAiUrl } / shared_state` ,
214
216
} ) ,
215
217
predictive_state_updates : new CrewAIAgent ( {
216
- url : "http://localhost:8000/ predictive_state_updates" ,
218
+ url : ` ${ envVars . crewAiUrl } / predictive_state_updates` ,
217
219
} ) ,
218
220
} ;
219
221
} ,
0 commit comments