Skip to content

File Upload Support in Chat for Plan Creation and Runtime Execution #30

@nehmetohmedb

Description

@nehmetohmedb

Problem

Users cannot upload files through the chat interface to provide context for plan creation or runtime execution. This limits the ability to:

  • Share requirements documents for better plan generation
  • Provide data files for processing during execution
  • Include configuration files or templates as context
  • Upload API specifications or examples

Why This Matters

  • Enhanced Context: Files provide rich context that improves AI understanding and plan quality
  • Data Processing: Many workflows require processing uploaded data files
  • User Experience: Drag-and-drop file upload is expected in modern chat interfaces
  • Flexibility: Different file types serve different purposes (docs for planning, data for execution)
  • Integration: Leverages existing upload infrastructure while extending chat capabilities

What's Missing

  • No file upload button or drag-and-drop support in chat UI
  • Chat messages cannot include file attachments
  • Dispatcher doesn't process file content as context
  • Execution configurations don't support file inputs
  • No way to reference uploaded files during plan creation or execution

Desired Outcome

Users can upload files directly in the chat interface that are automatically processed as context for plan generation and made available as inputs during execution. The system intelligently uses file content based on the operation type.

Proposed Implementation

Frontend Changes

  1. Add file upload button next to send button in chat
  2. Support drag-and-drop files into chat area
  3. Display attached files as chips/badges in messages
  4. Extend ChatMessage type to include attachments array

Backend Changes

  1. Extend DispatcherRequest to include file attachment IDs
  2. Read and process file content in dispatcher service
  3. Add file_inputs field to CrewConfig for runtime execution
  4. Support multiple file formats (text, JSON, YAML, CSV, PDF)

Integration Points

  • Leverage existing /upload/knowledge endpoints
  • Store files temporarily for chat session
  • Clean up files after execution completes
  • Pass file content to LLM for context-aware generation

Impact

Significantly improves the platform's ability to handle real-world use cases where file context is essential for generating accurate plans and executing data-driven workflows. Makes the chat interface more powerful and user-friendly.

Labels

enhancement, chat-interface, file-upload, user-experience, dispatcher

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions