@@ -12,8 +12,10 @@ import { LangGraphAgent } 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
} ;
@@ -118,7 +120,7 @@ export const agentsIntegrations: AgentIntegrationConfig[] = [
118
120
agents : async ( ) => {
119
121
return {
120
122
agentic_chat : new AgnoAgent ( {
121
- url : "http://localhost:8000/ agui" ,
123
+ url : ` ${ envVars . agnoUrl } / agui` ,
122
124
} ) ,
123
125
} ;
124
126
} ,
@@ -128,16 +130,16 @@ export const agentsIntegrations: AgentIntegrationConfig[] = [
128
130
agents : async ( ) => {
129
131
return {
130
132
agentic_chat : new LlamaIndexAgent ( {
131
- url : "http://localhost:9000/ agentic_chat/run" ,
133
+ url : ` ${ envVars . llamaIndexUrl } / agentic_chat/run` ,
132
134
} ) ,
133
135
human_in_the_loop : new LlamaIndexAgent ( {
134
- url : "http://localhost:9000/ human_in_the_loop/run" ,
136
+ url : ` ${ envVars . llamaIndexUrl } / human_in_the_loop/run` ,
135
137
} ) ,
136
138
agentic_generative_ui : new LlamaIndexAgent ( {
137
- url : "http://localhost:9000/ agentic_generative_ui/run" ,
139
+ url : ` ${ envVars . llamaIndexUrl } / agentic_generative_ui/run` ,
138
140
} ) ,
139
141
shared_state : new LlamaIndexAgent ( {
140
- url : "http://localhost:9000/ shared_state/run" ,
142
+ url : ` ${ envVars . llamaIndexUrl } / shared_state/run` ,
141
143
} ) ,
142
144
} ;
143
145
} ,
@@ -147,22 +149,22 @@ export const agentsIntegrations: AgentIntegrationConfig[] = [
147
149
agents : async ( ) => {
148
150
return {
149
151
agentic_chat : new CrewAIAgent ( {
150
- url : "http://localhost:8000/ agentic_chat" ,
152
+ url : ` ${ envVars . crewAiUrl } / agentic_chat` ,
151
153
} ) ,
152
154
human_in_the_loop : new CrewAIAgent ( {
153
- url : "http://localhost:8000/ human_in_the_loop" ,
155
+ url : ` ${ envVars . crewAiUrl } / human_in_the_loop` ,
154
156
} ) ,
155
157
tool_based_generative_ui : new CrewAIAgent ( {
156
- url : "http://localhost:8000/ tool_based_generative_ui" ,
158
+ url : ` ${ envVars . crewAiUrl } / tool_based_generative_ui` ,
157
159
} ) ,
158
160
agentic_generative_ui : new CrewAIAgent ( {
159
- url : "http://localhost:8000/ agentic_generative_ui" ,
161
+ url : ` ${ envVars . crewAiUrl } / agentic_generative_ui` ,
160
162
} ) ,
161
163
shared_state : new CrewAIAgent ( {
162
- url : "http://localhost:8000/ shared_state" ,
164
+ url : ` ${ envVars . crewAiUrl } / shared_state` ,
163
165
} ) ,
164
166
predictive_state_updates : new CrewAIAgent ( {
165
- url : "http://localhost:8000/ predictive_state_updates" ,
167
+ url : ` ${ envVars . crewAiUrl } / predictive_state_updates` ,
166
168
} ) ,
167
169
} ;
168
170
} ,
0 commit comments