# IMentorStructured interface

> The IMentorStructured interface of Novior.MentorAgent.Abstractions.Interfaces: Typed / structured generation (roadmap #12). Asks the model for a…

- URL: https://docs.mentoragent.net/api/novior-mentoragent-abstractions-interfaces/imentorstructured
- Verified with: MentorAgent 1.2.0
- Last updated: 2026-10-27
- Packages: Novior.MentorAgent.Abstractions

Typed / structured generation (roadmap \#12). Asks the model for a strongly-typed result whose JSON schema is derived from the requested type `T`, so you get back a deserialized object — ideal for auto-filling forms, extracting entities, or building typed generative UI outside the chat flow. Requires a configured `ChatClient` (Path A) whose provider supports structured outputs (OpenAI / Azure OpenAI).

## Definition

Namespace: `Novior.MentorAgent.Abstractions.Interfaces`. Package: `Novior.MentorAgent.Abstractions`.

`public interface IMentorStructured`

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

## Methods

### `GenerateAsync`

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

Generates a typed `T` from `prompt` (with optional system `instructions`). Returns `default` if the model output could not be parsed or no `ChatClient` is configured.

---

- Previous: [IMentorStateService interface](https://docs.mentoragent.net/api/novior-mentoragent-abstractions-interfaces/imentorstateservice.md)
- Next: [IMentorTeam interface](https://docs.mentoragent.net/api/novior-mentoragent-abstractions-interfaces/imentorteam.md)
