Agent Overview智能体概览
用六张图表卡片汇总单个智能体的工具调用、时间分配、每次运行的 Token 用量、响应耗时、当前任务进度和下次运行时段。悬停或用方向键查看各数据点,可拖动运行窗口调整时段。
npx https://kalos-ui-six.vercel.app/cli/kalos-ui-0.3.12.tgz add agent-overviewToday·01,770 calls14 days · 5 tools
45h 00m
- 24h 28m54% · Working
- 6h 12m14% · Tool calls
- 10h 41m24% · Waiting on you
- 3h 39m8% · Idle
166k avg / run1 over budget
Now·2.0s0.7 – 2.0sStable range
Postgresprod-eu-1Supabaseeu-central-1
Indexer
Reindex search · 1h 00mStarts in 20m
安装
在项目根目录运行,安装源码。
npx https://kalos-ui-six.vercel.app/cli/kalos-ui-0.3.12.tgz add agent-overview使用
React
"use client";
import { useState } from "react";import { KalosAgentOverview } from "@/components/blocks/agent-overview";
export function ResearchAgent() { const [slot, setSlot] = useState<[number, number]>([540, 600]); return ( <KalosAgentOverview title="Research agent" subtitle="This week" activity={{ title: "Tool calls", tools: [{ id: "search", name: "Web search" }, { id: "code", name: "Code runner" }], days: [{ label: "25", counts: { search: 42, code: 18 } }, { label: "26", counts: { search: 16 } }], }} timeSplit={{ title: "Time this week", slices: [{ id: "work", label: "Working", ms: 88_080_000 }, { id: "idle", label: "Idle", ms: 13_140_000 }] }} budget={{ title: "Tokens per run", runs: [{ id: "r1", tokens: 184_000, model: "opus" }], limit: 250_000, models: [{ id: "opus", name: "Opus 5.5" }] }} latency={{ title: "Response time", points: [{ label: "14", p50: 820, p95: 2100, runs: 512 }], target: 2500 }} transit={{ title: "Customer migration", from: { code: "Postgres" }, to: { code: "Supabase" }, progress: 0.62, eta: 300_000 }} window={{ title: "Next run", range: [510, 690], start: slot[0], end: slot[1], onChange: (start, end) => setSlot([start, end]) }} /> );}API
| 属性 | 类型 | 默认值 | 说明 |
|---|---|---|---|
title / subtitle | string | — | 卡片上方的标题与弱化副标题。两者都未提供时不显示标题区,区块的可访问名称回退为 Agent overview。 |
activity | ToolActivityProps | — | 工具调用点阵:tools 为每行工具,days 按时间先后排列,最后一天视为今天。可设置 unit。 |
timeSplit | AgentTimeSplitProps | — | 时间分配刻度条:slices 包含 id、label、ms,超过四项时合并为 Other。live 让第一段末尾闪烁,ticks 取 12–160。 |
budget | TokenBudgetProps | — | 每次运行的 Token 柱状图:runs 按时间排列,limit 绘制粉色上限线,models 决定柱条颜色与图例。 |
latency | LatencyRangeProps | — | 按小时显示 p50 到 p95 的耗时区间,target 为 p95 目标线,最新一小时以蓝色突出。 |
transit | RunTransitProps | — | 当前任务从 from 到 to 的进度。progress 取 0–1,status 为 running、paused、done 或 failed,agent.id 决定像素标识。 |
window | RunWindowProps | — | 允许运行的时间窗口,单位为当天分钟数。传入 onChange 后可拖动窗口或两端,按 step 对齐。 |
每张卡片通用 | title / icon / actionLabel / onAction / className | 各卡片默认标题与图标 | 传入 onAction 才显示右上角的 Open 按钮。 |
className | string | — | 附加到区块根元素的类名。 |
键盘操作
- Tab
- 按阅读顺序经过各卡片的 Open 按钮与图表。每个图表是一个焦点;时间分配的每一段、运行窗口及两端手柄各自可聚焦。
- ← / →
- 在图表内逐个查看日期、小时或运行记录;在运行窗口上移动整个窗口或当前手柄。
- ↑ / ↓
- 在工具调用点阵中切换工具;在运行窗口中 ↑ 等同 →,↓ 等同 ←。
- Home / End
- 跳到最早或最新的数据点。
- Shift + 方向键
- 运行窗口按 30 分钟移动。
- Esc
- 取消当前选中的数据点。