[Phase 4] Agent 异步执行 — 实现 execute_agent_task Celery 任务 #10

Closed
opened 2026-05-05 01:01:25 +08:00 by admin · 0 comments
Owner

背景

当前 execute_agent_task 是空壳占位符,定时调度(AgentSchedules)无法真正异步触发 Agent 执行。

需求

  1. 实现 Celery task execute_agent_task(agent_id, input_data)
  2. 支持定时调度器调用:到时间自动创建 execution 并异步执行
  3. 执行结果可查询(通过 execution_id 关联)
  4. 失败自动重试(Celery retry 机制)

涉及模块

  • backend/app/core/celery_app.py — Celery task 定义
  • backend/app/api/agent_schedules.py — 调度触发逻辑
  • backend/app/agent_runtime/core.py — AgentRuntime 复用

优先级

高 — Phase 4 核心需求

## 背景 当前 `execute_agent_task` 是空壳占位符,定时调度(AgentSchedules)无法真正异步触发 Agent 执行。 ## 需求 1. 实现 Celery task `execute_agent_task(agent_id, input_data)` 2. 支持定时调度器调用:到时间自动创建 execution 并异步执行 3. 执行结果可查询(通过 execution_id 关联) 4. 失败自动重试(Celery retry 机制) ## 涉及模块 - backend/app/core/celery_app.py — Celery task 定义 - backend/app/api/agent_schedules.py — 调度触发逻辑 - backend/app/agent_runtime/core.py — AgentRuntime 复用 ## 优先级 高 — Phase 4 核心需求
admin self-assigned this 2026-05-05 01:01:25 +08:00
admin closed this issue 2026-05-10 14:24:13 +08:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: admin/aiagent#10