fc71d848e2
Define IAgent interface and implement CoreAgent (main conversational agent) and LibrarianAgent (knowledge retrieval agent). Includes DI service collection extensions for agent registration.
20 lines
582 B
C#
20 lines
582 B
C#
using Luna.Configuration;
|
|
using Microsoft.Extensions.AI;
|
|
|
|
namespace Luna.Agents.Abstractions;
|
|
|
|
public interface IAgent
|
|
{
|
|
public static virtual string Name { get; } = null!;
|
|
|
|
public string DisplayName { get; }
|
|
public string Description { get; }
|
|
public AgentOptions Options { get; init; }
|
|
|
|
Task<IEnumerable<ChatMessage>> ProcessAsync(IReadOnlyList<ChatMessage> messages,
|
|
CancellationToken ct = default);
|
|
|
|
IAsyncEnumerable<ChatResponseUpdate> ProcessStreamingAsync(IReadOnlyList<ChatMessage> messages,
|
|
CancellationToken ct = default);
|
|
}
|