[Feature] Speed up LLM-generated welcome message and give agent template context
Summary
Keep the two existing template messages but make the third LLM-generated message arrive significantly faster. Tell the welcome agent that two template messages have already been sent so it generates a concise, non-redundant follow-up.
Problem
src/openhuman/agent/welcome_proactive.rs sends three messages in sequence:
- 4s delay → dynamic greeting with time-of-day and detected channels (lines 106-158)
- 10s delay → "Getting everything ready for you..." (lines 174-180)
- Agent LLM response — personalized welcome after tool calls and reasoning
The first two templates are fine — they give the user something to see while the LLM works. But the third message (the actual LLM response) takes too long to arrive. The user is left staring at "Getting everything ready..." for an extended period.
Additionally, the welcome agent doesn't know that two template messages have already been shown. This means it can repeat greetings or context that the templates already covered.
Solution
Speed up the LLM message:
- Optimize the proactive welcome flow so the agent's first LLM response arrives faster
- Consider starting the agent inference in parallel with the template message delays rather than sequentially
- Reduce unnecessary tool calls on the first turn if possible (e.g. if connection state is injected via #593, agent doesn't need to call
composio_list_connections)
Agent context:
- Update the welcome agent prompt (
prompt.md) to inform the agent that two template messages have already been sent to the user - Include what those templates said (time-of-day greeting, detected channels, "getting ready" message)
- Agent should NOT repeat greetings or "welcome" — it should jump straight into the personalized, context-aware part
- The LLM message should feel like a natural continuation of the templates, not a fresh start
Acceptance criteria
- [ ] Faster LLM message — Third message (LLM-generated) arrives noticeably faster than current flow
- [ ] Template context in prompt — Agent prompt tells the agent what template messages were already sent
- [ ] No redundancy — Agent doesn't repeat greetings or context already in the templates
- [ ] Natural continuation — LLM message feels like a continuation of the template messages, not a separate greeting
- [ ] Templates preserved — First two template messages unchanged
Related
- Files:
src/openhuman/agent/welcome_proactive.rs,src/openhuman/agent/agents/welcome/prompt.md - Related: #593 (inject connection state — could reduce first-turn tool calls)
- Part of: Conversational onboarding agent epic
Parent: #599 — Conversational onboarding agent
@sanil-23 to help here