
What is Agent Mode?
Agent Mode gives the AI the ability to act within your qBraid environment. It connects directly to your qBraid VS Code instance, where it can write code, execute scripts, install packages, and run quantum experiments — all driven by your natural language instructions. For sensitive operations like submitting jobs to quantum hardware, the agent asks for your approval before proceeding. With Agent Mode, the AI can:- Write and execute Python code in your VS Code environment
- Build quantum circuits using any supported framework (Qiskit, Cirq, PennyLane, etc.)
- Submit jobs to QPUs and simulators (with your approval), then analyze the results
- Debug errors, refactor code, and iterate until the task is complete
- Chain multiple operations into end-to-end quantum workflows
Enabling Agent Mode
To enable Agent Mode:- Open the AI Chat panel in qBraid Lab
- Select the Agent Mode toggle at the top of the chat interface
- Click on Connect to Agent
- The chat will indicate when Agent Mode is active

Agent Mode actions consume additional AI credits compared to standard chat
queries. See Usage Quotas for details.
Select AI Model
Choose the AI model that will power your Agent Mode experience. Different models offer varying levels of capability, speed, and cost. Select the one that best fits your needs from the dropdown menu in the chat interface :
Complete Workflow Example
Let’s walk through a complete quantum computing workflow using Agent Mode — from exploring devices to retrieving job results.Step 1: Query Device Details
Start by asking the AI about available quantum devices.
- Query the qBraid device API in real-time
- Filter for available simulators
- Recommend options based on your requirements
- Display pricing and expected execution times
Step 2: Select a Device
Based on the AI’s recommendations, specify which device you want to use. Your prompt:- Confirm the device selection
- Display the device ID for reference
- Prepare for job submission

Step 3: Submit a Bell State Circuit
Now instruct the AI to submit a quantum circuit to the selected device. Your prompt:- Generate the Bell state circuit (H gate on qubit 0, CNOT on qubits 0-1)
- Submit the job to the selected simulator
- Return the job ID for tracking
- Optionally wait for completion

Step 4: Verify Job in Sidebar
The submitted job will appear in the Quantum Jobs sidebar for visual tracking. You can:- View the job status in the Jobs sidebar
- Click on the job for detailed metadata
- Use the agent to cancel if needed

Step 5: Retrieve Results
Once the job completes, ask the AI for the results. Your prompt:- Fetch the job results from the qBraid API
- Display measurement counts
- Provide analysis of the results

Best Practices
Start Simple
Start Simple
Begin with basic queries before chaining complex workflows. This helps you understand how the AI interprets your requests.
Be Explicit About Actions
Be Explicit About Actions
Use action words like “submit,” “run,” “get,” or “cancel” to make your intent
clear.
Specify Parameters
Specify Parameters
Include details like shot count, device preferences, and circuit
specifications in your prompts.
Use Job IDs
Use Job IDs
Reference job IDs when asking about specific jobs to avoid ambiguity.
