Portal Assistant
An actionable chatbot that looks up, raises and approves leave, expense and IT requests on live Liferay data. Liferay's permissions decide what it may do, not the prompt.
The problem
Most portal chatbots explain the policy and stop there. Employees still have to find the right form, and managers still approve in a separate screen. The goal was an assistant that does the work itself: reads your actual records, creates new ones and lets a manager approve, all in one conversation.
How it works
- One AI Hub agent: a Kaleo workflow with 6 LLM prompts, 3 AI decisions and 6 HTTP calls.
- Every request first learns who is asking and what they want, then takes one of three paths: read, create, or approve and reject.
- Data lives in three Liferay Objects (leave, expenses, IT tickets). The agent calls the standard /o/c endpoints: GET, POST and PATCH.
- The page is a React 18 + TypeScript client extension, and results stream back over server-sent events.
Guardrails
- Every fact in a reply comes from Liferay's response. If nothing comes back, the assistant says it can't see any records.
- The topic router can only output a fixed set of values, so user input never reaches a URL.
- Approvals change exactly two fields from a fixed table. The model can't invent a field.
- HTTP nodes call Liferay as the signed-in user, so an Employee's approve attempt fails whatever the prompt says.
Lessons that cost me time
- AI Hub calls back into DXP, so DXP needs a public URL. The free ngrok tier's warning page breaks the callback.
- Open the event stream before starting the run, or the early node events are lost.
- A null in a PATCH body erases the field. Unknown decisions send an empty object instead.
What's next
Server-side validation of new records' starting status, manager notifications, and conversation memory.