# MentorStructuredService class

> The MentorStructuredService class of Novior.MentorAgent.Core: Default IMentorStructured implementation (roadmap #12). Uses the configured ChatClient's…

- URL: https://docs.mentoragent.net/api/novior-mentoragent-core/mentorstructuredservice
- Verified with: MentorAgent 1.2.0
- Last updated: 2026-10-27
- Packages: Novior.MentorAgent

Default [`IMentorStructured`](https://docs.mentoragent.net/api/novior-mentoragent-abstractions-interfaces/imentorstructured) implementation (roadmap \#12). Uses the configured `ChatClient`'s structured-output support (`GetResponseAsync<T>`) — the JSON schema is derived from the requested type `T` and the response is deserialized back to it.

## Definition

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

`public sealed class MentorStructuredService : IMentorStructured`

Implements [`IMentorStructured`](https://docs.mentoragent.net/api/novior-mentoragent-abstractions-interfaces/imentorstructured).

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

## Constructors

`public MentorStructuredService(IOptions<MentorOptions> options, ILogger<MentorStructuredService> logger)`

## Methods

### `GenerateAsync`

`public Task<T?> GenerateAsync<T>(string prompt, string? instructions = null, CancellationToken ct = default)`

---

- Previous: [MentorRateLimiter class](https://docs.mentoragent.net/api/novior-mentoragent-core/mentorratelimiter.md)
- Next: [MentorTokenUsage class](https://docs.mentoragent.net/api/novior-mentoragent-core/mentortokenusage.md)
