@elizaos/prompts 2.0.0-alpha.43 → 2.0.0-alpha.430

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/python/prompts.py +828 -244
  2. package/dist/rust/prompts.rs +809 -245
  3. package/dist/typescript/index.d.ts +40 -0
  4. package/dist/typescript/index.ts +846 -242
  5. package/package.json +6 -7
  6. package/prompts/add_contact.txt +29 -0
  7. package/prompts/choose_option.txt +4 -7
  8. package/prompts/extract_secret_operation.txt +20 -0
  9. package/prompts/extract_secret_request.txt +16 -0
  10. package/prompts/extract_secrets.txt +17 -0
  11. package/prompts/image_description.txt +8 -15
  12. package/prompts/image_generation.txt +4 -7
  13. package/prompts/initial_summarization.txt +28 -0
  14. package/prompts/long_term_extraction.txt +128 -0
  15. package/prompts/message_classifier.txt +37 -0
  16. package/prompts/message_handler.txt +44 -70
  17. package/prompts/multi_step_decision.txt +6 -18
  18. package/prompts/multi_step_summary.txt +4 -10
  19. package/prompts/option_extraction.txt +4 -9
  20. package/prompts/post_action_decision.txt +35 -0
  21. package/prompts/post_creation.txt +14 -25
  22. package/prompts/reflection.txt +8 -11
  23. package/prompts/reflection_evaluator.txt +37 -32
  24. package/prompts/remove_contact.txt +20 -0
  25. package/prompts/reply.txt +5 -8
  26. package/prompts/schedule_follow_up.txt +28 -0
  27. package/prompts/search_contacts.txt +23 -0
  28. package/prompts/should_follow_room.txt +18 -0
  29. package/prompts/should_mute_room.txt +18 -0
  30. package/prompts/should_respond.txt +37 -37
  31. package/prompts/should_respond_with_context.txt +41 -0
  32. package/prompts/should_unfollow_room.txt +18 -0
  33. package/prompts/should_unmute_room.txt +18 -0
  34. package/prompts/think.txt +25 -0
  35. package/prompts/update_contact.txt +27 -0
  36. package/prompts/update_entity.txt +6 -13
  37. package/prompts/update_role.txt +29 -0
  38. package/prompts/update_settings.txt +5 -12
  39. package/prompts/update_summarization.txt +30 -0
  40. package/scripts/generate-action-docs.js +18 -1
  41. package/scripts/generate-plugin-action-spec.js +1 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@elizaos/prompts",
3
3
  "private": false,
4
- "version": "2.0.0-alpha.43",
4
+ "version": "2.0.0-alpha.430",
5
5
  "description": "Shared prompt templates for elizaOS across TypeScript, Python, and Rust",
6
6
  "type": "module",
7
7
  "main": "./dist/typescript/index.ts",
@@ -15,18 +15,17 @@
15
15
  "./rust": "./dist/rust/prompts.rs"
16
16
  },
17
17
  "scripts": {
18
- "build": "node scripts/generate.js && node scripts/generate-plugin-action-spec.js && node scripts/generate-action-docs.js",
18
+ "build": "node scripts/generate.js && node scripts/generate-plugin-action-spec.js && bunx @biomejs/biome format --write specs/actions/plugins.generated.json && node scripts/generate-action-docs.js",
19
19
  "build:typescript": "node scripts/generate.js --target typescript",
20
20
  "build:python": "node scripts/generate.js --target python",
21
21
  "build:rust": "node scripts/generate.js --target rust",
22
22
  "build:action-docs": "node scripts/generate-action-docs.js",
23
- "build:plugin-action-spec": "node scripts/generate-plugin-action-spec.js",
23
+ "build:plugin-action-spec": "node scripts/generate-plugin-action-spec.js && bunx @biomejs/biome format --write specs/actions/plugins.generated.json",
24
24
  "check:secrets": "node scripts/check-secrets.js",
25
25
  "clean": "rm -rf dist",
26
- "lint": "bunx @biomejs/biome check --write --unsafe .",
26
+ "lint": "bunx @biomejs/biome check --write .",
27
27
  "lint:check": "bunx @biomejs/biome check .",
28
- "typecheck": "echo 'No TypeScript source files to check'",
29
- "test": "node --test test/*.test.js"
28
+ "typecheck": "echo 'No TypeScript source files to check'"
30
29
  },
