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:
@@ -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);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.AI.Abstractions" Version="10.4.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Luna.Configuration\Luna.Configuration.csproj" />
|
||||
<ProjectReference Include="..\Luna.Shared\Luna.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
Reference in New Issue
Block a user