import { Button } from "@/components/ui/button"; import { ImportWorkflowButton } from "./ImportWorkflowButton"; import { useNavigate } from "react-router-dom"; import { useMutation, useQueryClient } from "@tanstack/react-query"; import { getClient } from "@/api/AxiosClient"; import { useCredentialGetter } from "@/hooks/useCredentialGetter"; import { WorkflowCreateYAMLRequest } from "./types/workflowYamlTypes"; import { stringify as convertToYAML } from "yaml"; import { WorkflowApiResponse } from "./types/workflowTypes"; import { PlusIcon, ReloadIcon } from "@radix-ui/react-icons"; const emptyWorkflowRequest: WorkflowCreateYAMLRequest = { title: "New Workflow", description: "", workflow_definition: { blocks: [], parameters: [], }, }; function WorkflowsPageBanner() { const navigate = useNavigate(); const credentialGetter = useCredentialGetter(); const queryClient = useQueryClient(); const createNewWorkflowMutation = useMutation({ mutationFn: async () => { const client = await getClient(credentialGetter); const yaml = convertToYAML(emptyWorkflowRequest); return client.post< typeof emptyWorkflowRequest, { data: WorkflowApiResponse } >("/workflows", yaml, { headers: { "Content-Type": "text/plain", }, }); }, onSuccess: (response) => { queryClient.invalidateQueries({ queryKey: ["workflows"], }); navigate(`/workflows/${response.data.workflow_permanent_id}/edit`); }, }); return (

Workflows

Workflows let you create complex web-agents that can:
1
Save browser sessions and re-use them in subsequent runs
2
Connect multiple agents together to carry out complex objectives
3
Allow Skyvern agents to execute non-browser tasks such as sending emails, or parsing PDFs
); } export { WorkflowsPageBanner };