NoteTakingToolkit

class NoteTakingToolkit(BaseToolkit):

A toolkit for taking notes in a Markdown file.

This toolkit allows an agent to create, append to, and update a specific Markdown file for note-taking purposes.

init

def __init__(
    self,
    working_directory: Optional[str] = None,
    timeout: Optional[float] = None
):

Initialize the NoteTakingToolkit.

Parameters:

  • working_directory (str, optional): The path to the note file. If not provided, it will be determined by the CAMEL_WORKDIR environment variable (if set), saving the note as notes.md in that directory. If the environment variable is not set, it defaults to camel_working_dir/notes.md.
  • timeout (Optional[float]): The timeout for the toolkit.

append_note

def append_note(self, content: str):

Appends a note to the note file.

Parameters:

  • content (str): The content of the note to be appended.

Returns:

str: A message indicating the result of the operation.

read_note

def read_note(self):

Returns:

str: The content of the note file, or an error message if the file cannot be read.

get_tools

def get_tools(self):

Returns:

List[FunctionTool]: A list of FunctionTool objects.