# IMentorAgentSourceObserver interface

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

- URL: https://docs.mentoragent.net/api/novior-mentoragent-core/imentoragentsourceobserver
- Verified with: MentorAgent 1.4.0
- Last updated: 2026-11-18
- Packages: Novior.MentorAgent

Receives, every time a coordinator is built, what each [`IMentorAgentSource`](https://docs.mentoragent.net/api/novior-mentoragent-core/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.

## Definition

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

`public interface IMentorAgentSourceObserver`

```shell
dotnet add package Novior.MentorAgent
```

## Methods

### `OnAgentsLoaded`

`void OnAgentsLoaded(MentorAgentSourceReport report)`

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

### `OnTeamsLoaded`

`void OnTeamsLoaded(MentorAgentSourceReport report)`

One report per [`IMentorTeamSource`](https://docs.mentoragent.net/api/novior-mentoragent-core/imentorteamsource), every time a coordinator is built — also when the source gave no team. [`MentorAgentSourceReport.Loaded`](https://docs.mentoragent.net/api/novior-mentoragent-core/mentoragentsourcereport#loaded) names the teams that joined the coordinator. Does nothing unless the observer implements it.

---

- Previous: [IMentorAgentSource interface](https://docs.mentoragent.net/api/novior-mentoragent-core/imentoragentsource.md)
- Next: [IMentorTeamSource interface](https://docs.mentoragent.net/api/novior-mentoragent-core/imentorteamsource.md)
