The AI assistant is a side panel in the strategy editor. It drafts a first version of a strategy from a plain English description, reviews code you have already written, and diagnoses a failed run when you hand off from the diagnostics tab. Every response is reviewed in a diff editor before it touches your code.
What it is grounded in
The assistant receives a specific context bundle with every request:
- Your strategy name, the full contents of your strategy files, and your current strategy parameters.
- For strategies you have opened from an existing version, a diff of any dirty (unsaved) edits rather than the full files.
- For run debugging, the run id, the execution mode, the issues you clicked (if any), and a recent log excerpt.
What it does not see: other runs, your broker account, your other strategies, anything on the internet, or any code outside your current strategy.
The three intents
Generate
Type a description into the input and press Enter or click Generate.
The assistant either produces a suggested strategy.py and
config_schema.json, asks a focused clarifying question, or
answers conceptually when the question is not about producing code.
Suggestions open in a side by side diff editor. Review each file, edit the modified side directly if you want, then accept or reject. Changes to your strategy parameters render as a parameter-aware diff that highlights added, removed, and changed parameters as form cards, rather than as raw JSON.
Review
The Review button sends your current strategy to the assistant and asks
it to look for runtime bugs and framework contract violations: wrong
method signatures, using float for money, calling
datetime.now(), not filtering events by symbol, duplicate
order submissions. The assistant describes issues in a message by
default and returns code suggestions only when a fix is unambiguous.
Debug Run
Triggered from a run's Issues & Logs tab, not from the editor. Two entry points: Fix with AI on a single issue, or Debug Run to send all user fixable issues. The app opens the strategy editor at the version the run used, and auto sends the request.
When the root cause is a run config value rather than a code bug, the assistant names the field path and a recommended value instead of rewriting code.
Good uses
- Drafting a first version of a strategy from a plain English description.
- Answering questions about the SDK, the event to action contract, or why a method signature looks a certain way.
- Reviewing a strategy you wrote for bugs and framework misuse.
- Diagnosing a failed run with the actual issues and log tail in hand.
- Suggesting targeted fixes to observed failures without rewriting unrelated code.
What it won't do
- It does not apply changes on its own. Every suggestion opens in a diff editor for you to review and accept.
- It cannot execute code, launch runs, or interact with your broker.
- It does not see other runs, other strategies, the repo, the internet, or real time market data. Its world is limited to what you send it.
- It is not a substitute for a backtest. Treat every suggestion as draft code, and validate it in Backtest before promoting.
- If docs and SDK behavior disagree with the assistant's advice, trust the docs and the code.
Typical workflow
- Ask a question or describe a change.
- Read the response. If it is a clarification, answer and continue.
- If it is a set of code suggestions, review each file's diff.
- Edit the modified side if anything looks off.
- Accept or reject. Accepted changes replace your editor files.
- Publish the strategy and run a Backtest against it.