Skip to main content
Plexara
Field notes / governance

Every call your agent makes states its purpose

An AI agent that can query your warehouse leaves a question behind: what did it run, and why? On Plexara every query and API call carries the purpose the agent stated for it, every session can be opened long after it ended, and every saved report names the calls it was built from.

9-minute readGovernance

The question every AI data deployment gets asked

When a person queries a warehouse, you can ask them what they ran and why. They can open the statement, point at the question it answered, and say whether it was for a board deck, a masking review, or a close. That conversation is still how most data teams do audit: you ask the person.

An AI agent that can query the same warehouse breaks the conversation. The agent ran dozens of statements. Some failed. Some produced a dashboard. The person who asked the original question may not have seen any of them. A manager who has to sign off on AI data access, and an auditor who has to reconstruct what happened, both ask the same thing: what did it run, and why.

If the only record is the chat transcript, the answer is a reconstruction. Transcripts mix the question, the false starts, the retries, and the prose around the calls. They are hard to search, they expire with the client, and they do not say which statement actually produced the dashboard someone is looking at. If the platform recorded each call with the purpose the agent stated for it, the answer is a page you can open. That is the record Plexara keeps.

A stated purpose before every call

Before Plexara runs a query or calls an API, the assistant states in one sentence what the call is for. The line is the question behind the query, not a restatement of it. SELECT * FROM finance.regional_performance LIMIT 500 is the statement. "Finding which datasets carry customer email so they can be masked." is the purpose.

That distinction is the point of the line. A statement says what ran. A purpose says why anyone would have run it, in words a person who never saw the SQL can still read. It is also the only line about the call a person wrote (through the agent they are talking to), which is why it leads every row later: in My Calls, in a session timeline, in the provenance of a saved report.

On the ACME demo deployment, the catalog includes "Checking whether Q3 revenue fell in the western region for the board deck." The statement under it is a SELECT against inventory.return_rates. A later reader does not have to infer the board deck from the table name. A purpose that restates the SQL ("query the return rates table") would not have been useful. The useful line names the decision the call was meant to inform.

Four calls from the catalog, each with a stated purpose

PurposeConnectionOutcomeDetail

Establishing the current definition of an active account for the exec summary.

SQL · SELECT * FROM inventory.supply_chain_orders LIMIT 100

acme-warehousesatisfied2.3s

Finding which datasets carry customer email so they can be masked.

SQL · SELECT * FROM finance.regional_performance LIMIT 500

acme-warehousesatisfied2 later sessions

Checking whether Q3 revenue fell in the western region for the board deck.

SQL · SELECT * FROM inventory.return_rates LIMIT 1000

acme-stagingran-

Reconciling the finance close against the warehouse totals for October.

SQL · SELECT * FROM retail.return_rates LIMIT 1000

acme-warehouseran-
Rows from My Calls on the ACME demo deployment. The purpose leads every row because it is the only line about the call a person wrote. Outcome is derived on each read: two of these queries were later named by an asset and read as satisfied; two succeeded and nothing has been built from them yet, so they still read as ran.

A session you can open

Activity has My Sessions beside the overview. A session is every tool call sharing one session id, readable long after it ended, as far back as audit history reaches.

Each row carries the session's kind (Agent, Portal run, Script run, or Transport), the persona it ran as, how many calls it made, how many of them failed, and what it left behind. Facets narrow the list: a time window of 24 hours, 7 days, 30 days, or all time (the list opens on 7 days), session kind, sessions with at least one failed call, and sessions that saved at least one asset.

The list is always your own. There is no user column. A session id belonging to someone else is answered as not found, the same answer an id that was never used gets. Administrators read every session from Admin.

Open a row and the detail shows the session at a glance: calls, failures, wall-clock duration, and the assets and insights it produced. Below that is the timeline: its calls in the order they were made, each with the purpose the agent stated, the connection it went to, whether it succeeded, and how long it took. The page is addressable, so you can bookmark it. A colleague who is not an administrator will get a not-found, because a session opens only for the person who ran it.

On the ACME demo, one Agent session (dps_9f2c1a4bd1c0f9e8c5a4b3e2) shows 61 calls, one failure, one saved asset (Q4 Revenue Dashboard), and fourteen insights, some applied, some still pending, one rejected. The My Sessions list around it shows the other kinds in the same window: a Portal run of seven calls, a second Agent session of 67 calls with four failures, and a Transport session of nine. Kind, persona, call count, failures, and what was produced sit on the row before anyone opens it.

