# Data Agent

> Ask about your business in plain words and get the answer, a chart and how it got there. What the Data Agent can build, and its guardrails.

Source: https://tini.so/docs/agent

The **Data Agent** is an AI analyst that works on your real data. Ask it something in plain words. It looks at your metrics and tables, runs queries, checks what it finds, and answers with the numbers, a chart, and the steps it took. Open **Agent** in the sidebar to start.

> **Note**
>
> An admin turns the agent on once, in Settings → Agent. Until then, the Agent page says it isn’t set up yet. See [Set up the agent](https://tini.so/docs/agent/setup).

## What an answer looks like

An example answer, with illustrative numbers:

> **You:** Why did revenue drop last week?
>
> **Agent:** **Revenue fell 13% last week, to $10.4k.**
>
> - **One-time orders** dropped from $5.9k to $4.3k after the free-shipping banner ended on Tuesday.
> - **Subscriptions** held steady at $6.1k.
>
> [Chart card: Revenue by week ($k), stacked columns for subscriptions and one-time orders, with a chart-type menu, Customize and ⋯]
>
> How I got this: Checked the metrics · Ran 2 queries · 4 steps

1. **The answer first:** a headline and the few numbers that matter, in plain words.
2. **A chart you can change.** Switch the chart type from the card’s header, or click **Customize** for the same Data, Display and Format settings as [any chart](https://tini.so/docs/charts). Your changes stay on that card, and you can go back to the agent’s version. The **⋯** menu has **View SQL** and **Copy SQL**.
3. **How I got this**, folded away: every step in plain words, like “Checked the metrics” or “Ran a query · 3 rows”. Open it to check the agent’s work, SQL included.

## Asking good questions

Ask the way you’d ask a colleague. A few that work well:

| To | Try |
| --- | --- |
| Get your bearings | “What data do we have, and what does each table hold?” |
| Check a number | “How much revenue did we make last month?” |
| Find out why | “Why did revenue drop last week?” |
| Compare | “Do customers who start with the sampler stay longer?” |
| See your definitions | “Which certified metrics can I ask about?” |

- **Name the period.** “Last week”, “in August”, “since we launched the sampler”.
- **Follow up.** The agent remembers the chat: “Now split that by plan” works.
- **Define your key numbers.** With certified [metrics](https://tini.so/docs/metrics), the agent uses your definitions instead of guessing from column names, and says which one it used.

## How it finds answers

The agent works in steps, like an analyst would. For most questions it checks your certified metrics first, then your saved queries, and only writes new SQL when neither covers the question. Before writing SQL against a table, it reads the columns and a few sample rows. If a query fails, it reads the error, fixes the SQL and tries again.

### Long questions

Each model call is one step, and your organization sets how many steps one question can take (30 unless an admin changed it). When a question needs more, the agent stops to sum up what it has done so far and asks: *This is taking a while. Keep going?* Click **Continue** to carry on, or **Stop here**.

## Building things

Ask, and the agent builds it for you:

- **Charts and dashboards:** “Put weekly revenue and new customers on a dashboard called Monday.” It saves each chart as a query, creates the dashboard (or uses the one with that name), and places the charts.
- **Data models and metrics:** “Model our orders table and draft a revenue metric.” It checks what already exists, reads the table, writes a model with real descriptions, drafts the metric, and tests it.

The answer links to everything it made. New metrics are always **drafts**: review them on the Metrics page and certify the ones you trust.

> **Note: It creates, never edits or deletes**
>
> The agent can add new queries, dashboards, charts on a dashboard, data models and draft metrics. It has no way to edit or delete anything that exists, and it can’t certify metrics. It only builds when you ask. It doesn’t ask for approval first, so if it makes something you don’t want, delete it yourself.

## Choosing a model

Your admin picks a default model and up to eight more. Pick one for your next question from the menu in the chat box; your choice is remembered in this browser. Each answer says which model wrote it, which makes it easy to compare them.

## Chats

- Every chat is saved, with its charts, and has its own address. Open **Chat history** to find one: chats are grouped by Today, Yesterday, Previous 7 days and Older.
- Your first question names the chat. Rename or delete it from the history.
- A chat keeps working if you switch to another chat or leave the page, so a long question can finish while you do something else.
- Chats are private: only the person who started a chat can see it.
- The chat header shows how many tokens the chat has used, and its cost when your AI provider reports one. See [AI privacy and usage](https://tini.so/docs/agent/privacy-and-usage).

---

Previous: [Explore and query metrics](https://tini.so/docs/metric-queries.md) · Next: [Set up the agent](https://tini.so/docs/agent/setup.md)

All docs: https://tini.so/llms.txt
