diff --git a/ui/litellm-dashboard/src/components/lens/investigations/InvestigationsView.integration.test.tsx b/ui/litellm-dashboard/src/components/lens/investigations/InvestigationsView.integration.test.tsx
index 15fe9bca2d1..b0a7e720d1f 100644
--- a/ui/litellm-dashboard/src/components/lens/investigations/InvestigationsView.integration.test.tsx
+++ b/ui/litellm-dashboard/src/components/lens/investigations/InvestigationsView.integration.test.tsx
@@ -280,6 +280,45 @@ it("runs with saved settings from Run now without opening setup, then accepts an
});
});
+it("lists recorded agents in Run now and runs the one picked from the list", async () => {
+ testQueryClient.clear();
+ vi.mocked(apiClient.get).mockImplementation(async (path) => {
+ if (path === "/lens")
+ return {
+ lenses: [lens],
+ tracing_enabled: true,
+ workers: [
+ {
+ id: "worker",
+ name: "Worker",
+ revoked: false,
+ analysis_key_id: "a".repeat(64),
+ scope: lens.scope,
+ last_seen: new Date().toISOString(),
+ },
+ ],
+ };
+ if (path === "/lens/lens/runs") return lens.jobs;
+ if (path === "/lens/agents") return ["billing-agent", "support-bot"];
+ if (path === "/lens/activity/available") return { traces: true, requests: false };
+ return { data: [] };
+ });
+ vi.mocked(apiClient.post).mockResolvedValue(lens);
+ const user = userEvent.setup();
+ renderWithProviders();
+ await user.click(await screen.findByRole("button", { name: "Run now" }));
+ const dialog = within(await screen.findByRole("dialog", { name: "Run now" }));
+ await user.click(dialog.getByRole("combobox", { name: "Agent" }));
+ expect(await screen.findByRole("option", { name: "support-bot" })).toBeVisible();
+ await user.click(await screen.findByRole("option", { name: "billing-agent" }));
+ expect(dialog.getByRole("combobox", { name: "Agent" })).toHaveValue("billing-agent");
+ await user.click(dialog.getByRole("button", { name: "Run now" }));
+ expect(apiClient.post).toHaveBeenCalledWith("/lens/lens/runs", {
+ accessToken: "test",
+ body: { agent_name: "billing-agent" },
+ });
+});
+
it("offers the interactive demo without starting an investigation", async () => {
window.history.replaceState({}, "", "/lens/");
testQueryClient.clear();
diff --git a/ui/litellm-dashboard/src/components/lens/investigations/detail/RunNowDialog.tsx b/ui/litellm-dashboard/src/components/lens/investigations/detail/RunNowDialog.tsx
index 45a8ae06040..af843e52396 100644
--- a/ui/litellm-dashboard/src/components/lens/investigations/detail/RunNowDialog.tsx
+++ b/ui/litellm-dashboard/src/components/lens/investigations/detail/RunNowDialog.tsx
@@ -3,6 +3,14 @@
import { useState } from "react";
import { Button } from "@/components/ui/button";
+import {
+ Combobox,
+ ComboboxContent,
+ ComboboxEmpty,
+ ComboboxInput,
+ ComboboxItem,
+ ComboboxList,
+} from "@/components/ui/combobox";
import {
Dialog,
DialogContent,
@@ -93,18 +101,25 @@ export function RunNowDialog({