Support Bulk Import in AI Agent

Problem Statement

As an AI Agent user performing bulk operations, I experience connection drops and timeouts because the entire operation runs synchronously inside a single SSE stream. The full proxy chain (browser, Cloudflare, ALB, nginx, PHP-FPM) must stay alive for the duration of the operation. This results in partial completions, lost progress, and a poor user experience.

User Story

As an AI Agent user, I want bulk operations to execute in the background via Laravel job batches, so that the SSE chat stream stays lightweight and never disconnects regardless of operation duration.

Definition of Done (DoD)

A feature is done when:

  1. Given a bulk operation request, when the tool is invoked, then a Laravel Bus::batch() is dispatched and the SSE stream returns immediately with a status event.

  2. Given an active batch, when progress is made, the frontend can read batch progress via the existing SSE heartbeat or on next user message.

  3. Given a completed or failed batch, the result is available in conversation history even if the user closed the chat.

  4. This change will impact BulkOperationTool, BulkImportTool, AIAgentController, and the frontend progress handling.

  5. A dedicated queue connection (e.g. redis-ai-agent) is used, isolated from the main application queue.

  6. Limitations: the batch runs regardless of whether the user keeps the chat open. Real-time progress is best-effort via SSE heartbeat; the user can always see the final result on next visit.

Please authenticate to join the conversation.

Upvoters
Status

Done

Board
πŸ’‘

Pelcro Product

ETA
May 11, 2026
Date

7 days ago

Author

Rana Haleem

Subscribe to post

Get notified by email when there are changes.