Lyra Agent hinzugefügt, Multi-Agent Routing, BaseAgent refactoring

This commit is contained in:
Sithies
2026-03-16 22:31:13 +01:00
parent 30d63debd9
commit 6fc1648939
13 changed files with 148 additions and 22 deletions
+44
View File
@@ -0,0 +1,44 @@
// crates/lyra/src/lib.rs
//
// Lyra — Persönlicher Begleit-Agent von Nazarick.
// Dünner Wrapper um BaseAgent — nur name() ist Lyra-spezifisch.
use nazarick_core::agent::BaseAgent;
use nazarick_core::traits::Agent;
use nazarick_core::types::AgentId;
use nazarick_core::llm::LlmProvider;
pub struct Lyra {
base: BaseAgent,
}
impl Lyra {
/// Erstellt eine neue Lyra-Instanz.
/// `soul_core_path` → Pfad zu soul_core.md
/// `soul_personality_path` → Pfad zu soul_personality.md
/// `llm` → LLM-Provider (z.B. LmStudioProvider)
pub fn new(
soul_core_path: impl Into<String>,
soul_personality_path: impl Into<String>,
llm: Box<dyn LlmProvider>,
) -> Self {
Self {
base: BaseAgent::new(soul_core_path, soul_personality_path, llm),
}
}
/// Delegiert chat() an BaseAgent.
pub async fn chat(&mut self, user_message: &str) -> nazarick_core::types::Result<String> {
self.base.chat(user_message).await
}
}
impl Agent for Lyra {
fn id(&self) -> AgentId {
self.base.id
}
fn name(&self) -> &str {
"Lyra"
}
}