Add agent system with Core and Librarian agent implementations

Define IAgent interface and implement CoreAgent (main conversational
agent) and LibrarianAgent (knowledge retrieval agent). Includes DI
service collection extensions for agent registration.
This commit is contained in:
2026-04-04 04:10:51 +02:00
parent 45d3ee1ed6
commit fc71d848e2
6 changed files with 206 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
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);
}