# MentorLiveSkillsSource class

> The MentorLiveSkillsSource class of Novior.MentorAgent.Core: An AgentSkillsSource that MentorOptions.SkillsRefreshInterval never caches: wrap a source in it…

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

An `AgentSkillsSource` that [`MentorOptions.SkillsRefreshInterval`](https://docs.mentoragent.net/api/novior-mentoragent-options/mentoroptions#skillsrefreshinterval) never caches: wrap a source in it, in [`MentorOptions.SkillSources`](https://docs.mentoragent.net/api/novior-mentoragent-options/mentoroptions#skillsources), when what it gives must reach every session built after a change, not one built after the interval (rule `skill.live-source`).

With a refresh interval each source is cached on its own, so the others keep their cache while this one is asked every time a session's coordinator is built: a skill it withdraws is gone for the next session, and one it adds is there. A session keeps the list it started with, as for every source. Without an interval nothing changes, because every source is then read at every session anyway.

It is for a source that is cheap to ask and whose changes must count at once, such as the console of an integration that withdraws a skill. It composes with [`MentorPreferredSkillsSource`](https://docs.mentoragent.net/api/novior-mentoragent-core/mentorpreferredskillssource), in either order, and [`MentorOptions.SkillFilter`](https://docs.mentoragent.net/api/novior-mentoragent-options/mentoroptions#skillfilter) and the de-duplication apply to its skills as to the others'.

```text title="Example"
options.SkillsRefreshInterval = TimeSpan.FromMinutes(15);        // the remote catalogue is read every 15 minutes
options.SkillSources =
[
    new MentorLiveSkillsSource(new MentorPreferredSkillsSource(consoleSkills)),   // read at every session
    new AgentFileSkillsSource("/srv/shared-skills"),                              // cached
];
```

## Definition

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

`public sealed class MentorLiveSkillsSource : AgentSkillsSource`

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

## Constructors

`public MentorLiveSkillsSource(AgentSkillsSource inner)`

Wraps `inner`, which is then asked at every session, never cached.

## Properties

### `Inner`

`public AgentSkillsSource Inner { get; }`

The source asked at every session.

## Methods

### `GetSkillsAsync`

`public override Task<IList<AgentSkill>> GetSkillsAsync(AgentSkillsSourceContext context, CancellationToken cancellationToken = default)`

---

- Previous: [MentorChatReducer class](https://docs.mentoragent.net/api/novior-mentoragent-core/mentorchatreducer.md)
- Next: [MentorMetrics class](https://docs.mentoragent.net/api/novior-mentoragent-core/mentormetrics.md)
