OpenBI Docs Buy

How the agent works

Every agent that connects to OpenBI Studio gets the same briefing and the same guide. Here is what they say, so you know what to expect: the model’s numbers first, freedom where the model has none, every change in front of you, and nothing outward without you.

Numbers: the model’s measures first

The agent starts from the model’s measures, each with its OAX, description and display folder. When one of them gives the number you asked for, the agent uses it, in its own queries too, and names it. Its answer is then the number your reports show.

When no measure fits, the agent is free. It writes the OAX in its query, explores, answers, and tells you the expression is its own. That freedom is the point: you ask in business words, and the agent turns the question into an answer, whatever the model has prepared.

The agent’s queries and measures are OAX, OpenBI’s expression language. OAX is compatible with DAX, which agents know well, so they write it as they would DAX, with OpenBI’s own functions besides; the tools that run it keep DAX in their names, such as dax_query (see OAX and DAX).

Keeping a figure as a measure

A figure you will rely on or come back to deserves a name. The agent saves it as one of the model’s measures, with a format, a one-line description and a display folder named for why it exists, and says so. It is then there for the next question, on every report page, and for everyone who opens the model. On a live model it becomes one of the project’s own measures, beside the server’s.

To improve a measure you have open, the agent first checks that its rewrite gives the same results and how much faster it is, then proposes it in your formula bar: the line under the bar begins “The agent proposes:”, and Enter saves it (see Measures and OAX). Report pages name measures rather than carry OAX of their own, so a number lives in one place.

What the agent sees

  • What is open: the project, the model, the engine, the view you are looking at, and the OAX in your formula bar.
  • The model: tables, columns, relationships and measures, the queries that load them, roles.
  • Data: the rows its OAX and SQL queries return, a page at a time, and the previews of queries.
  • Pages: what a report page shows and why, and pictures of pages and of the studio.
  • Activity: what was done in the project, by you and by agents.

On a live model (Analysis Services, Power BI, Fabric) the server’s tables, columns and measures are read-only to the agent, as they are to you. What it reads goes to the agent’s AI provider: see Privacy.

Describing measures

An agent understands a measure as a person does, by its name, description, format and folder; on OpenBI Server, Viewers’ agents get descriptions, not formulas. Ask your agent to describe your measures (the studio’s Ask your agent to describe them copies the request): it calls measures_undescribed, which gives each measure without a description with its OAX, format, folder and the dimensions that slice it, drafts one line for each in the business’s words, and proposes them with measure_describe. They wait in the Model view’s Descriptions page until you accept or drop each one: nothing is saved before. See Describe your measures.

Changes as they happen, versions when you want them

The agent changes the open project as you would, and you see each change at once, in the studio and in the Activity panel. It says what it is about to change, and changes it in small steps.

The project is versioned with git. A change the agent makes is a change not yet saved as a version, like yours: the title bar counts them. The agent saves a version when you ask, with a message saying what changed and why; it can show you what changed since the last one first. Going back is the Versions view’s work (see Versions), and the report’s last change can be undone, as with Ctrl+Z.

Outward actions only when you ask

  • The agent publishes to OpenBI Server, shares a project or writes outside this computer only when you ask it to.
  • A person approves prediction and plan versions before they are used; the agent never does (see What a person approves).
  • Installing a plug-in opens the studio’s Install a plug-in window on the agent’s zip, with its checks: you choose Install and turn on, or Close and nothing is installed.
  • Sign-ins are yours: the agent asks, and you sign in in the studio’s window.

When a window waits for you, the studio asks for your attention without taking the keyboard, and the agent tells you which window it is.

Pages and PDFs looked at before “done”

The agent reads the report reference before its first page. After writing a page it checks it, fixes every error the check lists, and looks at a picture of it, also at a phone’s width. A PDF it makes, a notebook typeset as a paper or slides, comes back checked, with its pages to look at: the agent puts right what is flagged before it calls the work done.

Errors say how to fix them

When a call fails, the agent gets a code, a message and the fix, and does what the fix says. The failed call is a line in the Activity panel, with why.

Asking well

  • Ask in business words: “which products lost margin this quarter, and why?”
  • Say when a figure should be kept: “keep that as a measure in the Margin folder”.
  • Ask for the page you want to look at, and for a version when you like the result.
  • Ask what was done: the agent reads the project’s activity.

Last updated · OpenBI Studio 0.3.74