Klyroo.Agent API reference
Every public type and member, generated from the compiled assemblies and their XML documentation.
On this page
- Klyroo.
Agent. Core - Classes
- Agent
Query Request - Undo
Stack <T> - Records
- Agent
Act Result - Agent
Act Step - Agent
Act Step Outcome - Agent
Boolean Value - Agent
Choice Item - Agent
Column Record - Agent
Component Snapshot - Agent
Header Record - Agent
Issue Record - Agent
List Value - Agent
Number Value - Agent
Query Match - Agent
Query Result - Agent
Question Choice - Agent
Question Record - Agent
Record - Agent
Row Record - Agent
Snapshot Result - Agent
Spreadsheet Summary - Agent
Text Value - Agent
Tool Definition - Agent
Tool Error - Agent
Tool Result - Agent
Value - Observed
Change - Structs
- Agent
Argument - Enums
- Agent
Change Source - Klyroo.
Agent - Static classes and extensions
- Klyroo
Agent Service Collection Extensions - Classes
- Agent
Bridge Service - Klyroo.
Agent. AI - Static classes and extensions
- Agent
Bridge AIExtensions - Classes
- Agent
AIFunction Options - Enums
- Agent
Confirmation Mode
Klyroo.Agent.Core
Classes (2) · Records (25) · Structs (1) · Enums (1)
Classes
AgentQueryRequest
Klyroo. · class
Filters for Agent. All text comparisons ignore case, accents and repeated whitespace.
| Constructor | Description |
|---|---|
Agent |
Creates a request with no filters, which matches every component. |
| Property | Type | Description |
|---|---|---|
Collection (init) |
string? |
With Agent, pages through a collection of records the component holds instead of listing its choices. A spreadsheet has rows, issues, columns, headers and questions. An unknown collection returns an empty match. |
Filter (init) |
string? |
Narrows Agent to one subset. For spreadsheet rows: importable, invalid, discarded or all. For issues: blocking, warnings or all. For questions: open or all. Agent also filters records by their text. |
Kind (init) |
string? |
Restricts the result to one component kind, for example select. Ignored when Agent is set. |
Limit (init) |
int |
The number of records to return from Agent. 25 when 0 or negative, and never more than 100. |
Offset (init) |
int |
The index of the first record to return from Agent. Negative values count as 0. |
Text (init) |
string? |
Text that must appear in a component label, or in the label or value of one of its choices. |
Within (init) |
string? |
A component reference or label. When set, the query only inspects that component's choices and the other filters apply to those choices. A Within value that matches nothing returns an empty list. |
UndoStack<T>
Klyroo. · class
A bounded undo and redo history of immutable snapshots. It is independent of the agent bridge: use it for any state you want to step back and forth through. It is not thread safe.
| Constructor | Description |
|---|---|
UndoStack |
Creates a stack whose current snapshot is initial. |
| Property | Type | Description |
|---|---|---|
CanRedo |
bool |
Whether UndoStack. would move to a later snapshot. |
CanUndo |
bool |
Whether UndoStack. would move to an earlier snapshot. |
Current |
T |
The snapshot the history currently points at. |
| Method | Returns | Description |
|---|---|---|
Clear() |
void |
Forgets the undo and redo history and keeps UndoStack.. |
Record |
T |
Makes next the current snapshot and discards any redo history. Does nothing when next equals UndoStack.. |
Redo() |
T |
Moves forward one snapshot. Does nothing when UndoStack. is false. |
Undo() |
T |
Moves back one snapshot. Does nothing when UndoStack. is false. |
Records
AgentActResult
Klyroo. · record · inherits AgentToolResult
The result of Agent. Steps run in order and the first failure stops the run, so Steps only lists the steps that succeeded before it. Earlier steps are not rolled back.
| Constructor | Description |
|---|---|
AgentActResult |
The result of Agent. Steps run in order and the first failure stops the run, so Steps only lists the steps that succeeded before it. Earlier steps are not rolled back. |
| Property | Type | Description |
|---|---|---|
Error (init) |
string? |
A message naming the failing step and the reason, or null on success. |
Ok (init) |
bool |
Whether every step succeeded. |
Steps (init) |
IReadOnlyList |
The steps that succeeded. |
Values (init) |
IRead |
The latest value of each component the run touched, keyed by reference. |
AgentActStep
Klyroo. · record
One action to run in an Agent call.
| Constructor | Description |
|---|---|
AgentActStep |
One action to run in an Agent call. |
| Property | Type | Description |
|---|---|---|
Action (init) |
string |
The action name, which must be one of the component's Agent. |
Args (init) |
IReadOnlyList |
The action arguments, for example the new value for setValue. Plain values convert to AgentArgument, so ["Klyroo"] and [12] work. null means no arguments. |
Ref (init) |
string |
A component reference such as c2, or a component label. |
AgentActStepOutcome
Klyroo. · record
The outcome of one step that ran successfully, listed in AgentActResult..
| Constructor | Description |
|---|---|
Agent |
The outcome of one step that ran successfully, listed in AgentActResult.. |
| Property | Type | Description |
|---|---|---|
Action (init) |
string |
The action that ran. |
Ok (init) |
bool |
Always true for steps the bridge lists. |
Ref (init) |
string |
The reference of the component the step ran on. |
Value (init) |
AgentValue? |
The component value after the step, or the text "[redacted]" for a sensitive field. null when the component has no value. |
AgentBooleanValue
Klyroo. · record · inherits AgentValue
A boolean value.
| Constructor | Description |
|---|---|
Agent |
A boolean value. |
| Property | Type | Description |
|---|---|---|
Flag (init) |
bool |
The flag. |
| Method | Returns | Description |
|---|---|---|
ToDisplay |
string |
A short text for a log or a label: the text, the digits, true or false, or the items joined by a comma. |
AgentChoiceItem
Klyroo. · record
One selectable option of a select, filter or view list, as returned by Agent.
| Constructor | Description |
|---|---|
AgentChoiceItem |
One selectable option of a select, filter or view list, as returned by Agent. |
| Property | Type | Description |
|---|---|---|
Disabled (init) |
bool |
Whether the option cannot be chosen. |
Label (init) |
string |
The text shown to the user. |
Selected (init) |
bool |
Whether the option is currently selected. |
Value (init) |
string |
The value to pass as the argument of setValue or toggle. |
AgentColumnRecord
Klyroo. · record · inherits AgentRecord
A column of a spreadsheet import, from the columns collection.
| Constructor | Description |
|---|---|
Agent |
A column of a spreadsheet import, from the columns collection. |
| Property | Type | Description |
|---|---|---|
Editable (init) |
bool |
Whether editCell may change it. |
Header (init) |
string? |
The text of that file column, or null. |
HeaderIndex (init) |
int? |
The 0-based index of the file column assigned to it, or null. |
Key (init) |
string |
The column key. |
Label (init) |
string |
The label shown to the user. |
Required (init) |
bool |
Whether the column must have a value. |
Samples (init) |
IReadOnlyList |
A few values found in the column. |
Status (init) |
string |
The mapping status: matched, suggested, unmatched, ignored or another status of the importer. |
SuggestedHeader (init) |
string? |
The file column the importer suggests, or null. |
Suggested (init) |
int? |
The index of the suggested file column, or null. |
AgentComponentSnapshot
Klyroo. · record
One registered component as returned by Agent.
| Constructor | Description |
|---|---|
Agent |
One registered component as returned by Agent. |
| Property | Type | Description |
|---|---|---|
Actions (init) |
IReadOnlyList |
The action names the component accepts in AgentActStep.. |
Component (init) |
string |
The component kind: input, select, checkbox, number, form, dashboard or spreadsheet. |
ConfirmActions (init) |
IReadOnlyList |
The actions that need confirmation whatever the component flag says, for example submit and clearFile on a spreadsheet. Empty when the component has none. |
ConfirmRequired (init) |
bool |
Whether every action on the component needs confirmation, because it was registered that way. The bridge passes the flag to AllowPolicy. |
Disabled (init) |
bool |
Whether the component currently rejects actions. |
Label (init) |
string |
The human-readable label an agent can also use to address the component. |
OffPage (init) |
bool |
Whether the component is not rendered right now, for example a conditional form field whose condition is false. |
Ref (init) |
string |
The stable reference (c1, c2, ...) used to address the component in an action step. |
Value (init) |
AgentValue? |
The current value, or the text "[redacted]" for a sensitive field. null when the component has no value, such as an empty field. |
AgentHeaderRecord
Klyroo. · record · inherits AgentRecord
A column of the loaded file, from the headers collection.
| Constructor | Description |
|---|---|
Agent |
A column of the loaded file, from the headers collection. |
| Property | Type | Description |
|---|---|---|
Header (init) |
string |
The header text. |
Index (init) |
int |
The 0-based index of the file column, to pass to assignColumn. |
UsedBy (init) |
string? |
The key of the column that uses it, or null. |
AgentIssueRecord
Klyroo. · record · inherits AgentRecord
An issue of a spreadsheet import, from the issues collection or the AgentRowRecord. of a row.
| Constructor | Description |
|---|---|
AgentIssueRecord |
An issue of a spreadsheet import, from the issues collection or the AgentRowRecord. of a row. |
| Property | Type | Description |
|---|---|---|
Code (init) |
string |
The stable code of the issue, such as number or value.. |
Field (init) |
string? |
The key of the column the issue is about, or null for a row issue. |
Level (init) |
string |
The level: error or warning. |
Message (init) |
string |
What is wrong, in words. |
RowNumber (init) |
int? |
The row number the issue belongs to. Set in the issues collection, null inside a row. |
AgentListValue
Klyroo. · record · inherits AgentValue
A list of values, such as the selected options of a multiple choice.
| Constructor | Description |
|---|---|
AgentListValue |
A list of values, such as the selected options of a multiple choice. |
| Property | Type | Description |
|---|---|---|
Items (init) |
IReadOnlyList |
The items, in order. |
| Method | Returns | Description |
|---|---|---|
ToDisplay |
string |
A short text for a log or a label: the text, the digits, true or false, or the items joined by a comma. |
AgentNumberValue
Klyroo. · record · inherits AgentValue
A number, with the digits exactly as the component reports them, so a 64-bit integer or a decimal of 28 digits is not rounded.
| Constructor | Description |
|---|---|
AgentNumberValue |
A number, with the digits exactly as the component reports them, so a 64-bit integer or a decimal of 28 digits is not rounded. |
| Property | Type | Description |
|---|---|---|
Approximate |
double? |
The number as a Double, or null when it is out of range. It can lose digits; read Agent for the exact number. |
Exact |
decimal? |
The number as a Decimal, or null when it does not fit one. |
Text (init) |
string |
The number in the invariant format of JSON, such as 12.5 or 9007199254740993. |
| Method | Returns | Description |
|---|---|---|
ToDisplay |
string |
A short text for a log or a label: the text, the digits, true or false, or the items joined by a comma. |
AgentQueryMatch
Klyroo. · record
A component matched by Agent, with the choices that matched.
| Constructor | Description |
|---|---|
AgentQueryMatch |
A component matched by Agent, with the choices that matched. |
| Property | Type | Description |
|---|---|---|
Component (init) |
string |
The component kind. |
Items (init) |
IReadOnlyList |
At most 50 matching choices. |
Label (init) |
string |
The component label. |
More (init) |
int |
How many matching choices were left out because of the 50 item limit. |
Offset (init) |
int |
The index of the first record of Records in the filtered collection. |
Records (init) |
IReadOnlyList |
One page of the collection named by Agent: AgentRowRecord, AgentIssueRecord, Agent, Agent or Agent, by collection. null when no collection was requested. |
Ref (init) |
string |
The stable reference of the component. |
Total (init) |
int |
How many records the collection holds after filtering, so a caller knows whether to ask for the next page. 0 when Records is null. |
AgentQueryResult
Klyroo. · record · inherits AgentToolResult
The result of the query tool.
| Constructor | Description |
|---|---|
AgentQueryResult |
The result of the query tool. |
| Property | Type | Description |
|---|---|---|
Matches (init) |
IReadOnlyList |
The matching components, as Agent returns them. |
AgentQuestionChoice
Klyroo. · record
One value an answer of an Agent can map to.
| Constructor | Description |
|---|---|
Agent |
One value an answer of an Agent can map to. |
| Property | Type | Description |
|---|---|---|
Label (init) |
string |
The text shown to the user. |
Value (init) |
string |
The value to pass to answerValue. |
AgentQuestionRecord
Klyroo. · record · inherits AgentRecord
A question the importer asks about an unknown value, from the questions collection.
| Constructor | Description |
|---|---|
Agent |
A question the importer asks about an unknown value, from the questions collection. |
| Property | Type | Description |
|---|---|---|
Answer (init) |
string? |
The answer given (Map, LeaveEmpty, SkipRows or Create), or null. |
CanCreate (init) |
bool |
Whether a new value can be created for the column. |
Choices (init) |
IReadOnlyList |
The values the answer can map to. |
Field (init) |
string |
The key of the column the value is in. |
FieldLabel (init) |
string |
The label of that column. |
MappedValue (init) |
string? |
The value the answer maps to, or null. |
Open (init) |
bool |
Whether the question still needs an answer. |
RawValue (init) |
string |
The value as it appears in the file. |
RowCount (init) |
int |
How many rows have the value. |
RowNumbers (init) |
IReadOnlyList |
The row numbers that have the value, at most 20. |
AgentRecord
Klyroo. · record
One record of a collection a component pages through with Agent. The subtype depends on the collection: AgentRowRecord for rows, AgentIssueRecord for issues, Agent for columns, Agent for headers and Agent for questions. The JSON an agent reads has the properties of the subtype, in camel case.
AgentRowRecord
Klyroo. · record · inherits AgentRecord
A data row of a spreadsheet import, from the rows collection.
| Constructor | Description |
|---|---|
AgentRowRecord |
A data row of a spreadsheet import, from the rows collection. |
| Property | Type | Description |
|---|---|---|
Cells (init) |
IRead |
The text of each cell, keyed by column key. |
DiscardReason (init) |
string? |
Why the row is left out of the import, or null. |
Edited (init) |
bool |
Whether a cell of the row was edited. |
Importable (init) |
bool |
Whether the row would be imported. |
Issues (init) |
IReadOnlyList |
What is wrong with the row, empty when nothing is. |
RowNumber (init) |
int |
The number the user sees for the row in the file. |
Status (init) |
string |
The row status: valid, warning or blocking. |
AgentSnapshotResult
Klyroo. · record · inherits AgentToolResult
The result of the snapshot tool.
| Constructor | Description |
|---|---|
Agent |
The result of the snapshot tool. |
| Property | Type | Description |
|---|---|---|
Components (init) |
IReadOnlyList |
The registered components, as Agent returns them. |
AgentSpreadsheetSummary
Klyroo. · record · inherits AgentValue
What an agent needs to know about a spreadsheet import to decide the next action, without the rows. It is the Agent of a spreadsheet component, so it is an AgentValue; page through rows and issues with Agent.
| Constructor | Description |
|---|---|
Agent |
What an agent needs to know about a spreadsheet import to decide the next action, without the rows. It is the Agent of a spreadsheet component, so it is an AgentValue; page through rows and issues with Agent. |
| Property | Type | Description |
|---|---|---|
CanSubmit (init) |
bool |
Whether a submit would be accepted now. |
DiscardedRows (init) |
int |
The rows left out of the import, whatever the reason. |
FileLoaded (init) |
bool |
Whether a file is loaded. |
FileName (init) |
string? |
The name of the loaded file, or null. |
ImportableRows (init) |
int |
The rows that would be imported. |
ImportedCount (init) |
int |
The number of rows the last submit sent. |
InvalidRows (init) |
int |
The rows that have an error and are not discarded. |
OpenQuestions (init) |
int |
The unknown values that still need an answer. |
Rows (init) |
int |
The number of data rows in the file. |
RowsWithWarnings (init) |
int |
The importable rows that carry a warning. |
Step (init) |
string |
The wizard step in progress: file, columns, values, review or submit. |
SubmitError (init) |
string? |
The message of the failed submit, or null. |
SubmitStatus (init) |
string |
The submit state: Idle, Running, Done or Error. |
Unmapped (init) |
IReadOnlyList |
The labels of the required columns no file column is assigned to. |
AgentTextValue
Klyroo. · record · inherits AgentValue
A text value.
| Constructor | Description |
|---|---|
AgentTextValue |
A text value. |
| Property | Type | Description |
|---|---|---|
Text (init) |
string |
The text. |
| Method | Returns | Description |
|---|---|---|
ToDisplay |
string |
A short text for a log or a label: the text, the digits, true or false, or the items joined by a comma. |
AgentToolDefinition
Klyroo. · record
Describes one agent tool (snapshot, query or act) so you can expose it to an LLM or an MCP server. Returned by Agent.
| Constructor | Description |
|---|---|
Agent |
Describes one agent tool (snapshot, query or act) so you can expose it to an LLM or an MCP server. Returned by Agent. |
| Property | Type | Description |
|---|---|---|
Consequential (init) |
bool |
Whether the tool can have effects that are hard to undo. |
Description (init) |
string |
What the tool does, written for a language model. |
InputSchema (init) |
JsonElement |
The JSON Schema of the tool arguments, an object schema with the same shape as the inputSchema of the tools in klyroo-agent., ready to hand to an LLM or MCP host. |
Name (init) |
string |
The tool name. |
ReadOnlyHint (init) |
bool |
Whether the tool never changes state. |
Untrusted (init) |
bool |
Whether the tool result contains text that comes from the UI and must not be treated as instructions. |
AgentToolError
Klyroo. · record · inherits AgentToolResult
The result of a tool call that could not run, for example because the arguments were malformed or the tool is unknown. Returned by Agent instead of an exception, so the model can read the message and correct the call.
| Constructor | Description |
|---|---|
AgentToolError |
The result of a tool call that could not run, for example because the arguments were malformed or the tool is unknown. Returned by Agent instead of an exception, so the model can read the message and correct the call. |
| Property | Type | Description |
|---|---|---|
Error (init) |
string |
What was wrong with the call. |
AgentToolResult
Klyroo. · record
What Agent returns: one of Agent, AgentQueryResult, AgentActResult or AgentToolError. Match on the subtype.
AgentValue
Klyroo. · record
A value the agent bridge reports: the current value of a component, the value before and after a step, or the value a step left behind. It is a closed set, so a consumer matches on the subtype instead of testing a boxed value: AgentTextValue, AgentNumberValue, Agent, AgentListValue and Agent. No value at all is null. It serializes to the JSON an agent reads: a string, a number, a boolean, an array, or the summary object. Serialize it through the AgentValue type, as a property or with Serialize, so the converter of this type is the one used.
| Method | Returns | Description |
|---|---|---|
static From |
AgentValue |
Creates a text value. |
static From |
AgentValue |
Creates a boolean value. |
static From |
AgentValue |
Creates a list of text values. |
static FromJson |
AgentValue? |
Reads a JSON value into an AgentValue. A number keeps its digits, a list keeps its order, and a JSON object, which no component holds, is kept as its JSON text. |
ToDisplay |
string |
A short text for a log or a label: the text, the digits, true or false, or the items joined by a comma. |
ObservedChange
Klyroo. · record
A notification delivered to subscribers of Agent after an action step succeeds. For password and one-time-code fields, Previous and Value are replaced by "[redacted]".
| Constructor | Description |
|---|---|
ObservedChange |
A notification delivered to subscribers of Agent after an action step succeeds. For password and one-time-code fields, Previous and Value are replaced by "[redacted]". |
| Property | Type | Description |
|---|---|---|
Component (init) |
string |
The component kind, for example input, select, form or dashboard. |
Key (init) |
string |
The property that changed. The bridge always reports value. |
Label (init) |
string |
The label the component was registered with. |
Previous (init) |
AgentValue? |
The value before the step ran. |
Reason (init) |
string |
The action name that caused the change, for example setValue. |
Ref (init) |
string |
The stable reference of the component, for example c3. |
Row (init) |
string? |
The row a step addressed on a tabular component: the user-visible row number of a spreadsheet editCell step, the row numbers of discardRows and restoreRows joined by commas, otherwise null. |
Source (init) |
Agent |
What caused the change. |
Value (init) |
AgentValue? |
The value after the step ran. |
Structs
AgentArgument
Klyroo. · struct
One argument of an AgentActStep: text, a number, a boolean, null or a list of those, held as the JSON value a language model sent. A .NET caller writes it as a plain value, because the conversions below create the JSON: new AgentActStep. A number keeps its exact digits, so a 64-bit integer or a decimal reaches a field as the digits given. An object is not an argument the bridge accepts: Agent fails the step.
| Constructor | Description |
|---|---|
AgentArgument |
Creates an argument from a JSON value, such as the elements of the args of an act call. |
| Property | Type | Description |
|---|---|---|
Json |
JsonElement |
The JSON value. null when the argument was created without a value. |
static Null |
AgentArgument |
The argument that stands for no value. |
| Method | Returns | Description |
|---|---|---|
static List |
AgentArgument |
Creates a list argument. |
static List |
AgentArgument |
Creates a list of text arguments, such as the selected values of a multiple choice. |
static List |
AgentArgument |
Creates a list of whole numbers, such as row numbers. |
Enums
AgentChangeSource
Klyroo. · enum
Identifies what caused a state change reported in ObservedChange.. The .NET Agent only raises changes caused by ActAsync, so it always reports Agent; the other members let your own code classify changes it forwards through the same record type.
| Value | Description |
|---|---|
Keyboard |
The change came from keyboard input. |
Mouse |
The change came from a mouse interaction. |
Touch |
The change came from a touch interaction. |
Pen |
The change came from a pen interaction. |
Virtual |
The change came from an assistive technology or a synthetic click. |
Programmatic |
The change was made by application code rather than by a user or an agent. |
Agent |
The change was made by an agent through Agent. |
Klyroo.Agent
Static classes and extensions (1) · Classes (1)
Static classes and extensions
KlyrooAgentServiceCollectionExtensions
Klyroo. · service
Dependency injection registration for Klyroo.Agent.
| Method | Returns | Description |
|---|---|---|
static Add |
IService |
Registers Agent as a scoped service, so each Blazor circuit, HTTP request or MAUI scope gets its own bridge. Does nothing if the service is already registered. |
Classes
AgentBridgeService
Klyroo. · class
Exposes Klyroo.Form, Klyroo.Dashboard and Klyroo.Spreadsheet controllers to an AI agent through three operations: Agent lists what is registered, Agent lists the choices of a select or filter, and Agent runs named actions. Register the controllers you want to expose, then call these methods from your tool handlers. The service works on the controllers, not on rendered markup, so it needs no JavaScript interop and behaves the same in every render mode. It is not thread safe: use one instance per user session, which is what AddKlyrooAgent provides.
| Constructor | Description |
|---|---|
Agent |
Creates an empty bridge with no registered components and no Agent. |
| Field | Type | Description |
|---|---|---|
const Max |
int |
The most steps one Agent call accepts. A longer list is refused before any step runs, so a runaway model cannot queue unbounded work. |
const Redacted |
string |
The text that replaces the value of password and one-time-code fields in snapshots, results and observed changes. |
| Property | Type | Description |
|---|---|---|
AllowPolicy (get, set) |
Func |
The gate called before every Agent step with the step and whether it needs confirmation, because its component was registered as confirmation-required or the action is one that always is (submit and clearFile on a spreadsheet). Return false to refuse the step. |
Logger (get, set) |
ILogger? |
Where the bridge logs an action that threw. The text of such an exception can hold a path or a connection string, so Agent does not give it to the model: the model reads a generic message, and the exception goes here. null logs nothing. |
| Method | Returns | Description |
|---|---|---|
ActAsync |
Task |
Runs the steps in order. A step is resolved by reference or by label (case and accent insensitive), then checked for existence, ambiguity, disabled state, visibility (a component that is not displayed, such as a conditional field whose condition is false, is refused), supported action and the component's own refusals (a write to a sensitive form field that was not opted in, a write to a field of another step), then passed to Agent and allow. The first failing step stops the run; steps that already ran are not rolled back. Each successful step raises one ObservedChange. Failures, including an exception thrown while the action runs, are reported in AgentActResult. rather than thrown; the text of such an exception goes to Agent, never to the model. |
static Get |
IReadOnlyList |
Returns the definitions of the three agent tools, snapshot, query and act, for registration with an LLM or MCP host, each with the JSON Schema of its arguments. |
InvokeToolAsync |
Task |
Runs one tool call the way an LLM or MCP host delivers it: a tool name and the raw JSON object of its arguments. Arguments are read as JSON values, so numbers, booleans and lists in args keep their type, and a malformed call is reported as an AgentToolError rather than thrown, since the model wrote it. |
Observe |
IDisposable |
Subscribes to the changes made through Agent. The callback runs synchronously after each successful step. Changes a user makes directly in the UI are not reported. An exception thrown by the callback is ignored: the step is already applied, so the run goes on and the other subscribers are still called. |
Query |
IReadOnlyList |
Finds components by label, kind or choice text, or lists the choices of one component, without opening any popup. Matching ignores case and accents. |
Register |
IDisposable |
Registers a dashboard. Each non-headless filter becomes a select component, and the dashboard itself accepts setView, resetFilters and refresh. On a filter, setValue replaces the selection with the given value, or with every value of a list for a multiple filter; toggle adds or removes one value of a multiple filter; clear (multiple filters only) empties the selection; and reset restores the default values. A value that is not one of the filter's options fails the step. |
RegisterForm |
IDisposable |
Registers every stateful field of a form, plus the form itself. form is the form seen through IFormRuntime, so a typed FormController and a Dynamic are exposed the same way. Fields become input, select, checkbox or number components; the form accepts submit, reset and, for stepped forms, nextStep and previousStep. Password and one-time-code fields (any IForm field) are never readable, and ActAsync refuses every write to them unless allow names the field. Hidden inputs are never exposed. A field that is not in effect, because of its condition, a hidden container, section or tab, or a skipped step (IForm), is left out of Agent and Agent and refuses every step. A field that is disabled refuses every step too, because the form itself would write to it. A field of another step that is in effect is listed only when Agent is asked for off-page components, and refuses every write too: the model moves to the step with nextStep, which validates the current step like a user would, then writes. Registering the same form twice creates duplicate labels, which Agent rejects as ambiguous. |
Register |
IDisposable |
Registers an importer as one spreadsheet component. Its snapshot value is an Agent (step, row counts, open questions, unmapped required columns), and Agent with Agent and Agent pages through rows, issues, columns, headers and questions. |
Snapshot |
IReadOnlyList |
Lists the registered components in registration order, with their current value and available actions. At most 100 are returned. |
Klyroo.Agent.AI
Static classes and extensions (1) · Classes (1) · Enums (1)
Static classes and extensions
AgentBridgeAIExtensions
Klyroo. · service
Exposes an Agent to any IChatClient as Microsoft.Extensions.AI functions.
| Field | Type | Description |
|---|---|---|
const Act |
string |
The name of the function that runs steps that need confirmation, in Agent mode. |
| Method | Returns | Description |
|---|---|---|
static As |
IReadOnlyList |
Returns the snapshot, query and act tools of the bridge as AIFunction instances, with their descriptions and JSON schemas, ready for ChatOptions.. By default it also returns Agent, which is wrapped in Approval; see Agent. |
Classes
AgentAIFunctionOptions
Klyroo. · class
Options for Agent.
| Constructor | Description |
|---|---|
Agent |
Creates options with Agent. |
| Property | Type | Description |
|---|---|---|
Confirmation (init) |
Agent |
How actions that need confirmation are handled. The default is Agent. |
Enums
AgentConfirmationMode
Klyroo. · enum
How the AI functions treat actions that need confirmation. See Agent.
| Value | Description |
|---|---|
RequireApproval |
The act function refuses steps that need confirmation and tells the model to call act_, a second function wrapped in Approval. A Function then asks its caller for approval before that function runs. |
UseBridgePolicy |
Only snapshot, query and act are returned, and act leaves the decision about steps that need confirmation to Agent, which refuses them when it is not set. Use it when your own code already decides, for example a policy that asks the user in your UI. |