The Scheduler tool uses Google’s OR-Tools constraint programming engine to solve scheduling and resource allocation problems. Give it your data and describe the rules in plain language — it formulates the problem as a constraint model, solves it, and returns an optimized schedule with a full explanation of what it did and why.
The Scheduler takes your data and a set of constraints, then finds an optimal (or feasible) assignment. It works by:
Key capabilities:
The Scheduler isn’t the right tool when:
Describe your scheduling problem in natural language. The agent recognizes scheduling and optimization requests and automatically invokes the Scheduler tool.
Staff/shift scheduling:
Sports and tournaments:
Job and task scheduling:
Room and resource allocation:
The most important thing you can do is clearly state your rules. The Scheduler classifies rules into two types:
Hard constraints — must be satisfied or the schedule fails:
"Each shift needs exactly one nurse""No team plays two consecutive days""Jobs must follow their dependency order""A room can only hold one meeting at a time"
Soft constraints — the solver tries to satisfy these but can relax them:
"Try to give each team an equal number of home games""Prefer scheduling senior staff on weekday mornings""Minimize total idle time between jobs""Balance shifts as fairly as possible across nurses"
When writing your prompt, think through each of these categories. The Scheduler considers all five when formulating the model:
If you forget a category, the Scheduler will infer reasonable defaults from your data — but it’s always better to be explicit.
Tell the Scheduler what “good” looks like:
If you don’t specify an objective, the Scheduler finds any feasible solution. Adding an objective ensures it finds the best feasible solution.
At minimum, you need a primary dataset describing the items to be scheduled:
Additional datasets as separate steps improve results significantly:
Staff scheduling input (2 files):
Primary — Nurses:
Dependency — Availability:
Sports scheduling input (3 files):
Primary — Teams:
Dependency — Fields:
Dependency — Team Availability:
The Scheduler produces structured output with several sections. Here’s what to expect:
Data Summary — confirms what it found in your data:
=== Data Summary ===Scheduling 7 nurses across 3 shifts/day for 7 daysTotal slots to fill: 21
Rules Applied — every rule restated with PASS or FAIL:
=== Rules Applied === C1 (exactly 1 nurse per shift): PASS — all 21 slots filled C2 (no back-to-back shifts): PASS C3 (night->morning rest): PASS C4 (max 5 shifts/week): PASS — max is 5 S1 (fair distribution): gap of 1 shift(s)
Key Numbers — the statistics that matter most:
=== Key Numbers === Alice: 4 shifts Bob: 5 shifts Carol: 4 shifts Range: 4–5 shifts (gap: 1)
Plain-English Summary — a narrative you can share with non-technical stakeholders:
=== What This Means ===All 21 shifts are covered with exactly one nurse each.The workload is nearly even — the busiest nurse works 5 shifts and the lightest works 4.No nurse has back-to-back shifts or overnight turnarounds.
The Schedule — the full assignment as a table:
=== Schedule === Day Shift Nurse Mon Morning Alice Mon Afternoon Eve Mon Night Dave ...
The result status tells you how good the solution is:
If neither is achieved, the problem is infeasible — see Troubleshooting below.
The Scheduler produces an updated_df with the complete assignment:
updated_df
The agent typically follows the Scheduler with a visualization step. Ask for:
"Show the schedule as a Gantt chart""Create a timeline showing each team's matches""Visualize the shift assignments in a calendar grid"
One of the Scheduler’s strengths is iterative refinement. After getting an initial result, you can adjust rules and re-run.
Use the Refine button on a scheduling step to modify the prompt. The Scheduler regenerates the code with your updated rules. The code is organized into labeled sections, making it easy to see exactly what changed:
Adding a rule:
“Add a rule that at least one Senior nurse must be on every Night shift”
Relaxing a rule:
“Increase the max shifts per week from 5 to 6 for Senior nurses”
Changing the objective:
“Instead of minimizing the fairness gap, minimize total weekend shifts”
Responding to availability changes:
“Dave can now work nights. Carol is unavailable on Thursdays. Rebuild the schedule.”
Adding a hard deadline:
“Job J2 must finish by hour 12. Can the schedule accommodate this?”
Data: Upload nurses.csv (names, roles, max shifts, night eligibility) and nurse_availability.csv (day-by-day availability).
nurses.csv
nurse_availability.csv
Prompt:
Create a weekly shift schedule. There are 3 shifts: Morning, Afternoon, Night.Each shift needs exactly one nurse. No nurse works back-to-back shifts.Night shift means no morning shift the next day. Respect max_shifts_per_weekand availability. Nurses who can't work nights should never be assigned Night.Distribute shifts as fairly as possible.
Expected result: 21 shifts filled, all constraints pass, fairness gap of 0-1 shifts.
Follow-up visualization:
Create a Gantt-style chart with days on the x-axis and nurses on the y-axis,color-coded by shift type.
Data: Upload teams.csv (names, divisions), fields.csv (capacity, availability), and team_availability.csv.
teams.csv
fields.csv
team_availability.csv
Schedule a round-robin tournament for 8 teams over 7 weekends.Each team plays at most once per weekend. Each pair plays exactly once.Assign games to available fields — max one game per field per weekend.Respect team and field availability. Balance field usage evenly.
Expected result: All 28 matchups (8 choose 2) scheduled, 7 games per team, balanced field usage.
Refinement:
Add a rule that teams in the same division must play each otherin the first 3 weekends.
Data: Upload jobs.csv (job names, priority, operation sequences) and machines.csv (types, capacity, maintenance days).
jobs.csv
machines.csv
Schedule manufacturing jobs to minimize total completion time.Each job has operations that must run in order (operation_sequence column).No two operations on the same machine at once. Respect maintenance days.Prioritize high-priority jobs.
Expected result: All operations scheduled, precedence respected, makespan minimized with machine utilization stats.
Follow-up:
Show a Gantt chart with machines on the y-axis and time on the x-axis.Color-code by job.
Data: Upload conference_sessions.csv (titles, speakers, duration, track, attendance), conference_rooms.csv (capacity, projector), and conference_timeslots.csv.
conference_sessions.csv
conference_rooms.csv
conference_timeslots.csv
Assign sessions to rooms and timeslots. Room capacity must be >= expectedattendance. Sessions needing a projector must be in a room with one.Same speaker can't have two sessions at the same time. 90-minute sessionsgo in 90-minute slots only. No double-booking rooms.
Expected result: All 12 sessions assigned, no speaker conflicts, capacity/projector requirements met.
This means the hard constraints conflict with each other — no valid assignment exists.
Common causes and fixes:
What to do:
Cause: No balance objective was specified, or the objective weight is too low.
Fix:
The solver has a 60-second timeout. If it doesn’t find a solution in time:
Cause: Rules may have been inferred rather than read from your data.
Cause: The solver misread your data columns.
Based on the kinds of problems the Scheduler solves well (and where it struggles):
The solver is exact, not approximate. When it says OPTIMAL, it mathematically proved no better solution exists. This is a genuine guarantee, not an estimate.
More data columns = better. A column for can_work_nights is much better than hoping the solver infers night eligibility from context.
can_work_nights
The number of variables grows fast. 10 nurses × 7 days × 3 shifts = 210 decision variables (fine). 100 nurses × 30 days × 3 shifts = 9,000 variables (still fine, but slower). The solver handles thousands of variables well, but think about whether you need the full combinatorial space.
Soft constraints compete. If you ask for “minimize cost” AND “maximize fairness” AND “minimize weekend work”, the solver has to trade off between them. Be clear about what matters most, or you’ll get an arbitrary weighting.
Availability data is the #1 cause of infeasibility. If 3 of your 5 nurses are unavailable on Tuesday, you can’t fill 3 Tuesday shifts with 2 people. The math is simple but easy to miss.
The Scheduler tool solves data-driven scheduling problems (who works when, which job runs where). This is different from Querri’s automation scheduling, which lets you set up recurring project and dashboard refreshes on a cron schedule.