PRD-38.2: Extended Widgets

Version: 1.0 Status: 🟡 Planned Priority: HIGH Author: Automatos AI Platform Team Last Updated: 2026-01-27 Dependencies: PRD-38.1 (Widget-Ready Workspace) Timeline: Weeks 4-5


Executive Summary

Building on the widget foundation from Phase 1, this phase adds 5 new widget types to support the full range of Automatos tools and capabilities:

Widget
Source Tools
Key Capability

EmailWidget

Composio Gmail/Outlook

View, compose, reply to emails

TerminalWidget

Shell execution tools

Command output display

WorkflowWidget

Workflow orchestrator

Status, steps, control

MemoryWidget

Memory system

Context inspection

FileWidget

File operations

Preview, download, manage


1) Goals & Success Metrics

Goals

ID
Goal
Description

G1

Full Tool Coverage

All major tool categories have a dedicated widget

G2

Email Integration

Users can manage emails directly from the workspace

G3

Workflow Visibility

Complete transparency into workflow execution

G4

Memory Transparency

Users can see and manage AI memory/context

G5

File Management

File operations are visual and intuitive

Success Metrics

Metric
Target
Measurement

All 5 widgets implemented

100%

Feature completion

Email widget handles 100+ emails

Smooth scrolling

Performance test

Terminal supports ANSI colors

Working

Visual QA

Workflow shows real-time updates

< 1s lag

Timing test

Memory widget loads in < 500ms

Working

Performance test


2) Widget Specifications

2.1 EmailWidget

Purpose: Display, compose, and manage emails from Composio integrations (Gmail, Outlook, etc.)

Source Tools:

  • GMAIL_SEND_EMAIL

  • GMAIL_LIST_EMAILS

  • GMAIL_GET_EMAIL

  • GMAIL_REPLY_EMAIL

  • OUTLOOK_SEND_EMAIL

  • OUTLOOK_LIST_EMAILS

Data Structure:

Component Structure:

⚠️ Security: Email HTML Rendering (XSS Prevention)

The EmailWidgetData.bodyHtml field contains raw HTML from email providers which is a significant XSS risk. The following security measures are required in EmailViewer.tsx:

Content-Security-Policy for EmailViewer:

Implementation Checklist for EmailViewer.tsx:

Features:

UI Mockup:


2.2 TerminalWidget

Purpose: Display command execution output with proper formatting (ANSI colors, scrollback)

Source Tools:

  • execute_command

  • run_script

  • shell_execute

  • Any MCP tool that returns terminal output

Data Structure:

Component Structure:

Features:

Libraries:

  • ansi-to-html or ansi-to-react for ANSI parsing

UI Mockup:


2.3 WorkflowWidget

Purpose: Display workflow execution status, steps, and provide control actions

Source Tools:

  • run_workflow

  • get_workflow_status

  • pause_workflow

  • resume_workflow

  • cancel_workflow

Data Structure:

Component Structure:

Features:

UI Mockup:


2.4 MemoryWidget

Purpose: Display AI memory/context that was injected or stored during the conversation

Source Tools:

  • Memory injection events

  • store_memory tool

  • recall_memory tool

  • Memory system internals

Data Structure:

Component Structure:

Features:

UI Mockup:


2.5 FileWidget

Purpose: Display file information, preview content, and provide file operations

Source Tools:

  • read_file

  • write_file

  • list_files

  • delete_file

  • move_file

  • copy_file

  • File upload results

Data Structure:

Component Structure:

Features:

UI Mockup:


3) Implementation Plan

Week 4: EmailWidget + TerminalWidget

Day
Task

1-2

EmailWidget - List view and email viewer

3

EmailWidget - Compose and reply

4

TerminalWidget - Output with ANSI support

5

Integration testing

Week 5: WorkflowWidget + MemoryWidget + FileWidget

Day
Task

1-2

WorkflowWidget - Status and steps

3

MemoryWidget - List and search

4

FileWidget - Preview and actions

5

Integration testing and polish


4) Files to Create


5) Tool Router Updates

Add new mappings to router.ts:


6) Dependencies


7) Testing Checklist

EmailWidget

TerminalWidget

WorkflowWidget

MemoryWidget

FileWidget


8) Backend Requirements

New Streaming Events

API Endpoints Needed


9) Success Criteria

Phase 2 is complete when:


10) References


Document Version: 1.0 Created: 2026-01-27 Estimated Implementation: 2 weeks

Last updated