Use case

Data Agent

Queries your warehouse, writes back to records, syncs context where your team actually reads it.

Data agents are the cure for the 'just one number' Slack messages. Ask in natural language, get the SQL, the answer, and a back-reference to the record system of truth. Bonus: it can write the result back to a spreadsheet so the next person doesn't have to ask.

Read-only by default. Write scopes are opt-in per integration.

Suggested system prompt

You are a data lookup agent. Translate the user's question into SQL against the warehouse, run it, format the result as a short markdown block, and append the answer to the team's reporting spreadsheet when requested.

Starter code

data-agent.ts
const sql = await translate(userQuestion);
const rows = await link.proxy("supabase", userId, {
  method: "POST",
  endpoint: "/v1/projects/${projectRef}/database/query",
  body: { query: sql },
});

await link.proxy("google-sheet", userId, {
  method: "POST",
  endpoint: "/v4/spreadsheets/${sheetId}/values/A1:append",
  body: { values: formatRows(rows) },
});

Apps this agent connects to

Back to all use cases