note_taking_tool.md · 2.4 KB

note_taking_tool.py

1. Overview

The NoteTakingTool is a utility component for MindX agents. It provides a flexible mechanism for agents to create, read, update, delete, and list textual notes. Notes are stored as Markdown files (.md).

A key feature of this tool is its integration with the MemoryAgent. It no longer saves notes to a single, global directory. Instead, it stores notes within the dedicated workspace of the agent that is using the tool, ensuring that an agent's "thoughts" are properly sandboxed.

2. Core Architecture & Workflow

Agent-Specific Storage

Hierarchical Topic/Path Handling

Key Methods

- add / update: Creates or overwrites a note. Requires content and either a topic or file_name. - read: Reads the content of a note. Requires a topic or file_name. - delete: Deletes a note file. Requires a topic or file_name. - list: Lists all notes in the calling agent's notes directory.

3. Integration with the System

The NoteTakingTool is registered in the official_tools_registry.json. The BDIAgent's _initialize_tools_async method now intelligently passes the MemoryAgent instance to the tool's constructor upon loading. This allows any agent's BDI plan to include an action to TAKE_NOTES, and the resulting notes will be correctly and automatically saved to that agent's private workspace.


All DocumentsDocument IndexThe Book of mindXImprovement JournalAPI Reference