AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
TypeScript ai-agentai-agent-toolsai-agentsai-agents-frameworkmcpmcp-servermcp-toolsmcpsn8n-alternativeno-code-automationworkflowworkflow-automationworkflows
feat(ai): ui improvement (#16032)
Talal Jaberbff1c68f4ba9
diff --git a/bun.lock b/bun.lockindex b26c3ad75c1..757e7b28721 100644--- a/bun.lock+++ b/bun.lock@@ -348,7 +348,7 @@},"packages/pieces/community/ai": {"name": "@activepieces/piece-ai",- "version": "0.12.0",+ "version": "0.13.0","dependencies": {"@activepieces/core-piece-types": "workspace:*","@activepieces/core-utils": "workspace:*",diff --git a/packages/pieces/community/ai/package.json b/packages/pieces/community/ai/package.jsonindex 9b5ec85571a..47d2040f817 100644--- a/packages/pieces/community/ai/package.json+++ b/packages/pieces/community/ai/package.json@@ -1,6 +1,6 @@{"name": "@activepieces/piece-ai",- "version": "0.12.0",+ "version": "0.13.0","type": "commonjs","main": "./dist/src/index.js","types": "./dist/src/index.d.ts",diff --git a/packages/pieces/community/ai/src/index.ts b/packages/pieces/community/ai/src/index.tsindex 73de1f3a6a0..df17fc8241a 100644--- a/packages/pieces/community/ai/src/index.ts+++ b/packages/pieces/community/ai/src/index.ts@@ -11,6 +11,7 @@ import { runAgent } from "./lib/actions/agents/run-agent";export const ai = createPiece({displayName: "AI",+ description: 'Ask, summarize, classify, extract and create images with AI.',auth: PieceAuth.None(),minimumSupportedRelease: '0.93.0',categories: [diff --git a/packages/pieces/community/ai/src/lib/actions/agents/run-agent.ts b/packages/pieces/community/ai/src/lib/actions/agents/run-agent.tsindex c6f19a62315..cd9dd6d8fb7 100644--- a/packages/pieces/community/ai/src/lib/actions/agents/run-agent.ts+++ b/packages/pieces/community/ai/src/lib/actions/agents/run-agent.ts@@ -62,7 +62,7 @@ export const runAgent = createAction({name: 'run_agent',classification: 'WRITE',displayName: 'Run Agent',- description: 'Handles complex, multi-step tasks by reasoning through problems, using tools accurately, and iterating until the job is done.',+ description: 'Let an agent use tools and work step by step until the task is done.',aiMetadata: { description: 'Runs an agent that reasons over your prompt and calls the piece actions you attach to this step, iterating until the task is done. Pick it when the work needs tool use or an unknown number of steps; prefer askAi for a single prompt-in/answer-out call, or classifyText and extractStructuredData for one narrow analysis. Sub-flow, MCP and knowledge-base tools are not supported on this step. Requires a prompt and an AI Model; not idempotent, as the agent performs side effects through its tools.', idempotent: false },auth: PieceAuth.None(),props: {@@ -73,7 +73,7 @@ export const runAgent = createAction({}),[AgentPieceProps.PROMPT]: Property.LongText({displayName: 'Prompt',- description: 'Describe what you want the assistant to do.',+ description: 'Describe what you want the agent to do.',required: true,}),[AgentPieceProps.AI_PROVIDER_MODEL]: Property.Object({@@ -87,8 +87,8 @@ export const runAgent = createAction({properties: agentToolArrayItems,}),[AgentPieceProps.MAX_STEPS]: Property.Number({- displayName: 'Max steps',- description: 'The number of iterations the agent can do. Comes from the agent when the step runs a saved one.',+ displayName: 'Max Steps',+ description: 'Maximum number of steps before the agent stops.',required: false,defaultValue: 20,}),diff --git a/packages/pieces/community/ai/src/lib/actions/image/generate-image.ts b/packages/pieces/community/ai/src/lib/actions/image/generate-image.tsindex a27cac35a51..e9ab58a4a7b 100644--- a/packages/pieces/community/ai/src/lib/actions/image/generate-image.ts+++ b/packages/pieces/community/ai/src/lib/actions/image/generate-image.ts@@ -20,19 +20,19 @@ export const generateImageAction = createAction({name: 'generateImage',classification: 'READ',displayName: 'Generate Image',- description: 'Create unique, high-quality images from simple text descriptions using AI.',+ description: 'Create or edit images from a text description.',aiMetadata: { description: 'Generates an image from a text prompt with an image-capable model and writes it out as a flow file; when Input Images are attached and the model supports editing, it edits, varies, or merges those images instead of generating from scratch. Pick it for any image creation or edit step; use askAi or run_agent when you need text output. Requires a prompt plus an image-capable provider/model, and input images fail on a model that cannot accept them; not idempotent, as each call generates and stores a new image file.', idempotent: false },props: {provider: aiProps({ modelType: 'image' }).provider,model: aiProps({ modelType: 'image' }).model,prompt: Property.LongText({displayName: 'Prompt',+ placeholder: 'e.g. A watercolor fox in a snowy forest',required: true,}),inputImages: Property.Array({displayName: 'Input Images',- description:- 'Provide images for editing, variation, or merging. Support depends on the selected model.',+ description: 'Images to edit or combine. Not every model accepts them.',required: false,properties: {file: Property.File({@@ -119,7 +119,6 @@ export const generateImageAction = createAction({],},defaultValue: 'auto',- description: 'The background of the image.',displayName: 'Background',required: true,}),diff --git a/packages/pieces/community/ai/src/lib/actions/text/ask-ai.ts b/packages/pieces/community/ai/src/lib/actions/text/ask-ai.tsindex 3ff0d873e33..6e07304e711 100644--- a/packages/pieces/community/ai/src/lib/actions/text/ask-ai.ts+++ b/packages/pieces/community/ai/src/lib/actions/text/ask-ai.ts@@ -8,7 +8,7 @@ export const askAI = createAction({name: 'askAi',classification: 'READ',displayName: 'Ask AI',- description: 'A flexible AI step. ask it to analyze data, explain, draft, or decide based on your flow\'s data.',+ description: 'Ask AI to analyze, explain, draft or decide using your flow data.',aiMetadata: { description: 'Sends a free-form prompt to a text model and returns its answer, optionally continuing a multi-turn thread via a Conversation Key or grounding the reply with web search. Pick it for open-ended reasoning, drafting, or judgement over flow data; prefer summarizeText to condense text, classifyText for a fixed label set, extractStructuredData for typed fields, or run_agent when the task needs tools and multiple steps. Requires a provider/model plus a prompt; not idempotent, since each call generates a fresh answer and a Conversation Key appends the exchange to stored history.', idempotent: false },props: {provider: aiProps({ modelType: 'text' }).provider,@@ -16,28 +16,32 @@ export const askAI = createAction({prompt: Property.LongText({displayName: 'Prompt',required: true,+ placeholder: 'e.g. Draft a friendly reply to this customer email',}),conversationKey: Property.ShortText({displayName: 'Conversation Key',required: false,+ description: 'Same key in this flow continues the chat. Empty starts fresh.',+ placeholder: 'e.g. support-chat',}),creativity: Property.Number({displayName: 'Creativity',required: false,- description:- 'Controls the creativity of the AI response. A higher value will make the AI more creative and a lower value will make it more deterministic.',+ description: 'From 0 to 100. Lower is focused, higher is creative.',+ advanced: true,}),maxOutputTokens: Property.Number({displayName: 'Max Tokens',required: false,defaultValue: 2000,+ description: 'Longest reply allowed, in tokens. Raise it if a long reply fails or stops short.',+ advanced: true,}),webSearch: Property.Checkbox({displayName: 'Web Search',required: false,defaultValue: false,- description:- 'Whether to use web search to find information for the AI to use in its response.',+ description: 'Let the AI search the web before it answers.',}),webSearchOptions: buildWebSearchOptionsProperty((propsValue) => ({diff --git a/packages/pieces/community/ai/src/lib/actions/text/summarize-text.ts b/packages/pieces/community/ai/src/lib/actions/text/summarize-text.tsindex 2e64f0a1f2e..ae4dd9ce3c0 100644--- a/packages/pieces/community/ai/src/lib/actions/text/summarize-text.ts+++ b/packages/pieces/community/ai/src/lib/actions/text/summarize-text.ts@@ -21,11 +21,14 @@ export const summarizeText = createAction({defaultValue:'Summarize the following text in a clear and concise manner, capturing the key points and main ideas while keeping the summary brief and informative.',required: true,+ description: 'How to summarize. Edit it to change length, tone or focus.',}),maxOutputTokens: Property.Number({displayName: 'Max Tokens',required: false,defaultValue: 2000,+ description: 'Longest reply allowed, in tokens. Raise it if a long reply fails or stops short.',+ advanced: true,}),},async run(context) {diff --git a/packages/pieces/community/ai/src/lib/actions/utility/classify-text.ts b/packages/pieces/community/ai/src/lib/actions/utility/classify-text.tsindex 40b7a8ad008..ca28d5e0c4f 100644--- a/packages/pieces/community/ai/src/lib/actions/utility/classify-text.ts+++ b/packages/pieces/community/ai/src/lib/actions/utility/classify-text.ts@@ -7,18 +7,18 @@ export const classifyText = createAction({name: 'classifyText',classification: 'READ',displayName: 'Classify Text',- description: 'Categorize any text input using custom labels, so your flow knows what to do next.',+ description: 'Sort text into one of your categories to branch the flow.',aiMetadata: { description: 'Assigns exactly one label from a caller-supplied Categories list to a block of text using a text model, and errors if the model answers with anything outside that list. Pick it for routing or branching where the outcomes are known up front; use extractStructuredData for multiple typed fields, summarizeText to shorten text, or askAi when the answer is not one of a fixed set. Requires the text plus a non-empty Categories array matched by exact string, so keep labels short; read-only and idempotent.', idempotent: true },props: {provider: aiProps({ modelType: 'text' }).provider,model: aiProps({ modelType: 'text' }).model,text: Property.LongText({- displayName: 'Text to Classify',+ displayName: 'Text',required: true,}),categories: Property.Array({displayName: 'Categories',- description: 'Categories to classify text into.',+ description: 'The AI picks exactly one of these.',required: true,}),},diff --git a/packages/pieces/community/ai/src/lib/actions/utility/extract-structured-data.ts b/packages/pieces/community/ai/src/lib/actions/utility/extract-structured-data.tsindex 6d84673ad44..5e9068b40ea 100644--- a/packages/pieces/community/ai/src/lib/actions/utility/extract-structured-data.ts+++ b/packages/pieces/community/ai/src/lib/actions/utility/extract-structured-data.ts@@ -9,43 +9,43 @@ export const extractStructuredData = createAction({name: 'extractStructuredData',classification: 'READ',displayName: 'Extract Structured Data',- description: 'Accurately Pull names, amounts, and other structured data from emails, invoices, and scanned documents.',+ description: 'Pull names, amounts and other fields from text, images or PDFs.',aiMetadata: { description: 'Pulls typed fields out of unstructured input (text, images or PDFs) against a schema supplied either in simple mode, a list of field definitions, or advanced mode, a raw JSON Schema. Pick it when you need specific named values from documents such as invoices, receipts or emails; use classifyText for a single label, summarizeText for prose condensation, or askAi for open-ended analysis. At least one of Text or Files is required or the step throws; read-only and idempotent.', idempotent: true },props: {provider: aiProps({ modelType: 'text' }).provider,model: aiProps({ modelType: 'text' }).model,text: Property.LongText({displayName: 'Text',- description: 'Text to extract structured data from.',+ description: 'Text to extract from. Fill this, Files, or both.',required: false,}),files: Property.Array({displayName: 'Files',+ description: 'Images or PDFs to extract from.',required: false,properties: {file: Property.File({displayName: 'Image/PDF',- description: 'Image or PDF to extract structured data from.',required: false,}),},}),prompt: Property.LongText({- displayName: 'Guide Prompt',- description: 'Prompt to guide the AI.',+ displayName: 'Prompt',+ description: 'Extra guidance for the AI, like a date format to use.',defaultValue: 'Extract the following data from the provided data.',required: false,}),mode: Property.StaticDropdown<'simple' | 'advanced'>({displayName: 'Data Schema Type',- description: 'For complex schema, you can use advanced mode.',required: true,defaultValue: 'simple',+ display: 'cards',options: {disabled: false,options: [- { label: 'Simple', value: 'simple' },- { label: 'Advanced', value: 'advanced' },+ { label: 'Simple', value: 'simple', description: 'List fields', icon: 'sliders' },+ { label: 'Advanced', value: 'advanced', description: 'JSON Schema', icon: 'code' },],},}),@@ -60,8 +60,7 @@ export const extractStructuredData = createAction({return {fields: Property.Json({displayName: 'JSON Schema',- description:- 'Learn more about JSON Schema here: https://json-schema.org/learn/getting-started-step-by-step',+ description: 'JSON Schema for the output. See json-schema.org to learn more.',required: true,defaultValue: {type: 'object',@@ -80,24 +79,24 @@ export const extractStructuredData = createAction({}return {fields: Property.Array({- displayName: 'Data Definition',+ displayName: 'Fields',required: true,properties: {name: Property.ShortText({displayName: 'Name',- description:- 'Provide the name of the value you want to extract from the unstructured text. The name should be unique and short. ',+ description: 'Short, unique name for this value in the output.',+ placeholder: 'e.g. invoice_total',required: true,}),description: Property.LongText({displayName: 'Description',- description:- 'Brief description of the data, this hints for the AI on what to look for',+ description: 'Tells the AI what to look for.',+ placeholder: 'e.g. Total due, including tax',required: false,}),type: Property.StaticDropdown({displayName: 'Data Type',- description: 'Type of parameter.',+ description: 'Data type of the extracted value.',required: true,defaultValue: 'string',options: {@@ -110,7 +109,8 @@ export const extractStructuredData = createAction({},}),isRequired: Property.Checkbox({- displayName: 'Fail if Not present?',+ displayName: 'Required',+ description: 'Asks the AI to always fill this field. The step does not check it.',required: true,defaultValue: false,}),@@ -121,8 +121,10 @@ export const extractStructuredData = createAction({}),maxOutputTokens: Property.Number({displayName: 'Max Tokens',+ description: 'Longest reply allowed, in tokens. Raise it if a long reply fails or stops short.',required: false,defaultValue: 2000,+ advanced: true,}),},async run(context) {diff --git a/packages/pieces/community/ai/src/lib/common/props.test.ts b/packages/pieces/community/ai/src/lib/common/props.test.tsindex ad9fa347e2e..29d6240ff89 100644--- a/packages/pieces/community/ai/src/lib/common/props.test.ts+++ b/packages/pieces/community/ai/src/lib/common/props.test.ts@@ -129,6 +129,6 @@ describe('a provider the customer brought their own key for', () => {);expect(state.disabled).toBe(true);- expect(state.placeholder).toBe('Select AI Provider');+ expect(state.placeholder).toBe('Select a provider first');});});diff --git a/packages/pieces/community/ai/src/lib/common/props.ts b/packages/pieces/community/ai/src/lib/common/props.tsindex d6b09f929f3..8406ca2cc06 100644--- a/packages/pieces/community/ai/src/lib/common/props.ts+++ b/packages/pieces/community/ai/src/lib/common/props.ts@@ -118,7 +118,7 @@ export const aiProps = <T extends AIModelType>({return {disabled: true,options: [],- placeholder: 'Select AI Provider',+ placeholder: 'Select a provider first',};}diff --git a/packages/pieces/community/ai/src/lib/common/web-search.ts b/packages/pieces/community/ai/src/lib/common/web-search.tsindex 6c6ee9c2255..c1e81851fcd 100644--- a/packages/pieces/community/ai/src/lib/common/web-search.ts+++ b/packages/pieces/community/ai/src/lib/common/web-search.ts@@ -21,8 +21,8 @@ function buildWebSearchOptionsProps(provider: string, params?: { showIncludeSourrequired: false,defaultValue: 5,description: isOpenRouterProvider- ? 'For OpenRouter/Activepieces, this maps to OpenRouter web plugin max_results (1-10). Default is 5.'- : 'Maximum number of searches to use. Default is 5.',+ ? 'How many search results to fetch, from 1 to 10.'+ : 'Maximum number of web searches for one answer.',}),};@@ -32,7 +32,7 @@ function buildWebSearchOptionsProps(provider: string, params?: { showIncludeSourincludeSources: Property.Checkbox({displayName: 'Include Sources',description:- 'Whether to include the sources in the response. Useful for getting web search details (e.g. search queries, searched URLs, etc).',+ 'Returns text and sources as separate fields instead of plain text.',required: false,defaultValue: false,}),@@ -44,25 +44,29 @@ function buildWebSearchOptionsProps(provider: string, params?: { showIncludeSourdisplayName: 'User Location - City',required: false,description:- 'The city name for localizing search results (e.g., San Francisco).',+ 'City to localize search results to.',+ placeholder: 'San Francisco',}),userLocationRegion: Property.ShortText({displayName: 'User Location - Region',required: false,description:- 'The region or state for localizing search results (e.g., California).',+ 'Region or state to localize search results to.',+ placeholder: 'California',}),userLocationCountry: Property.ShortText({displayName: 'User Location - Country',required: false,description:- 'The country code for localizing search results (e.g., US).',+ 'Two-letter country code to localize search results to.',+ placeholder: 'US',}),userLocationTimezone: Property.ShortText({displayName: 'User Location - Timezone',required: false,description:- 'The IANA timezone ID for localizing search results (e.g., America/Los_Angeles).',+ 'IANA time zone to localize search results to.',+ placeholder: 'America/Los_Angeles',}),};@@ -73,11 +77,12 @@ function buildWebSearchOptionsProps(provider: string, params?: { showIncludeSourdisplayName: 'Allowed Domains',required: false,description:- 'List of domains to search (e.g., example.com, docs.example.com/blog). Domains should not include HTTP/HTTPS scheme. Subdomains are automatically included unless more specific subpaths are provided. Overrides Blocked Domains if both are provided.',+ 'Search only these domains, without http://. Subdomains count too.',properties: {domain: Property.ShortText({displayName: 'Domain',required: true,+ placeholder: 'example.com',}),},}),@@ -85,11 +90,12 @@ function buildWebSearchOptionsProps(provider: string, params?: { showIncludeSourdisplayName: 'Blocked Domains',required: false,description:- 'List of domains to exclude from search (e.g., example.com, docs.example.com/blog). Domains should not include HTTP/HTTPS scheme. Subdomains are automatically included unless more specific subpaths are provided. Overrided by Allowed Domains if both are provided.',+ 'Never search these domains. Ignored when Allowed Domains is set.',properties: {domain: Property.ShortText({displayName: 'Domain',required: true,+ placeholder: 'example.com',}),},}),@@ -112,7 +118,7 @@ function buildWebSearchOptionsProps(provider: string, params?: { showIncludeSour],},description:- 'High level guidance for the amount of context window space to use for the search.',+ 'How much search content the AI reads. Higher is slower and costs more.',}),...userLocationOptions,};