AI Assistance
Bring Your Own Key
Introduction
By default, Assistants run on the free QuantConnect Meta Agent, which requires no setup. Organizations with a paid Assistant Node can instead supply their own API key and run the Assistants on an LLM provider of their choice. Bring your own key when you want to run a specific model, tune how the model reasons, or route the cost through your own provider account.
The provider, API key, and model are stored in a secret. To configure your own provider, either add an assistant or update an existing one. In the Provider section of the Assistant Configuration, click the Use Your Own Provider option and select a secret from the Provider Token dropdown. The following settings become available:
| Setting | Description |
|---|---|
| Reasoning Effort | The amount of reasoning the model applies before it responds. The default is high. |
| Max Turns | The maximum number of turns the assistant takes per deployment. The default is 100. |
| Tool Choice | The tool selection policy. The default is auto, which lets the model decide when to call tools. |
Secrets
A secret securely stores an LLM provider token and the model configuration that goes with it, so you can reuse the same credentials across your Assistants without pasting the token each time. To manage your secrets, log in to the Algorithm Lab and, in the left navigation bar, click Organization > Secrets. The Secrets page lists every secret in your organization with its name, key, configuration, and a masked preview of its token. The token is write-only, while the secret configuration stays visible and editable.
Add a Secret
Follow these steps to add a secret to your organization:
- On the Secrets page, click .
- Fill out the following fields:
Field Description Name A label to identify the secret. Key The type of secret. Select Llm Provider Token to store LLM provider credentials. Provider The LLM provider that issued the token. Token The API key from your provider account. Model The model to run. The list shows the models that the selected provider offers. - Click .
Update or Delete a Secret
On the Secrets page, each secret has and actions. Click to edit the secret configuration. Because the token and its configuration are saved together, leave the Token field blank to keep the current value, or re-enter the token to change any configuration below it. Click to remove the secret.
Use a Secret
To run an Assistant on a secret, associate the secret with the Assistant in one of the following ways:
- When you add or update an Assistant, in the Provider section, click Use Your Own Provider and select the secret from the Provider Token dropdown.
- When you deploy an Assistant, click , select Bring your own token, and select the secret from the Secret dropdown.
In either dropdown, select to add a secret without leaving the Assistant.
Keep the following in mind when you use a secret:
- When you run an Assistant Team, the orchestrator's secret is used for the whole team.
- You cannot change the secret after you deploy a task. To use a different secret, start a new task.
Claude
To run the Assistants on Anthropic's Claude models, follow these steps to get an API key:
- Log in or create an account on the Claude Console.
- On the API Keys page, click .
- Copy the key and paste it into the Token field in the Organization's Secrets.
OpenAI
To run the Assistants on OpenAI's models, follow these steps to get an API key:
- Log in or create an account on the OpenAI Platform.
- On the API keys page, click .
- Copy the key and paste it into the Token field in the Organization's Secrets.
OpenRouter
To run the Assistants on a model from OpenRouter, follow these steps to get an API key:
- Log in or create an account on OpenRouter.
- On the Keys page, click .
- Copy the key and paste it into the Token field in the Organization's Secrets.