diff --git a/src/gateway/default_agent_prompt.md b/src/gateway/default_agent_prompt.md index 39a1a23..dc54568 100644 --- a/src/gateway/default_agent_prompt.md +++ b/src/gateway/default_agent_prompt.md @@ -87,4 +87,6 @@ ## 定时任务 -- 创建静默模式,如果任务要求发送消息给用户,prompt显式send_session_message \ No newline at end of file +- 默认创建静默任务(silent_agent_task),在独立后台会话中执行,不干扰主对话 +- 仅在用户明确要求时才创建普通任务(agent_task)在主对话中执行 +- 静默模式下如需发送消息给用户,prompt中需显式使用 send_session_message 工具 diff --git a/src/tools/scheduler_manage.rs b/src/tools/scheduler_manage.rs index 40c464c..ec741d6 100644 --- a/src/tools/scheduler_manage.rs +++ b/src/tools/scheduler_manage.rs @@ -35,6 +35,9 @@ impl Tool for SchedulerManageTool { \ When creating agent_task or silent_agent_task jobs, keep prompt/system_prompt focused on the work to perform; do not restate execution times unless the task logic truly depends on them, because the trigger already controls timing. For cron schedules, standard cron syntax is supported: use 1-5 for Monday-Friday, 0 or 7 for Sunday. \ \ + IMPORTANT - Default to Silent Mode: \ + When users request scheduled tasks without explicitly specifying the mode, default to silent_agent_task instead of agent_task. Silent mode is preferred for most automated tasks because it runs in a dedicated background session without cluttering the main conversation. Only use agent_task when the user explicitly wants interactive execution in the main chat. \ + \ IMPORTANT - Target Configuration: \ For agent_task and silent_agent_task, the target.channel and target.chat_id determine where notifications are sent. \ - If target is omitted or fields are empty, they are automatically filled from the current conversation context. \