import { useState, useEffect } from 'react'; import { Link } from 'react-router-dom'; import { agentApi } from '../utils/api'; function Home() { const [stats, setStats] = useState({ agents: [], agentCount: 0, actions: 0, connectors: 0, status: {}, }); const [loading, setLoading] = useState(true); const [error, setError] = useState(null); // Fetch dashboard data useEffect(() => { const fetchData = async () => { setLoading(true); try { const agents = await agentApi.getAgents(); setStats({ agents: agents.agents || [], agentCount: agents.agentCount || 0, actions: agents.actions || 0, connectors: agents.connectors || 0, status: agents.statuses || {}, }); } catch (err) { console.error('Error fetching dashboard data:', err); setError('Failed to load dashboard data'); } finally { setLoading(false); } }; fetchData(); }, []); if (loading) { return
View and manage your list of agents, including detailed profiles and statistics.
Create a new intelligent agent with custom behaviors, connectors, and actions.
Explore and test available actions for your agents.
Create agent groups for collaborative intelligence.