MentorAgent Docs
Menu

ReferencePackage: Novior.MentorAgent

IMentorAgentSourceObserver interface

The IMentorAgentSourceObserver interface of Novior.MentorAgent.Core: Receives, every time a coordinator is built, what each IMentorAgentSource loaded and…

View as Markdown
On this page

Receives, every time a coordinator is built, what each IMentorAgentSource loaded and what it left out: a definition that did not load, a tool taken away from an agent. Register it with AddMentorAgentSourceObserver<T>(); it is a singleton, and every observer registered is called.

It is called on the path that builds the session, before the first answer: return quickly, and hand anything slow — a call to another service — to a queue of your own. An observer that throws is logged with the exception's type and does not stop the session.

Namespace: Novior.MentorAgent.Core. Package: Novior.MentorAgent.

public interface IMentorAgentSourceObserver

Terminal
dotnet add package Novior.MentorAgent

void OnAgentsLoaded(MentorAgentSourceReport report)

One report per source, every time a coordinator is built — also when the source loaded nothing.

void OnTeamsLoaded(MentorAgentSourceReport report)

One report per IMentorTeamSource, every time a coordinator is built — also when the source gave no team. MentorAgentSourceReport.Loaded names the teams that joined the coordinator. Does nothing unless the observer implements it.