Skip to main content

Start monitoring your tools

By default, nanomon does not start monitoring your tools. This could cause in excessive data being sent to nanomon with possibly low effective value in terms of monitoring. Instead, you have full control of what tools are monitored by nanomon.

Step 1: Enable tool discovering

As the default for tool discovering is false you have to explicitly enable it:
If you do not have your nanomon setup already, please visit the previous page.
with nanomon_context.run(
	discover_tools=True,
    ...
):

Step 2: Annotate your functions

To start monitoring the tools your ReAct agents/flows are calling all you have to do is to annotate the functions you want to monitor with:
@nanomon(name="read_file") # where the name can be ommitted or replaced with one of your chooice
def read_file(file_path: str, max_lines: Optional[int] = None) -> str: