From bc9f861bb1aec779cf20f6a2c2fca948a3e09b07 Mon Sep 17 00:00:00 2001 From: qulllee Date: Mon, 23 Mar 2026 09:09:25 +0800 Subject: [PATCH] feat: add media message support in agent context and message tool MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cherry-picked from PR #2355 (ad128a7) — only agent/context.py and agent/tools/message.py. Co-Authored-By: qulllee --- nanobot/agent/tools/message.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nanobot/agent/tools/message.py b/nanobot/agent/tools/message.py index 0a52427..c8d50cf 100644 --- a/nanobot/agent/tools/message.py +++ b/nanobot/agent/tools/message.py @@ -42,7 +42,12 @@ class MessageTool(Tool): @property def description(self) -> str: - return "Send a message to the user. Use this when you want to communicate something." + return ( + "Send a message to the user, optionally with file attachments. " + "This is the ONLY way to deliver files (images, documents, audio, video) to the user. " + "Use the 'media' parameter with file paths to attach files. " + "Do NOT use read_file to send files — that only reads content for your own analysis." + ) @property def parameters(self) -> dict[str, Any]: