diff --git a/tools/cli/lib/yaml-xml-builder.js b/tools/cli/lib/yaml-xml-builder.js
index 2786d7f5..b4ad8cf8 100644
--- a/tools/cli/lib/yaml-xml-builder.js
+++ b/tools/cli/lib/yaml-xml-builder.js
@@ -119,6 +119,16 @@ class YamlXmlBuilder {
if (customizeYaml.critical_actions) {
merged.agent.critical_actions = [...(merged.agent.critical_actions || []), ...customizeYaml.critical_actions];
}
+
+ // Append prompts
+ if (customizeYaml.prompts) {
+ merged.agent.prompts = [...(merged.agent.prompts || []), ...customizeYaml.prompts];
+ }
+
+ // Append memories
+ if (customizeYaml.memories) {
+ merged.agent.memories = [...(merged.agent.memories || []), ...customizeYaml.memories];
+ }
}
}
@@ -202,6 +212,11 @@ class YamlXmlBuilder {
// Persona section
xml += this.buildPersonaXml(agent.persona);
+ // Memories section (if exists)
+ if (agent.memories) {
+ xml += this.buildMemoriesXml(agent.memories);
+ }
+
// Prompts section (if exists)
if (agent.prompts) {
xml += this.buildPromptsXml(agent.prompts);
@@ -268,6 +283,23 @@ class YamlXmlBuilder {
return xml;
}
+ /**
+ * Build memories XML section
+ */
+ buildMemoriesXml(memories) {
+ if (!memories || memories.length === 0) return '';
+
+ let xml = ' \n';
+
+ for (const memory of memories) {
+ xml += ` ${this.escapeXml(memory)}\n`;
+ }
+
+ xml += ' \n';
+
+ return xml;
+ }
+
/**
* Build prompts XML section
* Handles both array format and object/dictionary format
@@ -296,9 +328,9 @@ class YamlXmlBuilder {
for (const prompt of promptsArray) {
xml += ` \n`;
- xml += ` \n`;
+ xml += ` \n`;
+ xml += `${this.escapeXml(prompt.content || '')}\n`;
+ xml += ` \n`;
xml += ` \n`;
}