31
30
  "files": [
32
31
  "prompts/",
@@ -44,5 +43,5 @@
44
43
  "publishConfig": {
45
44
  "access": "public"
46
45
  },
47
- "gitHead": "921845fc70406f93b8649731260e3254228cb21a"
46
+ "gitHead": "c3c6281e6b43f1bdf8b54fcec1a00986c5828cf8"
48
47
  }
@@ -0,0 +1,29 @@
1
+ task: Extract contact information to add to the relationships.
2
+
3
+ context:
4
+ {{providers}}
5
+
6
+ recent_messages:
7
+ {{recentMessages}}
8
+
9
+ current_message:
10
+ {{message}}
11
+
12
+ instructions[5]:
13
+ - identify the contact name being added
14
+ - include entityId only if it is explicitly known from context
15
+ - return categories as a comma-separated list
16
+ - include notes, timezone, and language only when clearly present
17
+ - include a short reason for why this contact should be saved
18
+
19
+ output:
20
+ TOON only. Return exactly one TOON document. No prose before or after it. No <think>.
21
+
22
+ Example:
23
+ contactName: Jane Doe
24
+ entityId:
25
+ categories: vip,colleague
26
+ notes: Met at the design summit
27
+ timezone: America/New_York
28
+ language: English
29
+ reason: Important collaborator to remember
@@ -9,14 +9,11 @@
9
9
  Analyze the options and select the most appropriate one based on the current context.
10
10
  Provide your reasoning and the selected option ID.
11
11
 
12
- Respond using XML format like this:
13
- <response>
14
- <thought>Your reasoning for the selection</thought>
15
- <selected_id>The ID of the selected option</selected_id>
16
- </response>
17
-
18
- IMPORTANT: Your response must ONLY contain the <response></response> XML block above.
12
+ Respond using TOON like this:
13
+ thought: Your reasoning for the selection
14
+ selected_id: The ID of the selected option
19
15
 
16
+ IMPORTANT: Your response must ONLY contain the TOON document above.
20
17
 
21
18
 
22
19
 
@@ -0,0 +1,20 @@
1
+ You are helping manage secrets for an AI agent.
2
+
3
+ Determine what operation the user wants to perform:
4
+ - get: Retrieve a secret value
5
+ - set: Store a new secret
6
+ - delete: Remove a secret
7
+ - list: Show all available secrets (without values)
8
+ - check: Check if a secret exists
9
+
10
+ Common patterns:
11
+ - "What is my OpenAI key?" -> operation: get, key: OPENAI_API_KEY
12
+ - "Do I have a Discord token set?" -> operation: check, key: DISCORD_BOT_TOKEN
13
+ - "Show me my secrets" -> operation: list
14
+ - "Delete my old API key" -> operation: delete
15
+ - "Remove TWITTER_API_KEY" -> operation: delete, key: TWITTER_API_KEY
16
+ - "Set my key to sk-..." -> operation: set, key: <infer>, value: sk-...
17
+
18
+ {{recentMessages}}
19
+
20
+ Extract the operation, key (if applicable), value (if applicable), and level from the user's message.
@@ -0,0 +1,16 @@
1
+ You are helping an AI agent request a missing secret.
2
+ Determine what secret the agent needs and why based on the recent conversation.
3
+
4
+ Common patterns:
5
+ - "I need an API key for OpenAI" -> key: OPENAI_API_KEY
6
+ - "Missing TWITTER_TOKEN" -> key: TWITTER_TOKEN
7
+ - "I cannot proceed without a Discord token" -> key: DISCORD_TOKEN
8
+
9
+ Recent Messages:
10
+ {{recentMessages}}
11
+
12
+ Output JSON with:
13
+ - key: The name of the secret needed (e.g. OPENAI_API_KEY)
14
+ - reason: Why it is needed (optional)
15
+
16
+ If no specific secret is requested, return null json.
@@ -0,0 +1,17 @@
1
+ You are extracting secret/configuration values from the user's message.
2
+
3
+ The user wants to set one or more secrets. Extract:
4
+ 1. The secret key (should be UPPERCASE_WITH_UNDERSCORES format)
5
+ 2. The secret value
6
+ 3. Optional description
7
+ 4. Secret type (api_key, secret, credential, url, or config)
8
+
9
+ Common patterns:
10
+ - "Set my OpenAI key to sk-..." -> key: OPENAI_API_KEY, value: sk-...
11
+ - "My Anthropic API key is sk-ant-..." -> key: ANTHROPIC_API_KEY, value: sk-ant-...
12
+ - "Use this Discord token: ..." -> key: DISCORD_BOT_TOKEN, value: ...
13
+ - "Set DATABASE_URL to postgres://..." -> key: DATABASE_URL, value: postgres://...
14
+
15
+ {{recentMessages}}
16
+
17
+ Extract the secrets from the user's message. If the key name isn't explicitly specified, infer an appropriate UPPERCASE_WITH_UNDERSCORES name based on the context.
@@ -1,28 +1,21 @@
1
- <task>Analyze the provided image and generate a comprehensive description with multiple levels of detail.</task>
1
+ Task: Analyze the provided image and generate a comprehensive description with multiple levels of detail.
2
2
 
