Workforce planning is a human craft. A planner knows that Jan and Margriet prefer not to work together, that Erica has already worked too many evening shifts, and that weekend staffing on the ICU is always tight. That knowledge lives in people’s heads, not in systems. But how do you translate those insights into a schedule that actually works?
At Intus, developer of InPlanning for workforce management in healthcare and other sectors, we’re building an AI agent that does exactly that: combining human expertise with automated optimization.
The problem: complex puzzles with many variables
Workforce planning comes with difficult puzzles every day. Shifts nobody wants, conflicting preferences, staffing shortages at inconvenient moments. The planner has to account for employees’ protected days off, hour balances, collective labor agreement (CAO) rules, qualifications, and dozens of other wishes and requirements. One change can trigger a cascade of consequences.
Previously, this meant: trial and error and constant puzzling by the planner, searching for a solution that meets all requirements. In today’s climate of widespread staff shortages, it’s often not possible to simply resolve a shortage outright.
The solution: an agent that listens and optimizes
First, back to basics: what is an agent, exactly? An agent is a system in which an LLM itself determines which steps are needed to complete a task. Unlike a chatbot that only responds, an agent can actively call tools, retrieve information, and keep working until the goal is reached.
Every agent has four core components:
- A reasoning model. The brain of the agent. In our case, Claude, which understands the planner’s question and determines which actions are needed.
- A prompt. The instructions that define what the agent should do, when the task is complete, and when it should return to the user for input.
- Memory. Both short-term (the current conversation) and long-term (what the agent remembers across sessions). We use Mem0 so the agent retains context: if a planner previously indicated that department X is always tight on staff, the agent remembers that.
- Tool use. The ability to call other systems, such as InPlanning. The agent translates natural language into API calls, database queries, and solver configurations.
The Planner Agent we’re developing combines these four elements:
- A prompt that clearly directs the task.
- Natural language as the interface. A planner types: “There’s understaffing on the evening shift of March 6th, level 2, on the South wing. Can you find a solution?” The agent understands this without the planner needing to know any query language or filters.
- Direct access to schedule data. Via the InPlanning API, the agent retrieves real-time information: who’s scheduled, where overstaffing occurs, which employees have the right qualifications, who has a protected day off.
- Operations research under the hood. The agent configures Google OR-Tools to calculate the optimal solution. Hard constraints (CAO rules, maximum shifts) are respected, soft constraints (preferences, hour balance, fair distribution) are weighed in.
Concrete scenarios
A few examples of what the agent can handle:
Weekend swap. Saturday morning is overstaffed (+1), Saturday afternoon is understaffed (-1). The agent proposes shifting one employee and shows which options have the least impact on hour balances.
Secondary skills. A shift requires someone with a specific qualification (say, Echo-2 certification). The agent first looks for available employees with that skill, and if needed proposes a swap while explicitly flagging that this creates a shortage elsewhere.
Chain swaps. Sometimes the solution isn’t a single shift but a chain: move A to shift X, so B can move to shift Y, which resolves the shortage at Z. These kinds of puzzles are time-consuming to solve by hand; the agent solves them in seconds.
The human stays in control
This isn’t autonomous AI taking over schedules. The planner stays in charge of decisions. The agent proposes solutions, shows the trade-offs (“if you do this, a shortage arises there”), and waits for approval. The planner brings context the agent doesn’t have: that team member X prefers not to work Wednesday afternoons, that department Y just went through a reorganization.
It’s a partnership. The planner knows where the bottlenecks are and can explain them in plain language. The agent translates that into mathematical constraints and works through the options. Together, they arrive at a better schedule, faster.
Technical stack
To develop this agent, we use modern frameworks and tools that give us full control over agent configuration:
- PydanticAI as the agent framework for type-safe tool calling and structured outputs.
- FastAPI for the backend.
- PostgreSQL with pgvector for semantic search over documentation (CAO rules, InPlanning manuals).
- Mem0 for conversational memory, so the agent retains context across multiple questions.
- Google OR-Tools for the actual optimization.
Everything runs on Kubernetes and is code-first.
What does it deliver?
Where a planner used to spend minutes searching for a solution to a complex chain swap, the agent now delivers multiple options within seconds. The planner is left with more time for conversations with team members, anticipating changes, and thinking about capacity.
The project is currently in the pilot phase, with demo environments where real scenarios are being tested.
Why this works at Intus
AI agents often get criticized: too much hype, too little concrete value. Here it works because there’s a well-defined domain (schedule planning), clear constraints (CAO, qualifications, hours), and a human who stays in control. The agent doesn’t replace the planner. The agent strengthens the planner.
On top of that, Europe’s GDPR and EU AI Act provide clear frameworks within which the AI agent could be developed safely and reliably.
A pattern for more applications
The lesson from this project extends beyond schedule planning. What we’re building here is a pattern: natural language as a bridge between human expertise and complex tooling.
Operations research tools like Google OR-Tools are enormously powerful. They can solve optimization problems that are impossible for humans to work through manually within any reasonable amount of time. But they have a barrier to entry: you have to know how to configure them. Which variables do you define? Which constraints are hard, which are soft? How do you weigh different goals against each other?
Traditionally, this requires a specialist - someone who understands both the domain and the mathematics behind these OR tools. That combination is rare and expensive.
What LLMs add is a translation layer. A planner doesn’t need to know how OR-Tools actually works. The planner says: “Erica has already worked six evening shifts this month, that’s too many.” The agent translates this into a soft constraint with a penalty weight. The planner says: “No one may work more than five night shifts in a row.” The agent turns it into a hard constraint.
This pattern works anywhere the following things come together:
- Complex tooling with a steep learning curve. ERP systems, financial models, supply chain optimization, CAD software. Tools that are powerful but require expertise to operate.
- Domain knowledge that lives with people. The planner who knows an employee is about to leave. The buyer who knows supplier X is unreliable. The engineer who knows part Y always fails first. Knowledge that isn’t written down in any manual.
- Decisions that require context. Situations where a purely algorithmic solution isn’t enough, where human judgment is still needed.
The agent then becomes the interpreter between two worlds. The human talks in natural language about what needs to happen. The agent translates that into API calls, database queries, solver configurations. The tool computes. The agent translates the result back into understandable options. The human decides.
Broader applicability
This changes how organizations can work with complex tools. Instead of months of training or expensive consultants, the interface becomes a conversation.
At Intus, we see this concretely. Planners who previously had to rely solely on their own analytical skills to resolve complex situations can now have the agent work out solutions. The knowledge that lives in their heads - that intuition for what makes a good schedule - now becomes input for the solver.








