guan404ming opened a new issue, #70093:
URL: https://github.com/apache/airflow/issues/70093

   ## Why 
   
   LLM calls in LLMOperator / AgentOperator block a worker slot for the whole 
API call (30s to minutes). Airflow's deferral mechanism fits this perfectly.
   
   ## Proposal
   
   Step 1 — LLMTrigger + deferrable LLMOperator
   
   - Run the LLM call in the triggerer via async agent.run(), freeing the 
worker slot
   - deferrable=True on LLMOperator, rehydrate output_type on resume
   - Chain with require_approval (HITL) so the whole flow never holds a worker
   
   Step 2 — Deferrable subclasses
   
   - LLMBranchOperator (branch on resume)
   - LLMSQLOperator, LLMSchemaCompareOperator
   
   Step 3 — AgentTrigger for AgentOperator
   
   - Multi-turn agent in the triggerer, message history serialized
   - Toolsets rebuilt from serializable spec (conn_id + hook path)
   - Durable-storage replay on triggerer restart, no re-billed LLM calls
   
   ## Use case
   
   - Hundreds of concurrent LLM tasks without holding hundreds of worker slots
   - Long-running reasoning/agent tasks (10+ min) become cheap to run


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to