Problem
Vague requests like "sell on every week" cause the agent to either fail with tool errors or hallucinate parameter values. The system prompt has a few narrow clarification rules but no general framework for handling broadly incomplete requests.
tk ticket: sa-xeyj
Root Cause
The system prompt focuses on routing clear intents to tools, not detecting/resolving incomplete intents. No instruction like "if you cannot determine [sell asset, buy asset, amount], ask before calling any tool."
Fix (prompt-only, no tool code changes)
Add a <clarification-rules> section to the system prompt that:
- Defines minimum required params per intent (swaps: sell/buy/amount; TWAP: sell/buy/amount/duration; etc.)
- Instructs agent to batch all missing params into one clarifying question
- Handles common vague patterns with intelligent defaults/suggestions
- Never fabricates parameter values
Key Files
apps/agentic-server/src/routes/chat.ts — buildSystemPrompt()
Acceptance Criteria
Problem
Vague requests like "sell on every week" cause the agent to either fail with tool errors or hallucinate parameter values. The system prompt has a few narrow clarification rules but no general framework for handling broadly incomplete requests.
tk ticket:
sa-xeyjRoot Cause
The system prompt focuses on routing clear intents to tools, not detecting/resolving incomplete intents. No instruction like "if you cannot determine [sell asset, buy asset, amount], ask before calling any tool."
Fix (prompt-only, no tool code changes)
Add a
<clarification-rules>section to the system prompt that:Key Files
apps/agentic-server/src/routes/chat.ts—buildSystemPrompt()Acceptance Criteria