+ {/* Backdrop */}
+
onOpenChange(false)}
+ aria-hidden="true"
+ />
+ {/* Dialog Content */}
+
{children}
+
+ );
+}
+
+/**
+ * DialogContent component
+ * @description Container for dialog content
+ */
+export function DialogContent({ children, className }: DialogContentProps) {
+ return (
+
+ {children}
+
+ );
+}
+
+/**
+ * DialogHeader component
+ * @description Header section of dialog
+ */
+export function DialogHeader({ children, className }: DialogHeaderProps) {
+ return (
+
+ {children}
+
+ );
+}
+
+/**
+ * DialogTitle component
+ * @description Title section of dialog header
+ */
+export function DialogTitle({ children, className }: DialogTitleProps) {
+ return (
+
{children}
+ );
+}
+
+/**
+ * DialogDescription component
+ * @description Description/subtitle in dialog header
+ */
+export function DialogDescription({
+ children,
+ className,
+}: DialogDescriptionProps) {
+ return (
+
+ {children}
+
+ );
+}
+
+/**
+ * DialogClose component
+ * @description Close button for dialog
+ */
+export function DialogClose({ className, onClick }: DialogCloseProps) {
+ const closeIcon = 'https://www.figma.com/api/mcp/asset/d151f987-7858-49a2-85dd-eac10b6bf0b0';
+ const closeCircleBg = 'https://www.figma.com/api/mcp/asset/3702e7bd-24a9-4380-83be-0347e18baa40';
+
+ return (
+
+ );
+}
+
diff --git a/src/components/ui/tool-chip.tsx b/src/components/ui/tool-chip.tsx
new file mode 100644
index 0000000..616c561
--- /dev/null
+++ b/src/components/ui/tool-chip.tsx
@@ -0,0 +1,57 @@
+/**
+ * Tool Chip Component
+ * @description Displays a tool chip with name, close button, and redirect button
+ */
+
+import { X, ArrowRight } from 'lucide-react';
+import { Tool } from '@/types';
+
+interface ToolChipProps {
+ tool: Tool;
+ onDelete: (id: string) => void;
+ onRedirect: (id: string) => void;
+}
+
+/**
+ * ToolChip component
+ * @description Chip component for displaying tools with delete and redirect actions
+ * Matches Figma design with exact styling
+ */
+export function ToolChip({ tool, onDelete, onRedirect }: ToolChipProps) {
+ return (
+
+
+
+ {/* Close Button - matches Figma design */}
+
+
+ {/* Redirect Button - matches Figma design */}
+
+
+
+ );
+}
+
diff --git a/src/constants/agents.ts b/src/constants/agents.ts
new file mode 100644
index 0000000..f3572e0
--- /dev/null
+++ b/src/constants/agents.ts
@@ -0,0 +1,95 @@
+/**
+ * Agents Data Constants
+ * @description Mock data for agents list
+ */
+
+/**
+ * Agent data interface
+ */
+export interface AgentData {
+ title: string;
+ tags: string[];
+ description: string;
+}
+
+/**
+ * Mock agents data
+ */
+export const MOCK_AGENTS: AgentData[] = [
+ {
+ title: 'Customer Support Agent',
+ tags: ['GPT-4', 'Chat Interface'],
+ description: 'Automates customer service inquiries with intelligent escalation and context preservation.',
+ },
+ {
+ title: 'Document Analyst',
+ tags: ['Claude-3', 'PDF Processing', 'Knowledge Graph'],
+ description: 'Analyzes documents to extract insights and generate comprehensive reports automatically.',
+ },
+ {
+ title: 'Sales Qualifier',
+ tags: ['Lead Scoring', 'CRM Integration', 'Email Autom...'],
+ description: 'Qualifies prospects, schedules meetings, and manages follow-up communications with tracking.',
+ },
+ {
+ title: 'Customer Support Agent',
+ tags: ['GPT-4', 'Chat Interface'],
+ description: 'Automates customer service inquiries with intelligent escalation and context preservation.',
+ },
+ {
+ title: 'Document Analyst',
+ tags: ['Claude-3', 'PDF Processing', 'Knowledge Graph'],
+ description: 'Analyzes documents to extract insights and generate comprehensive reports automatically.',
+ },
+ {
+ title: 'Sales Qualifier',
+ tags: ['Lead Scoring', 'CRM Integration', 'Email Autom...'],
+ description: 'Qualifies prospects, schedules meetings, and manages follow-up communications with tracking.',
+ },
+ {
+ title: 'Data Analyst Agent',
+ tags: ['GPT-4', 'Data Processing'],
+ description: 'Processes and analyzes large datasets to generate insights and visualizations.',
+ },
+ {
+ title: 'Content Writer',
+ tags: ['Claude-3', 'Content Generation'],
+ description: 'Generates high-quality content for blogs, articles, and marketing materials.',
+ },
+ {
+ title: 'Code Reviewer',
+ tags: ['GPT-4', 'Code Analysis'],
+ description: 'Reviews code for quality, security, and best practices automatically.',
+ },
+ {
+ title: 'Email Assistant',
+ tags: ['GPT-4', 'Email Management'],
+ description: 'Manages and responds to emails intelligently with context awareness.',
+ },
+ {
+ title: 'Meeting Scheduler',
+ tags: ['Calendar Integration', 'AI Scheduling'],
+ description: 'Schedules meetings by understanding natural language requests and availability.',
+ },
+ {
+ title: 'Research Assistant',
+ tags: ['Claude-3', 'Web Research'],
+ description: 'Conducts comprehensive research on topics and compiles detailed reports.',
+ },
+ {
+ title: 'Translation Agent',
+ tags: ['Multi-language', 'GPT-4'],
+ description: 'Translates content between multiple languages with high accuracy.',
+ },
+ {
+ title: 'Quality Assurance',
+ tags: ['Testing', 'Automation'],
+ description: 'Automates quality assurance processes and generates test reports.',
+ },
+ {
+ title: 'Financial Analyst',
+ tags: ['Data Analysis', 'Reporting'],
+ description: 'Analyzes financial data and generates comprehensive reports and insights.',
+ },
+];
+
diff --git a/src/index.css b/src/index.css
index 6fe0af8..597f4e5 100644
--- a/src/index.css
+++ b/src/index.css
@@ -3,7 +3,7 @@
@layer base {
body {
font-family: 'Poppins', sans-serif;
- font-size: 12px;
+ font-size: 0.875rem; /* 14px - Base body text size */
}
:root {
@@ -59,6 +59,22 @@
}
.sidebar-icon-v3 {
- @apply w-[42px] h-[42px] flex items-center justify-center text-white hover:bg-white/10 rounded-xl transition-all duration-300;
+ @apply w-9 h-9 md:w-[42px] md:h-[42px] flex items-center justify-center text-white hover:bg-white/10 rounded-xl transition-all duration-300 min-h-[44px] min-w-[44px] md:min-h-[42px] md:min-w-[42px];
+ }
+
+ /* Global Font Utilities */
+ .font-regular {
+ font-family: 'Poppins', sans-serif;
+ font-weight: 400;
+ }
+
+ .font-medium {
+ font-family: 'Poppins', sans-serif;
+ font-weight: 500;
+ }
+
+ .font-semibold {
+ font-family: 'Poppins', sans-serif;
+ font-weight: 600;
}
}
\ No newline at end of file
diff --git a/src/pages/agent-create.tsx b/src/pages/agent-create.tsx
new file mode 100644
index 0000000..17ef13d
--- /dev/null
+++ b/src/pages/agent-create.tsx
@@ -0,0 +1,340 @@
+import { useState } from 'react';
+import { Link } from '@tanstack/react-router';
+import { Info, ChevronDown, Settings } from 'lucide-react';
+import { APP_PATHS } from '@/routes';
+import { AddToolDialog } from '@/components/ui/add-tool-dialog';
+import { ToolChip } from '@/components/ui/tool-chip';
+import type { Tool } from '@/types';
+
+/**
+ * Toggle Switch Component
+ * @description A toggle switch that visually represents on/off state
+ */
+function ToggleSwitch({ enabled }: { enabled: boolean }) {
+ return (
+
+ );
+}
+
+/**
+ * AgentCreatePage component
+ * @description Page for creating a new agent with configuration options
+ * @returns Agent creation form page
+ */
+export function AgentCreatePage() {
+ const [enableKb, setEnableKb] = useState(false);
+ const [enableMemory, setEnableMemory] = useState(true);
+ const [isToolDialogOpen, setIsToolDialogOpen] = useState(false);
+ const [editingTool, setEditingTool] = useState
(null);
+ const [tools, setTools] = useState([
+ { id: '1', name: 'Slack', type: 'API', color: '#ff0080' },
+ { id: '2', name: 'GitHub', type: 'MCP', color: '#8fbc24' },
+ ]);
+
+ const handleAddTool = (toolData: Omit) => {
+ const newTool: Tool = {
+ ...toolData,
+ id: Date.now().toString(), // Simple ID generation
+ };
+ setTools((prev) => [...prev, newTool]);
+ };
+
+ const handleUpdateTool = (toolId: string, toolData: Omit) => {
+ setTools((prev) =>
+ prev.map((tool) => (tool.id === toolId ? { ...tool, ...toolData } : tool))
+ );
+ setEditingTool(null);
+ };
+
+ const handleDeleteTool = (id: string) => {
+ setTools((prev) => prev.filter((tool) => tool.id !== id));
+ };
+
+ const handleRedirectTool = (id: string) => {
+ // Find the tool and open configuration/update dialog
+ const tool = tools.find((t) => t.id === id);
+ if (tool) {
+ setEditingTool(tool);
+ setIsToolDialogOpen(true);
+ }
+ };
+
+ const handleDialogClose = (open: boolean) => {
+ setIsToolDialogOpen(open);
+ if (!open) {
+ setEditingTool(null);
+ }
+ };
+
+ return (
+
+
+
+ Add Agent
+
+
+
+
+ {/* Main Form Card */}
+
+
+ {/* Left Column */}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Select
+
+
+
+
+
+
+
+
+ Select
+
+
+
+
+
+
+
+ {/* Right Column */}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {/* Features Card */}
+
+
+
+ Features
+
+
+ {/* Knowledge Base */}
+
+
+
+
+ Knowledge Base
+
+
+
+
+
+ {enableKb && (
+
+
+
+
+ )}
+
+
+ {/* Memory */}
+
+
+
+
+ Memory
+
+
+
+
+
+ {enableMemory && (
+
+
+
+ 2 Messages
+
+
+ )}
+
+
+ {/* Tool Configuration */}
+
+
+
+ Tool Configuration
+
+
+
+
+
+
+
+ {/* Divider */}
+
+
+ {/* Tools Display Section */}
+
+
+ {tools.map((tool) => (
+
+ ))}
+
+
+
+
+
+ {/* Action Buttons */}
+
+
+
+ Cancel
+
+
+
+
+
+
+ {/* Add Tool Dialog */}
+
+
+ );
+}
diff --git a/src/pages/agent.tsx b/src/pages/agent.tsx
new file mode 100644
index 0000000..8b74026
--- /dev/null
+++ b/src/pages/agent.tsx
@@ -0,0 +1,62 @@
+import { Link } from '@tanstack/react-router';
+import { APP_PATHS } from '@/routes';
+
+const searchIcon = 'https://www.figma.com/api/mcp/asset/379327bd-47f2-4ebc-a8e0-c0004928d27b';
+const emptyStateIcon = '/Agent/agent.svg';
+const addIcon = '/Agent/add.svg';
+
+export function AgentPage() {
+ return (
+
+
+
+
+ Agent
+
+
+ Intelligent Agents that automate workflows and enhance decision-making
+
+
+
+
+
+
+

+
+
+
+
+
+
+
+

+
+
+ No Agent Found
+
+
+ Get started by adding your first Agent
+
+
+
+

+ Add Agent
+
+
+
+
+
+ );
+}
+
diff --git a/src/pages/dashboard.tsx b/src/pages/dashboard.tsx
index 72ac848..de57b81 100644
--- a/src/pages/dashboard.tsx
+++ b/src/pages/dashboard.tsx
@@ -3,11 +3,11 @@
* @description Main dashboard page with metrics and agent cards
*/
-import { useState } from 'react';
import { MetricCard } from '@/components/dashboard/metric-card';
-import { AgentCard } from '@/components/dashboard/agent-card';
+import { AgentsSection } from '@/components/dashboard/agents-section';
import { Button } from '@/components/ui/button';
import { Search, Plus } from 'lucide-react';
+import { MOCK_AGENTS } from '@/constants/agents';
/**
* Dashboard component
@@ -15,136 +15,73 @@ import { Search, Plus } from 'lucide-react';
* @returns Dashboard element
*/
export function Dashboard() {
- const [activeTab, setActiveTab] = useState<'all' | 'my'>('all');
-
- const agents = [
- {
- title: 'Customer Support Agent',
- tags: ['GPT-4', 'Chat Interface'],
- description: 'Automates customer service inquiries with intelligent escalation and context preservation.',
- },
- {
- title: 'Document Analyst',
- tags: ['Claude-3', 'PDF Processing', 'Knowledge Graph'],
- description: 'Analyzes documents to extract insights and generate comprehensive reports automatically.',
- },
- {
- title: 'Sales Qualifier',
- tags: ['Lead Scoring', 'CRM Integration', 'Email Autom...'],
- description: 'Qualifies prospects, schedules meetings, and manages follow-up communications with tracking.',
- },
- {
- title: 'Customer Support Agent',
- tags: ['GPT-4', 'Chat Interface'],
- description: 'Automates customer service inquiries with intelligent escalation and context preservation.',
- },
- {
- title: 'Document Analyst',
- tags: ['Claude-3', 'PDF Processing', 'Knowledge Graph'],
- description: 'Analyzes documents to extract insights and generate comprehensive reports automatically.',
- },
- {
- title: 'Sales Qualifier',
- tags: ['Lead Scoring', 'CRM Integration', 'Email Autom...'],
- description: 'Qualifies prospects, schedules meetings, and manages follow-up communications with tracking.',
- },
- ];
-
return (
-
- {/* Content Header: Welcome + Search/Create */}
-
-
-
- Welcome, Vijay! 👋
-
-
- Monitor and manage your intelligent agents, knowledge bases, and automated workflows from a centralized dashboard
-
-
+
+ {/* Content Header: Welcome + Search/Create */}
+
+
+
+ Welcome, Vijay! 👋🏻
+
+
+ Manage Agents, Workflows, Tools and Knowledge Base
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
- {/* Metrics Grid */}
-
+ {/* Metrics Grid */}
+
- {/* Agents Section */}
-
- {/* Tabs */}
-
-
-
-
-
- {/* Agent Cards Grid */}
-
- {agents.map((agent, index) => (
-
- ))}
-
-
+ {/* Agents Section */}
+
);
}
diff --git a/src/routes.tsx b/src/routes.tsx
index faa3de7..a03eb0d 100644
--- a/src/routes.tsx
+++ b/src/routes.tsx
@@ -5,10 +5,20 @@
import { createRootRoute, createRoute, createRouter, Outlet } from '@tanstack/react-router';
import { RootLayout } from '@/components/layout';
+import { AgentPage } from '@/pages/agent';
+import { AgentCreatePage } from '@/pages/agent-create';
import { Dashboard } from '@/pages/dashboard';
import { SignInPage } from '@/pages/sign-in';
import { SignUpPage } from '@/pages/sign-up';
+export const APP_PATHS = {
+ signIn: '/',
+ signUp: '/signup',
+ dashboard: '/dashboard',
+ agent: '/agent',
+ agentCreate: '/agent/create',
+} as const;
+
const rootRoute = createRootRoute({
component: () =>
,
});
@@ -31,25 +41,51 @@ const appRoute = createRoute({
const signInRoute = createRoute({
getParentRoute: () => publicRoute,
- path: '/',
+ path: APP_PATHS.signIn,
component: SignInPage,
});
const signUpRoute = createRoute({
getParentRoute: () => publicRoute,
- path: '/signup',
+ path: APP_PATHS.signUp,
component: SignUpPage,
});
const dashboardRoute = createRoute({
getParentRoute: () => appRoute,
- path: '/dashboard',
+ path: APP_PATHS.dashboard,
component: Dashboard,
});
+const agentRoute = createRoute({
+ getParentRoute: () => appRoute,
+ path: APP_PATHS.agent,
+ component: AgentPage,
+});
+
+const agentCreateRoute = createRoute({
+ getParentRoute: () => appRoute,
+ path: APP_PATHS.agentCreate,
+ component: AgentCreatePage,
+});
+
+const notFoundRoute = createRoute({
+ getParentRoute: () => rootRoute,
+ path: '*',
+ component: () => (
+
+
+
Page not found
+
The page you requested does not exist.
+
+
+ ),
+});
+
const routeTree = rootRoute.addChildren([
publicRoute.addChildren([signInRoute, signUpRoute]),
- appRoute.addChildren([dashboardRoute]),
+ appRoute.addChildren([dashboardRoute, agentRoute, agentCreateRoute]),
+ notFoundRoute,
]);
export const router = createRouter({
diff --git a/src/types/index.ts b/src/types/index.ts
index 20dcc64..6250237 100644
--- a/src/types/index.ts
+++ b/src/types/index.ts
@@ -25,3 +25,10 @@ export interface ApiError {
}
export type LoadingState = 'idle' | 'loading' | 'success' | 'error'
+
+export interface Tool {
+ id: string
+ name: string
+ type: 'API' | 'MCP'
+ color: string // Color for the tool name (e.g., '#ff0080' for Slack, '#8fbc24' for GitHub)
+}
\ No newline at end of file