The Session detail page for an Agent session whose id begins dps_9f2c1a4b, started 8/29/2026 at 1:58:49 PM, with summary cards for 61 calls, 1 failed call, a duration of 127 hours 16 minutes, 1 asset, and 14 insights, an Assets panel naming Q4 Revenue Dashboard, and an Insights list showing applied, rejected, and pending review statuses.
One session, opened. The summary is what it produced; the insights sit with the review status each is sitting at. Administrators read every session from Admin. Anyone else opening a session they did not run is answered as not found.

My Calls, and what came of each one

My Calls is the catalog of every query against a query engine and every invocation through the API gateway, kept with the reason stated for it and what came of the result. Each row leads with the purpose and carries the statement under it. Facets narrow by kind (SQL or API), connection, outcome, and free text over the purpose and the statement. Awaiting review keeps the records that answered something and have not been published or declined, most re-run first.

The Outcome column is what the catalog exists for, and it is derived on every read rather than stored. Four values cover the life of a call. satisfied means something was built from it and named it: an asset or a capture whose sources cite it, or an export citing the statement it streamed. failed means the call returned an error. superseded means a later read in the same session addressed the same resource, and nothing was built from this one. ran means the call succeeded and nothing has come of it yet.

Deriving the outcome rather than storing it means it cannot be stale with respect to the asset that gives it meaning. Save an asset citing a query and the query reads satisfied on the next read, with nothing to backfill. Naming, not proximity, is the rule: an asset saved without naming its sources still records every call the session made in its provenance, and those calls still read as ran. What makes a call satisfied is an artifact naming it.

A query that answered a question can be published as a saved query in the catalog, associated with every dataset it reads. An API call can be published as a saved example on its endpoint, shown to whoever reads that endpoint's schema next. A record you decide is not worth publishing can be declined with a note, which stops it being offered.

On the ACME catalog, "Establishing the current definition of an active account for the exec summary" reads satisfied against acme-warehouse. "Finding which datasets carry customer email so they can be masked" also reads satisfied, and two later sessions found that record and ran what it holds; that reuse count is the one signal on a record that a stranger, not its author, found it worth running. "Checking whether Q3 revenue fell in the western region for the board deck" still reads ran: it succeeded, and nothing has been built from it yet.

How a call's outcome is derived

OutcomeWhat it means
satisfiedSomething was built from the call and named it: an asset or a capture whose sources cite it, or an export citing the statement it streamed.
failedThe call returned an error.
supersededA later read in the same session addressed the same resource, and nothing was built from this one.
ranThe call succeeded and nothing has come of it yet.
The four outcomes My Calls computes on every read. They are not stored. Save an asset that names a query and the query reads satisfied on the next open, with nothing to backfill.
The My Calls tab of Activity listing queries and API calls with columns for when, purpose, connection, outcome, and reuse. Visible purposes include Establishing the current definition of an active account for the exec summary, Finding which datasets carry customer email so they can be masked, and Checking whether Q3 revenue fell in the western region for the board deck, with outcomes of satisfied and ran, against connections acme-warehouse, acme-staging, and acme-billing-api.
My Calls leads with the purpose, then the statement, then what came of the result. A query a later session re-ran shows a reuse count; a query nothing has been built from still reads as ran.

A report that names the calls it was built from

Every save records the queries and API calls the asset was built from. Each captured call names its kind (a SQL statement, an API request, or another data call), the connection it ran against, the purpose the agent stated, how long it took, and whether it failed. A failed call is shown, not hidden, because it is part of how the answer was reached.

The asset viewer groups those calls by capture, one per time the asset was written, so a revised asset shows what fed each of its versions. The newest capture is shown expanded; earlier ones sit behind a disclosure. Opening a call shows the full statement or request, its outcome, and a copyable reference. The panel also links to the session the work belongs to, which holds every call that session made, before and after the write.

The assistant can name the exact calls it used. When it does, the capture is marked Cited, and those named calls are what make the catalog rows read as satisfied. A capture the platform took from the session window around the save is the record of what the session did; being in that window is not a claim that a given call produced the asset. Saving a second asset in the same session records the calls made since the first save, not the whole session again.

On a Weekly Inventory Report in the demo, the provenance of version 1 still shows a failed query: "Summing stock per warehouse for the weekly report," 95 milliseconds, TABLE_NOT_FOUND on inventory.level. The next call, same purpose, succeeded in 1.1 seconds. Hiding the miss would make the record of the work untrue. The person who opens the report next week can see how the answer was reached, including the wrong table name that did not survive.

