@tpmjs/tools-prompt-to-workflow-skeleton
Creates workflow skeleton from natural language prompt. Analyzes the prompt to detect intent, identifies key actions, and generates a workflow structure with suggested tools. Optionally validates against available tools. Returns a skeleton with steps, suggested tools, and confidence score.
Test @tpmjs/tools-prompt-to-workflow-skeleton (promptToWorkflowSkeletonTool) with AI-powered execution
0/2000 characters
Install this tool and use it with the AI SDK
npm install @tpmjs/tools-prompt-to-workflow-skeletonpnpm add @tpmjs/tools-prompt-to-workflow-skeletonyarn add @tpmjs/tools-prompt-to-workflow-skeletonbun add @tpmjs/tools-prompt-to-workflow-skeletondeno add npm:@tpmjs/tools-prompt-to-workflow-skeletonimport { promptToWorkflowSkeletonTool } from '@tpmjs/tools-prompt-to-workflow-skeleton';import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { promptToWorkflowSkeletonTool } from '@tpmjs/tools-prompt-to-workflow-skeleton';
const result = await generateText({
model: openai('gpt-4o'),
tools: { promptToWorkflowSkeletonTool },
prompt: 'Your prompt here...',
});
console.log(result.text);Available configuration options
promptstringNatural language description of the desired workflow
availableToolsarrayOptional array of available tool names that can be used in the workflow
Schema extracted: 1/1/2026, 8:18:42 AM
Creates workflow skeleton from natural language prompt. Analyzes user intent and maps to available tools to generate a workflow structure.
npm install @tpmjs/tools-prompt-to-workflow-skeleton
import { promptToWorkflowSkeletonTool } from '@tpmjs/tools-prompt-to-workflow-skeleton'; const result = await promptToWorkflowSkeletonTool.execute({ prompt: 'Fetch user data from the API, validate it, and save it to the database', availableTools: [ 'fetchTool', 'validateTool', 'saveTool', 'logTool', 'errorHandlerTool', ], }); console.log(result); // { // skeleton: { // name: 'Fetch User Data', // description: 'Fetch user data from the API, validate it, and save it to the database', // steps: [ // { // stepNumber: 1, // toolName: 'fetch', // purpose: 'Fetch the data', // estimatedInputs: ['inputData'], // estimatedOutputs: ['output1'], // isAvailable: true // }, // { // stepNumber: 2, // toolName: 'validate', // purpose: 'Validate the data', // estimatedInputs: ['output1'], // estimatedOutputs: ['output2'], // isAvailable: true // }, // { // stepNumber: 3, // toolName: 'save', // purpose: 'Save the data', // estimatedInputs: ['output2'], // estimatedOutputs: ['output3'], // isAvailable: true // } // ] // }, // suggestedTools: [ // { // name: 'fetch', // reason: 'Required to fetch data in the workflow', // priority: 'high', // isAvailable: true // }, // ... // ], // confidence: 0.9, // analysis: { // detectedIntent: 'fetch transform save', // complexity: 'moderate', // estimatedSteps: 3, // keyActions: ['fetch', 'validate', 'save'] // } // }
{ prompt: string; // Natural language workflow description availableTools?: string[]; // Optional list of available tool names }
{ skeleton: { name: string; // Generated workflow name description: string; // Workflow description (from prompt) steps: Array<{ // Generated workflow steps stepNumber: number; toolName: string; // Suggested tool name purpose: string; // What this step does estimatedInputs: string[]; estimatedOutputs: string[]; isAvailable: boolean; // Whether tool is in availableTools list }>; }; suggestedTools: Array<{ // Recommended tools with reasoning name: string; reason: string; priority: 'high' | 'medium' | 'low'; isAvailable: boolean; }>; confidence: number; // 0-1 confidence score analysis: { detectedIntent: string; // Detected workflow pattern complexity: 'simple' | 'moderate' | 'complex'; estimatedSteps: number; keyActions: string[]; // Extracted action verbs }; }
The tool recognizes common patterns:
Confidence is calculated based on:
Higher confidence (>0.7) indicates the tool is confident about the generated skeleton.
const result = await promptToWorkflowSkeletonTool.execute({ prompt: 'Send a daily summary email with sales data', }); // Suggests: fetch → aggregate → format → send
const result = await promptToWorkflowSkeletonTool.execute({ prompt: 'Process images and generate thumbnails', availableTools: ['fetchImage', 'resizeImage', 'saveThumbnail'], }); // Marks tools as available/unavailable
const result = await promptToWorkflowSkeletonTool.execute({ prompt: 'Scrape product data, validate prices, filter deals, notify users', }); // Detects: scrape → validate → filter → notify pattern
MIT
Downloads/month
0
Quality Score