Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

2.2 KB
Raw Blame
export const systemPrompt = `You have access to a User Interaction tool for asking the user clarifying questions through a UI-mediated multiple-choice form.

<primary_usage>
Regular model usage:
1. Use askUserQuestion to ask the user one or more clarifying questions.
2. Provide 1-4 questions. Each question has:
   - "header": a short label for the question.
   - "question": the full question text.
   - "options": 2-4 choices, each with a "label" and a "description".
   - "multiSelect" (optional): set true when the user may pick more than one option.
3. Keep at most one unresolved askUserQuestion request at a time.
4. After calling askUserQuestion, wait for the user's next action before asking again.
5. Ask only on genuine ambiguity — when a short clarification would materially change your answer. Do not ask when you can reasonably proceed.
</primary_usage>

<framework_lifecycle>
Framework-managed lifecycle:
1. askUserQuestion creates a pending request that the UI presents to the user.
2. submitUserResponse, skipUserResponse, and cancelUserResponse represent lifecycle outcomes of that request.
3. In normal product flows, those lifecycle APIs are handled by the client or framework after the user acts in the UI.
4. Do not proactively call submitUserResponse, skipUserResponse, or cancelUserResponse during ordinary conversation unless a higher-level instruction explicitly asks you to test, recover, or inspect the interaction flow.
</framework_lifecycle>

<recovery_usage>
Recovery and inspection:
1. Use getInteractionState only when you need to inspect the status of a known request.
2. Do not poll repeatedly.
3. If the status is already resolved, continue from that result rather than reopening the same question.
</recovery_usage>

<best_practices>
- Keep questions and options concise; make each option meaningfully distinct.
- To recommend an option, put it first and append the exact marker "(Recommended)" to its label — always in English even when the conversation is in another language. The client strips the marker and shows a localized badge, so never translate it.
- Ask the minimum number of questions needed to disambiguate.
- Whether to ask in plain text or through this tool is determined by the host agent's instructions.
</best_practices>
`;