AI Suggestions
Endpoints for generating app creation suggestions based on available data sources and AI analysis.
GET /api/apps/suggestions
Get keyword-based app suggestions derived from the user's available datasets and toolkits.
Authentication: Required
Pre-requisites: AI feature must be enabled (ai.verify)
Response:
{
"suggested": [
{
"label": "Sales Dashboard",
"description": "Track revenue, orders, and sales performance",
"prompt": "Create a sales dashboard that shows revenue trends...",
"icon": "trending_up",
"color": "green"
}
],
"templates": [
{
"id": "kpi-dashboard",
"title": "KPI Dashboard",
"description": "Track key performance indicators with live metrics",
"icon": "speed",
"color": "blue",
"category": "template",
"prompt": "Create a KPI dashboard that..."
}
],
"meta": {
"source": "keyword-based",
"datasetsAnalyzed": 5,
"toolkitsAnalyzed": 2
}
}
Key Fields:
| Field | Description |
|---|---|
suggested | Data-driven suggestions based on dataset field names and toolkit types |
templates | Static template suggestions (KPI dashboard, data explorer, etc.) |
meta.source | Always "keyword-based" for this endpoint |
meta.datasetsAnalyzed | Number of datasets analyzed for pattern matching |
Pattern Matching:
Suggestions are generated by matching keywords in dataset field names against known patterns (sales, customer, inventory, employee, finance, project, shipping) and toolkit types (GitHub, Slack, Stripe, Jira, Salesforce).
POST /api/apps/suggestions
Generate AI-powered app suggestions using an LLM to analyze available data sources.
Authentication: Required
Pre-requisites: AI feature must be enabled (ai.verify)
Payload: None (empty body)
Response:
{
"suggestions": [
{
"label": "Sales Performance Tracker",
"description": "Monitor revenue trends and team performance with interactive charts",
"prompt": "Create an interactive sales dashboard using the Orders dataset...",
"icon": "trending_up",
"color": "green"
}
],
"meta": {
"source": "ai",
"datasetsAnalyzed": 5,
"queriesAnalyzed": 3,
"datasourcesAnalyzed": 2
}
}
Key Fields:
| Field | Description |
|---|---|
suggestions | AI-generated suggestions with detailed prompts referencing specific data sources |
meta.source | Always "ai" for this endpoint |
Behavior:
- Loads up to 10 each of the user's datasets, queries, and datasources to build context
- Uses an LLM to generate relevant app suggestions with specific prompts
- Falls back to keyword-based suggestions if the AI call fails
- Suggestions include detailed prompts that reference the user's actual data sources