Osy#betaRun it on Osyrin: osyrin.com

Reference / Agent

Osysharp.Agents.Inspector — one piece of an agent's work, readable by a person who was not there

`Osysharp.Agents.Inspector` draws one page for one piece of work: who asked and for whom, as which account it ran, what it was given and handed back, every step in order, each proposal and who decided, each question and its answer, the work it handed on, what it spent, and whether its record still checks.

previewagentsguidekit

Source on GitHub: Osysharp.Agents.Inspector — github.com/osysharp/agents/inspector ↗

You are here: Building with agents › The kits › Agents.Inspector

Summary#

Osysharp.Agents.Inspector draws one page for one piece of work: who asked and for whom, as which account it ran, what it was given and handed back, every step in order, each proposal and who decided, each question and its answer, the work it handed on, what it spent, and whether its record still checks.

It changes nothing and widens nothing: everything is read as whoever is looking. The person the work was for reads it with what it said; a supervisor reads that each step happened; a piece of work that is not the reader's says so and shows nothing.

PackageOsysharp.Agents.Inspector, version 1.2.0
You add it withuse Osysharp.Agents.Inspector; in the app's manifest.
It sits on[[agent-kit-agents|Agents]], [[agent-kit-llm|Llm]]
It also usesIdentity, Ui — parts of the platform's own library
Its own test appA small weather station whose daily bulletin is drafted by an agent — kits/agents-inspector/tests

Description#

What do you get without writing anything?#

  • One line on a page of yours — WorkInspector(task) — is the whole page.
  • Each step has a link, so a person can be sent to one step.
  • What was erased is shown as erased, and the record still checks.
  • Other kits add their own sections: "Correct this", the process run the work is a step of, the controls of whoever is in charge.

When do you need it?#

As soon as somebody other than the developer has to understand what an agent did. Shape 3 opens it from a run's page.

What does it expose?#

The tables below are generated from the kit itself, not written by hand: osy kits Osysharp.Agents.Inspector --surface lists each of them with the code of the kit's own test app that uses it, and the tests that show it working.

Settings — one line in the app, each field with a default.

You writeIt says
app.AgentInspector = new AgentInspectorSetup { WorkPage }How this app shows its agents' work.

Functions you call, those its own tests show most first.

FunctionWhat it doesTests that show it
RecordInWords(TraceCheck check)What the inspector says of a record's check: that every line is as it was written — or that it does not check, and where.7
InspectAgentWork(Guid task)One piece of work, for somebody who was not there — everything its receipt, its record and the rows beside them say, in words.6

Screens and components you mount — each is one line in a page of yours.

ComponentWhat it draws
Fact(caption, value, mono)A fact with its caption above it.
Quoted(text, name)Words that were said — a brief, a result, an answer — set apart from what the page says about them.
InspectedStepLine(step, marked, showWho)One step of the record.
InspectedProposalCard(p)One proposal, and what a person decided.
InspectedHelpCard(h)One request for help, and what came of it.
WorkInspector(task, step, embedded)The inspector: one piece of an agent's work, readable by a person who was not there.

Slots you can fill — a place on the kit's screens where your app, or another kit, adds a section.

SlotWhat goes there
AgentWorkPanel(Guid task)More about a piece of work, under its record — a section each from whoever adds one.
AgentWorkActions(Guid task)What can be done about a piece of work, at the head of the page — straight under what it is and how it stands, so that nobody scrolls past a long record to stop it.
AgentWorkOrigin(Guid task)Where a piece of work came from, beside who asked for it — Osysharp.Agents.Processes shows the run of the process the work is a step of, with the way to it.

Go deeper#

Related

The map of the kits — which sits on which, and what each one is for

The agents family is 29 kits. Two are under everything: `Osysharp.Llm` for every model call and `Osysharp.Agents` for…

The inspector — one piece of an agent's work, readable by a person who was not there (Agents.Inspector kit)

Osysharp.Agents.Inspector draws one page for one piece of an agent's work: what it was and how it ended; who gave it…

The receipt and the record — what every piece of an agent's work leaves (Agents kit)

Every piece of work leaves one receipt, `AgentTask` — who asked, the account it ran as, what it cost against its limit…