Table of Contents

Method AddMailAnsweringAgent

Namespace
MailFathom.AI
Assembly
MailFathom.AI.dll

AddMailAnsweringAgent(IServiceCollection)

Registers the agent that answers a question about the mailbox from what it retrieves while answering.

public static IServiceCollection AddMailAnsweringAgent(this IServiceCollection services)

Parameters

services IServiceCollection

The service collection to add to.

Returns

IServiceCollection

The same service collection, so registration reads as one expression.

Remarks

Called only where a chat endpoint was declared, and beside AddChatProviderAdapter(IServiceCollection) rather than inside it: they are two capabilities over one endpoint, and an instance that answers questions is not the same decision as one that can generate text.

Scoped, because a run retrieves through the mailbox search, and that reads through the scoped persistence context. It adds no transport of its own — a run's requests go to the same endpoint under the same bounds as any other chat request, so it sends over the client that registration named.

Exceptions

ArgumentNullException

Thrown when services is null.