Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

refactor(frontend): tidy up on components folder (#10940)

Ubbe9fc2101e7efb
diff --git a/autogpt_platform/frontend/src/components/admin/marketplace/admin-agents-data-table.tsx b/autogpt_platform/frontend/src/app/(platform)/admin/marketplace/components/AdminAgentsDataTable.tsx
similarity index 92%
rename from autogpt_platform/frontend/src/components/admin/marketplace/admin-agents-data-table.tsx
rename to autogpt_platform/frontend/src/app/(platform)/admin/marketplace/components/AdminAgentsDataTable.tsx
index 6605452654..f08c807c90 100644
--- a/autogpt_platform/frontend/src/components/admin/marketplace/admin-agents-data-table.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/admin/marketplace/components/AdminAgentsDataTable.tsx
@@ -10,10 +10,10 @@ import {
StoreSubmission,
SubmissionStatus,
} from "@/lib/autogpt-server-api/types";
-import { PaginationControls } from "../../ui/pagination-controls";
+import { PaginationControls } from "../../../../../components/ui/pagination-controls";
import { getAdminListingsWithVersions } from "@/app/(platform)/admin/marketplace/actions";
-import { ExpandableRow } from "./expandable-row";
-import { SearchAndFilterAdminMarketplace } from "./search-filter-form";
+import { ExpandableRow } from "./ExpandleRow";
+import { SearchAndFilterAdminMarketplace } from "./SearchFilterForm";
// Helper function to get the latest version by version number
const getLatestVersionByNumber = (
diff --git a/autogpt_platform/frontend/src/components/admin/marketplace/approve-reject-buttons.tsx b/autogpt_platform/frontend/src/app/(platform)/admin/marketplace/components/ApproveRejectButton.tsx
similarity index 100%
rename from autogpt_platform/frontend/src/components/admin/marketplace/approve-reject-buttons.tsx
rename to autogpt_platform/frontend/src/app/(platform)/admin/marketplace/components/ApproveRejectButton.tsx
diff --git a/autogpt_platform/frontend/src/components/admin/marketplace/download-agent-button.tsx b/autogpt_platform/frontend/src/app/(platform)/admin/marketplace/components/DownloadAgentButton.tsx
similarity index 100%
rename from autogpt_platform/frontend/src/components/admin/marketplace/download-agent-button.tsx
rename to autogpt_platform/frontend/src/app/(platform)/admin/marketplace/components/DownloadAgentButton.tsx
diff --git a/autogpt_platform/frontend/src/components/admin/marketplace/expandable-row.tsx b/autogpt_platform/frontend/src/app/(platform)/admin/marketplace/components/ExpandleRow.tsx
similarity index 98%
rename from autogpt_platform/frontend/src/components/admin/marketplace/expandable-row.tsx
rename to autogpt_platform/frontend/src/app/(platform)/admin/marketplace/components/ExpandleRow.tsx
index e1f936da5b..10d6a0b7b0 100644
--- a/autogpt_platform/frontend/src/components/admin/marketplace/expandable-row.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/admin/marketplace/components/ExpandleRow.tsx
@@ -17,8 +17,8 @@ import {
type StoreSubmission,
SubmissionStatus,
} from "@/lib/autogpt-server-api/types";
-import { ApproveRejectButtons } from "./approve-reject-buttons";
-import { DownloadAgentAdminButton } from "./download-agent-button";
+import { ApproveRejectButtons } from "./ApproveRejectButton";
+import { DownloadAgentAdminButton } from "./DownloadAgentButton";
// Moved the getStatusBadge function into the client component
const getStatusBadge = (status: SubmissionStatus) => {
diff --git a/autogpt_platform/frontend/src/components/admin/marketplace/search-filter-form.tsx b/autogpt_platform/frontend/src/app/(platform)/admin/marketplace/components/SearchFilterForm.tsx
similarity index 100%
rename from autogpt_platform/frontend/src/components/admin/marketplace/search-filter-form.tsx
rename to autogpt_platform/frontend/src/app/(platform)/admin/marketplace/components/SearchFilterForm.tsx
diff --git a/autogpt_platform/frontend/src/app/(platform)/admin/marketplace/page.tsx b/autogpt_platform/frontend/src/app/(platform)/admin/marketplace/page.tsx
index d4df2e5b77..7fcfb6b5d4 100644
--- a/autogpt_platform/frontend/src/app/(platform)/admin/marketplace/page.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/admin/marketplace/page.tsx
@@ -1,7 +1,7 @@
import { withRoleAccess } from "@/lib/withRoleAccess";
import { Suspense } from "react";
import type { SubmissionStatus } from "@/lib/autogpt-server-api/types";
-import { AdminAgentsDataTable } from "@/components/admin/marketplace/admin-agents-data-table";
+import { AdminAgentsDataTable } from "./components/AdminAgentsDataTable";
type MarketplaceAdminPageSearchParams = {
page?: string;
diff --git a/autogpt_platform/frontend/src/components/admin/spending/add-money-button.tsx b/autogpt_platform/frontend/src/app/(platform)/admin/spending/components/AddMoneyButton.tsx
similarity index 100%
rename from autogpt_platform/frontend/src/components/admin/spending/add-money-button.tsx
rename to autogpt_platform/frontend/src/app/(platform)/admin/spending/components/AddMoneyButton.tsx
diff --git a/autogpt_platform/frontend/src/components/admin/spending/admin-grant-history-data-table.tsx b/autogpt_platform/frontend/src/app/(platform)/admin/spending/components/AdminUserGrantHistory.tsx
similarity index 96%
rename from autogpt_platform/frontend/src/components/admin/spending/admin-grant-history-data-table.tsx
rename to autogpt_platform/frontend/src/app/(platform)/admin/spending/components/AdminUserGrantHistory.tsx
index 80695b803c..6137345070 100644
--- a/autogpt_platform/frontend/src/components/admin/spending/admin-grant-history-data-table.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/admin/spending/components/AdminUserGrantHistory.tsx
@@ -7,10 +7,10 @@ import {
TableRow,
} from "@/components/ui/table";
-import { PaginationControls } from "../../ui/pagination-controls";
-import { SearchAndFilterAdminSpending } from "./search-filter-form";
+import { PaginationControls } from "../../../../../components/ui/pagination-controls";
+import { SearchAndFilterAdminSpending } from "./SearchAndFilterAdminSpending";
import { getUsersTransactionHistory } from "@/app/(platform)/admin/spending/actions";
-import { AdminAddMoneyButton } from "./add-money-button";
+import { AdminAddMoneyButton } from "./AddMoneyButton";
import { CreditTransactionType } from "@/lib/autogpt-server-api";
export async function AdminUserGrantHistory({
diff --git a/autogpt_platform/frontend/src/components/admin/spending/search-filter-form.tsx b/autogpt_platform/frontend/src/app/(platform)/admin/spending/components/SearchAndFilterAdminSpending.tsx
similarity index 100%
rename from autogpt_platform/frontend/src/components/admin/spending/search-filter-form.tsx
rename to autogpt_platform/frontend/src/app/(platform)/admin/spending/components/SearchAndFilterAdminSpending.tsx
diff --git a/autogpt_platform/frontend/src/app/(platform)/admin/spending/page.tsx b/autogpt_platform/frontend/src/app/(platform)/admin/spending/page.tsx
index 2b741102d1..4b9d5a7eac 100644
--- a/autogpt_platform/frontend/src/app/(platform)/admin/spending/page.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/admin/spending/page.tsx
@@ -1,7 +1,7 @@
-import { AdminUserGrantHistory } from "@/components/admin/spending/admin-grant-history-data-table";
import type { CreditTransactionType } from "@/lib/autogpt-server-api";
import { withRoleAccess } from "@/lib/withRoleAccess";
import { Suspense } from "react";
+import { AdminUserGrantHistory } from "./components/AdminUserGrantHistory";
type SpendingDashboardPageSearchParams = {
page?: string;
diff --git a/autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/AgentRunsView/components/AgentInputsReadOnly/AgentInputsReadOnly.tsx b/autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/AgentRunsView/components/AgentInputsReadOnly/AgentInputsReadOnly.tsx
index c98d03f7fa..0787d77592 100644
--- a/autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/AgentRunsView/components/AgentInputsReadOnly/AgentInputsReadOnly.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/AgentRunsView/components/AgentInputsReadOnly/AgentInputsReadOnly.tsx
@@ -3,7 +3,7 @@
import React from "react";
import type { LibraryAgent } from "@/app/api/__generated__/models/libraryAgent";
import type { CredentialsMetaInput } from "@/lib/autogpt-server-api/types";
-import { toDisplayName } from "@/components/integrations/helper";
+import { toDisplayName } from "@/services/agent-credentials/helper";
import {
getAgentCredentialsFields,
getAgentInputFields,
diff --git a/autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/AgentRunsView/components/RunAgentModal/components/ModalRunSection/ModalRunSection.tsx b/autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/AgentRunsView/components/RunAgentModal/components/ModalRunSection/ModalRunSection.tsx
index f7bd3dbf3f..720c88992c 100644
--- a/autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/AgentRunsView/components/RunAgentModal/components/ModalRunSection/ModalRunSection.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/AgentRunsView/components/RunAgentModal/components/ModalRunSection/ModalRunSection.tsx
@@ -6,7 +6,7 @@ import { useRunAgentModalContext } from "../../context";
import { RunAgentInputs } from "../../../RunAgentInputs/RunAgentInputs";
import { InfoIcon } from "@phosphor-icons/react";
import { Text } from "@/components/atoms/Text/Text";
-import { toDisplayName } from "@/components/integrations/helper";
+import { toDisplayName } from "@/services/agent-credentials/helper";
import { getCredentialTypeDisplayName } from "./helpers";
export function ModalRunSection() {
diff --git a/autogpt_platform/frontend/src/components/monitor/AgentFlowList.tsx b/autogpt_platform/frontend/src/app/(platform)/monitoring/components/AgentFlowList.tsx
similarity index 100%
rename from autogpt_platform/frontend/src/components/monitor/AgentFlowList.tsx
rename to autogpt_platform/frontend/src/app/(platform)/monitoring/components/AgentFlowList.tsx
diff --git a/autogpt_platform/frontend/src/components/monitor/FlowInfo.tsx b/autogpt_platform/frontend/src/app/(platform)/monitoring/components/FlowInfo.tsx
similarity index 98%
rename from autogpt_platform/frontend/src/components/monitor/FlowInfo.tsx
rename to autogpt_platform/frontend/src/app/(platform)/monitoring/components/FlowInfo.tsx
index 8dd4b2d14c..b07702c3a3 100644
--- a/autogpt_platform/frontend/src/components/monitor/FlowInfo.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/monitoring/components/FlowInfo.tsx
@@ -24,7 +24,6 @@ import {
} from "@radix-ui/react-icons";
import Link from "next/link";
import { exportAsJSONFile } from "@/lib/utils";
-import { FlowRunsStats } from "@/components/monitor/index";
import {
Dialog,
DialogContent,
@@ -36,6 +35,7 @@ import {
import useAgentGraph from "@/hooks/useAgentGraph";
import { useBackendAPI } from "@/lib/autogpt-server-api/context";
import { RunnerInputDialog } from "@/components/runner-ui/RunnerInputUI";
+import { FlowRunsStatus } from "./FlowRunsStatus";
export const FlowInfo: React.FC<
React.HTMLAttributes<HTMLDivElement> & {
@@ -184,7 +184,7 @@ export const FlowInfo: React.FC<
</div>
</CardHeader>
<CardContent>
- <FlowRunsStats
+ <FlowRunsStatus
flows={[flow]}
executions={executions.filter(
(execution) =>
diff --git a/autogpt_platform/frontend/src/components/monitor/FlowRunInfo.tsx b/autogpt_platform/frontend/src/app/(platform)/monitoring/components/FlowRunInfo.tsx
similarity index 95%
rename from autogpt_platform/frontend/src/components/monitor/FlowRunInfo.tsx
rename to autogpt_platform/frontend/src/app/(platform)/monitoring/components/FlowRunInfo.tsx
index 3070c2b4c5..be0d009a51 100644
--- a/autogpt_platform/frontend/src/components/monitor/FlowRunInfo.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/monitoring/components/FlowRunInfo.tsx
@@ -6,8 +6,10 @@ import { Button, buttonVariants } from "@/components/ui/button";
import { IconSquare } from "@/components/ui/icons";
import { ExitIcon, Pencil2Icon } from "@radix-ui/react-icons";
import moment from "moment/moment";
-import { FlowRunStatusBadge } from "@/components/monitor/FlowRunStatusBadge";
-import RunnerOutputUI, { OutputNodeInfo } from "../runner-ui/RunnerOutputUI";
+import { FlowRunStatusBadge } from "@/app/(platform)/monitoring/components/FlowRunStatusBadge";
+import RunnerOutputUI, {
+ OutputNodeInfo,
+} from "../../../../components/runner-ui/RunnerOutputUI";
import { useBackendAPI } from "@/lib/autogpt-server-api/context";
export const FlowRunInfo: React.FC<
diff --git a/autogpt_platform/frontend/src/components/monitor/FlowRunStatusBadge.tsx b/autogpt_platform/frontend/src/app/(platform)/monitoring/components/FlowRunStatusBadge.tsx
similarity index 100%
rename from autogpt_platform/frontend/src/components/monitor/FlowRunStatusBadge.tsx
rename to autogpt_platform/frontend/src/app/(platform)/monitoring/components/FlowRunStatusBadge.tsx
diff --git a/autogpt_platform/frontend/src/components/monitor/FlowRunsList.tsx b/autogpt_platform/frontend/src/app/(platform)/monitoring/components/FlowRunsList.tsx
similarity index 94%
rename from autogpt_platform/frontend/src/components/monitor/FlowRunsList.tsx
rename to autogpt_platform/frontend/src/app/(platform)/monitoring/components/FlowRunsList.tsx
index a0919d7500..2113cfd58d 100644
--- a/autogpt_platform/frontend/src/components/monitor/FlowRunsList.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/monitoring/components/FlowRunsList.tsx
@@ -10,8 +10,8 @@ import {
TableRow,
} from "@/components/ui/table";
import moment from "moment/moment";
-import { FlowRunStatusBadge } from "@/components/monitor/FlowRunStatusBadge";
-import { TextRenderer } from "../ui/render";
+import { FlowRunStatusBadge } from "@/app/(platform)/monitoring/components/FlowRunStatusBadge";
+import { TextRenderer } from "../../../../components/ui/render";
export const FlowRunsList: React.FC<{
flows: LibraryAgent[];
diff --git a/autogpt_platform/frontend/src/components/monitor/FlowRunsStatus.tsx b/autogpt_platform/frontend/src/app/(platform)/monitoring/components/FlowRunsStatus.tsx
similarity index 97%
rename from autogpt_platform/frontend/src/components/monitor/FlowRunsStatus.tsx
rename to autogpt_platform/frontend/src/app/(platform)/monitoring/components/FlowRunsStatus.tsx
index 67134389fc..5f7a197735 100644
--- a/autogpt_platform/frontend/src/components/monitor/FlowRunsStatus.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/monitoring/components/FlowRunsStatus.tsx
@@ -8,7 +8,7 @@ import {
PopoverTrigger,
} from "@/components/ui/popover";
import { Calendar } from "@/components/ui/calendar";
-import { FlowRunsTimeline } from "@/components/monitor/FlowRunsTimeline";
+import { FlowRunsTimeline } from "@/app/(platform)/monitoring/components/FlowRunsTimeline";
export const FlowRunsStatus: React.FC<{
flows: LibraryAgent[];
diff --git a/autogpt_platform/frontend/src/components/monitor/FlowRunsTimeline.tsx b/autogpt_platform/frontend/src/app/(platform)/monitoring/components/FlowRunsTimeline.tsx
similarity index 98%
rename from autogpt_platform/frontend/src/components/monitor/FlowRunsTimeline.tsx
rename to autogpt_platform/frontend/src/app/(platform)/monitoring/components/FlowRunsTimeline.tsx
index 92310031aa..a65d7c9895 100644
--- a/autogpt_platform/frontend/src/components/monitor/FlowRunsTimeline.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/monitoring/components/FlowRunsTimeline.tsx
@@ -14,7 +14,7 @@ import moment from "moment/moment";
import { Card } from "@/components/ui/card";
import { cn, hashString } from "@/lib/utils";
import React from "react";
-import { FlowRunStatusBadge } from "@/components/monitor/FlowRunStatusBadge";
+import { FlowRunStatusBadge } from "@/app/(platform)/monitoring/components/FlowRunStatusBadge";
export const FlowRunsTimeline = ({
flows,
diff --git a/autogpt_platform/frontend/src/components/monitor/scheduleTable.tsx b/autogpt_platform/frontend/src/app/(platform)/monitoring/components/SchedulesTable.tsx
similarity index 98%
rename from autogpt_platform/frontend/src/components/monitor/scheduleTable.tsx
rename to autogpt_platform/frontend/src/app/(platform)/monitoring/components/SchedulesTable.tsx
index 153417a665..4749f26076 100644
--- a/autogpt_platform/frontend/src/components/monitor/scheduleTable.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/monitoring/components/SchedulesTable.tsx
@@ -35,9 +35,9 @@ import {
DialogHeader,
DialogTitle,
} from "@/components/ui/dialog";
-import { TextRenderer } from "../ui/render";
-import { Input } from "../ui/input";
-import { Label } from "../ui/label";
+import { TextRenderer } from "../../../../components/ui/render";
+import { Input } from "../../../../components/ui/input";
+import { Label } from "../../../../components/ui/label";
interface SchedulesTableProps {
schedules: GraphExecutionJobInfo[];
diff --git a/autogpt_platform/frontend/src/components/monitor/skeletons/AgentFlowListSkeleton.tsx b/autogpt_platform/frontend/src/app/(platform)/monitoring/components/skeletons/AgentFlowListSkeleton.tsx
similarity index 100%
rename from autogpt_platform/frontend/src/components/monitor/skeletons/AgentFlowListSkeleton.tsx
rename to autogpt_platform/frontend/src/app/(platform)/monitoring/components/skeletons/AgentFlowListSkeleton.tsx
diff --git a/autogpt_platform/frontend/src/components/monitor/skeletons/FlowRunsListSkeleton.tsx b/autogpt_platform/frontend/src/app/(platform)/monitoring/components/skeletons/FlowRunsListSkeleton.tsx
similarity index 100%
rename from autogpt_platform/frontend/src/components/monitor/skeletons/FlowRunsListSkeleton.tsx
rename to autogpt_platform/frontend/src/app/(platform)/monitoring/components/skeletons/FlowRunsListSkeleton.tsx
diff --git a/autogpt_platform/frontend/src/components/monitor/skeletons/FlowRunsStatusSkeleton.tsx b/autogpt_platform/frontend/src/app/(platform)/monitoring/components/skeletons/FlowRunsStatusSkeleton.tsx
similarity index 100%
rename from autogpt_platform/frontend/src/components/monitor/skeletons/FlowRunsStatusSkeleton.tsx
rename to autogpt_platform/frontend/src/app/(platform)/monitoring/components/skeletons/FlowRunsStatusSkeleton.tsx
diff --git a/autogpt_platform/frontend/src/app/(platform)/monitoring/loading.tsx b/autogpt_platform/frontend/src/app/(platform)/monitoring/loading.tsx
index b0be672e03..6e0a9fa5cd 100644
--- a/autogpt_platform/frontend/src/app/(platform)/monitoring/loading.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/monitoring/loading.tsx
@@ -1,7 +1,7 @@
-import AgentFlowListSkeleton from "@/components/monitor/skeletons/AgentFlowListSkeleton";
+import AgentFlowListSkeleton from "@/app/(platform)/monitoring/components/skeletons/AgentFlowListSkeleton";
import React from "react";
-import FlowRunsListSkeleton from "@/components/monitor/skeletons/FlowRunsListSkeleton";
-import FlowRunsStatusSkeleton from "@/components/monitor/skeletons/FlowRunsStatusSkeleton";
+import FlowRunsListSkeleton from "@/app/(platform)/monitoring/components/skeletons/FlowRunsListSkeleton";
+import FlowRunsStatusSkeleton from "@/app/(platform)/monitoring/components/skeletons/FlowRunsStatusSkeleton";
export default function MonitorLoadingSkeleton() {
return (
diff --git a/autogpt_platform/frontend/src/app/(platform)/monitoring/page.tsx b/autogpt_platform/frontend/src/app/(platform)/monitoring/page.tsx
index f02d146c5a..1c465b84b8 100644
--- a/autogpt_platform/frontend/src/app/(platform)/monitoring/page.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/monitoring/page.tsx
@@ -9,15 +9,13 @@ import {
} from "@/app/api/__generated__/endpoints/schedules/schedules";
import { Card } from "@/components/ui/card";
-import {
- AgentFlowList,
- FlowInfo,
- FlowRunInfo,
- FlowRunsList,
- FlowRunsStats,
-} from "@/components/monitor";
-import { SchedulesTable } from "@/components/monitor/scheduleTable";
+import { SchedulesTable } from "@/app/(platform)/monitoring/components/SchedulesTable";
import { useBackendAPI } from "@/lib/autogpt-server-api/context";
+import AgentFlowList from "./components/AgentFlowList";
+import FlowRunsList from "./components/FlowRunsList";
+import FlowRunInfo from "./components/FlowRunInfo";
+import FlowInfo from "./components/FlowInfo";
+import FlowRunsStatus from "./components/FlowRunsStatus";
const Monitor = () => {
const [flows, setFlows] = useState<LibraryAgent[]>([]);
@@ -129,7 +127,7 @@ const Monitor = () => {
/>
)) || (
<Card className={`p-6 ${column3}`}>
- <FlowRunsStats flows={flows} executions={executions} />
+ <FlowRunsStatus flows={flows} executions={executions} />
</Card>
)}
<div className="col-span-full xl:col-span-6">
diff --git a/autogpt_platform/frontend/src/app/(platform)/profile/(user)/integrations/page.tsx b/autogpt_platform/frontend/src/app/(platform)/profile/(user)/integrations/page.tsx
index b9ebd0356a..433334ddb7 100644
--- a/autogpt_platform/frontend/src/app/(platform)/profile/(user)/integrations/page.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/profile/(user)/integrations/page.tsx
@@ -7,7 +7,7 @@ import { IconKey, IconUser } from "@/components/ui/icons";
import { Trash2Icon } from "lucide-react";
import { KeyIcon } from "@phosphor-icons/react/dist/ssr";
import { providerIcons } from "@/app/(platform)/library/agents/[id]/components/AgentRunsView/components/CredentialsInputs/CredentialsInputs";
-import { CredentialsProvidersContext } from "@/components/integrations/credentials-provider";
+import { CredentialsProvidersContext } from "@/services/agent-credentials/credentials-provider";
import {
Table,
TableBody,
diff --git a/autogpt_platform/frontend/src/app/layout.tsx b/autogpt_platform/frontend/src/app/layout.tsx
index 44996d4997..2ed896eb6f 100644
--- a/autogpt_platform/frontend/src/app/layout.tsx
+++ b/autogpt_platform/frontend/src/app/layout.tsx
@@ -6,7 +6,7 @@ import "./globals.css";
import { Providers } from "@/app/providers";
import TallyPopupSimple from "@/components/TallyPopup";
-import { GoogleAnalytics } from "@/components/analytics/google-analytics";
+import { GoogleAnalytics } from "@/services/analytics/google-analytics";
import { Toaster } from "@/components/molecules/Toast/toaster";
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
import { SpeedInsights } from "@vercel/speed-insights/next";
diff --git a/autogpt_platform/frontend/src/app/providers.tsx b/autogpt_platform/frontend/src/app/providers.tsx
index ef14bb723c..a9023b781c 100644
--- a/autogpt_platform/frontend/src/app/providers.tsx
+++ b/autogpt_platform/frontend/src/app/providers.tsx
@@ -1,7 +1,7 @@
"use client";
import { LaunchDarklyProvider } from "@/services/feature-flags/feature-flag-provider";
-import CredentialsProvider from "@/components/integrations/credentials-provider";
+import CredentialsProvider from "@/services/agent-credentials/credentials-provider";
import OnboardingProvider from "@/components/onboarding/onboarding-provider";
import { TooltipProvider } from "@/components/ui/tooltip";
import { BackendAPIProvider } from "@/lib/autogpt-server-api/context";
diff --git a/autogpt_platform/frontend/src/components/marketplace/AgentDetailContent.tsx b/autogpt_platform/frontend/src/components/marketplace/AgentDetailContent.tsx
deleted file mode 100644
index cbaa72e990..0000000000
--- a/autogpt_platform/frontend/src/components/marketplace/AgentDetailContent.tsx
+++ /dev/null
@@ -1,96 +0,0 @@
-// "use client";
-// import Link from "next/link";
-// import { ArrowLeft, Download, Calendar, Tag } from "lucide-react";
-// import { Button } from "@/components/ui/button";
-// import BackendAPI, { GraphCreatable } from "@/lib/autogpt-server-api";
-// import "@xyflow/react/dist/style.css";
-// import { useToast } from "../ui/use-toast";
-
-// function AgentDetailContent({ agent }: { agent: GraphCreatable }) {
-// const { toast } = useToast();
-
-// // const downloadAgent = async (id: string): Promise<void> => {
-// // const api = new MarketplaceAPI();
-// // try {
-// // const file = await api.downloadAgentFile(id);
-// // console.debug(`Agent file downloaded:`, file);
-
-// // // Create a Blob from the file content
-// // const blob = new Blob([file], { type: "application/json" });
-
-// // // Create a temporary URL for the Blob
-// // const url = window.URL.createObjectURL(blob);
-
-// // // Create a temporary anchor element
-// // const a = document.createElement("a");
-// // a.href = url;
-// // a.download = `agent_${id}.json`; // Set the filename
-
-// // // Append the anchor to the body, click it, and remove it
-// // document.body.appendChild(a);
-// // a.click();
-// // document.body.removeChild(a);
-
-// // // Revoke the temporary URL
-// // window.URL.revokeObjectURL(url);
-// // } catch (error) {
-// // console.error(`Error downloading agent:`, error);
-// // throw error;
-// // }
-// // };
-
-// return (
-// <div className="mx-auto max-w-7xl px-4 py-4 sm:px-6 lg:px-8">
-// <div className="mb-4 flex items-center justify-between">
-// <Link
-// href="/marketplace"
-// className="inline-flex items-center text-indigo-600 hover:text-indigo-500"
-// >
-// <ArrowLeft className="mr-2" size={20} />
-// Back to Marketplace
-// </Link>
-// <div className="flex space-x-4">
-// <Button
-// onClick={() => downloadAgent(agent.id)}
-// className="inline-flex items-center rounded-md border border-transparent bg-indigo-600 px-4 py-2 text-sm font-medium text-white shadow-sm hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2"
-// >
-// <Download className="mr-2" size={16} />
-// Download Agent
-// </Button>
-// </div>
-// </div>
-// <div className="overflow-hidden bg-white shadow sm:rounded-lg">
-// <div className="px-4 py-5 sm:px-6">
-// <h1 className="text-3xl font-bold text-gray-900">{agent.name}</h1>
-// <p className="mt-1 max-w-2xl text-sm text-gray-500">
-// {agent.description}
-// </p>
-// </div>
-// <div className="border-t border-gray-300 px-4 py-5 sm:p-0">
-// <dl className="sm:divide-y sm:divide-gray-200">
-// <div className="py-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6 sm:py-5">
-// <dt className="flex items-center text-sm font-medium text-gray-500">
-// <Calendar className="mr-2" size={16} />
-// Last Updated
-// </dt>
-// <dd className="mt-1 text-sm text-gray-900 sm:col-span-2 sm:mt-0">
-// {new Date(agent.updatedAt).toLocaleDateString()}
-// </dd>
-// </div>
-// <div className="py-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6 sm:py-5">
-// <dt className="flex items-center text-sm font-medium text-gray-500">
-// <Tag className="mr-2" size={16} />
-// Categories
-// </dt>
-// <dd className="mt-1 text-sm text-gray-900 sm:col-span-2 sm:mt-0">
-// {agent.categories.join(", ")}
-// </dd>
-// </div>
-// </dl>
-// </div>
-// </div>
-// </div>
-// );
-// }
-
-// export default AgentDetailContent;
diff --git a/autogpt_platform/frontend/src/components/marketplace/actions.ts b/autogpt_platform/frontend/src/components/marketplace/actions.ts
deleted file mode 100644
index d6ebec32a0..0000000000
--- a/autogpt_platform/frontend/src/components/marketplace/actions.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-// "use server";
-
-// import * as Sentry from "@sentry/nextjs";
-// import MarketplaceAPI, { AnalyticsEvent } from "@/lib/marketplace-api";
-// import { checkAuth } from "@/lib/supabase/server";
-
-// export async function makeAnalyticsEvent(event: AnalyticsEvent) {
-// return await Sentry.withServerActionInstrumentation(
-// "makeAnalyticsEvent",
-// {},
-// async () => {
-// await checkAuth();
-// const apiUrl = process.env.AGPT_SERVER_API_URL;
-// const api = new MarketplaceAPI();
-// await api.makeAnalyticsEvent(event);
-// },
-// );
-// }
diff --git a/autogpt_platform/frontend/src/components/monitor/index.ts b/autogpt_platform/frontend/src/components/monitor/index.ts
deleted file mode 100644
index 0f8f80287c..0000000000
--- a/autogpt_platform/frontend/src/components/monitor/index.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-export { default as AgentFlowList } from "./AgentFlowList";
-export { default as FlowRunsList } from "./FlowRunsList";
-export { default as FlowInfo } from "./FlowInfo";
-export { default as FlowRunInfo } from "./FlowRunInfo";
-export { default as FlowRunsStats } from "./FlowRunsStatus";
-export { default as FlowRunsTimeline } from "./FlowRunsTimeline";
diff --git a/autogpt_platform/frontend/src/components/tutorial.ts b/autogpt_platform/frontend/src/components/tutorial.ts
index f6d99752e4..1d862f2811 100644
--- a/autogpt_platform/frontend/src/components/tutorial.ts
+++ b/autogpt_platform/frontend/src/components/tutorial.ts
@@ -1,6 +1,6 @@
import Shepherd from "shepherd.js";
import "shepherd.js/dist/css/shepherd.css";
-import { sendGAEvent } from "@/components/analytics/google-analytics";
+import { sendGAEvent } from "@/services/analytics/google-analytics";
import { Key, storage } from "@/services/storage/local-storage";
export const startTutorial = (
diff --git a/autogpt_platform/frontend/src/hooks/useCredentials.ts b/autogpt_platform/frontend/src/hooks/useCredentials.ts
index 64c891b2e3..580dd388e8 100644
--- a/autogpt_platform/frontend/src/hooks/useCredentials.ts
+++ b/autogpt_platform/frontend/src/hooks/useCredentials.ts
@@ -4,7 +4,7 @@ import { getValue } from "@/lib/utils";
import {
CredentialsProviderData,
CredentialsProvidersContext,
-} from "@/components/integrations/credentials-provider";
+} from "@/services/agent-credentials/credentials-provider";
import {
BlockIOCredentialsSubSchema,
CredentialsProviderName,
diff --git a/autogpt_platform/frontend/src/components/integrations/credentials-provider.tsx b/autogpt_platform/frontend/src/services/agent-credentials/credentials-provider.tsx
similarity index 99%
rename from autogpt_platform/frontend/src/components/integrations/credentials-provider.tsx
rename to autogpt_platform/frontend/src/services/agent-credentials/credentials-provider.tsx
index abf081ab6d..f4cb1f59ac 100644
--- a/autogpt_platform/frontend/src/components/integrations/credentials-provider.tsx
+++ b/autogpt_platform/frontend/src/services/agent-credentials/credentials-provider.tsx
@@ -11,7 +11,7 @@ import {
} from "@/lib/autogpt-server-api";
import { useBackendAPI } from "@/lib/autogpt-server-api/context";
import { useToastOnFail } from "@/components/molecules/Toast/use-toast";
-import { toDisplayName } from "@/components/integrations/helper";
+import { toDisplayName } from "@/services/agent-credentials/helper";
type APIKeyCredentialsCreatable = Omit<
APIKeyCredentials,
diff --git a/autogpt_platform/frontend/src/components/integrations/helper.ts b/autogpt_platform/frontend/src/services/agent-credentials/helper.ts
similarity index 100%
rename from autogpt_platform/frontend/src/components/integrations/helper.ts
rename to autogpt_platform/frontend/src/services/agent-credentials/helper.ts
diff --git a/autogpt_platform/frontend/src/components/analytics/google-analytics.tsx b/autogpt_platform/frontend/src/services/analytics/google-analytics.tsx
similarity index 100%
rename from autogpt_platform/frontend/src/components/analytics/google-analytics.tsx
rename to autogpt_platform/frontend/src/services/analytics/google-analytics.tsx