The asset viewer open on Q4 Revenue Dashboard version 5, with KPI tiles for total revenue 4.2 million dollars, average order value 847 dollars, 4,958 total orders, and a 3.2 percent return rate, a revenue-by-region bar chart, and a Provenance panel in the sidebar listing two SQL Trino Query calls against acme-warehouse, one of them carrying the purpose Establishing the current definition of an active account for the exec summary, a Cited badge, and an Open session control.
Provenance on a saved report. Each capture is one write, grouped by version, with the purpose, connection, and duration of every call that write was built from. Open session walks back to the session those calls belong to.

A failed query stays in the record

SQL · Trino Query · 95ms

failed

Summing stock per warehouse for the weekly report.

SELECT warehouse, SUM(quantity) FROM inventory.level GROUP BY warehouse

warehouse

TABLE_NOT_FOUND: inventory.level

SQL · Trino Query · 1.1s

ran

Summing stock per warehouse for the weekly report.

SELECT warehouse, SUM(qty) FROM warehouse GROUP BY warehouse

warehouse

Version 1 of the Weekly Inventory Report on the ACME demo. The first call missed the table, 95 milliseconds, TABLE_NOT_FOUND. The next call, same purpose, succeeded in 1.1 seconds. Provenance keeps both, because the miss is part of how the answer was reached.

The agent remembers its own work the same way

The assistant finds its own past work the way a person does: by what it was for, not by an id it kept. Ask what it ran last Tuesday and search matches the caller's own sessions against the purposes their calls stated and the names of the assets they saved. A hit carries a session reference. Fetch opens one: its summary, the assets and insights it produced (each as a reference to follow), and its call timeline in order. Every call on that timeline carries the purpose stated for it, and a call the catalog recorded also carries its kind, its outcome, and the reference that reads the record in full.

The scope is the same as My Sessions. An agent recalls the sessions of the person it is acting for and no one else's. Another person's session id is answered as not found.

Ask the assistant what it ran

Recalling a session by what its calls were for

What the agent calls. This is the exchange the agent has with Plexara on your behalf, shown for the technical reader. You ask in plain language; you never type any of it.

search query="what did I run last Tuesday for the board deck"
→ sessions
    mcp:session:dps_9f2c1a4bd1c0f9e8c5a4b3e2
    Agent · 61 calls · 1 failed · Q4 Revenue Dashboard

fetch mcp:session:dps_9f2c1a4bd1c0f9e8c5a4b3e2
→ timeline
    purpose  Establishing the current definition of an active account for the exec summary.
    kind     SQL · acme-warehouse · satisfied · 2.3s
    purpose  Checking whether Q3 revenue fell in the western region for the board deck.
    kind     SQL · acme-staging · ran
search matches the caller's own sessions against the purposes their calls stated. fetch opens one. Another person's session id is answered as not found, the same as an id that never ran.

Automated work stays in the audit log and out of the catalog

The catalog of calls exists so the next person can find the query that already answered a question. Automated work was crowding it out: a pipeline fetching through the same tools people use writes a record per fetch that nobody will ever re-run.

Calls made by a managed script's run, and by the accounts that drive ingestion, are recorded in the audit trail as before and kept out of that catalog. Records written before the distinction was drawn are cleared, with anything that was built on, promoted, declined, or re-run kept whoever produced it. The catalog stays a list of calls a person might re-run. The audit page still names the principal behind each option, so a script run reads as that script rather than as its owner.

This week: open Activity, read one of your sessions all the way through the timeline, and publish one query that worked so the next person starts from something that already answered the question.

Related reading

governance
Governance

403 - Sharing prompts, and closing the loop with feedback

A procedure is only worth as much as the people who can run it. Plexara distributes a prompt two ways: a direct share to one teammate, or a promotion to a whole role or company through the admin review queue. A shared prompt is live, not a copy. Feedback threads then carry corrections back, with a validation step and a path into the knowledge catalog, and the deprecate-and-supersede lifecycle retires old versions cleanly.

Governance

505 - Next month’s file

The new sheet arrives. Replacing the file’s content writes a new revision, and the registered table keeps reading the old one until it is registered again under the same name; the Scratch Tables page says so. This lesson covers the two cases that look alike and behave differently, moving the table forward, unregistering, what deleting the file does, saving the monthly procedure as a prompt, and the point at which a monthly file needs more than a join, which is where the 600 series begins.

Governance

605 - What a run may do, and the record it leaves

A run presents the roles its author held at the save, every call is authorized at that moment, and narrowing the persona takes effect on the next run. A save refuses a credential-shaped literal and source that does not parse. The dialect has no network, no filesystem, and no clock, so everything a script does is a platform call audited under the script’s own identity. The lifecycle from active to disabled, deprecated, and superseded; who sees what; ownership and an administrator’s transfer; and the administrator’s view of every script and every run.