Skip to content

Self-improving AI Employees for everyone

refactor(client): Wave 3 Phase 1 Batch 1 - outputSchema on agents / Google / Android / WhatsApp

trohitgf1b2813041d2
diff --git a/client/src/factories/baseChatModelFactory.ts b/client/src/factories/baseChatModelFactory.ts
index 8dd7ca7e..a38b7986 100644
--- a/client/src/factories/baseChatModelFactory.ts
+++ b/client/src/factories/baseChatModelFactory.ts
@@ -85,6 +85,14 @@ export function createBaseChatModel(config: ChatModelConfig): INodeTypeDescripti
}
}
}],
+ outputSchema: {
+ response: 'string',
+ thinking: 'string',
+ model: 'string',
+ provider: 'string',
+ finish_reason: 'string',
+ timestamp: 'string',
+ },
properties: [
{
displayName: 'Model',
diff --git a/client/src/nodeDefinitions/aiAgentNodes.ts b/client/src/nodeDefinitions/aiAgentNodes.ts
index 7db8344d..1feb51ff 100644
--- a/client/src/nodeDefinitions/aiAgentNodes.ts
+++ b/client/src/nodeDefinitions/aiAgentNodes.ts
@@ -58,6 +58,14 @@ export const aiAgentNodes: Record<string, INodeTypeDescription> = {
type: 'main' as NodeConnectionType,
description: 'Agent output'
}],
+ outputSchema: {
+ response: 'string',
+ thinking: 'string',
+ model: 'string',
+ provider: 'string',
+ finish_reason: 'string',
+ timestamp: 'string',
+ },
properties: [
{
displayName: 'AI Provider',
@@ -207,6 +215,14 @@ export const aiAgentNodes: Record<string, INodeTypeDescription> = {
type: 'main' as NodeConnectionType,
description: 'response, model, provider, timestamp'
}],
+ outputSchema: {
+ response: 'string',
+ thinking: 'string',
+ model: 'string',
+ provider: 'string',
+ finish_reason: 'string',
+ timestamp: 'string',
+ },
properties: [
{
displayName: 'AI Provider',
diff --git a/client/src/nodeDefinitions/androidServiceNodes.ts b/client/src/nodeDefinitions/androidServiceNodes.ts
index 8279813c..9a43949e 100644
--- a/client/src/nodeDefinitions/androidServiceNodes.ts
+++ b/client/src/nodeDefinitions/androidServiceNodes.ts
@@ -19,6 +19,8 @@ function createAndroidServiceNode(config: {
group: string[];
description: string;
defaultAction: string;
+ /** Per-service output shape for InputSection's variable list. */
+ outputSchema?: Record<string, any>;
additionalProperties?: Array<{
displayName: string;
name: string;
@@ -62,6 +64,12 @@ function createAndroidServiceNode(config: {
description: 'Connect to Android Toolkit (top handle)'
}
],
+ outputSchema: config.outputSchema ?? {
+ service_id: 'string',
+ action: 'string',
+ data: 'object',
+ success: 'boolean',
+ },
properties: [
// Hidden service_id - automatically set based on node type
{
@@ -156,7 +164,14 @@ export const androidServiceNodes: Record<string, INodeTypeDescription> = {
color: '#4CAF50',
group: ['android', 'monitoring'],
description: 'Monitor battery status, level, charging state, temperature, and health',
- defaultAction: 'status'
+ defaultAction: 'status',
+ outputSchema: {
+ battery_level: 'number',
+ is_charging: 'boolean',
+ temperature_celsius: 'number',
+ health: 'string',
+ voltage: 'number',
+ },
}),
networkMonitor: createAndroidServiceNode({
@@ -167,7 +182,13 @@ export const androidServiceNodes: Record<string, INodeTypeDescription> = {
color: '#2196F3',
group: ['android', 'monitoring'],
description: 'Monitor network connectivity status, type, and internet availability',
- defaultAction: 'status'
+ defaultAction: 'status',
+ outputSchema: {
+ connected: 'boolean',
+ type: 'string',
+ wifi_ssid: 'string',
+ ip_address: 'string',
+ },
}),
systemInfo: createAndroidServiceNode({
@@ -178,7 +199,15 @@ export const androidServiceNodes: Record<string, INodeTypeDescription> = {
color: '#9C27B0',
group: ['android', 'monitoring'],
description: 'Get device and OS information including Android version, API level, memory, and hardware details',
- defaultAction: 'info'
+ defaultAction: 'info',
+ outputSchema: {
+ device_model: 'string',
+ android_version: 'string',
+ api_level: 'number',
+ manufacturer: 'string',
+ total_memory: 'number',
+ available_memory: 'number',
+ },
}),
location: createAndroidServiceNode({
@@ -189,7 +218,16 @@ export const androidServiceNodes: Record<string, INodeTypeDescription> = {
color: '#F44336',
group: ['android', 'monitoring'],
description: 'GPS location tracking with latitude, longitude, accuracy, and provider information',
- defaultAction: 'current'
+ defaultAction: 'current',
+ outputSchema: {
+ latitude: 'number',
+ longitude: 'number',
+ accuracy: 'number',
+ provider: 'string',
+ altitude: 'number',
+ speed: 'number',
+ bearing: 'number',
+ },
}),
// ============================================================================
@@ -205,6 +243,11 @@ export const androidServiceNodes: Record<string, INodeTypeDescription> = {
group: ['android', 'apps'],
description: 'Launch applications by package name',
defaultAction: 'launch',
+ outputSchema: {
+ package_name: 'string',
+ launched: 'boolean',
+ app_name: 'string',
+ },
additionalProperties: [
{
displayName: 'Package Name',
@@ -231,7 +274,8 @@ export const androidServiceNodes: Record<string, INodeTypeDescription> = {
color: '#00BCD4',
group: ['android', 'apps'],
description: 'Get list of installed applications with package names, versions, and metadata',
- defaultAction: 'list'
+ defaultAction: 'list',
+ outputSchema: { apps: 'array', count: 'number' },
}),
// ============================================================================
@@ -246,7 +290,13 @@ export const androidServiceNodes: Record<string, INodeTypeDescription> = {
color: '#3F51B5',
group: ['android', 'automation'],
description: 'WiFi control and scanning - enable, disable, get status, scan for networks',
- defaultAction: 'status'
+ defaultAction: 'status',
+ outputSchema: {
+ wifi_enabled: 'boolean',
+ ssid: 'string',
+ ip_address: 'string',
+ signal_strength: 'number',
+ },
}),
bluetoothAutomation: createAndroidServiceNode({
@@ -257,7 +307,12 @@ export const androidServiceNodes: Record<string, INodeTypeDescription> = {
color: '#2196F3',
group: ['android', 'automation'],
description: 'Bluetooth control - enable, disable, get status, and paired devices',
- defaultAction: 'status'
+ defaultAction: 'status',
+ outputSchema: {
+ bluetooth_enabled: 'boolean',
+ paired_devices: 'array',
+ connected_devices: 'array',
+ },
}),
audioAutomation: createAndroidServiceNode({
@@ -268,7 +323,12 @@ export const androidServiceNodes: Record<string, INodeTypeDescription> = {
color: '#E91E63',
group: ['android', 'automation'],
description: 'Volume and audio control - get/set volume, mute, unmute',
- defaultAction: 'get_volume'
+ defaultAction: 'get_volume',
+ outputSchema: {
+ music_volume: 'number',
+ ring_volume: 'number',
+ muted: 'boolean',
+ },
}),
deviceStateAutomation: createAndroidServiceNode({
diff --git a/client/src/nodeDefinitions/googleWorkspaceNodes.ts b/client/src/nodeDefinitions/googleWorkspaceNodes.ts
index aa789609..98dae7af 100644
--- a/client/src/nodeDefinitions/googleWorkspaceNodes.ts
+++ b/client/src/nodeDefinitions/googleWorkspaceNodes.ts
@@ -74,6 +74,22 @@ export const gmailNode: INodeTypeDescription = {
description: 'Connect to AI Agent tool handle'
}
],
+ outputSchema: {
+ operation: 'string',
+ // send
+ message_id: 'string',
+ thread_id: 'string',
+ // search / read
+ emails: 'array',
+ count: 'number',
+ subject: 'string',
+ from: 'string',
+ to: 'string',
+ date: 'string',
+ body: 'string',
+ snippet: 'string',
+ labels: 'array',
+ },
properties: [
// ===== OPERATION SELECTOR =====
{
@@ -255,6 +271,19 @@ export const gmailReceiveNode: INodeTypeDescription = {
type: 'main' as NodeConnectionType,
description: 'Received email (message_id, from, to, subject, body, date, labels, attachments)'
}],
+ outputSchema: {
+ message_id: 'string',
+ thread_id: 'string',
+ from: 'string',
+ to: 'string',
+ subject: 'string',
+ body: 'string',
+ snippet: 'string',
+ date: 'string',
+ labels: 'array',
+ attachments: 'array',
+ is_unread: 'boolean',
+ },
properties: [
ACCOUNT_MODE_PROPERTY,
CUSTOMER_ID_PROPERTY,
@@ -334,6 +363,20 @@ export const calendarNode: INodeTypeDescription = {
description: 'Connect to AI Agent tool handle'
}
],
+ outputSchema: {
+ operation: 'string',
+ event_id: 'string',
+ summary: 'string',
+ start: 'string',
+ end: 'string',
+ location: 'string',
+ description: 'string',
+ attendees: 'array',
+ status: 'string',
+ events: 'array',
+ count: 'number',
+ deleted: 'boolean',
+ },
properties: [
// ===== OPERATION SELECTOR =====
{
@@ -638,6 +681,22 @@ export const driveNode: INodeTypeDescription = {
description: 'Connect to AI Agent tool handle'
}
],
+ outputSchema: {
+ operation: 'string',
+ file_id: 'string',
+ name: 'string',
+ mime_type: 'string',
+ web_view_link: 'string',
+ web_content_link: 'string',
+ size: 'number',
+ content: 'string',
+ files: 'array',
+ count: 'number',
+ next_page_token: 'string',
+ permission_id: 'string',
+ role: 'string',
+ email: 'string',
+ },
properties: [
// ===== OPERATION SELECTOR =====
{
@@ -901,6 +960,19 @@ export const sheetsNode: INodeTypeDescription = {
description: 'Connect to AI Agent tool handle'
}
],
+ outputSchema: {
+ operation: 'string',
+ values: 'array',
+ range: 'string',
+ rows: 'number',
+ columns: 'number',
+ major_dimension: 'string',
+ updated_range: 'string',
+ updated_rows: 'number',
+ updated_columns: 'number',
+ updated_cells: 'number',
+ table_range: 'string',
+ },
properties: [
// ===== OPERATION SELECTOR =====
{
@@ -1051,6 +1123,18 @@ export const tasksNode: INodeTypeDescription = {
description: 'Connect to AI Agent tool handle'
}
],
+ outputSchema: {
+ operation: 'string',
+ task_id: 'string',
+ title: 'string',
+ notes: 'string',
+ due: 'string',
+ status: 'string',
+ completed: 'string',
+ tasks: 'array',
+ count: 'number',
+ deleted: 'boolean',
+ },
properties: [
// ===== OPERATION SELECTOR =====
{
@@ -1252,6 +1336,22 @@ export const contactsNode: INodeTypeDescription = {
description: 'Connect to AI Agent tool handle'
}
],
+ outputSchema: {
+ operation: 'string',
+ resource_name: 'string',
+ display_name: 'string',
+ given_name: 'string',
+ family_name: 'string',
+ email: 'string',
+ phone: 'string',
+ company: 'string',
+ job_title: 'string',
+ contacts: 'array',
+ count: 'number',
+ total_people: 'number',
+ next_page_token: 'string',
+ deleted: 'boolean',
+ },
properties: [
// ===== OPERATION SELECTOR =====
{
diff --git a/client/src/nodeDefinitions/specializedAgentNodes.ts b/client/src/nodeDefinitions/specializedAgentNodes.ts
index 108ab38e..890993f6 100644
--- a/client/src/nodeDefinitions/specializedAgentNodes.ts
+++ b/client/src/nodeDefinitions/specializedAgentNodes.ts
@@ -55,6 +55,17 @@ export const AI_AGENT_OUTPUTS = [
}
];
+// Runtime output shape shared by every LLM-backed agent node. Consumed by
+// InputSection to populate the draggable variable list for downstream nodes.
+export const AI_AGENT_OUTPUT_SCHEMA = {
+ response: 'string',
+ thinking: 'string',
+ model: 'string',
+ provider: 'string',
+ finish_reason: 'string',
+ timestamp: 'string',
+};
+
// ============================================================================
// SHARED AI AGENT PROPERTIES - Used by Specialized Agent Nodes
// ============================================================================
@@ -173,7 +184,8 @@ export const specializedAgentNodes: Record<string, INodeTypeDescription> = {
defaults: { name: 'Android Control Agent', color: dracula.green },
inputs: AI_AGENT_INPUTS,
outputs: AI_AGENT_OUTPUTS,
- properties: AI_AGENT_PROPERTIES
+ properties: AI_AGENT_PROPERTIES,
+ outputSchema: AI_AGENT_OUTPUT_SCHEMA,
},
// Coding Agent - AI Agent with code execution capabilities
@@ -188,7 +200,8 @@ export const specializedAgentNodes: Record<string, INodeTypeDescription> = {
defaults: { name: 'Coding Agent', color: dracula.cyan },
inputs: AI_AGENT_INPUTS,
outputs: AI_AGENT_OUTPUTS,
- properties: AI_AGENT_PROPERTIES
+ properties: AI_AGENT_PROPERTIES,
+ outputSchema: AI_AGENT_OUTPUT_SCHEMA,
},
// Web Control Agent - AI Agent with web automation capabilities
@@ -203,7 +216,8 @@ export const specializedAgentNodes: Record<string, INodeTypeDescription> = {
defaults: { name: 'Web Control Agent', color: dracula.pink },
inputs: AI_AGENT_INPUTS,
outputs: AI_AGENT_OUTPUTS,
- properties: AI_AGENT_PROPERTIES
+ properties: AI_AGENT_PROPERTIES,
+ outputSchema: AI_AGENT_OUTPUT_SCHEMA,
},
// Task Management Agent - AI Agent with task automation capabilities
@@ -218,7 +232,8 @@ export const specializedAgentNodes: Record<string, INodeTypeDescription> = {
defaults: { name: 'Task Management Agent', color: dracula.purple },
inputs: AI_AGENT_INPUTS,
outputs: AI_AGENT_OUTPUTS,
- properties: AI_AGENT_PROPERTIES
+ properties: AI_AGENT_PROPERTIES,
+ outputSchema: AI_AGENT_OUTPUT_SCHEMA,
},
// Social Media Agent - AI Agent with social messaging capabilities
@@ -233,7 +248,8 @@ export const specializedAgentNodes: Record<string, INodeTypeDescription> = {
defaults: { name: 'Social Media Agent', color: dracula.green },
inputs: AI_AGENT_INPUTS,
outputs: AI_AGENT_OUTPUTS,
- properties: AI_AGENT_PROPERTIES
+ properties: AI_AGENT_PROPERTIES,
+ outputSchema: AI_AGENT_OUTPUT_SCHEMA,
},
// Travel Agent - AI Agent with travel planning capabilities
@@ -248,7 +264,8 @@ export const specializedAgentNodes: Record<string, INodeTypeDescription> = {
defaults: { name: 'Travel Agent', color: dracula.orange },
inputs: AI_AGENT_INPUTS,
outputs: AI_AGENT_OUTPUTS,
- properties: AI_AGENT_PROPERTIES
+ properties: AI_AGENT_PROPERTIES,
+ outputSchema: AI_AGENT_OUTPUT_SCHEMA,
},
// Tool Agent - AI Agent for orchestrating multiple tools
@@ -263,7 +280,8 @@ export const specializedAgentNodes: Record<string, INodeTypeDescription> = {
defaults: { name: 'Tool Agent', color: dracula.yellow },
inputs: AI_AGENT_INPUTS,
outputs: AI_AGENT_OUTPUTS,
- properties: AI_AGENT_PROPERTIES
+ properties: AI_AGENT_PROPERTIES,
+ outputSchema: AI_AGENT_OUTPUT_SCHEMA,
},
// Productivity Agent - AI Agent for productivity and time management
@@ -278,7 +296,8 @@ export const specializedAgentNodes: Record<string, INodeTypeDescription> = {
defaults: { name: 'Productivity Agent', color: dracula.cyan },
inputs: AI_AGENT_INPUTS,
outputs: AI_AGENT_OUTPUTS,
- properties: AI_AGENT_PROPERTIES
+ properties: AI_AGENT_PROPERTIES,
+ outputSchema: AI_AGENT_OUTPUT_SCHEMA,
},
// Payments Agent - AI Agent for payment processing and financial operations
@@ -293,7 +312,8 @@ export const specializedAgentNodes: Record<string, INodeTypeDescription> = {
defaults: { name: 'Payments Agent', color: dracula.green },
inputs: AI_AGENT_INPUTS,
outputs: AI_AGENT_OUTPUTS,
- properties: AI_AGENT_PROPERTIES
+ properties: AI_AGENT_PROPERTIES,
+ outputSchema: AI_AGENT_OUTPUT_SCHEMA,
},
// Consumer Agent - AI Agent for consumer interactions and support
@@ -308,7 +328,8 @@ export const specializedAgentNodes: Record<string, INodeTypeDescription> = {
defaults: { name: 'Consumer Agent', color: dracula.purple },
inputs: AI_AGENT_INPUTS,
outputs: AI_AGENT_OUTPUTS,
- properties: AI_AGENT_PROPERTIES
+ properties: AI_AGENT_PROPERTIES,
+ outputSchema: AI_AGENT_OUTPUT_SCHEMA,
},
// Autonomous Agent - AI Agent for autonomous operations with Code Mode patterns
@@ -323,7 +344,8 @@ export const specializedAgentNodes: Record<string, INodeTypeDescription> = {
defaults: { name: 'Autonomous Agent', color: dracula.purple },
inputs: AI_AGENT_INPUTS,
outputs: AI_AGENT_OUTPUTS,
- properties: AI_AGENT_PROPERTIES
+ properties: AI_AGENT_PROPERTIES,
+ outputSchema: AI_AGENT_OUTPUT_SCHEMA,
},
// Orchestrator Agent - Coordinates multiple agents for complex workflows
@@ -355,7 +377,8 @@ export const specializedAgentNodes: Record<string, INodeTypeDescription> = {
default: '',
description: 'Enable team mode to coordinate connected teammate agents'
}
- ]
+ ],
+ outputSchema: AI_AGENT_OUTPUT_SCHEMA,
},
// AI Employee - Team lead node for coordinating multiple agents
@@ -394,7 +417,8 @@ export const specializedAgentNodes: Record<string, INodeTypeDescription> = {
typeOptions: { minValue: 1, maxValue: 20 },
description: 'Maximum concurrent task executions'
}
- ]
+ ],
+ outputSchema: AI_AGENT_OUTPUT_SCHEMA,
},
// RLM Agent - Recursive Language Model with REPL-based reasoning
@@ -450,7 +474,8 @@ export const specializedAgentNodes: Record<string, INodeTypeDescription> = {
default: false,
description: 'Enable detailed REPL output logging'
}
- ]
+ ],
+ outputSchema: AI_AGENT_OUTPUT_SCHEMA,
},
claude_code_agent: {
@@ -525,6 +550,7 @@ export const specializedAgentNodes: Record<string, INodeTypeDescription> = {
description: 'Working directory for Claude Code (empty = server default)',
},
],
+ outputSchema: AI_AGENT_OUTPUT_SCHEMA,
},
// Deep Agent - LangChain DeepAgents powered agent with filesystem, sub-agents, and planning
@@ -553,6 +579,7 @@ export const specializedAgentNodes: Record<string, INodeTypeDescription> = {
description: 'Maximum agentic loop iterations',
},
],
+ outputSchema: AI_AGENT_OUTPUT_SCHEMA,
}
};
diff --git a/client/src/nodeDefinitions/whatsappNodes.ts b/client/src/nodeDefinitions/whatsappNodes.ts
index 2acd69fc..4628e71b 100644
--- a/client/src/nodeDefinitions/whatsappNodes.ts
+++ b/client/src/nodeDefinitions/whatsappNodes.ts
@@ -105,6 +105,13 @@ export const whatsappNodes: Record<string, INodeTypeDescription> = {
description: 'Connect to AI Agent tool handle'
}
],
+ outputSchema: {
+ success: 'boolean',
+ message_id: 'string',
+ chat_id: 'string',
+ timestamp: 'string',
+ message_type: 'string',
+ },
properties: [
// ===== RECIPIENT =====
{
@@ -430,6 +437,29 @@ export const whatsappNodes: Record<string, INodeTypeDescription> = {
type: 'main' as NodeConnectionType,
description: 'Received message data (message_id, sender, sender_phone, chat_id, message_type, text, timestamp, is_group, is_from_me, group_info.sender_jid, group_info.sender_phone, group_info.sender_name)'
}],
+ outputSchema: {
+ message_id: 'string',
+ sender: 'string',
+ sender_phone: 'string',
+ chat_id: 'string',
+ message_type: 'string',
+ text: 'string',
+ timestamp: 'string',
+ is_group: 'boolean',
+ is_from_me: 'boolean',
+ push_name: 'string',
+ media: 'object',
+ group_info: {
+ group_jid: 'string',
+ sender_jid: 'string',
+ sender_phone: 'string',
+ sender_name: 'string',
+ },
+ newsletter_meta: {
+ edit_ts: 'number',
+ original_ts: 'number',
+ },
+ },
properties: [
// ===== MESSAGE TYPE FILTER =====
{
@@ -681,6 +711,47 @@ export const whatsappNodes: Record<string, INodeTypeDescription> = {
description: 'Connect to AI Agent tool handle'
}
],
+ outputSchema: {
+ operation: 'string',
+ // chat_history
+ messages: [{
+ text: 'string',
+ sender: 'string',
+ sender_phone: 'string',
+ message_type: 'string',
+ timestamp: 'string',
+ message_id: 'string',
+ is_from_me: 'boolean',
+ is_group: 'boolean',
+ push_name: 'string',
+ index: 'number',
+ }],
+ total: 'number',
+ has_more: 'boolean',
+ count: 'number',
+ chat_type: 'string',
+ // search_groups / list_contacts
+ groups: [{ jid: 'string', name: 'string', participant_count: 'number' }],
+ contacts: [{ jid: 'string', phone: 'string', name: 'string', push_name: 'string' }],
+ // get_group_info
+ participants: [{ jid: 'string', phone: 'string', name: 'string', is_admin: 'boolean' }],
+ // get_contact_info
+ jid: 'string',
+ phone: 'string',
+ name: 'string',
+ push_name: 'string',
+ business_name: 'string',
+ is_business: 'boolean',
+ is_contact: 'boolean',
+ profile_pic: 'string',
+ // channel operations
+ channels: [{ jid: 'string', name: 'string', subscriber_count: 'number' }],
+ channel_jid: 'string',
+ timestamp: 'string',
+ muted: 'boolean',
+ server_ids: 'string',
+ status: 'string',
+ },
properties: [
// ===== OPERATION SELECTOR =====
{