Files
sim/apps/docs/components/workflow-preview/academy-video-workflows.ts
T
Will Chen 3e710845da improvement(academy): set 2, pages for the new video wave (workflow embeds, 2K players, full sequencing) (#5382)
* academy: Chat section (intro, building) + Agents tool-calling and skills pages, sequenced in meta.json — pages for the four approved videos, blob src pattern, chapters offset by each recorded intro

* academy pages: Related documentation links point at real docs routes (mothership/agents/logs-debugging/deployment), not other academy videos

* academy: Tables — Workflow Columns page (combined-cut chapters, receipts pedagogy), sequenced after tables/intro

* academy set 2: five new pages (agents/block, agents/memory, knowledge-bases/connectors, tables/operations, files/object) + retimed chapters on the redone tables/files intros (recomposed/working-day cuts) + full meta.json sequencing — Chat · Agents(5) · Tables(3) · Files(2) · KB(2)

* academy pages: every page shows the VIDEO's workflow (new academy-video-workflows.ts registry — invoice intake, Qualify, memory, table ops, tools/skills agents, support-desk, content-agent) + plain pedagogical headings throughout (no poetry: 'The warm and cold split' → 'The same agent, with and without memory', 'From one pass to a loop' → 'What tools change', etc.); files/intro's embed swapped to the video's machine

* academy: all video players point at the 2K blob set (academy/<slug>.mp4) — 20 pages rewritten from academy-preview/*-light-with-intro, files/intro plays the new files-intro cut, workflows/logs gains its src (video now exists); use-case placeholders stay src-less (no videos yet)

* biome: format academy-video-workflows.ts

* fix (cursor/greptile): support-desk condition block uses branches + rows:[] (the renderer's real fields — conditions: was never read, so Urgent? rendered without if/else handles and branch edges dangled); bgColor aligned to the product condition example

* biome: format meta.json (CI lint:check)

* fix (cursor): Start exposes <start.input>, not <start.ticket>/<start.idea> — support-desk Triage and content-agent Writer message rows now match the product's Start output (same pattern as the file's other workflows)

* academy lesson material (CTO ask): FAQ on every lesson page + the index (grounded in the audited codebase facts: memory modes, the ten table ops, coerce/refuse, deploy surfaces + draft-vs-deployed, file parser formats; the FAQ component emits FAQPage JSON-LD for SEO); em-dashes 202 → 0 with hand-fixed splices; added copy where sparse (agent block placement, when-to-use-memory); SEO phrasing sprinkled naturally into FAQ answers ('visual platform for building AI workflows and agents', 'no-code', model names), not over-indexed

* fix: quote frontmatter descriptions that gained colons in the em-dash pass (unquoted YAML scalars with a second colon broke every page)
2026-07-02 18:35:59 -07:00

394 lines
11 KiB
TypeScript

import type { PreviewWorkflow } from './workflow-data'
/**
* Workflows shown in the academy videos, reproduced block-for-block so each
* page's written supplement shows the same machine the video builds. Rows and
* operation labels match the videos (which match the block registry).
*/
/** files/intro + files/object — the invoice intake machine. */
export const AV_INVOICE_INTAKE_WORKFLOW: PreviewWorkflow = {
id: 'av-invoice-intake',
name: 'Invoice intake',
blocks: [
{
id: 'gmailtrigger',
name: 'Gmail Email Trigger',
type: 'gmail',
bgColor: '#E0E0E0',
position: { x: 0, y: 0 },
hideTargetHandle: true,
rows: [{ title: 'Include Attachments', value: 'Enabled' }],
},
{
id: 'file',
name: 'File',
type: 'file',
bgColor: '#40916C',
position: { x: 340, y: 0 },
rows: [
{ title: 'Operation', value: 'Read' },
{ title: 'Files', value: '<gmailtrigger.attachments[0]>' },
],
},
{
id: 'agent',
name: 'Agent',
type: 'agent',
bgColor: '#33C482',
position: { x: 680, y: 0 },
rows: [
{ title: 'Messages', value: 'Extract the invoice fields' },
{ title: 'Model', value: 'claude-sonnet-4-6' },
{ title: 'Files', value: '<file.files[0]>' },
],
},
{
id: 'supabase',
name: 'Supabase',
type: 'supabase',
bgColor: '#1C1C1C',
position: { x: 1020, y: 0 },
rows: [
{ title: 'Operation', value: 'Create a Row' },
{ title: 'Table', value: 'invoices' },
{ title: 'Data', value: '<agent.content>' },
],
},
],
edges: [
{ id: 'trigger-file', source: 'gmailtrigger', target: 'file' },
{ id: 'file-agent', source: 'file', target: 'agent' },
{ id: 'agent-supabase', source: 'agent', target: 'supabase' },
],
}
/** agents/block — the Qualify agent the camera rides through. */
export const AV_QUALIFY_WORKFLOW: PreviewWorkflow = {
id: 'av-qualify',
name: 'Qualify a lead',
blocks: [
{
id: 'start',
name: 'Start',
type: 'start_trigger',
bgColor: '#2FB3FF',
position: { x: 0, y: 0 },
hideTargetHandle: true,
rows: [{ title: 'Input', value: 'Lead' }],
},
{
id: 'qualify',
name: 'Qualify',
type: 'agent',
bgColor: '#33C482',
position: { x: 340, y: 0 },
rows: [
{ title: 'Messages', value: 'Qualify this lead: <start.input>' },
{ title: 'Model', value: 'claude-sonnet-4-6' },
],
},
{
id: 'response',
name: 'Response',
type: 'response',
bgColor: '#2F55FF',
position: { x: 680, y: 0 },
rows: [{ title: 'Data', value: '<qualify.content>' }],
},
],
edges: [
{ id: 'start-qualify', source: 'start', target: 'qualify' },
{ id: 'qualify-response', source: 'qualify', target: 'response' },
],
}
/** agents/memory — the Support agent with Memory set to Conversation. */
export const AV_MEMORY_WORKFLOW: PreviewWorkflow = {
id: 'av-memory',
name: 'Support agent with memory',
blocks: [
{
id: 'start',
name: 'Start',
type: 'start_trigger',
bgColor: '#2FB3FF',
position: { x: 0, y: 0 },
hideTargetHandle: true,
rows: [{ title: 'Input', value: 'Customer message' }],
},
{
id: 'support',
name: 'Support',
type: 'agent',
bgColor: '#33C482',
position: { x: 340, y: 0 },
rows: [
{ title: 'Messages', value: '<start.input>' },
{ title: 'Model', value: 'claude-sonnet-4-6' },
{ title: 'Memory', value: 'Conversation · user-123' },
],
},
],
edges: [{ id: 'start-support', source: 'start', target: 'support' }],
}
/** tables/operations — the Table block with a filtered query. */
export const AV_TABLE_OPS_WORKFLOW: PreviewWorkflow = {
id: 'av-table-ops',
name: 'Query the tickets table',
blocks: [
{
id: 'start',
name: 'Start',
type: 'start_trigger',
bgColor: '#2FB3FF',
position: { x: 0, y: 0 },
hideTargetHandle: true,
rows: [{ title: 'Input', value: 'Run' }],
},
{
id: 'table',
name: 'Table 1',
type: 'table',
bgColor: '#10B981',
position: { x: 340, y: 0 },
rows: [
{ title: 'Operation', value: 'Query Rows' },
{ title: 'Table', value: 'tickets' },
{ title: 'Filter Conditions', value: 'priority equals high' },
],
},
],
edges: [{ id: 'start-table', source: 'start', target: 'table' }],
}
/** agents/tool-calling — the Qualify agent with research tools attached. */
export const AV_TOOLS_WORKFLOW: PreviewWorkflow = {
id: 'av-tools',
name: 'Qualify with tools',
blocks: [
{
id: 'start',
name: 'Start',
type: 'start_trigger',
bgColor: '#2FB3FF',
position: { x: 0, y: 0 },
hideTargetHandle: true,
rows: [{ title: 'Input', value: 'Lead' }],
},
{
id: 'qualify',
name: 'Qualify',
type: 'agent',
bgColor: '#33C482',
position: { x: 340, y: 0 },
rows: [
{ title: 'Messages', value: 'Qualify this lead: <start.input>' },
{ title: 'Model', value: 'claude-sonnet-4-6' },
],
tools: [
{ type: 'exa', name: 'Search', bgColor: '#1F40ED' },
{ type: 'github', name: 'GitHub', bgColor: '#181717' },
{ type: 'hubspot', name: 'CRM', bgColor: '#FF7A59' },
],
},
{
id: 'response',
name: 'Response',
type: 'response',
bgColor: '#2F55FF',
position: { x: 680, y: 0 },
rows: [{ title: 'Data', value: '<qualify.content>' }],
},
],
edges: [
{ id: 'start-qualify', source: 'start', target: 'qualify' },
{ id: 'qualify-response', source: 'qualify', target: 'response' },
],
}
/** agents/skills — the same agent with a skill attached. */
export const AV_SKILLS_WORKFLOW: PreviewWorkflow = {
id: 'av-skills',
name: 'Qualify with a skill',
blocks: [
{
id: 'start',
name: 'Start',
type: 'start_trigger',
bgColor: '#2FB3FF',
position: { x: 0, y: 0 },
hideTargetHandle: true,
rows: [{ title: 'Input', value: 'Lead' }],
},
{
id: 'qualify',
name: 'Qualify',
type: 'agent',
bgColor: '#33C482',
position: { x: 340, y: 0 },
rows: [
{ title: 'Messages', value: 'Qualify this lead: <start.input>' },
{ title: 'Model', value: 'claude-sonnet-4-6' },
{ title: 'Skills', value: 'answer-with-citations' },
],
tools: [{ type: 'exa', name: 'Search', bgColor: '#1F40ED' }],
},
],
edges: [{ id: 'start-qualify', source: 'start', target: 'qualify' }],
}
/** chat/intro — the support-desk workflow the chat operates. */
export const AV_SUPPORT_DESK_WORKFLOW: PreviewWorkflow = {
id: 'av-support-desk',
name: 'support-desk',
blocks: [
{
id: 'start',
name: 'Start',
type: 'start_trigger',
bgColor: '#2FB3FF',
position: { x: 0, y: 60 },
hideTargetHandle: true,
rows: [{ title: 'Input', value: 'Ticket' }],
},
{
id: 'triage',
name: 'Triage',
type: 'agent',
bgColor: '#33C482',
position: { x: 320, y: 60 },
rows: [
{ title: 'Messages', value: '<start.input>' },
{ title: 'Model', value: 'claude-sonnet-4-6' },
],
tools: [{ type: 'knowledge', name: 'Help Center', bgColor: '#00B0B0' }],
},
{
id: 'condition',
name: 'Urgent?',
type: 'condition',
bgColor: '#FF752F',
position: { x: 660, y: 60 },
rows: [],
branches: [
{ id: 'condition-if', label: 'If', value: '<triage.urgent>' },
{ id: 'condition-else', label: 'else' },
],
},
{
id: 'escalate',
name: 'Escalate',
type: 'slack',
bgColor: '#611F69',
position: { x: 1000, y: -40 },
rows: [{ title: 'Channel', value: '#support-urgent' }],
},
{
id: 'reply',
name: 'Reply',
type: 'agent',
bgColor: '#33C482',
position: { x: 1000, y: 160 },
rows: [{ title: 'Messages', value: 'Draft the reply' }],
},
{
id: 'log',
name: 'Log',
type: 'table',
bgColor: '#10B981',
position: { x: 1340, y: 60 },
rows: [
{ title: 'Operation', value: 'Insert Row' },
{ title: 'Table', value: 'tickets' },
],
},
],
edges: [
{ id: 'start-triage', source: 'start', target: 'triage' },
{ id: 'triage-condition', source: 'triage', target: 'condition' },
{
id: 'condition-escalate',
source: 'condition',
target: 'escalate',
sourceHandle: 'condition-if',
},
{ id: 'condition-reply', source: 'condition', target: 'reply', sourceHandle: 'condition-else' },
{ id: 'escalate-log', source: 'escalate', target: 'log' },
{ id: 'reply-log', source: 'reply', target: 'log' },
],
}
/** chat/building — the content-agent the chat builds: candidates drafted in
* parallel, media generated, an evaluator scoring, results kept. */
export const AV_CONTENT_AGENT_WORKFLOW: PreviewWorkflow = {
id: 'av-content-agent',
name: 'content-agent',
blocks: [
{
id: 'start',
name: 'Start',
type: 'start_trigger',
bgColor: '#2FB3FF',
position: { x: 0, y: 95 },
hideTargetHandle: true,
rows: [{ title: 'Input', value: 'Idea' }],
},
{
id: 'candidates',
name: 'Candidates',
type: 'parallel',
bgColor: '#1D1C1A',
position: { x: 320, y: 30 },
size: { width: 430, height: 170 },
rows: [],
},
{
id: 'writer',
name: 'Writer',
type: 'agent',
bgColor: '#33C482',
position: { x: 150, y: 62 },
parentId: 'candidates',
rows: [
{ title: 'Messages', value: '<start.input>' },
{ title: 'Model', value: 'claude-sonnet-4-6' },
],
},
{
id: 'evaluator',
name: 'Evaluator',
type: 'evaluator',
bgColor: '#8B5CF6',
position: { x: 840, y: 95 },
rows: [
{ title: 'Metrics', value: 'Voice · Hook' },
{ title: 'Content', value: '<writer.content>' },
],
},
{
id: 'scores',
name: 'Scores',
type: 'table',
bgColor: '#10B981',
position: { x: 1180, y: 95 },
rows: [
{ title: 'Operation', value: 'Insert Row' },
{ title: 'Table', value: 'scores' },
],
},
],
edges: [
{ id: 'start-candidates', source: 'start', target: 'candidates' },
{
id: 'candidates-writer',
source: 'candidates',
target: 'writer',
sourceHandle: 'parallel-start-source',
},
{ id: 'candidates-evaluator', source: 'candidates', target: 'evaluator' },
{ id: 'evaluator-scores', source: 'evaluator', target: 'scores' },
],
}