"use client"; import { useMemo, useState } from "react"; import { Badge } from "@/components/ui/badge"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; import { Input } from "@/components/ui/input"; import { Select } from "@/components/ui/select"; import type { FleetAgent } from "@/lib/types"; export function AgentsClient({ agents }: { agents: FleetAgent[] }) { const [query, setQuery] = useState(""); const [family, setFamily] = useState(""); const filteredAgents = useMemo(() => { return agents.filter((agent) => { const matchesQuery = query.length === 0 || agent.name.toLowerCase().includes(query.toLowerCase()) || agent.host.toLowerCase().includes(query.toLowerCase()) || agent.role.toLowerCase().includes(query.toLowerCase()); const matchesFamily = family.length === 0 || agent.family === family; return matchesQuery && matchesFamily; }); }, [agents, family, query]); return (
Configured Agent Runtimes OpenClaw swarm members and ZeroClaw host runtimes are shown from the deployed fleet model. setQuery(event.target.value)} />
{filteredAgents.map((agent) => (
{agent.emoji} {agent.name} {agent.role}
{agent.family} {agent.status}
Host
{agent.host}
Model
{agent.model || "Host-local/runtime-defined"}
Runtime
{agent.runtimePath}
Workload
{agent.workload} active
Current task
{agent.currentTask || "No heartbeat task"}

Channels

{agent.channels.map((channel) => ( {channel.label}: {channel.value} ))}

Tools

{agent.tools.length ? agent.tools.map((tool) => {tool}) : No parsed tools.}
))}
); }