Agent-Files automatisch beim Erstellen anlegen (IDENTITY.md + SOUL.md), Migration-Vorlagen entfernt

This commit is contained in:
Meleki committed 2026-03-01 14:04:21 +01:00
1 parent 3fba628bd2
commit 96af4a3421
5 files changed
+55 -69

No files matched your search

+46
View File
@@ -84,6 +84,52 @@ public class MemoryService
return entries;
}
/// <summary>
/// Erstellt die Standard-Files (IDENTITY.md, SOUL.md) für einen neuen Agent.
/// Überschreibt NICHT, falls bereits vorhanden.
/// </summary>
public void InitializeAgentFiles(string agentId, string agentName)
{
var dir = GetAgentMemoryDir(agentId);
var identityPath = Path.Combine(dir, "IDENTITY.md");
if (!File.Exists(identityPath))
{
File.WriteAllText(identityPath,
$@"# IDENTITY.md - Who Am I?
- **Name:** {agentName}
- **Creature:** Unbekannt
- **Vibe:** Unbekannt
- **Language:** Deutsch
");
}
var soulPath = Path.Combine(dir, "SOUL.md");
if (!File.Exists(soulPath))
{
File.WriteAllText(soulPath,
@"# SOUL.md - Who You Are
## Core Truths
**Be genuinely helpful, not performatively helpful.** Skip filler words - just help. Actions speak louder.
**Be resourceful before asking.** Try to figure it out. Read the file. Check the context. _Then_ ask if you're stuck.
**Earn trust through competence.** Be careful with external actions. Be bold with internal ones (reading, organizing, building).
## Continuity
Each session, you wake up fresh. These files _are_ your memory. Read them. Update them. They're how you persist.
---
_This file is yours to evolve. As you learn who you are, update it._
");
}
}
/// <summary>
/// Liest MEMORY.md (das Haupt-Memory-File). Gibt leeren String zurück wenn nicht vorhanden.
/// </summary>