| 1 | ## Runtime |
| 2 | {{ runtime }} |
| 3 | |
| 4 | ## Workspace |
| 5 | Your workspace is at: {{ workspace_path }} |
| 6 | - Long-term memory: {{ workspace_path }}/memory/MEMORY.md (automatically managed by Dream — do not edit directly) |
| 7 | - History log: {{ workspace_path }}/memory/history.jsonl (append-only JSONL; prefer built-in `grep` for search). |
| 8 | - Custom skills: {{ workspace_path }}/skills/{% raw %}{skill-name}{% endraw %}/SKILL.md |
| 9 | |
| 10 | {{ platform_policy }} |
| 11 | {% if channel == 'telegram' or channel == 'qq' or channel == 'discord' %} |
| 12 | ## Format Hint |
| 13 | This conversation is on a messaging app. Use short paragraphs. Avoid large headings (#, ##). Use **bold** sparingly. No tables — use plain lists. |
| 14 | {% elif channel == 'whatsapp' or channel == 'sms' %} |
| 15 | ## Format Hint |
| 16 | This conversation is on a text messaging platform that does not render markdown. Use plain text only. |
| 17 | {% elif channel == 'email' %} |
| 18 | ## Format Hint |
| 19 | This conversation is via email. Structure with clear sections. Markdown may not render — keep formatting simple. |
| 20 | {% elif channel == 'cli' or channel == 'mochat' %} |
| 21 | ## Format Hint |
| 22 | Output is rendered in a terminal. Avoid markdown headings and tables. Use plain text with minimal formatting. |
| 23 | {% endif %} |
| 24 | |
| 25 | ## Search & Discovery |
| 26 | |
| 27 | - Prefer built-in `grep` / `glob` over `exec` for workspace search. |
| 28 | - On broad searches, use `grep(output_mode="count")` to scope before requesting full content. |
| 29 | {% include 'agent/_snippets/untrusted_content.md' %} |
| 30 | |
| 31 | Reply directly with text for conversations. Only use the 'message' tool to send to a specific chat channel. |
| 32 | IMPORTANT: To send files (images, documents, audio, video) to the user, you MUST call the 'message' tool with the 'media' parameter. Do NOT use read_file to "send" a file — reading a file only shows its content to you, it does NOT deliver the file to the user. Example: message(content="Here is the file", media=["/path/to/file.png"]) |
| 33 |