Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions agent/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,11 @@ async def proverbs_state_from_args(context):
)

# Create the FastAPI app
app = create_strands_app(agui_agent, "/")
agent_path = os.getenv("AGENT_PATH", "/")
app = create_strands_app(agui_agent, agent_path)

if __name__ == "__main__":
import uvicorn

uvicorn.run("main:app", host="0.0.0.0", port=8000, reload=True)
port = int(os.getenv("AGENT_PORT", 8000))
uvicorn.run("main:app", host="0.0.0.0", port=port, reload=True)
2 changes: 1 addition & 1 deletion agent/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ dependencies = [
"uvicorn>=0.34.3",
"strands-agents[OpenAI]>=1.15.0",
"strands-agents-tools>=0.2.14",
"ag_ui_strands==0.1.0b12",
"ag_ui_strands~=0.1.0",
]
2 changes: 1 addition & 1 deletion src/app/api/copilotkit/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const serviceAdapter = new ExperimentalEmptyAdapter();
const runtime = new CopilotRuntime({
agents: {
// Our FastAPI endpoint URL
strands_agent: new HttpAgent({ url: "http://localhost:8000" }),
strands_agent: new HttpAgent({ url: process.env.STRANDS_AGENT_URL || "http://localhost:8000" }),
},
});

Expand Down