| name | sb-data-agent |
| description | Answer data and analytics questions using SecondBrain DataAgent — SQL execution, workflow runs, and LLM synthesis over the knowledge database. Use for questions about metrics, counts, trends, comparisons, or anything that sounds like "how many", "show me the data", "analyse", "what are the trends in". |
| when_to_use | Trigger when the user asks data questions like "how many", "show me stats", "analyse X", "what are the metrics for", "query the database", "run a report on". Prefer over secondbrain_ask when the question is clearly analytical. |
| allowed-tools | Bash(.venv/bin/sb data-agent *) |
| argument-hint | <data question> |
DataAgent Query
Answer the following data question using SecondBrain's DataAgent:
Question
$ARGUMENTS
How to answer
Use the secondbrain_ask MCP tool (it routes to DataAgent for analytical queries).
Or run directly:
.venv/bin/sb data-agent ask "$ARGUMENTS" --json 2>/dev/null
Output format
Answer
Data used
- Intent classified as: SQL / WORKFLOW / SYNTHESIS / CODE
- Sources:
- Rows returned:
Assumptions
List any assumptions made (e.g., date range, scope, filters applied).
Confidence
- Confidence: <0–100%>
- If low: explain why and what additional data would help
Caveats
Note any data quality issues, missing data, or limitations in the analysis.