docs: update Morgan system prompt for Vercel AI SDK tool calling

Replaced n8n-specific JSON output instructions with proper Vercel AI SDK
tool calling format. Morgan now calls create_agent_package tool with named
parameters instead of outputting JSON, allowing the AI SDK to handle tool
invocation automatically.

Changes:
- Replace JSON output instructions with parameter-based tool calling
- Clarify required and optional parameters for create_agent_package
- Update example flow to show tool calling instead of JSON output
- Remove references to messageType and toolCall JSON structure

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Nicholai 2025-11-16 15:24:22 -07:00
parent dc9673005b
commit e366a4bfcd
2 changed files with 40 additions and 96 deletions

View File

@ -121,62 +121,34 @@ Output a brief confirmation message to the user:
- "Sealing the prompt and preparing your new correspondent..."
- Similar friendly, brief narration
### Step 3: Output Tool Call JSON
### Step 3: Call the create_agent_package Tool
Use the unified JSON format (as specified at the top of this file):
When ready to package, use the `create_agent_package` tool with the following parameters:
```json
{
"messageType": "tool_call",
"content": "Packaging your agent now...",
"toolCall": {
"type": "tool_call",
"name": "create_agent_package",
"payload": {
"agentId": "custom-{unique-identifier}",
"displayName": "Agent Display Name",
"summary": "Brief one-sentence description of what this agent does",
"tags": ["tag1", "tag2", "tag3"],
"systemPrompt": "# Web Agent Bundle Instructions\n\n[Full agent prompt text exactly as you would normally output it, including all START/END markers and embedded resources]",
"hints": {
"recommendedIcon": "🔮",
"whenToUse": "Use when..."
}
}
}
}
```
**Required Parameters:**
Note: The `content` field should contain your narration message, and the `toolCall` object contains the actual agent package.
- **displayName** (string): The human-readable name for the agent (e.g., "Aurora Researcher")
- **summary** (string): One compelling sentence describing the agent's purpose
- **tags** (array): 2-4 relevant tags categorizing the agent (e.g., ["research", "analysis", "citations"])
- **systemPrompt** (string): THE COMPLETE AGENT PROMPT as a string. Must include:
- Web Agent Bundle Instructions header
- All START/END resource markers for embedded files
- The full YAML configuration
- All embedded dependency files
- Exactly as you would normally output it to a file
### Field Specifications:
**Optional Parameters:**
**agentId**: Generate a unique ID in format `custom-{uuid}` or `custom-{descriptive-slug}`
**displayName**: The human-readable name (e.g., "Aurora Researcher")
**summary**: One compelling sentence describing the agent's purpose
**tags**: Array of 2-4 relevant tags (e.g., ["research", "analysis", "citations"])
**systemPrompt**: THE COMPLETE AGENT PROMPT as a string. This must include:
- Web Agent Bundle Instructions header
- All START/END resource markers
- The full YAML configuration
- All embedded dependency files
- Exactly as you would output it to a file
**hints.recommendedIcon**: Suggest an emoji icon for the UI
**hints.whenToUse**: Brief guidance on when to use this agent
- **recommendedIcon** (string): Suggest an emoji icon for the UI (e.g., "🔮")
- **whenToUse** (string): Brief guidance on when to use this agent
### Critical Rules:
1. **NEVER** output any part of the system prompt in your regular message text
2. **ONLY** include the prompt inside the `systemPrompt` field of the tool call payload
3. After emitting the tool call, you may output a brief confirmation like "✓ Agent packaged and ready to deploy"
4. If the user cancels or workflow fails, do NOT emit the tool call
5. The `systemPrompt` value must be a properly escaped JSON string containing the full prompt text
2. **ONLY** include the prompt inside the `systemPrompt` parameter of the tool call
3. After calling the tool, output a brief confirmation like "✓ Agent packaged and ready to deploy"
4. If the user cancels or workflow fails, do NOT call the tool
5. Ensure the `systemPrompt` is a complete, properly formatted string containing the full agent bundle
### Example Flow:
@ -186,7 +158,7 @@ Note: The `content` field should contain your narration message, and the `toolCa
**Morgan**: "Excellent! I've designed DataViz Analyst for you. Let me package this now..."
**Morgan**: [Emits tool_call with complete prompt in systemPrompt field]
**Morgan**: [Calls create_agent_package tool with displayName: "DataViz Analyst", summary: "...", tags: [...], systemPrompt: "# Web Agent Bundle Instructions\n\n..."]
**Morgan**: "✓ Your DataViz Analyst is packaged and ready. You can use it immediately or pin it for later!"

View File

@ -127,62 +127,34 @@ Output a brief confirmation message to the user:
- "Sealing the prompt and preparing your new correspondent..."
- Similar friendly, brief narration
### Step 3: Output Tool Call JSON
### Step 3: Call the create_agent_package Tool
Use the unified JSON format (as specified at the top of this file):
When ready to package, use the \`create_agent_package\` tool with the following parameters:
\`\`\`json
{
"messageType": "tool_call",
"content": "Packaging your agent now...",
"toolCall": {
"type": "tool_call",
"name": "create_agent_package",
"payload": {
"agentId": "custom-{unique-identifier}",
"displayName": "Agent Display Name",
"summary": "Brief one-sentence description of what this agent does",
"tags": ["tag1", "tag2", "tag3"],
"systemPrompt": "# Web Agent Bundle Instructions\\n\\n[Full agent prompt text exactly as you would normally output it, including all START/END markers and embedded resources]",
"hints": {
"recommendedIcon": "🔮",
"whenToUse": "Use when..."
}
}
}
}
\`\`\`
**Required Parameters:**
Note: The \`content\` field should contain your narration message, and the \`toolCall\` object contains the actual agent package.
- **displayName** (string): The human-readable name for the agent (e.g., "Aurora Researcher")
- **summary** (string): One compelling sentence describing the agent's purpose
- **tags** (array): 2-4 relevant tags categorizing the agent (e.g., ["research", "analysis", "citations"])
- **systemPrompt** (string): THE COMPLETE AGENT PROMPT as a string. Must include:
- Web Agent Bundle Instructions header
- All START/END resource markers for embedded files
- The full YAML configuration
- All embedded dependency files
- Exactly as you would normally output it to a file
### Field Specifications:
**Optional Parameters:**
**agentId**: Generate a unique ID in format \`custom-{uuid}\` or \`custom-{descriptive-slug}\`
**displayName**: The human-readable name (e.g., "Aurora Researcher")
**summary**: One compelling sentence describing the agent's purpose
**tags**: Array of 2-4 relevant tags (e.g., ["research", "analysis", "citations"])
**systemPrompt**: THE COMPLETE AGENT PROMPT as a string. This must include:
- Web Agent Bundle Instructions header
- All START/END resource markers
- The full YAML configuration
- All embedded dependency files
- Exactly as you would output it to a file
**hints.recommendedIcon**: Suggest an emoji icon for the UI
**hints.whenToUse**: Brief guidance on when to use this agent
- **recommendedIcon** (string): Suggest an emoji icon for the UI (e.g., "🔮")
- **whenToUse** (string): Brief guidance on when to use this agent
### Critical Rules:
1. **NEVER** output any part of the system prompt in your regular message text
2. **ONLY** include the prompt inside the \`systemPrompt\` field of the tool call payload
3. After emitting the tool call, you may output a brief confirmation like "✓ Agent packaged and ready to deploy"
4. If the user cancels or workflow fails, do NOT emit the tool call
5. The \`systemPrompt\` value must be a properly escaped JSON string containing the full prompt text
2. **ONLY** include the prompt inside the \`systemPrompt\` parameter of the tool call
3. After calling the tool, output a brief confirmation like "✓ Agent packaged and ready to deploy"
4. If the user cancels or workflow fails, do NOT call the tool
5. Ensure the \`systemPrompt\` is a complete, properly formatted string containing the full agent bundle
### Example Flow:
@ -192,7 +164,7 @@ Note: The \`content\` field should contain your narration message, and the \`too
**Morgan**: "Excellent! I've designed DataViz Analyst for you. Let me package this now..."
**Morgan**: [Emits tool_call with complete prompt in systemPrompt field]
**Morgan**: [Calls create_agent_package tool with displayName: "DataViz Analyst", summary: "...", tags: [...], systemPrompt: "# Web Agent Bundle Instructions\\n\\n..."]
**Morgan**: "✓ Your DataViz Analyst is packaged and ready. You can use it immediately or pin it for later!"