3
- <instructions>
3
+ Instructions:
4
4
  Carefully examine the image and provide:
5
5
  1. A concise, descriptive title that captures the main subject or scene
6
6
  2. A brief summary description (1-2 sentences) highlighting the key elements
7
7
  3. An extensive, detailed description that covers all visible elements, composition, lighting, colors, mood, and any other relevant details
8
8
 
9
9
  Be objective and descriptive. Focus on what you can actually see in the image rather than making assumptions about context or meaning.
10
- </instructions>
11
10
 
12
- <output>
13
- Do NOT include any thinking, reasoning, or <think> sections in your response.
14
- Go directly to the XML response format without any preamble or explanation.
11
+ Output:
15
12
 
16
- Respond using XML format like this:
17
- <response>
18
- <title>A concise, descriptive title for the image</title>
19
- <description>A brief 1-2 sentence summary of the key elements in the image</description>
20
- <text>An extensive, detailed description covering all visible elements, composition, lighting, colors, mood, setting, objects, people, activities, and any other relevant details you can observe in the image</text>
21
- </response>
22
-
23
- IMPORTANT: Your response must ONLY contain the <response></response> XML block above. Do not include any text, thinking, or reasoning before or after this XML block. Start your response immediately with <response> and end with </response>.
24
- </output>
13
+ Respond using TOON like this:
14
+ title: A concise, descriptive title for the image
15
+ description: A brief 1-2 sentence summary of the key elements in the image
16
+ text: An extensive, detailed description covering all visible elements, composition, lighting, colors, mood, setting, objects, people, activities, and any other relevant details you can observe in the image
25
17
 
18
+ IMPORTANT: Your response must ONLY contain the TOON document above. Do not include any text, thinking, or reasoning before or after it.
26
19
 
27
20
 
28
21
 
@@ -9,14 +9,11 @@ The prompt should be specific, descriptive, and suitable for AI image generation
9
9
  # Recent conversation:
10
10
  {{recentMessages}}
11
11
 
12
- Respond using XML format like this:
13
- <response>
14
- <thought>Your reasoning for the image prompt</thought>
15
- <prompt>Detailed image generation prompt</prompt>
16
- </response>
17
-
18
- IMPORTANT: Your response must ONLY contain the <response></response> XML block above.
12
+ Respond using TOON like this:
13
+ thought: Your reasoning for the image prompt
14
+ prompt: Detailed image generation prompt
19
15
 
16
+ IMPORTANT: Your response must ONLY contain the TOON document above.
20
17
 
