trading_agent.tools.present_plan_tool
¶
The present_plan tool: shows the user a plan to approve before the desk acts on it, as Claude Code's plan approval does.
The desk does not wait. The plan is saved and shown in the web chat and on Telegram, and the user's decision arrives later as a new message.
Typical usage example:
tool = PresentPlanTool(store, event_bus, 'main')
PresentPlanArguments
¶
Bases: BaseModel
The arguments of present_plan.
Attributes:
| Name | Type | Description |
|---|---|---|
title |
str
|
A short name for the plan, such as "Monday pre-market plan". |
plan |
str
|
The plan in Markdown: what you will do, with levels, sizes and the conditions that would change it. |
PresentPlanTool
¶
Bases: Tool
Saves and shows the desk's plan to the user for approval.
Creates the tool.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
store
|
UserRequestStore
|
Where the request is saved. |
required |
event_bus
|
EventBus
|
Where it is published for the web page and Telegram. |
required |
desk_name
|
str
|
The desk presenting the plan. |
required |
Source code in src/trading_agent/tools/present_plan_tool.py
run
async
¶
Saves the plan and publishes it.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
arguments
|
PresentPlanArguments
|
The plan. |
required |
Returns:
| Type | Description |
|---|---|
ToolResult
|
The request's identifier and what happens next. |