{"uid":"cap_Gl3Hjf2i0pbHvQKuHoE3D","slug":"or-tools-cp-sat-schedule-solver-017dfb9d","name":"OR-Tools CP-SAT Schedule Solver","description":"Solves a scheduling/roster problem (gym class rosters, dance-school timetables, restaurant shift plans) with OR-Tools CP-SAT: assigns resources to slot demands honoring availability, tags, and constraints (no double-booking, max-per-day, min-rest, forbidden/required pairs, fixed assignments, max total hours), optimizing the requested objective. Infeasible inputs come back with the specific conflicting demands/constraints named.","url":"https://x402-api-24223879872.us-east1.run.app/v1/schedule-solve?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"slots":{"type":"array","items":{"type":"object"},"description":"Time or label slots demands can be assigned to."},"demands":{"type":"array","items":{"type":"object"},"description":"Assignment requirements, each tied to a slot."},"objective":{"enum":["balance_load","maximize_preferences","minimize_resources"],"type":"string","default":"balance_load"},"resources":{"type":"array","items":{"type":"object"},"description":"People/rooms/equipment that can be assigned, with tags and availability."},"constraints":{"type":"array","items":{"type":"object"},"description":"Optional typed constraints: no_double_booking, max_per_day, min_rest_between, forbid_pair, require_pair, fixed_assignment, max_total_hours."},"timeLimitSeconds":{"type":"number","default":5,"maximum":15}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.3","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.3/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.3","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.3","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_CWY5RpHAodLhDniCCnjgP","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.3","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Solves scheduling and roster assignment problems using Google OR-Tools CP-SAT, assigning resources to time slots while honoring availability, tags, and constraints, with configurable optimization objectives.","exampleAgentPrompt":"I need to schedule 12 yoga instructors across 20 class slots this week — can you solve the roster using OR-Tools, balancing the load evenly, making sure no instructor is double-booked, each works at most 6 hours total, and that instructors tagged 'advanced' are only assigned to advanced-level slots?","exampleUseCases":[{"title":"Gym class instructor roster","prompt":"I have 8 fitness instructors and 30 class slots across Monday to Friday — solve the weekly roster for me, balancing load evenly, making sure no one works more than 8 hours total, and that instructors who only listed morning availability aren't assigned to evening slots."},{"title":"Restaurant shift scheduling","prompt":"I need to build a shift plan for my restaurant for the weekend — I have 15 staff with different availability windows and role tags like 'bartender' or 'server', and I want to minimize the total number of staff used while ensuring every shift demand is covered and no one works back-to-back shifts without at least 8 hours rest."},{"title":"Dance school timetable conflict check","prompt":"I'm trying to schedule our dance school's 10 instructors across 25 weekly class slots and keep hitting conflicts — can you run a constraint solve that flags exactly which demands or constraints are making it infeasible, using the maximize_preferences objective?"}],"resultDescription":"Returns a solved schedule with resource-to-slot assignments satisfying all constraints, along with the optimization objective value. If the problem is infeasible, returns specific conflicting demands and constraints by name so the caller can identify and resolve them. Solve time is bounded by the configured timeLimitSeconds (default 5, max 15).","failureModes":["Infeasible input: returns named conflicting demands/constraints instead of an assignment","Time limit exceeded: solver returns best partial solution or infeasibility signal within timeLimitSeconds","Invalid schema: missing required slots, demands, or resources fields causes a 400-level error","Contradictory constraints (e.g. require_pair and forbid_pair for same pair): flagged as conflict","Resources with no overlapping availability with any slot result in unassigned demands"],"whenToPreferThis":"Choose this endpoint when you need to solve a real scheduling or rostering problem with multiple constraints (availability, tags, no double-booking, rest periods, required/forbidden pairings, fixed assignments, hour caps) and want an optimal or feasible assignment back in seconds. It is especially useful when you need to know exactly which constraints make a problem infeasible. Prefer it over manual heuristics or general-purpose LLM reasoning when the problem has more than a handful of resources and slots, or when constraint violations need to be formally detected.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-11T00:39:03.311Z","isFirstParty":false,"canonicalSlug":"or-tools-cp-sat-schedule-solver-017dfb9d"}