21
18
 
22
19
 
@@ -0,0 +1,28 @@
1
+ # Task: Summarize Conversation
2
+
3
+ You are analyzing a conversation to create a concise summary that captures the key points, topics, and important details.
4
+
5
+ # Recent Messages
6
+ {{recentMessages}}
7
+
8
+ # Instructions
9
+ Generate a summary that:
10
+ 1. Captures the main topics discussed
11
+ 2. Highlights key information shared
12
+ 3. Notes any decisions made or questions asked
13
+ 4. Maintains context for future reference
14
+ 5. Is concise but comprehensive
15
+
16
+ **IMPORTANT**: Keep the summary under 2500 tokens. Be comprehensive but concise.
17
+
18
+ Also extract:
19
+ - **Topics**: List of main topics discussed (comma-separated)
20
+ - **Key Points**: Important facts or decisions (bullet points)
21
+
22
+ Respond in TOON:
23
+ text: Your comprehensive summary here
24
+ topics[0]: topic1
25
+ topics[1]: topic2
26
+ topics[2]: topic3
27
+ keyPoints[0]: First key point
28
+ keyPoints[1]: Second key point
@@ -0,0 +1,128 @@
1
+ # Task: Extract Long-Term Memory (Strict Criteria)
2
+
3
+ You are analyzing a conversation to extract ONLY the most critical, persistent information about the user using cognitive science memory categories.
4
+
5
+ # Recent Messages
6
+ {{recentMessages}}
7
+
8
+ # Current Long-Term Memories
9
+ {{existingMemories}}
10
+
11
+ # Memory Categories (Based on Cognitive Science)
12
+
13
+ ## 1. EPISODIC Memory
14
+ Personal experiences and specific events with temporal/spatial context.
15
+ **Examples:**
16
+ - "User completed migration project from MongoDB to PostgreSQL in Q2 2024"
17
+ - "User encountered authentication bug in production on March 15th"
18
+ - "User had a negative experience with Docker networking in previous job"
19
+
20
+ **Requirements:**
21
+ - Must include WHO did WHAT, WHEN/WHERE
22
+ - Must be a specific, concrete event (not a pattern)
23
+ - Must have significant impact or relevance to future work
24
+
25
+ ## 2. SEMANTIC Memory
26
+ General facts, concepts, knowledge, and established truths about the user.
27
+ **Examples:**
28
+ - "User is a senior backend engineer with 8 years experience"
29
+ - "User specializes in distributed systems and microservices architecture"
30
+ - "User's primary programming language is TypeScript"
31
+ - "User works at Acme Corp as technical lead"
32
+
33
+ **Requirements:**
34
+ - Must be factual, timeless information
35
+ - Must be explicitly stated or demonstrated conclusively
36
+ - No speculation or inference from single instances
37
+ - Core identity, expertise, or knowledge only
38
+
39
+ ## 3. PROCEDURAL Memory
40
+ Skills, workflows, methodologies, and how-to knowledge.
41
+ **Examples:**
42
+ - "User follows strict TDD workflow: write tests first, then implementation"
43
+ - "User prefers git rebase over merge to maintain linear history"
44
+ - "User's debugging process: check logs → reproduce locally → binary search"
45
+ - "User always writes JSDoc comments before implementing functions"
46
+
47
+ **Requirements:**
48
+ - Must describe HOW user does something
49
+ - Must be a repeated, consistent pattern (seen 3+ times or explicitly stated as standard practice)
50
+ - Must be a workflow, methodology, or skill application
51
+ - Not one-off preferences
52
+
53
+ # ULTRA-STRICT EXTRACTION CRITERIA
54
+
55
+ ## DO EXTRACT (Only These):
56
+
57
+ **EPISODIC:**
58
+ - Significant completed projects or milestones
59
+ - Important bugs, incidents, or problems encountered
60
+ - Major decisions made with lasting impact
61
+ - Formative experiences that shape future work
62
+
63
+ **SEMANTIC:**
64
+ - Professional identity (role, title, company)
65
+ - Core expertise and specializations (stated explicitly or demonstrated conclusively)
66
+ - Primary languages, frameworks, or tools (not exploratory use)
67
+ - Established facts about their work context
68
+
69
+ **PROCEDURAL:**
70
+ - Consistent workflows demonstrated 3+ times or explicitly stated
71
+ - Standard practices user always follows
72
+ - Methodology preferences with clear rationale
73
+ - Debugging, testing, or development processes
74
+
75
+ ## NEVER EXTRACT:
76
+
77
+ - **One-time requests or tasks** (e.g., "can you generate an image", "help me debug this")
78
+ - **Casual conversations** without lasting significance
79
+ - **Exploratory questions** (e.g., "how does X work?")
80
+ - **Temporary context** (current bug, today's task)
81
+ - **Preferences from single occurrence** (e.g., user asked for code once)
82
+ - **Social pleasantries** (thank you, greetings)
83
+ - **Testing or experimentation** (trying out a feature)
84
+ - **Common patterns everyone has** (likes clear explanations)
85
+ - **Situational information** (working on feature X today)
86
+ - **Opinions without persistence** (single complaint, isolated praise)
87
+ - **General knowledge** (not specific to user)
88
+
89
+ # Quality Gates (ALL Must Pass)
90
+
91
+ 1. **Significance Test**: Will this matter in 3+ months?
92
+ 2. **Specificity Test**: Is this concrete and actionable?
93
+ 3. **Evidence Test**: Is there strong evidence (3+ instances OR explicit self-identification)?
94
+ 4. **Uniqueness Test**: Is this specific to THIS user (not generic)?
95
+ 5. **Confidence Test**: Confidence must be >= 0.85 (be VERY conservative)
96
+ 6. **Non-Redundancy Test**: Does this add NEW information not in existing memories?
97
+
98
+ # Confidence Scoring (Be Conservative)
99
+
100
+ - **0.95-1.0**: User explicitly stated as core identity/practice AND demonstrated multiple times
101
+ - **0.85-0.94**: User explicitly stated OR consistently demonstrated 5+ times
102
+ - **0.75-0.84**: Strong pattern (3-4 instances) with supporting context
103
+ - **Below 0.75**: DO NOT EXTRACT (insufficient evidence)
104
+
105
+ # Critical Instructions
106
+
107
+ 1. **Default to NOT extracting** - When in doubt, skip it
108
+ 2. **Require overwhelming evidence** - One or two mentions is NOT enough
109
+ 3. **Focus on what's PERSISTENT** - Not what's temporary or situational
110
+ 4. **Verify against existing memories** - Don't duplicate or contradict
111
+ 5. **Maximum 2-3 extractions per run** - Quality over quantity
112
+
113
+ **If there are no qualifying facts (which is common), return no memories entries.**
114
+
115
+ # Response Format
116
+
117
+ memories[0]:
118
+ category: semantic
119
+ content: User is a senior TypeScript developer with 8 years of backend experience
120
+ confidence: 0.95
121
+ memories[1]:
122
+ category: procedural
123
+ content: User follows TDD workflow: writes tests before implementation, runs tests after each change
124
+ confidence: 0.88
125
+ memories[2]:
126
+ category: episodic
127
+ content: User led database migration from MongoDB to PostgreSQL for payment system in Q2 2024
128
+ confidence: 0.92
@@ -0,0 +1,37 @@
1
+ Analyze this user request and classify it for planning purposes:
2
+
3
+ "{{text}}"
4
+
5
+ Classify the request across these dimensions:
6
+
7
+ 1. COMPLEXITY LEVEL:
8
+ - simple: Direct actions that don't require planning
9
+ - medium: Multi-step tasks requiring coordination
10
+ - complex: Strategic initiatives with multiple stakeholders
11
+ - enterprise: Large-scale transformations with full complexity
12
+
13
+ 2. PLANNING TYPE:
14
+ - direct_action: Single action, no planning needed
15
+ - sequential_planning: Multiple steps in sequence
16
+ - strategic_planning: Complex coordination with stakeholders
17
+
18
+ 3. REQUIRED CAPABILITIES:
19
+ - List specific capabilities needed (analysis, communication, project_management, etc.)
20
+
21
+ 4. STAKEHOLDERS:
22
+ - List types of people/groups involved
23
+
24
+ 5. CONSTRAINTS:
25
+ - List limitations or requirements mentioned
26
+
27
+ 6. DEPENDENCIES:
28
+ - List dependencies between tasks or external factors
29
+
30
+ Respond in this exact format:
31
+ COMPLEXITY: [simple|medium|complex|enterprise]
32
+ PLANNING: [direct_action|sequential_planning|strategic_planning]
33
+ CAPABILITIES: [comma-separated list]
34
+ STAKEHOLDERS: [comma-separated list]
35
+ CONSTRAINTS: [comma-separated list]
36
+ DEPENDENCIES: [comma-separated list]
37
+ CONFIDENCE: [0.0-1.0]
@@ -1,75 +1,49 @@
1
- <task>Generate dialog and actions for the character {{agentName}}.</task>
1
+ task: Generate dialog and actions for {{agentName}}.
2
2
 
3
- <providers>
3
+ context:
4
4
  {{providers}}
5
- </providers>
6
5
 
7
- <instructions>
8
- Write a thought and plan for {{agentName}} and decide what actions to take.
9
-
10
- IMPORTANT ACTION ORDERING RULES:
11
- - Actions are executed in the ORDER you list them - the order MATTERS!
12
- - REPLY should come FIRST to acknowledge the user's request before executing other actions
13
- - Common patterns:
14
- - For requests requiring tool use: REPLY,CALL_MCP_TOOL (acknowledge first, then gather info)
15
- - For task execution: REPLY,SEND_MESSAGE or REPLY,EVM_SWAP_TOKENS (acknowledge first, then do the task)
16
- - For multi-step operations: REPLY,ACTION1,ACTION2 (acknowledge first, then complete all steps)
17
- - REPLY is used to acknowledge and inform the user about what you're going to do
18
- - Follow-up actions execute the actual tasks after acknowledgment
19
- - Use IGNORE only when you should not respond at all
20
- - If you use IGNORE, do not include any other actions. IGNORE should be used alone when you should not respond or take any actions.
21
-
22
- IMPORTANT ACTION PARAMETERS:
23
- - Some actions accept input parameters that you should extract from the conversation
24
- - When an action has parameters listed in its description, include a <params> block for that action
25
- - Extract parameter values from the user's message and conversation context
26
- - Required parameters MUST be provided; optional parameters can be omitted if not mentioned
27
- - If you cannot determine a required parameter value, ask the user for clarification in your <text>
28
-
29
- IMPORTANT CODE BLOCK FORMATTING RULES:
30
- - If {{agentName}} includes code examples, snippets, or multi-line code in the response, ALWAYS wrap the code with ``` fenced code blocks (specify the language if known, e.g., ```python).
31
- - ONLY use fenced code blocks for actual code. Do NOT wrap non-code text, instructions, or single words in fenced code blocks.
32
- - If including inline code (short single words or function names), use single backticks (`) as appropriate.
33
- - This ensures the user sees clearly formatted and copyable code when relevant.
34
-
35
- First, think about what you want to do next and plan your actions. Then, write the next message and include the actions you plan to take.
36
- </instructions>
37
-
38
- <keys>
39
- "thought" should be a short description of what the agent is thinking about and planning.
40
- "actions" should be a comma-separated list of the actions {{agentName}} plans to take based on the thought, IN THE ORDER THEY SHOULD BE EXECUTED (if none, use IGNORE, if simply responding with text, use REPLY)
41
- "text" should be the text of the next message for {{agentName}} which they will send to the conversation.
42
- "params" (optional) should contain action parameters when actions require input. Format as nested XML with action name as wrapper.
43
- </keys>
44
-
45
- <output>
46
- Do NOT include any thinking, reasoning, or <think> sections in your response.
47
- Go directly to the XML response format without any preamble or explanation.
48
-
49
- Respond using XML format like this:
6
+ rules[11]:
7
+ - think briefly, then respond
8
+ - always include a <thought> field, even for direct replies
9
+ - actions execute in listed order
10
+ - if replying without another grounded state/action query, REPLY goes first
11
+ - use IGNORE or STOP only by themselves
12
+ - include providers only when needed
13
+ - use provider_hints from context when present instead of restating the same rules
14
+ - if an action needs inputs, include them inside that action's <params> block
15
+ - if a required param is unknown, ask for clarification in text
16
+ - for live status questions or remaining-work queries, do not answer from recent conversation alone; call the relevant action/provider to refresh state, and do not pair it with a speculative REPLY that guesses the result
17
+ - when an action will fetch the state and produce the final grounded answer, do not add REPLY just to say "checking", "let me look", or similar filler; use the action alone and leave text empty
18
+ - for LifeOps create requests with a clear defaultable habit or natural window, such as drinking water, stretch breaks during the day, weekday-after-lunch Invisalign checks, or brushing when waking up and before bed, call LIFE instead of asking for exact clock times unless the user explicitly asks for precise scheduling
19
+
20
+ control_actions:
21
+ - STOP means the task is done and the agent should end the run without executing more actions
22
+ - STOP is a terminal control action even if it is not listed in available actions
23
+
24
+ fields[5]{name,meaning}:
25
+ - thought | short plan
26
+ - actions | ordered <action> entries inside <actions>
27
+ - providers | array of provider names, or empty
28
+ - text | next message for {{agentName}}
29
+ - simple | true or false
30
+
31
+ formatting:
32
+ - wrap multi-line code in fenced code blocks
33
+ - use inline backticks for short code identifiers
34
+
35
+ output:
36
+ XML only. Return exactly one <response>...</response> document. No prose before or after it. No <think>.
37
+
38
+ Example:
50
39
  <response>
51
- <thought>Your thought here</thought>
52
- <actions>ACTION1,ACTION2</actions>
53
- <text>Your response text here</text>
54
- <params>
55
- <ACTION1>
56
- <paramName1>value1</paramName1>
57
- <paramName2>value2</paramName2>
58
- </ACTION1>
59
- <ACTION2>
60
- <paramName1>value1</paramName1>
61
- </ACTION2>
62
- </params>
40
+ <thought>Reply briefly. No extra providers needed.</thought>
41
+ <actions>
42
+ <action>
43
+ <name>REPLY</name>
44
+ </action>
45
+ </actions>
46
+ <providers></providers>
47
+ <text>Your message here</text>
48
+ <simple>true</simple>
63
49
  </response>
64
-
65
- The <params> block is optional - only include when actions require input parameters.
66
- If an action has no parameters or you're only using REPLY/IGNORE, omit <params> entirely.
67
-
68
- IMPORTANT: Your response must ONLY contain the <response></response> XML block above. Do not include any text, thinking, or reasoning before or after this XML block. Start your response immediately with <response> and end with </response>.
69
- </output>
70
-
71
-
72
-
73
-
74
-
75
-
@@ -1,6 +1,4 @@
1
- <task>
2
1
  Determine the next step the assistant should take in this conversation to help the user reach their goal.
3
- </task>
4
2
 
5
3
  {{recentMessages}}
6
4
 
@@ -26,29 +24,19 @@ These are the actions or data provider calls that have already been used in this
26
24
 
27
25
  {{actionResults}}
28
26
 
29
- <keys>
27
+ keys:
30
28
  "thought" Clearly explain your reasoning for the selected providers and/or action, and how this step contributes to resolving the user's request.
31
29
  "action" Name of the action to execute after providers return (can be empty if no action is needed).
32
30
  "providers" List of provider names to call in this step (can be empty if none are needed).
33
- "params" Optional XML parameters for the selected action. Use nested XML only when the action needs input.
34
31
  "isFinish" Set to true only if the task is fully complete.
35
- </keys>
36
32
 
37
33
  ⚠️ IMPORTANT: Do **not** mark the task as `isFinish: true` immediately after calling an action. Wait for the action to complete before deciding the task is finished.
38
34
 
39
- <output>
40
- <response>
41
- <thought>Your thought here</thought>
42
- <action>ACTION</action>
43
- <providers>PROVIDER1,PROVIDER2</providers>
44
- <params>
45
- <ACTION>
46
- <paramName>value</paramName>
47
- </ACTION>
48
- </params>
49
- <isFinish>true | false</isFinish>
50
- </response>
51
- </output>
35
+ output:
36
+ thought: Your thought here
37
+ action: ACTION
38
+ providers[2]: PROVIDER1,PROVIDER2
39
+ isFinish: false
52
40
 
53
41
 
54
42
 
@@ -1,6 +1,4 @@
1
- <task>
2
1
  Summarize what the assistant has done so far and provide a final response to the user based on the completed steps.
3
- </task>
4
2
 
5
3
  # Context Information
6
4
  {{bio}}
@@ -28,14 +26,10 @@ Here are the actions taken by the assistant to fulfill the request:
28
26
 
29
27
  - Review the execution trace and last reasoning step carefully
30
28
 
31
- - Your final output MUST be in this XML format:
32
- <output>
33
- <response>
34
- <thought>Your thought here</thought>
35
- <text>Your final message to the user</text>
36
- </response>
37
- </output>
38
-
29
+ - Your final output MUST be TOON in this format:
30
+ output:
31
+ thought: Your thought here
32
+ text: Your final message to the user
39
33
 
40
34
 
41
35
 
@@ -12,17 +12,12 @@
12
12
  3. Return the task ID (shortened UUID) and selected option name exactly as listed above
13
13
  4. If no clear selection is made, return null for both fields
14
14
 
15
- Do NOT include any thinking, reasoning, or <think> sections in your response.
16
- Go directly to the XML response format without any preamble or explanation.
17
15
 
18
- Return in XML format:
19
- <response>
20
- <taskId>string_or_null</taskId>
21
- <selectedOption>OPTION_NAME_or_null</selectedOption>
22
- </response>
23
-
24
- IMPORTANT: Your response must ONLY contain the <response></response> XML block above. Do not include any text, thinking, or reasoning before or after this XML block. Start your response immediately with <response> and end with </response>.
16
+ Return in TOON format:
17
+ taskId: string_or_null
18
+ selectedOption: OPTION_NAME_or_null
25
19
 
20
+ IMPORTANT: Your response must ONLY contain the TOON document above. Do not include any text, thinking, or reasoning before or after it.
26
21
 
27
22
 
28
23
 
@@ -0,0 +1,35 @@
1
+ Continue helping the user after reviewing the latest action results.
2
+
3
+ context:
4
+ {{providers}}
5
+
6
+ recent conversation:
7
+ {{recentMessages}}
8
+
9
+ recent action results:
10
+ {{actionResults}}
11
+
12
+ latest reflection task status:
13
+ {{taskCompletionStatus}}
14
+
15
+ rules[10]:
16
+ - think briefly, then continue the task from the latest action results
17
+ - actions execute in listed order
18
+ - if replying, REPLY goes first
19
+ - use IGNORE or STOP only by themselves
20
+ - include providers only when needed
21
+ - use provider_hints from context when present instead of restating the same rules
22
+ - if an action needs inputs, include them under params keyed by action name
23
+ - if a required param is unknown, ask for clarification in text
24
+ - if reflection says the task is incomplete, keep working or explain the concrete follow-up you still need
25
+ - if the task is complete, either reply to the user or use STOP to end the run
26
+ - STOP is a terminal control action even if it is not listed in available actions
27
+
28
+ output:
29
+ TOON only. Return exactly one TOON document. No prose before or after it. No <think>.
30
+
31
+ thought: Your thought here
32
+ actions[1]: ACTION
33
+ providers[0]:
34
+ text: Your message here
35
+ simple: true