@@ -12,8 +12,10 @@ 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
18
+ const envVars = getEnvVars ( ) ;
17
19
export const agentsIntegrations : AgentIntegrationConfig [ ] = [
18
20
{
19
21
id : "middleware-starter" ,
@@ -27,7 +29,7 @@ export const agentsIntegrations: AgentIntegrationConfig[] = [
27
29
id : "server-starter" ,
28
30
agents : async ( ) => {
29
31
return {
30
- agentic_chat : new ServerStarterAgent ( { url : "http://localhost:8000/" } ) ,
32
+ agentic_chat : new ServerStarterAgent ( { url : envVars . serverStarterUrl } ) ,
31
33
} ;
32
34
} ,
33
35
} ,
@@ -36,22 +38,22 @@ export const agentsIntegrations: AgentIntegrationConfig[] = [
36
38
agents : async ( ) => {
37
39
return {
38
40
agentic_chat : new ServerStarterAllFeaturesAgent ( {
39
- url : "http://localhost:8000/ agentic_chat" ,
41
+ url : ` ${ envVars . serverStarterAllFeaturesUrl } / agentic_chat` ,
40
42
} ) ,
41
43
human_in_the_loop : new ServerStarterAllFeaturesAgent ( {
42
- url : "http://localhost:8000/ human_in_the_loop" ,
44
+ url : ` ${ envVars . serverStarterAllFeaturesUrl } / human_in_the_loop` ,
43
45
} ) ,
44
46
agentic_generative_ui : new ServerStarterAllFeaturesAgent ( {
45
- url : "http://localhost:8000/ agentic_generative_ui" ,
47
+ url : ` ${ envVars . serverStarterAllFeaturesUrl } / agentic_generative_ui` ,
46
48
} ) ,
47
49
tool_based_generative_ui : new ServerStarterAllFeaturesAgent ( {
48
- url : "http://localhost:8000/ tool_based_generative_ui" ,
50
+ url : ` ${ envVars . serverStarterAllFeaturesUrl } / tool_based_generative_ui` ,
49
51
} ) ,
50
52
shared_state : new ServerStarterAllFeaturesAgent ( {
51
- url : "http://localhost:8000/ shared_state" ,
53
+ url : ` ${ envVars . serverStarterAllFeaturesUrl } / shared_state` ,
52
54
} ) ,
53
55
predictive_state_updates : new ServerStarterAllFeaturesAgent ( {
54
- url : "http://localhost:8000/ predictive_state_updates" ,
56
+ url : ` ${ envVars . serverStarterAllFeaturesUrl } / predictive_state_updates` ,
55
57
} ) ,
56
58
} ;
57
59
} ,
@@ -60,7 +62,7 @@ export const agentsIntegrations: AgentIntegrationConfig[] = [
60
62
id : "mastra" ,
61
63
agents : async ( ) => {
62
64
const mastraClient = new MastraClient ( {
63
- baseUrl : "http://localhost:4111" ,
65
+ baseUrl : envVars . mastraUrl ,
64
66
} ) ;
65
67
66
68
return MastraAgent . getRemoteAgents ( {
@@ -87,27 +89,27 @@ export const agentsIntegrations: AgentIntegrationConfig[] = [
87
89
agents : async ( ) => {
88
90
return {
89
91
agentic_chat : new LangGraphAgent ( {
90
- deploymentUrl : "http://localhost:2024" ,
92
+ deploymentUrl : envVars . langgraphUrl ,
91
93
graphId : "agentic_chat" ,
92
94
} ) ,
93
95
agentic_generative_ui : new LangGraphAgent ( {
94
- deploymentUrl : "http://localhost:2024" ,
96
+ deploymentUrl : envVars . langgraphUrl ,
95
97
graphId : "agentic_generative_ui" ,
96
98
} ) ,
97
99
human_in_the_loop : new LangGraphAgent ( {
98
- deploymentUrl : "http://localhost:2024" ,
100
+ deploymentUrl : envVars . langgraphUrl ,
99
101
graphId : "human_in_the_loop" ,
100
102
} ) ,
101
103
predictive_state_updates : new LangGraphAgent ( {
102
- deploymentUrl : "http://localhost:2024" ,
104
+ deploymentUrl : envVars . langgraphUrl ,
103
105
graphId : "predictive_state_updates" ,
104
106
} ) ,
105
107
shared_state : new LangGraphAgent ( {
106
- deploymentUrl : "http://localhost:2024" ,
108
+ deploymentUrl : envVars . langgraphUrl ,
107
109
graphId : "shared_state" ,
108
110
} ) ,
109
111
tool_based_generative_ui : new LangGraphAgent ( {
110
- deploymentUrl : "http://localhost:2024" ,
112
+ deploymentUrl : envVars . langgraphUrl ,
111
113
graphId : "tool_based_generative_ui" ,
112
114
} ) ,
113
115
} ;
@@ -143,7 +145,7 @@ export const agentsIntegrations: AgentIntegrationConfig[] = [
143
145
agents : async ( ) => {
144
146
return {
145
147
agentic_chat : new AgnoAgent ( {
146
- url : "http://localhost:8000/ agui" ,
148
+ url : ` ${ envVars . agnoUrl } / agui` ,
147
149
} ) ,
148
150
} ;
149
151
} ,
@@ -153,16 +155,16 @@ export const agentsIntegrations: AgentIntegrationConfig[] = [
153
155
agents : async ( ) => {
154
156
return {
155
157
agentic_chat : new LlamaIndexAgent ( {
156
- url : "http://localhost:9000/ agentic_chat/run" ,
158
+ url : ` ${ envVars . llamaIndexUrl } / agentic_chat/run` ,
157
159
} ) ,
158
160
human_in_the_loop : new LlamaIndexAgent ( {
159
- url : "http://localhost:9000/ human_in_the_loop/run" ,
161
+ url : ` ${ envVars . llamaIndexUrl } / human_in_the_loop/run` ,
160
162
} ) ,
161
163
agentic_generative_ui : new LlamaIndexAgent ( {
162
- url : "http://localhost:9000/ agentic_generative_ui/run" ,
164
+ url : ` ${ envVars . llamaIndexUrl } / agentic_generative_ui/run` ,
163
165
} ) ,
164
166
shared_state : new LlamaIndexAgent ( {
165
- url : "http://localhost:9000/ shared_state/run" ,
167
+ url : ` ${ envVars . llamaIndexUrl } / shared_state/run` ,
166
168
} ) ,
167
169
} ;
168
170
} ,
@@ -172,22 +174,22 @@ export const agentsIntegrations: AgentIntegrationConfig[] = [
172
174
agents : async ( ) => {
173
175
return {
174
176
agentic_chat : new CrewAIAgent ( {
175
- url : "http://localhost:8000/ agentic_chat" ,
177
+ url : ` ${ envVars . crewAiUrl } / agentic_chat` ,
176
178
} ) ,
177
179
human_in_the_loop : new CrewAIAgent ( {
178
- url : "http://localhost:8000/ human_in_the_loop" ,
180
+ url : ` ${ envVars . crewAiUrl } / human_in_the_loop` ,
179
181
} ) ,
180
182
tool_based_generative_ui : new CrewAIAgent ( {
181
- url : "http://localhost:8000/ tool_based_generative_ui" ,
183
+ url : ` ${ envVars . crewAiUrl } / tool_based_generative_ui` ,
182
184
} ) ,
183
185
agentic_generative_ui : new CrewAIAgent ( {
184
- url : "http://localhost:8000/ agentic_generative_ui" ,
186
+ url : ` ${ envVars . crewAiUrl } / agentic_generative_ui` ,
185
187
} ) ,
186
188
shared_state : new CrewAIAgent ( {
187
- url : "http://localhost:8000/ shared_state" ,
189
+ url : ` ${ envVars . crewAiUrl } / shared_state` ,
188
190
} ) ,
189
191
predictive_state_updates : new CrewAIAgent ( {
190
- url : "http://localhost:8000/ predictive_state_updates" ,
192
+ url : ` ${ envVars . crewAiUrl } / predictive_state_updates` ,
191
193
} ) ,
192
194
} ;
193
195
} ,
0 commit comments