trading_agent.tools.add_note_tool
¶
The add_note tool: records one to three short lessons in the desk's notes for today.
Notes go to notes/YYYY-MM-DD.md in the desk folder, one bullet per note with the India time. When a session ends, the desk folds the day's notes into Memory.md. The notes file is snapshotted before every change, so a note can be undone.
Typical usage example:
tool = AddNoteTool(notes_directory, checkpoints)
AddNoteArguments
¶
Bases: BaseModel
The arguments of add_note.
Attributes:
| Name | Type | Description |
|---|---|---|
notes |
list[str]
|
One to three short notes, each a single lesson. |
AddNoteTool
¶
Bases: Tool
Appends notes to today's notes file.
Creates the tool.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
notes_directory
|
Path
|
The desk's notes folder. |
required |
checkpoints
|
Checkpoints | None
|
Snapshots the desk's files before the note is written, or None to take none. |
required |
clock
|
Callable[[], datetime] | None
|
Returns the current India time; None uses the system clock. Tests replace it. |
None
|
Source code in src/trading_agent/tools/add_note_tool.py
run
async
¶
Appends the notes, starting today's file when needed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
arguments
|
AddNoteArguments
|
The notes. |
required |
Returns:
| Type | Description |
|---|---|
ToolResult
|
Where the notes went. |