workflow-01
simple-ai/workflow-01FreeBlock
Build powerful AI agent workflows
Live preview
live · rendered by the registry
Rendered by simple-ai on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://simple-ai.dev/r/workflow-01.jsonSource
1"use client";23import {4 Background,5 Controls,6 type EdgeTypes,7 MiniMap,8 type NodeTypes,9 ReactFlow,10 ReactFlowProvider,11 useOnSelectionChange,12 useReactFlow,13} from "@xyflow/react";14import { type DragEvent, useCallback, useEffect, useState } from "react";15import { shallow } from "zustand/shallow";16import "@xyflow/react/dist/style.css";17import { useChat } from "@ai-sdk/react";18import { DefaultChatTransport } from "ai";19import { Workflow } from "lucide-react";20import { useTheme } from "next-themes";21import { SidebarTrigger } from "@/components/ui/sidebar";22import {23 AppHeader,24 AppHeaderIcon,25 AppHeaderSeparator,26 AppHeaderTitle,27} from "@/registry/blocks/workflow-01/components/app-header";28import {29 AppLayout,30 AppLayoutInset,31 AppLayoutSidebar,32} from "@/registry/blocks/workflow-01/components/app-layout";33import { Chat } from "@/registry/blocks/workflow-01/components/chat";34import { NodeEditorPanel } from "@/registry/blocks/workflow-01/components/node-editor-panel";35import { NodeSelectorPanel } from "@/registry/blocks/workflow-01/components/node-selector-panel";36import { TemplateSelector } from "@/registry/blocks/workflow-01/components/template-selector";37import { ThemeToggle } from "@/registry/blocks/workflow-01/components/theme-toggle";38import { ValidationStatus } from "@/registry/blocks/workflow-01/components/validation-status";39import { StatusEdge } from "@/registry/blocks/workflow-01/components/workflow/status-edge";40import { useWorkflow } from "@/registry/blocks/workflow-01/hooks/use-workflow";41import {42 DEFAULT_TEMPLATE,43 getTemplateById,44} from "@/registry/blocks/workflow-01/lib/templates";45import { getAllNodeDefinitions } from "@/registry/blocks/workflow-01/lib/workflow/nodes";46import type { WorkflowUIMessage } from "@/registry/blocks/workflow-01/types/messages";47import type { FlowNode } from "@/registry/blocks/workflow-01/types/workflow";4849const nodeDefinitions = getAllNodeDefinitions();50const nodeTypes: NodeTypes = {} as NodeTypes;51for (const definition of nodeDefinitions) {52 // biome-ignore lint/suspicious/noExplicitAny: ReactFlow nodeTypes accepts any component type53 nodeTypes[definition.shared.type] = definition.client.component as any;54}5556const edgeTypes: EdgeTypes = {57 status: StatusEdge,58};5960export function Flow() {61 const { theme } = useTheme();62 const store = useWorkflow(63 (store) => ({64 nodes: store.nodes,65 edges: store.edges,66 onNodesChange: store.onNodesChange,67 onEdgesChange: store.onEdgesChange,68// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from simple-ai
All 77 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| app-01app-01 | simple-ai | Blocks | Free | 5 deps · 11 files | |
| app-02app-02 | simple-ai | Blocks | Free | 3 deps · 5 files | |
| app-03app-03 | simple-ai | Blocks | Free | 4 deps · 9 files | |
| chat-01chat-01 | simple-ai | Blocks | Free | 3 deps · 16 files | |
| chat-02chat-02 | simple-ai | Blocks | Free | 2 deps · 3 files | |
| chat-03chat-03 | simple-ai | Blocks | Free | 2 deps · 3 files | |
| chat-04chat-04 | simple-ai | Blocks | Free | 3 deps · 13 files | |
| flow-chainflow-chain | simple-ai | Blocks | Free | 8 deps · 19 files |
