agentscope-ai / agentscope-ai/agentscope
feat(channel): integrate channel with scheduled task mechanism
- Linguagem predominante
- Python
- Estrelas
- 31.5k
- Forks
- 3.5k
- Merge médio
- 1d 23h
- PRs com merge (30d)
- 95
Descrição
**Background**
Currently, channels in Agent Service are purely reactive, responding only to incoming messages. Integrating channels with the scheduled task mechanism will enable agents to be triggered proactively at specified times, allowing them to complete tasks autonomously and deliver results through the corresponding channel.
**Changes**
- **Frontend**: add a channel selector component (based on Shadcn `DropdownMenu`) to `CreateScheduleDialog`
- **Backend**: support executing scheduled tasks with a specified channel; if the channel is not active at the time of execution, it should be started automatically
- When a channel is deleted, scheduled tasks should tolerate invalid channel ID references gracefully and ensure Agent Service does not crash
> **TBD**: The integration approach between scheduled tasks and channels requires further discussion. There are two candidate designs:
> 1. The scheduled task only provides the agent with channel-related tools (e.g. `SendMessage`), so the agent can proactively send messages to specified users or groups. In this case, the session is owned by Agent Service, and the channel is used purely as an output target.
> 2. The entire scheduled task runs within a channel conversation, where all agent utterances and tool calls are routed to the channel. In this case, selecting a channel alone is insufficient — a specific conversation must be selected. However, since Agent Service passively discovers conversations through channels, this raises potential routing conflicts: for example, if group chat A is currently routed to session B, but the scheduled task runs in session C, group chat A would then be bound to both session B and session C, which needs to be carefully handled for compatibility.
Guia de contribuição
Avaliação
Esta issue ainda não foi avaliada.