QuantCraft AI
QuantCraft includes a built-in AI assistant that lives in the right sidebar of the IDE (Workspace layout). It works like an in-IDE coding agent — it knows about the workspace folder you have linked, sees the files you have open, and can create new files or edit existing ones for you in one chat turn.
To use it, open the right sidebar and switch to the QuantCraft AI tab. For the in-app doc index and dev bundle overview, see Reference. Use the Python editor and Running code to validate any suggested strategy changes in Test / Run.
Bring your own API key
QuantCraft AI does not include any built-in API access. You have to provide your own API key from one of the supported providers, and that provider is billed for the requests you make.
Open Connect model at the bottom of the chat and pick a provider:
- Anthropic (Claude) — currently the fully supported provider that QuantCraft AI uses to generate replies and apply file edits. Get an API key from
console.anthropic.com. - GitHub Copilot — token / key from your GitHub or Copilot settings.
- Cursor — API key from your Cursor account or team settings.
Paste the key, choose the model, and click Save.
Where keys live: API keys are stored only on your machine (in this browser’s local storage / the desktop app’s local config). They are never uploaded to QuantCraft. If you wipe your browser data or move to another computer, you will need to re-enter the key.
Where requests go: When you send a message, QuantCraft AI calls the provider directly from your machine using your key. The desktop (Tauri) app uses an HTTP bridge so requests aren’t blocked by browser CORS — running QuantCraft AI in the browser version may show a CORS-related “Request failed” message; use the desktop build for the best experience.
Picking a model
Each provider has a model dropdown next to the key field. The connection badge at the bottom of the chat shows the active provider and short model name (for example Anthropic (Claude) · Claude Sonnet 4.5). Multiple providers can be saved — the badge shows the most recently used one with a +N suffix when more than one key is present.
For Anthropic (the supported path today), the dropdown lists Claude Sonnet 4.6, Claude Opus 4.7, Claude Haiku 4.5, and several earlier Sonnet/Opus versions. Choose the one your account has access to.
If you try to send a message without a saved Anthropic key, the assistant replies with a reminder to add one.
Chat sessions
QuantCraft AI keeps a history of chat sessions. Each session is its own conversation, with its own messages and attachments.
The bar at the top of the chat panel has:
- New chat — starts a fresh, empty session. The button is disabled while the assistant is working or while you have a pending file edit; it is also disabled if your current chat is already empty.
- Chats — a dropdown listing every saved session, newest first. Each entry shows its title (auto-derived from the first user message, trimmed if long) and the last update time. Click a row to switch to that session, or press the trash icon to delete it.
- The current session title is shown to the right of those buttons.
Sessions are persisted automatically:
- All chats are saved a moment after each change (in the desktop app to its local config, otherwise to browser local storage).
- Chats survive reloads and app restarts.
- Switching chats and creating new ones is blocked while a reply is streaming or while you have an unresolved Accept/Undo bar — finish or undo the change first.
Composer (sending messages and attachments)
The composer at the bottom of the panel has a few elements:
- A multi-line text box. Press Shift+Enter to send. Plain Enter inserts a newline.
- Attach files button — opens a file picker. You can also drag and drop files onto the input area, or paste a file/image from the clipboard.
- A row of attachment chips above the textarea showing every file you’ve queued. Each chip has its name (and a thumbnail for images) and an × to remove it.
- A Send button (also triggered by Shift+Enter).
- The connection badge and Connect model button.
Notes on attachments:
- Any file type is accepted. Image files show a small inline thumbnail in the message stream after sending.
- Attachments belong to the message you send them with — they’re shown alongside that message in the chat history.
- When you delete a chat or close the app, image previews are cleaned up automatically.
While the assistant is generating a reply, the composer is disabled with a “Please wait…” placeholder and a small status row appears in the message list (e.g. Building API messages…, Streaming reply… 1,234 characters, Syncing to workspace folder on disk…).
What the assistant can see
Each time you send a message, QuantCraft AI builds the request from:
- The bundled QuantCraft developer docs (so it knows the lifecycle, account API, OHLCV / fundamentals modules, indicator series, and so on).
- A fresh workspace snapshot — the linked workspace folder path, the file currently open in the editor, the list of open tabs and folders.
- The prior turns of the active chat session (your messages and its replies).
- Your new message plus any attachments.
This is why picking a workspace folder in the Files sidebar matters — without one, the assistant can still answer questions, but it cannot write files to disk and will tell you so.
File edits from the assistant
The assistant can return one or more file actions in a single reply: create a new file, edit the file currently in the editor, or edit a specific named file in the workspace.
When that happens, QuantCraft applies the changes directly to the IDE:
- New files appear as a new tab in the linked folder; existing files are updated in place in their tab.
- The editor jumps to the changed location and highlights the changed lines so you can review what the assistant did.
- A pending bar appears at the bottom of the chat with a short summary, plus two buttons:
- Accept — keep the change. The highlight is removed and you can carry on chatting.
- Undo — revert the change. For an edit, the previous file content is restored. For a new file, the new tab is removed.
- Until you Accept or Undo, the chat is frozen — you can’t switch sessions or send another message. This is intentional: it makes sure you actively review every change.
- For multi-file replies, the bar tells you how many changes were applied. The Undo button reverts only the last step, so review highlights tab-by-tab if needed.
Files are also synced to the linked workspace folder on disk (in the desktop app). If something prevents the write, the assistant message will say so.
When you’re running the browser version (not the Tauri desktop app), files are still updated in the editor and tabs, but they are not mirrored to disk. The reply notes this so you know to use the desktop build for full file integration.
Tips
- Link a workspace folder first. In the Files sidebar, choose your project folder. Without one, the assistant can answer questions but cannot create or edit files on disk.
- Be explicit about file paths. When asking for an edit, mention the tab title or a path like
utils/foo.py. The assistant matches both. - Use Undo freely. It’s safer to let the assistant try a multi-file change and undo than to micro-manage each step — undo restores the editor buffer instantly.
- Switch models per task. Use a faster Claude model for routine edits, a stronger one (Opus) for big refactors or strategy design.
- Keep keys safe. API keys live only on this machine. Treat them like passwords — don’t paste them anywhere outside the Connect model dialog.