So far, we’ve explored our use case, the features we want to create, and how an AI Agent Actor model could help automate the HR timesheet approval process.
I might have overlooked some useful features in our use case, and I could do so again while simplifying the solution design.
The goal is to start building something. Instead of nailing down every little detail, let’s focus on the big picture and create a workflow that answers most questions and delivers the core idea. At the same time, we’ll build the solution with small, flexible components that can scale to handle bigger, more complex use cases later.
To keep it simple: for the timesheet approval process, let’s tackle one small use case first. We can expand it later as we get more comfortable with the AI Agent Actor model, the tech behind AI Agents, and solution design patterns.
An employee asks for PTO next week.
A request is made for the employee.
The system checks the employee’s available PTO, HR rules, and assigned tasks.
If the employee has enough PTO and no more than 2 tasks during that time, the PTO is automatically approved.
If not, the request goes to the employee’s manager for approval.
The manager approves or denies it.
The decision is shared with the employee.
If approved, a notice goes to the team, letting them know the employee will be out of office on those days.
Workflow¶
Design Pattern¶
LLMAgent gets a request (e.g., PTO for Alice, EmployeeID: 512, next Thursday and Friday).
LLMAgent identifies the dates and employee ID from the request.
LLMAgent contacts PTOAgent and TaskAgent with the employee ID and dates.
PTOAgent checks sick leave rules with HRAgent.
PTOAgent and LLMAgent send info to DecisionAgent.
DecisionAgent either forwards it to ManagerAgent or auto-approves the PTO.