Skip to content

Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.

feat(web-studio): guide Agent Experience setup and skill installation (#5035)

yufeng4220b4d2ca0d
diff --git a/web-studio/src/i18n/locales/en/workspace.ts b/web-studio/src/i18n/locales/en/workspace.ts
index cc0cc2b47..36982bbdb 100644
--- a/web-studio/src/i18n/locales/en/workspace.ts
+++ b/web-studio/src/i18n/locales/en/workspace.ts
@@ -208,6 +208,22 @@ const workspace = {
},
},
agentExperiencePage: {
+ setup: {
+ expand: 'Expand steps',
+ collapse: 'Collapse',
+ title: 'Give your Agent experience and evolution capabilities',
+ connect: 'Connect OpenViking to your Agent',
+ docs: 'View integration guide',
+ install: 'Install the experience Skill for your Agent',
+ hint: 'Run this command in your terminal and select your Agent when prompted.',
+ copy: 'Copy install command',
+ view: 'View command',
+ copied: 'Install command copied',
+ copyFailed: 'Copy failed. Expand the command and copy it manually.',
+ enable: 'Enable Agent Evolution',
+ enableHint:
+ 'Ask an account administrator to enable Agent Evolution so future session commits can generate experiences.',
+ },
title: 'Agent Experience',
description:
'Track experiences distilled from committed sessions, along with the trajectories and outcomes produced after they are applied.',
diff --git a/web-studio/src/i18n/locales/zh-CN/workspace.ts b/web-studio/src/i18n/locales/zh-CN/workspace.ts
index 5bcf6b7af..4238b8417 100644
--- a/web-studio/src/i18n/locales/zh-CN/workspace.ts
+++ b/web-studio/src/i18n/locales/zh-CN/workspace.ts
@@ -207,6 +207,21 @@ const workspace = {
},
},
agentExperiencePage: {
+ setup: {
+ expand: '展开步骤',
+ collapse: '收起',
+ title: '让你的 Agent 获得经验与进化能力',
+ connect: '将 OpenViking 接入你的 Agent',
+ docs: '查看接入指南',
+ install: '为你的 Agent 安装经验 Skill',
+ hint: '在终端运行以下命令,并按提示选择你使用的 Agent。',
+ copy: '复制安装命令',
+ view: '查看命令',
+ copied: '安装命令已复制',
+ copyFailed: '复制失败,请展开命令后手动复制。',
+ enable: '启用 Agent 进化',
+ enableHint: '由账号管理员开启 Agent 进化,让后续会话提交生成经验。',
+ },
title: 'Agent 经验',
description:
'跟踪从会话提交中沉淀的经验资产,以及经验被应用后的执行轨迹与结果分布。',
diff --git a/web-studio/src/routes/agent-experience/-components/evolution-settings-popover.tsx b/web-studio/src/routes/agent-experience/-components/evolution-settings-popover.tsx
index 76cfd7d64..3e8a28777 100644
--- a/web-studio/src/routes/agent-experience/-components/evolution-settings-popover.tsx
+++ b/web-studio/src/routes/agent-experience/-components/evolution-settings-popover.tsx
@@ -3,6 +3,7 @@ import { LoaderCircleIcon, SettingsIcon } from 'lucide-react'
import { useTranslation } from 'react-i18next'
import { toast } from 'sonner'
+import { Badge } from '#/components/ui/badge'
import { Button } from '#/components/ui/button'
import {
Popover,
@@ -92,6 +93,33 @@ export function EvolutionSettingsPopover() {
<SettingsIcon className="size-3.5" />
{t('settings.title')}
</PopoverTrigger>
+ <span
+ role="status"
+ className="inline-flex items-center text-xs text-muted-foreground"
+ >
+ {statusQuery.isError ? (
+ t('settings.loadFailed')
+ ) : statusQuery.isPending ? (
+ t('settings.loading')
+ ) : !matchesCurrentAccount ? (
+ t('settings.scopeMismatch')
+ ) : toggleMutation.isPending ? (
+ t('settings.pending')
+ ) : (
+ <Badge
+ variant="secondary"
+ className={
+ statusQuery.data.enabled
+ ? 'bg-emerald-500/10 text-emerald-700 dark:text-emerald-400'
+ : undefined
+ }
+ >
+ {statusQuery.data.enabled
+ ? t('settings.statusEnabled')
+ : t('settings.statusDisabled')}
+ </Badge>
+ )}
+ </span>
<PopoverContent align="end" className="w-80">
<PopoverHeader>
<PopoverTitle>{t('settings.title')}</PopoverTitle>
diff --git a/web-studio/src/routes/agent-experience/-components/experience-setup-guide.tsx b/web-studio/src/routes/agent-experience/-components/experience-setup-guide.tsx
new file mode 100644
index 000000000..2f413d777
--- /dev/null
+++ b/web-studio/src/routes/agent-experience/-components/experience-setup-guide.tsx
@@ -0,0 +1,156 @@
+import { useState } from 'react'
+import {
+ ChevronDownIcon,
+ ChevronUpIcon,
+ CopyIcon,
+ ExternalLinkIcon,
+ SparklesIcon,
+} from 'lucide-react'
+import { useTranslation } from 'react-i18next'
+import { toast } from 'sonner'
+
+import { Button } from '#/components/ui/button'
+import {
+ Popover,
+ PopoverContent,
+ PopoverDescription,
+ PopoverTitle,
+ PopoverTrigger,
+} from '#/components/ui/popover'
+import { copyTextToClipboard } from '#/lib/clipboard'
+
+import { EvolutionSettingsPopover } from './evolution-settings-popover'
+
+const INSTALL_COMMAND =
+ 'npx skills add https://github.com/volcengine/OpenViking/tree/main/examples/codex-memory-plugin/skills/ov-experience-memory'
+
+export function ExperienceSetupGuide() {
+ const [expanded, setExpanded] = useState(false)
+ const { t, i18n } = useTranslation('agentExperiencePage')
+ const docsLanguage = i18n.language.startsWith('zh') ? 'zh' : 'en'
+
+ async function copyCommand() {
+ try {
+ await copyTextToClipboard(INSTALL_COMMAND)
+ toast.success(t('setup.copied'))
+ } catch {
+ toast.error(t('setup.copyFailed'))
+ }
+ }
+
+ return (
+ <section
+ aria-labelledby="experience-setup-title"
+ className="rounded-xl border border-primary/25 bg-gradient-to-br from-primary/5 to-background px-4 py-3 sm:px-5"
+ >
+ <div className="flex flex-wrap items-center justify-between gap-3">
+ <div className="flex items-center gap-2">
+ <SparklesIcon className="size-5 shrink-0 text-primary" />
+ <h2 id="experience-setup-title" className="font-semibold">
+ {t('setup.title')}
+ </h2>
+ </div>
+ <Button
+ variant="outline"
+ size="sm"
+ aria-expanded={expanded}
+ aria-controls="experience-setup-steps"
+ onClick={() => setExpanded((value) => !value)}
+ >
+ {expanded ? t('setup.collapse') : t('setup.expand')}
+ {expanded ? <ChevronUpIcon /> : <ChevronDownIcon />}
+ </Button>
+ </div>
+ <div id="experience-setup-steps" hidden={!expanded}>
+ <ol className="mt-4 divide-y divide-border/60 text-sm">
+ <li className="flex flex-wrap items-center gap-3 py-3">
+ <StepNumber number={1} />
+ <span>{t('setup.connect')}</span>
+ <Button
+ render={
+ <a
+ href={`https://docs.openviking.ai/${docsLanguage}/agent-integrations/01-overview`}
+ target="_blank"
+ rel="noopener noreferrer"
+ />
+ }
+ nativeButton={false}
+ variant="outline"
+ size="sm"
+ >
+ {t('setup.docs')}
+ <ExternalLinkIcon />
+ </Button>
+ </li>
+ <li className="py-3">
+ <div className="flex flex-wrap items-center gap-3">
+ <StepNumber number={2} />
+ <span>{t('setup.install')}</span>
+ <Popover>
+ <PopoverTrigger
+ render={
+ <Button
+ variant="ghost"
+ size="sm"
+ className="text-primary"
+ />
+ }
+ >
+ {t('setup.view')}
+ </PopoverTrigger>
+ <PopoverContent
+ className="w-[min(28rem,calc(100vw-2rem))]"
+ sideOffset={8}
+ >
+ <PopoverTitle>{t('setup.install')}</PopoverTitle>
+ <PopoverDescription>{t('setup.hint')}</PopoverDescription>
+ <pre className="rounded-lg border bg-muted/50 p-4 text-xs leading-6 whitespace-pre-wrap break-all select-text">
+ <code>{INSTALL_COMMAND}</code>
+ </pre>
+ <Button
+ variant="ghost"
+ size="sm"
+ className="w-fit text-primary"
+ onClick={() => void copyCommand()}
+ >
+ <CopyIcon />
+ {t('setup.copy')}
+ </Button>
+ </PopoverContent>
+ </Popover>
+ <Button
+ variant="secondary"
+ size="sm"
+ onClick={() => void copyCommand()}
+ >
+ <CopyIcon />
+ {t('setup.copy')}
+ </Button>
+ </div>
+ </li>
+ <li className="py-3">
+ <div className="flex flex-wrap items-center gap-3">
+ <StepNumber number={3} />
+ <span>{t('setup.enable')}</span>
+ <EvolutionSettingsPopover />
+ </div>
+ <p className="mt-2 text-muted-foreground sm:ml-9">
+ {t('setup.enableHint')}
+ </p>
+ </li>
+ </ol>
+ </div>
+ </section>
+ )
+}
+
+function StepNumber({ number }: { number: number }) {
+ return (
+ <span
+ aria-hidden="true"
+ className="flex size-6 shrink-0 items-center justify-center rounded-full border border-dashed border-primary/50 text-xs font-medium text-primary"
+ >
+ {number}
+ </span>
+ )
+}
diff --git a/web-studio/src/routes/agent-experience/index.tsx b/web-studio/src/routes/agent-experience/index.tsx
index d676caaba..ceb249628 100644
--- a/web-studio/src/routes/agent-experience/index.tsx
+++ b/web-studio/src/routes/agent-experience/index.tsx
@@ -43,7 +43,7 @@ import { useAppConnection } from '#/hooks/use-app-connection'
import { isOvClientError } from '#/lib/ov-client'
import { cn } from '#/lib/utils'
-import { EvolutionSettingsPopover } from './-components/evolution-settings-popover'
+import { ExperienceSetupGuide } from './-components/experience-setup-guide'
import { ExperiencePreviewSheet } from './-components/experience-preview-sheet'
import { fetchExperiences } from './-lib/api'
import {
@@ -291,7 +291,6 @@ function AgentExperienceRoute() {
</p>
</div>
<div className="flex items-center gap-2">
- <EvolutionSettingsPopover />
<Button
type="button"
variant="outline"
@@ -309,6 +308,8 @@ function AgentExperienceRoute() {
</div>
</header>
+ <ExperienceSetupGuide />
+
{experiencesQuery.isLoading ? (
<Card className="min-h-56 items-center justify-center">
<div className="flex items-center gap-2 text-sm text-muted-foreground">