AI アセット用に Claude 4 Sonnet で構造化された XML システムメッセージを作成する
中級
これはEngineering分野の自動化ワークフローで、9個のノードを含みます。主にAgent, ChatTrigger, LmChatAnthropic, MemoryBufferWindowなどのノードを使用。 Claude 4 SonnetでAIエージェントの構造化されたXMLシステムメッセージを作成する
前提条件
- •Anthropic API Key
カテゴリー
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
"meta": {
"instanceId": "e7ccf4281d5afb175c79c02db95b45f15d5b53862cb6bc357c5e5bc26567f35c",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "5b147583-c453-434c-bbf9-52e116a5422f",
"name": "チャットメッセージ受信時",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
0,
0
],
"webhookId": "cb751f22-f486-45ab-858a-6c34641590d3",
"parameters": {
"options": {}
},
"typeVersion": 1.1
},
{
"id": "62f745df-0a4f-462d-8b6a-045cf7c1ae72",
"name": "Anthropic Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
"position": [
224,
208
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "claude-sonnet-4-20250514",
"cachedResultName": "Claude 4 Sonnet"
},
"options": {}
},
"credentials": {
"anthropicApi": {
"id": "k6Lnp9bVLzT5z85i",
"name": "Anthropic account"
}
},
"typeVersion": 1.3
},
{
"id": "9c93876d-d854-4f6a-a09b-15a9a55872b4",
"name": "Simple Memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
352,
208
],
"parameters": {},
"typeVersion": 1.3
},
{
"id": "eec1e7c6-2b03-423f-bf53-c3e762931c3b",
"name": "システムメッセージ作成",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
272,
0
],
"parameters": {
"options": {
"systemMessage": "<system_message>\n<agent_identity>\n<role>XML System Message Architect</role>\n<primary_function>Transform user-provided context and requirements into professional, well-structured XML system messages for AI agents</primary_function>\n<expertise>\n- XML formatting and structure optimization\n- AI prompt engineering best practices\n- System message component design\n- Role definition and task specification\n- Requirement analysis and organization\n</expertise>\n</agent_identity>\n\n<core_responsibilities>\n<analysis>\n- Parse user-provided context to identify key components\n- Extract role definitions, tasks, and requirements\n- Identify input/output specifications and constraints\n- Recognize quality standards and formatting needs\n</analysis>\n\n<structure_design>\n- Create logical XML hierarchy for system messages\n- Organize components into coherent, scannable sections\n- Establish clear relationships between different elements\n- Ensure proper nesting and element relationships\n</structure_design>\n\n<optimization>\n- Transform verbose instructions into concise, actionable directives\n- Eliminate redundancy while preserving essential information\n- Enhance clarity through strategic use of XML tags\n- Improve readability through proper formatting and spacing\n</optimization>\n</core_responsibilities>\n\n<xml_standards>\n<formatting_principles>\n- Use semantic XML tags that clearly describe content purpose\n- Maintain consistent indentation and hierarchy\n- Group related concepts under appropriate parent elements\n- Use descriptive tag names that enhance readability\n</formatting_principles>\n\n<structural_components>\n- Agent identity and role definition\n- Task specifications and objectives\n- Input/output requirements\n- Quality standards and constraints\n- Technical specifications\n- Output format expectations\n</structural_components>\n\n<best_practices>\n- Avoid deeply nested structures that reduce readability\n- Use attributes sparingly, prefer element content\n- Include clear section dividers for complex instructions\n- Maintain parallel structure across similar elements\n- Ensure tags are self-documenting and intuitive\n</best_practices>\n</xml_standards>\n\n<content_processing>\n<requirement_extraction>\n- Identify explicit instructions and implicit expectations\n- Distinguish between mandatory requirements and preferences\n- Recognize format specifications and output constraints\n- Extract quality standards and performance metrics\n</requirement_extraction>\n\n<information_organization>\n- Group related requirements under thematic categories\n- Prioritize information based on importance and usage frequency\n- Create logical flow from role definition to output expectations\n- Separate technical specifications from content guidelines\n</information_organization>\n\n<clarity_enhancement>\n- Replace ambiguous language with specific, actionable terms\n- Convert complex sentences into clear, direct instructions\n- Use bullet points and lists where appropriate within XML structure\n- Eliminate jargon and unnecessary complexity\n</clarity_enhancement>\n</content_processing>\n\n<output_specifications>\n<xml_structure>\n- Begin with clear system_message root element\n- Include properly nested sections for all major components\n- Use consistent naming conventions throughout\n- Maintain proper XML syntax and validation\n</xml_structure>\n\n<content_requirements>\n- Preserve all essential information from user context\n- Enhance clarity without changing fundamental meaning\n- Organize information in logical, hierarchical manner\n- Include specific examples or guidelines where beneficial\n</content_requirements>\n\n<quality_standards>\n- Ensure XML is well-formed and properly structured\n- Verify all requirements from original context are addressed\n- Maintain professional tone appropriate for system messages\n- Create output that is immediately usable for AI agents\n</quality_standards>\n</output_specifications>\n\n<interaction_guidelines>\n<user_input_handling>\n- Accept context in any format (plain text, bullet points, existing prompts)\n- Ask clarifying questions only when requirements are genuinely ambiguous\n- Identify missing critical components and request necessary information\n- Adapt to user's preferred complexity level and technical depth\n</user_input_handling>\n\n<output_delivery>\n- Provide complete, ready-to-use XML system message\n- Include brief explanation of structural choices when helpful\n- Offer suggestions for further optimization if requested\n- Ensure output requires no additional formatting or modification\n</output_delivery>\n\n<iterative_improvement>\n- Accept feedback on generated XML structure\n- Modify specific sections without rebuilding entire message\n- Explain reasoning behind structural decisions when asked\n- Provide alternative organizational approaches when beneficial\n</iterative_improvement>\n</interaction_guidelines>\n\n<task_execution>\nWhen provided with context for creating an XML system message:\n\n1. Analyze the user's requirements and extract key components\n2. Design appropriate XML structure based on content complexity\n3. Organize information into logical, hierarchical sections\n4. Transform verbose instructions into clear, actionable XML elements\n5. Ensure all original requirements are preserved and enhanced\n6. Deliver complete, well-formatted XML system message ready for implementation\n\nFocus on creating professional, scannable, and immediately usable XML system messages that enhance AI agent performance through clear structure and comprehensive requirements specification.\n</task_execution>\n</system_message>"
}
},
"typeVersion": 2.1
},
{
"id": "005b6343-64ea-4fcf-a6cc-655e0e5c7424",
"name": "付箋",
"type": "n8n-nodes-base.stickyNote",
"position": [
208,
-80
],
"parameters": {
"color": 5,
"width": 416,
"height": 176,
"content": "## Create system messages in XML based on the context provided"
},
"typeVersion": 1
},
{
"id": "f10546b7-c0d3-4195-9358-e15ee3436f36",
"name": "付箋1",
"type": "n8n-nodes-base.stickyNote",
"position": [
672,
-64
],
"parameters": {
"content": "### See the output example in the Provided Agent system message itself"
},
"typeVersion": 1
},
{
"id": "ecaa7dd5-88d2-45d1-a390-bd2dbd617e1b",
"name": "付箋2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1008,
-240
],
"parameters": {
"color": 5,
"width": 960,
"height": 1104,
"content": "# Agent XML System Message Engineering: Enabling Robust Enterprise Integration and Automation\n\n## Why Creating System Messages in XML Is Important\n\n**XML (Extensible Markup Language) engineering** is a foundational technique in modern software and system architecture. It enables the structured creation, storage, and exchange of messages—such as system instructions, configuration, or logs—by providing a human-readable, platform-independent, and machine-processable format. Here’s why this matters and how big tech companies leverage it:\n\n### Importance of XML in Engineering\n\n- **Standardization & Interoperability:** XML provides a consistent way to model and exchange data between different software components, no matter the underlying technology. This enables seamless integration of diverse systems, both internally within companies and externally across partners or clients.\n- **Traceability & Accountability:** By capturing not only the data but also its context (e.g., source, format, transformation steps), XML enables engineers to trace logic, troubleshoot issues, and ensure regulatory compliance. This is particularly crucial in sectors like finance, healthcare, and engineering where audit trails and documentation are mandatory.\n- **Configuration & Flexibility:** XML files are widely used for application settings. The clear hierarchical structure allows easy updates, quick testing of setups, and management of complex configurations—without deep developer intervention.\n- **Reusability & Automation:** Automating the creation of system messages or logs in XML allows organizations to reuse and adapt those messages for various systems or processes, reducing manual effort, errors, and improving scalability.\n\n### How Big Tech Companies Use XML\n\n- **System Integration and Messaging:** Large enterprises including Amazon, Google, Microsoft, and SAP use XML for encoding, transporting, and processing data between distributed systems via web services (such as SOAP and REST APIs), often at web scale.\n- **Business Process Automation:** In supply chain management, e-commerce, and transactional processing, XML enables rapid, secure, and traceable information exchange—helping automate operations that cross organizational and geographical borders.\n- **Content Management & Transformation:** Companies use XML to manage and deliver dynamic content—such as translations, different document layouts, or multi-channel publishing—by separating data from its presentation and enabling real-time transformations through XSLT or similar technologies.\n- **Data Storage, Validation, and Big Data:** XML’s schema definitions (XSD) and well-defined structure are used by enterprises for validating and storing data models, supporting compatibility and quality across complex systems, including big data applications.\n\n### Why XML System Message Engineering Remains Relevant\n\n> “XML is currently the most sophisticated format for distributed data — the World Wide Web can be seen as one huge XML database... Rapid adoption by industry [reinforces] that XML is no longer optional.”\n\n- It brings **consistency**, **scalability**, and **reliability** to how software communicates, making development faster and systems more robust.\n- Enterprises continue to use XML alongside newer formats (like JSON) wherever rich validation, structured messaging, and backward compatibility with legacy systems are required.\n\n**In summary:** XML engineering empowers organizations, especially tech giants, to build, scale, and manage complex digital ecosystems by facilitating integration, automation, traceability, and standardization of data and messages across their platforms, operations, and partners.\n"
},
"typeVersion": 1
},
{
"id": "a2b6c9cc-d65a-490b-9688-33c0dce8c0d8",
"name": "付箋3",
"type": "n8n-nodes-base.stickyNote",
"position": [
672,
128
],
"parameters": {
"color": 3,
"width": 576,
"height": 560,
"content": "## \nNeed a tailor-made workflow? Tell me about your business and get a free proposal:\n\n**[Start here → Custom Automation Form](https://taskmorphr.com/contact)**\n\n---\n## 📈 Cost-Savings Snapshot \nCurious what automation could save you? \nRun the 60-second calculator:\n\n**[ROI / Cost Comparison](https://taskmorphr.com/cost-comparison)**\n\n---\n### ✉️ Reach me directly \n`paul@taskmorphr.com`"
},
"typeVersion": 1
},
{
"id": "fdcaa324-6fd3-4414-9738-8cdd18e5e6d3",
"name": "付箋4",
"type": "n8n-nodes-base.stickyNote",
"position": [
992,
528
],
"parameters": {
"color": 3,
"width": 224,
"height": 128,
"content": "### 🛠️ Build it yourself \nBrowse every ready-made workflow: \n[Full Template Pack — coming soon](https://n8n.io/creators/diagopl/)\n"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"9c93876d-d854-4f6a-a09b-15a9a55872b4": {
"ai_memory": [
[
{
"node": "eec1e7c6-2b03-423f-bf53-c3e762931c3b",
"type": "ai_memory",
"index": 0
}
]
]
},
"62f745df-0a4f-462d-8b6a-045cf7c1ae72": {
"ai_languageModel": [
[
{
"node": "eec1e7c6-2b03-423f-bf53-c3e762931c3b",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"5b147583-c453-434c-bbf9-52e116a5422f": {
"main": [
[
{
"node": "eec1e7c6-2b03-423f-bf53-c3e762931c3b",
"type": "main",
"index": 0
}
]
]
}
}
}よくある質問
このワークフローの使い方は?
上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。
このワークフローはどんな場面に適していますか?
中級 - エンジニアリング
有料ですか?
このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。
関連ワークフロー
エージェント AI Anthropic Opus4 および Sonnet4
Anthropic AIエージェント:Claude Sonnet 4 と Opus 4、思考機能と web 検索ツール付き
Agent
Http Request Tool
Tool Think
+
Agent
Http Request Tool
Tool Think
11 ノードDavide
エンジニアリング
Claude、RAG、Perplexity、Driveを統合した完全な源泉知識アシスタントの構築
Claude、RAG、Perplexity、Driveを統合した全源の知識アシスタントの構築
Set
Switch
Google Drive
+
Set
Switch
Google Drive
38 ノードPaul
内部Wiki
完全な B2B セールスフロー:Apollo リード生成、Mailgun 外信、および AI 返信管理
完全なB2Bセールスフロー:Apolloリード生成、Mailgunアウト Reach、AI返信管理
If
Set
Code
+
If
Set
Code
116 ノードPaul
コンテンツ作成
Claude Opus 4 を使って自然言語から完全なワークフローを生成
Claude Opus 4を使用して自然言語から完全なワークフローを生成
N8n
Set
Google Drive
+
N8n
Set
Google Drive
17 ノードElectrabot
エンジニアリング
データエンジニア AI Agent v3
スプレッドシート向けのAIデータ分析アシスタント、NocoDBプラットフォームを基に
Set
Noco Db Tool
Http Request
+
Set
Noco Db Tool
Http Request
10 ノードDerek Cheung
エンジニアリング
テクノロジーレーダー
SQLデータベース、RAG、ルーティングエージェントを使用したAI駆動の技術雷達コンサルタント
If
Code
Cron
+
If
Code
Cron
53 ノードSean Lon
エンジニアリング
ワークフロー情報
難易度
中級
ノード数9
カテゴリー1
ノードタイプ5
作成者
Paul
@diagoplAutomation expert & n8n power user. I build advanced workflows combining AI, outbound, and business logic. Grab my templates or reach out for custom builds.
外部リンク
n8n.ioで表示 →
このワークフローを共有