Documentation Index
Fetch the complete documentation index at: https://docs.usecrow.ai/llms.txt
Use this file to discover all available pages before exploring further.
User suggestions are clickable buttons that appear above the chat input, giving users one-tap access to common actions.
Two Types
| Type | Set By | Persists |
|---|
| Page-level | Host app via window.crow() | Yes — reappears after each response |
| Agent-driven | Agent via suggest_actions tool | No — clears when user sends a message |
Page-Level Suggestions
Use window.crow('setSuggestedActions', [...]) to set persistent buttons for the current page. These reappear after every agent response.
// Show different buttons per page
window.crow('setSuggestedActions', [
{ label: 'Enrich contacts', message: 'Enrich owner contacts for these leads' },
{ label: 'Export', message: 'Export this list to CSV' },
]);
// Clear suggestions
window.crow('setSuggestedActions', []);
Each suggestion has:
- label — Button text shown to the user
- message — Text sent to the agent when clicked
Per-Page Example (Next.js)
import { useRouter } from 'next/router';
import { useEffect } from 'react';
function CrowSetup() {
const router = useRouter();
useEffect(() => {
const setSuggestions = () => {
if (!window.crow) {
setTimeout(setSuggestions, 200);
return;
}
if (router.pathname === '/leads') {
window.crow('setSuggestedActions', [
{ label: 'Enrich contacts', message: 'Enrich owner contacts' },
{ label: 'Add to list', message: 'Add these results to a new list' },
]);
} else if (router.pathname.startsWith('/myList')) {
window.crow('setSuggestedActions', [
{ label: 'Export', message: 'Export this list to CSV' },
]);
}
};
setSuggestions();
}, [router.pathname]);
return null;
}
Agent-Driven Suggestions
The agent can show buttons on demand by calling the suggest_actions tool. Add instructions to your agent’s system prompt telling it when to offer buttons:
Before running any enrichment, confirm the cost with suggest_actions buttons:
- "Yes, proceed (3 credits)"
- "Cancel"
The agent calls suggest_actions with an array of { label, message } objects. These buttons clear automatically when the user sends their next message.
Dashboard Config
You can also set initial suggestions (shown before the user types anything) from the dashboard under Agent > Suggestions. These are stored in your product config and appear on widget load.