OpenRules Platform

AI & LLM Integration

AI Agent “Vacation Days”

Use a familiar rules-based vacation-days model as an AI agent that gathers inputs and explains its decision.

AI Agent “Vacation Days” illustration 1

This AI agent is designed to help calculate the number of eligible vacation days for any employee within a company. We will begin by creating a rule-based decision model and deploying it as an AWS Lambda function, though MS Azure or other deployment options could equally be used. Since OpenRules automatically makes decision services AI-friendly, we will then test this service through a plain English dialogue with ChatGPT.

Business Logic

Every employee receives vacation days according to the following rules:

1) Every employee receives at least 22 vacation days.
2) Employees younger than 18 or at least 60 years, or employees with at least 30 years of service, can receive an extra 5 days.
3) An employee who has at least 30 years of service and who is 60 years old or older can receive an extra 3 days, on top of possible additional days already given
4) If an employee has at least 15 but less than 30 years of service, an extra 2 days can be given. These 2 extra days cannot be combined with the above 5 extra days.
5) A college student is eligible for 1 extra vacation day.
6) If an employee is a veteran, 2 extra days can be given.
7) The total number of vacation days cannot exceed 31.

Decision Model Implementation

This decision model is included in the OpenRules installation – see openrules.solver/AI/VacationDaysAI. Here is the Glossary:

AI Agent “Vacation Days” illustration 2

OpenRules uses this Glossary to automatically generate the files “description.md” and “schema.json” that will be passed to an LLM. It makes any OpenRules-based decision service AI-friendly. The decision tables that implement this decision model are described at the end of this post.

Testing and Deploying Decision Services

We successfully tested this decision model using this table of the type “DecisionTest”:

AI Agent “Vacation Days” illustration 3

Then we deployed it as an AWS Lambda function with the following endpoint:

AI Agent “Vacation Days” illustration 4

Human-LLM Dialogue

We use the ChatGPT desktop app, which provides a simple graphical interface for managing AI agents. It can be accessed via chatgpt.com by selecting “…More + Codex.” Similar desktop applications are also available from Claude and Gemini.

The initial interface appears as shown below, allowing us to enter commands or questions and view the LLM’s responses.

AI Agent “Vacation Days” illustration 5

In the dialogue below, human requests have a gray background and the LLM’s responses have a white background.

AI Agent “Vacation Days” illustration 6
AI Agent “Vacation Days” illustration 7
AI Agent “Vacation Days” illustration 8
AI Agent “Vacation Days” illustration 9
AI Agent “Vacation Days” illustration 10
AI Agent “Vacation Days” illustration 11
AI Agent “Vacation Days” illustration 12

Note that we ran this dialogue on April 9, 2026.

AI Agent “Vacation Days” illustration 13
AI Agent “Vacation Days” illustration 14
AI Agent “Vacation Days” illustration 15
AI Agent “Vacation Days” illustration 16
AI Agent “Vacation Days” illustration 17
AI Agent “Vacation Days” illustration 18
AI Agent “Vacation Days” illustration 19
AI Agent “Vacation Days” illustration 20
AI Agent “Vacation Days” illustration 21
AI Agent “Vacation Days” illustration 22
AI Agent “Vacation Days” illustration 23
AI Agent “Vacation Days” illustration 24
AI Agent “Vacation Days” illustration 25
AI Agent “Vacation Days” illustration 26
AI Agent “Vacation Days” illustration 27

Conclusion

Given that the LLM had no knowledge of the underlying service logic — only the required inputs and outputs — its performance was nothing short of remarkable.

Appendix. Decision Tables

The underlying decision model uses the main goal, “DetermineVacationDays” that executes the 5 sub-goals (decision tables):

AI Agent “Vacation Days” illustration 28

Here are the proper decision tables:

AI Agent “Vacation Days” illustration 29
AI Agent “Vacation Days” illustration 30
AI Agent “Vacation Days” illustration 31
AI Agent “Vacation Days” illustration 32
AI Agent “Vacation Days” illustration 33

Build AI-ready decisions

Connect reliable decision services with the LLM your users prefer.

Start with the free evaluation or request a demonstration of OpenRules AI and MCP integration.