diff --git a/frontend/server.ts b/frontend/server.ts index 65e20c0..7dc0ee7 100644 --- a/frontend/server.ts +++ b/frontend/server.ts @@ -9,10 +9,12 @@ import { HttpAgent, Middleware, EventType } from "@ag-ui/client"; import { Observable } from "rxjs"; import { Hono } from "hono"; -const AGENT_URL = - process.env.AGENT_URL ?? "http://backend:8000/api/v1/agent/agui"; const BACKEND_URL = process.env.BACKEND_URL ?? "http://localhost:8001"; +// Prod sets AGENT_URL explicitly (compose network); the default derives from +// BACKEND_URL so local dev reaches the docker backend published on :8001. +const AGENT_URL = + process.env.AGENT_URL ?? `${BACKEND_URL}/api/v1/agent/agui`; const isProd = process.env.NODE_ENV === "production"; const PORT = parseInt(process.env.PORT ?? (isProd ? "3000" : "3001"));