trading_agent.tools.search_sessions_tool
¶
The search_sessions tool: finds what the desk said and did before.
Typical usage example:
tool = SearchSessionsTool(SessionSearch(desk_directory))
SearchSessionsArguments
¶
Bases: BaseModel
The arguments of search_sessions.
Attributes:
| Name | Type | Description |
|---|---|---|
keywords |
str
|
A few keywords separated by spaces, such as "NIFTY gap down". |
limit |
int
|
The most results to return. |
SearchSessionsTool
¶
Bases: Tool
Searches the desk's past sessions, summaries, notes and journal.
Creates the tool.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
search
|
SessionSearch
|
The desk's search. |
required |
Source code in src/trading_agent/tools/search_sessions_tool.py
run
async
¶
Runs the search in a worker thread, because it reads many files.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
arguments
|
SearchSessionsArguments
|
The keywords and the limit. |
required |
Returns:
| Type | Description |
|---|---|
ToolResult
|
The hits, one block each, or a note that nothing matched. |