@@ -12,8 +12,10 @@ 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" ;
1617
18+ const envVars = getEnvVars ( ) ;
1719export const agentsIntegrations : AgentIntegrationConfig [ ] = [
1820 {
1921 id : "middleware-starter" ,
@@ -27,7 +29,7 @@ export const agentsIntegrations: AgentIntegrationConfig[] = [
2729 id : "server-starter" ,
2830 agents : async ( ) => {
2931 return {
30- agentic_chat : new ServerStarterAgent ( { url : "http://localhost:8000/" } ) ,
32+ agentic_chat : new ServerStarterAgent ( { url : envVars . serverStarterUrl } ) ,
3133 } ;
3234 } ,
3335 } ,
@@ -36,22 +38,22 @@ export const agentsIntegrations: AgentIntegrationConfig[] = [
3638 agents : async ( ) => {
3739 return {
3840 agentic_chat : new ServerStarterAllFeaturesAgent ( {
39- url : "http://localhost:8000/ agentic_chat" ,
41+ url : ` ${ envVars . serverStarterAllFeaturesUrl } / agentic_chat` ,
4042 } ) ,
4143 human_in_the_loop : new ServerStarterAllFeaturesAgent ( {
42- url : "http://localhost:8000/ human_in_the_loop" ,
44+ url : ` ${ envVars . serverStarterAllFeaturesUrl } / human_in_the_loop` ,
4345 } ) ,
4446 agentic_generative_ui : new ServerStarterAllFeaturesAgent ( {
45- url : "http://localhost:8000/ agentic_generative_ui" ,
47+ url : ` ${ envVars . serverStarterAllFeaturesUrl } / agentic_generative_ui` ,
4648 } ) ,
4749 tool_based_generative_ui : new ServerStarterAllFeaturesAgent ( {
48- url : "http://localhost:8000/ tool_based_generative_ui" ,
50+ url : ` ${ envVars . serverStarterAllFeaturesUrl } / tool_based_generative_ui` ,
4951 } ) ,
5052 shared_state : new ServerStarterAllFeaturesAgent ( {
51- url : "http://localhost:8000/ shared_state" ,
53+ url : ` ${ envVars . serverStarterAllFeaturesUrl } / shared_state` ,
5254 } ) ,
5355 predictive_state_updates : new ServerStarterAllFeaturesAgent ( {
54- url : "http://localhost:8000/ predictive_state_updates" ,
56+ url : ` ${ envVars . serverStarterAllFeaturesUrl } / predictive_state_updates` ,
5557 } ) ,
5658 } ;
5759 } ,
@@ -60,7 +62,7 @@ export const agentsIntegrations: AgentIntegrationConfig[] = [
6062 id : "mastra" ,
6163 agents : async ( ) => {
6264 const mastraClient = new MastraClient ( {
63- baseUrl : "http://localhost:4111" ,
65+ baseUrl : envVars . mastraUrl ,
6466 } ) ;
6567
6668 return MastraAgent . getRemoteAgents ( {
@@ -87,27 +89,27 @@ export const agentsIntegrations: AgentIntegrationConfig[] = [
8789 agents : async ( ) => {
8890 return {
8991 agentic_chat : new LangGraphAgent ( {
90- deploymentUrl : "http://localhost:2024" ,
92+ deploymentUrl : envVars . langgraphUrl ,
9193 graphId : "agentic_chat" ,
9294 } ) ,
9395 agentic_generative_ui : new LangGraphAgent ( {
94- deploymentUrl : "http://localhost:2024" ,
96+ deploymentUrl : envVars . langgraphUrl ,
9597 graphId : "agentic_generative_ui" ,
9698 } ) ,
9799 human_in_the_loop : new LangGraphAgent ( {
98- deploymentUrl : "http://localhost:2024" ,
100+ deploymentUrl : envVars . langgraphUrl ,
99101 graphId : "human_in_the_loop" ,
100102 } ) ,
101103 predictive_state_updates : new LangGraphAgent ( {
102- deploymentUrl : "http://localhost:2024" ,
104+ deploymentUrl : envVars . langgraphUrl ,
103105 graphId : "predictive_state_updates" ,
104106 } ) ,
105107 shared_state : new LangGraphAgent ( {
106- deploymentUrl : "http://localhost:2024" ,
108+ deploymentUrl : envVars . langgraphUrl ,
107109 graphId : "shared_state" ,
108110 } ) ,
109111 tool_based_generative_ui : new LangGraphAgent ( {
110- deploymentUrl : "http://localhost:2024" ,
112+ deploymentUrl : envVars . langgraphUrl ,
111113 graphId : "tool_based_generative_ui" ,
112114 } ) ,
113115 } ;
@@ -143,7 +145,7 @@ export const agentsIntegrations: AgentIntegrationConfig[] = [
143145 agents : async ( ) => {
144146 return {
145147 agentic_chat : new AgnoAgent ( {
146- url : "http://localhost:8000/ agui" ,
148+ url : ` ${ envVars . agnoUrl } / agui` ,
147149 } ) ,
148150 } ;
149151 } ,
@@ -153,16 +155,16 @@ export const agentsIntegrations: AgentIntegrationConfig[] = [
153155 agents : async ( ) => {
154156 return {
155157 agentic_chat : new LlamaIndexAgent ( {
156- url : "http://localhost:9000/ agentic_chat/run" ,
158+ url : ` ${ envVars . llamaIndexUrl } / agentic_chat/run` ,
157159 } ) ,
158160 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` ,
160162 } ) ,
161163 agentic_generative_ui : new LlamaIndexAgent ( {
162- url : "http://localhost:9000/ agentic_generative_ui/run" ,
164+ url : ` ${ envVars . llamaIndexUrl } / agentic_generative_ui/run` ,
163165 } ) ,
164166 shared_state : new LlamaIndexAgent ( {
165- url : "http://localhost:9000/ shared_state/run" ,
167+ url : ` ${ envVars . llamaIndexUrl } / shared_state/run` ,
166168 } ) ,
167169 } ;
168170 } ,
@@ -172,22 +174,22 @@ export const agentsIntegrations: AgentIntegrationConfig[] = [
172174 agents : async ( ) => {
173175 return {
174176 agentic_chat : new CrewAIAgent ( {
175- url : "http://localhost:8000/ agentic_chat" ,
177+ url : ` ${ envVars . crewAiUrl } / agentic_chat` ,
176178 } ) ,
177179 human_in_the_loop : new CrewAIAgent ( {
178- url : "http://localhost:8000/ human_in_the_loop" ,
180+ url : ` ${ envVars . crewAiUrl } / human_in_the_loop` ,
179181 } ) ,
180182 tool_based_generative_ui : new CrewAIAgent ( {
181- url : "http://localhost:8000/ tool_based_generative_ui" ,
183+ url : ` ${ envVars . crewAiUrl } / tool_based_generative_ui` ,
182184 } ) ,
183185 agentic_generative_ui : new CrewAIAgent ( {
184- url : "http://localhost:8000/ agentic_generative_ui" ,
186+ url : ` ${ envVars . crewAiUrl } / agentic_generative_ui` ,
185187 } ) ,
186188 shared_state : new CrewAIAgent ( {
187- url : "http://localhost:8000/ shared_state" ,
189+ url : ` ${ envVars . crewAiUrl } / shared_state` ,
188190 } ) ,
189191 predictive_state_updates : new CrewAIAgent ( {
190- url : "http://localhost:8000/ predictive_state_updates" ,
192+ url : ` ${ envVars . crewAiUrl } / predictive_state_updates` ,
191193 } ) ,
192194 } ;
193195 } ,
0 commit comments