Skip to content

Commit fe64193

Browse files
feat: add port and path configurability (#1)
1 parent d0152e4 commit fe64193

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

agent/main.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,11 @@ async def proverbs_state_from_args(context):
152152
)
153153

154154
# Create the FastAPI app
155-
app = create_strands_app(agui_agent, "/")
155+
agent_path = os.getenv("AGENT_PATH", "/")
156+
app = create_strands_app(agui_agent, agent_path)
156157

157158
if __name__ == "__main__":
158159
import uvicorn
159160

160-
uvicorn.run("main:app", host="0.0.0.0", port=8000, reload=True)
161+
port = int(os.getenv("AGENT_PORT", 8000))
162+
uvicorn.run("main:app", host="0.0.0.0", port=port, reload=True)

agent/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ dependencies = [
1111
"uvicorn>=0.34.3",
1212
"strands-agents[OpenAI]>=1.15.0",
1313
"strands-agents-tools>=0.2.14",
14-
"ag_ui_strands==0.1.0b12",
14+
"ag_ui_strands~=0.1.0",
1515
]

src/app/api/copilotkit/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const serviceAdapter = new ExperimentalEmptyAdapter();
1616
const runtime = new CopilotRuntime({
1717
agents: {
1818
// Our FastAPI endpoint URL
19-
strands_agent: new HttpAgent({ url: "http://localhost:8000" }),
19+
strands_agent: new HttpAgent({ url: process.env.STRANDS_AGENT_URL || "http://localhost:8000" }),
2020
},
2121
});
2222

0 commit comments

Comments
 (0)