@@ -12,9 +12,11 @@ import { LangGraphAgent, LangGraphHttpAgent } from "@ag-ui/langgraph";
1212import { AgnoAgent } from "@ag-ui/agno" ;
1313import { LlamaIndexAgent } from "@ag-ui/llamaindex" ;
1414import { CrewAIAgent } from "@ag-ui/crewai" ;
15+ import getEnvVars from "./env" ;
1516import { mastra } from "./mastra" ;
1617import { PydanticAIAgent } from "@ag-ui/pydantic-ai" ;
1718
19+ const envVars = getEnvVars ( ) ;
1820export const agentsIntegrations : AgentIntegrationConfig [ ] = [
1921 {
2022 id : "middleware-starter" ,
@@ -29,22 +31,22 @@ export const agentsIntegrations: AgentIntegrationConfig[] = [
2931 agents : async ( ) => {
3032 return {
3133 agentic_chat : new PydanticAIAgent ( {
32- url : "http://localhost:9000/ agentic_chat/" ,
34+ url : ` ${ envVars . pydanticAIUrl } / agentic_chat/` ,
3335 } ) ,
3436 agentic_generative_ui : new PydanticAIAgent ( {
35- url : "http://localhost:9000/ agentic_generative_ui/" ,
37+ url : ` ${ envVars . pydanticAIUrl } / agentic_generative_ui/` ,
3638 } ) ,
3739 human_in_the_loop : new PydanticAIAgent ( {
38- url : "http://localhost:9000/ human_in_the_loop/" ,
40+ url : ` ${ envVars . pydanticAIUrl } / human_in_the_loop/` ,
3941 } ) ,
4042 predictive_state_updates : new PydanticAIAgent ( {
41- url : "http://localhost:9000/ predictive_state_updates/" ,
43+ url : ` ${ envVars . pydanticAIUrl } / predictive_state_updates/` ,
4244 } ) ,
4345 shared_state : new PydanticAIAgent ( {
44- url : "http://localhost:9000/ shared_state/" ,
46+ url : ` ${ envVars . pydanticAIUrl } / shared_state/` ,
4547 } ) ,
4648 tool_based_generative_ui : new PydanticAIAgent ( {
47- url : "http://localhost:9000/ tool_based_generative_ui/" ,
49+ url : ` ${ envVars . pydanticAIUrl } / tool_based_generative_ui/` ,
4850 } ) ,
4951 } ;
5052 } ,
@@ -53,7 +55,7 @@ export const agentsIntegrations: AgentIntegrationConfig[] = [
5355 id : "server-starter" ,
5456 agents : async ( ) => {
5557 return {
56- agentic_chat : new ServerStarterAgent ( { url : "http://localhost:8000/" } ) ,
58+ agentic_chat : new ServerStarterAgent ( { url : envVars . serverStarterUrl } ) ,
5759 } ;
5860 } ,
5961 } ,
@@ -62,22 +64,22 @@ export const agentsIntegrations: AgentIntegrationConfig[] = [
6264 agents : async ( ) => {
6365 return {
6466 agentic_chat : new ServerStarterAllFeaturesAgent ( {
65- url : "http://localhost:8000/ agentic_chat" ,
67+ url : ` ${ envVars . serverStarterAllFeaturesUrl } / agentic_chat` ,
6668 } ) ,
6769 human_in_the_loop : new ServerStarterAllFeaturesAgent ( {
68- url : "http://localhost:8000/ human_in_the_loop" ,
70+ url : ` ${ envVars . serverStarterAllFeaturesUrl } / human_in_the_loop` ,
6971 } ) ,
7072 agentic_generative_ui : new ServerStarterAllFeaturesAgent ( {
71- url : "http://localhost:8000/ agentic_generative_ui" ,
73+ url : ` ${ envVars . serverStarterAllFeaturesUrl } / agentic_generative_ui` ,
7274 } ) ,
7375 tool_based_generative_ui : new ServerStarterAllFeaturesAgent ( {
74- url : "http://localhost:8000/ tool_based_generative_ui" ,
76+ url : ` ${ envVars . serverStarterAllFeaturesUrl } / tool_based_generative_ui` ,
7577 } ) ,
7678 shared_state : new ServerStarterAllFeaturesAgent ( {
77- url : "http://localhost:8000/ shared_state" ,
79+ url : ` ${ envVars . serverStarterAllFeaturesUrl } / shared_state` ,
7880 } ) ,
7981 predictive_state_updates : new ServerStarterAllFeaturesAgent ( {
80- url : "http://localhost:8000/ predictive_state_updates" ,
82+ url : ` ${ envVars . serverStarterAllFeaturesUrl } / predictive_state_updates` ,
8183 } ) ,
8284 } ;
8385 } ,
@@ -86,7 +88,7 @@ export const agentsIntegrations: AgentIntegrationConfig[] = [
8688 id : "mastra" ,
8789 agents : async ( ) => {
8890 const mastraClient = new MastraClient ( {
89- baseUrl : "http://localhost:4111" ,
91+ baseUrl : envVars . mastraUrl ,
9092 } ) ;
9193
9294 return MastraAgent . getRemoteAgents ( {
@@ -113,27 +115,27 @@ export const agentsIntegrations: AgentIntegrationConfig[] = [
113115 agents : async ( ) => {
114116 return {
115117 agentic_chat : new LangGraphAgent ( {
116- deploymentUrl : "http://localhost:2024" ,
118+ deploymentUrl : envVars . langgraphUrl ,
117119 graphId : "agentic_chat" ,
118120 } ) ,
119121 agentic_generative_ui : new LangGraphAgent ( {
120- deploymentUrl : "http://localhost:2024" ,
122+ deploymentUrl : envVars . langgraphUrl ,
121123 graphId : "agentic_generative_ui" ,
122124 } ) ,
123125 human_in_the_loop : new LangGraphAgent ( {
124- deploymentUrl : "http://localhost:2024" ,
126+ deploymentUrl : envVars . langgraphUrl ,
125127 graphId : "human_in_the_loop" ,
126128 } ) ,
127129 predictive_state_updates : new LangGraphAgent ( {
128- deploymentUrl : "http://localhost:2024" ,
130+ deploymentUrl : envVars . langgraphUrl ,
129131 graphId : "predictive_state_updates" ,
130132 } ) ,
131133 shared_state : new LangGraphAgent ( {
132- deploymentUrl : "http://localhost:2024" ,
134+ deploymentUrl : envVars . langgraphUrl ,
133135 graphId : "shared_state" ,
134136 } ) ,
135137 tool_based_generative_ui : new LangGraphAgent ( {
136- deploymentUrl : "http://localhost:2024" ,
138+ deploymentUrl : envVars . langgraphUrl ,
137139 graphId : "tool_based_generative_ui" ,
138140 } ) ,
139141 } ;
@@ -144,22 +146,22 @@ export const agentsIntegrations: AgentIntegrationConfig[] = [
144146 agents : async ( ) => {
145147 return {
146148 agentic_chat : new LangGraphHttpAgent ( {
147- url : "http://localhost:8000/ agent/agentic_chat" ,
149+ url : ` ${ envVars . langgraphFastApiUrl } / agent/agentic_chat` ,
148150 } ) ,
149151 agentic_generative_ui : new LangGraphHttpAgent ( {
150- url : "http://localhost:8000/ agent/agentic_generative_ui" ,
152+ url : ` ${ envVars . langgraphFastApiUrl } / agent/agentic_generative_ui` ,
151153 } ) ,
152154 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` ,
154156 } ) ,
155157 predictive_state_updates : new LangGraphHttpAgent ( {
156- url : "http://localhost:8000/ agent/predictive_state_updates" ,
158+ url : ` ${ envVars . langgraphFastApiUrl } / agent/predictive_state_updates` ,
157159 } ) ,
158160 shared_state : new LangGraphHttpAgent ( {
159- url : "http://localhost:8000/ agent/shared_state" ,
161+ url : ` ${ envVars . langgraphFastApiUrl } / agent/shared_state` ,
160162 } ) ,
161163 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` ,
163165 } ) ,
164166 } ;
165167 } ,
@@ -169,7 +171,7 @@ export const agentsIntegrations: AgentIntegrationConfig[] = [
169171 agents : async ( ) => {
170172 return {
171173 agentic_chat : new AgnoAgent ( {
172- url : "http://localhost:8000/ agui" ,
174+ url : ` ${ envVars . agnoUrl } / agui` ,
173175 } ) ,
174176 } ;
175177 } ,
@@ -179,16 +181,16 @@ export const agentsIntegrations: AgentIntegrationConfig[] = [
179181 agents : async ( ) => {
180182 return {
181183 agentic_chat : new LlamaIndexAgent ( {
182- url : "http://localhost:9000/ agentic_chat/run" ,
184+ url : ` ${ envVars . llamaIndexUrl } / agentic_chat/run` ,
183185 } ) ,
184186 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` ,
186188 } ) ,
187189 agentic_generative_ui : new LlamaIndexAgent ( {
188- url : "http://localhost:9000/ agentic_generative_ui/run" ,
190+ url : ` ${ envVars . llamaIndexUrl } / agentic_generative_ui/run` ,
189191 } ) ,
190192 shared_state : new LlamaIndexAgent ( {
191- url : "http://localhost:9000/ shared_state/run" ,
193+ url : ` ${ envVars . llamaIndexUrl } / shared_state/run` ,
192194 } ) ,
193195 } ;
194196 } ,
@@ -198,22 +200,22 @@ export const agentsIntegrations: AgentIntegrationConfig[] = [
198200 agents : async ( ) => {
199201 return {
200202 agentic_chat : new CrewAIAgent ( {
201- url : "http://localhost:8000/ agentic_chat" ,
203+ url : ` ${ envVars . crewAiUrl } / agentic_chat` ,
202204 } ) ,
203205 human_in_the_loop : new CrewAIAgent ( {
204- url : "http://localhost:8000/ human_in_the_loop" ,
206+ url : ` ${ envVars . crewAiUrl } / human_in_the_loop` ,
205207 } ) ,
206208 tool_based_generative_ui : new CrewAIAgent ( {
207- url : "http://localhost:8000/ tool_based_generative_ui" ,
209+ url : ` ${ envVars . crewAiUrl } / tool_based_generative_ui` ,
208210 } ) ,
209211 agentic_generative_ui : new CrewAIAgent ( {
210- url : "http://localhost:8000/ agentic_generative_ui" ,
212+ url : ` ${ envVars . crewAiUrl } / agentic_generative_ui` ,
211213 } ) ,
212214 shared_state : new CrewAIAgent ( {
213- url : "http://localhost:8000/ shared_state" ,
215+ url : ` ${ envVars . crewAiUrl } / shared_state` ,
214216 } ) ,
215217 predictive_state_updates : new CrewAIAgent ( {
216- url : "http://localhost:8000/ predictive_state_updates" ,
218+ url : ` ${ envVars . crewAiUrl } / predictive_state_updates` ,
217219 } ) ,
218220 } ;
219221 } ,
0 commit comments