# I built an agentic AI assistant for HR Legal > A custom AI agent that answers from HR Legal's own content and legal databases, renders rich HTML responses, and knows where you are on the site. **Author:** Pelle Fredrikson **Published:** 2026-06-29 **Tag:** AI One of the things I'm most proud of in [HR Legal](/projects/hrlegal) is its AI assistant — and it's a lot more than a chatbot bolted onto the side. It's an **agentic AI wrapper** I built from scratch. Instead of just answering from a single prompt, it reasons over the right sources before it responds: - **Grounded in real data.** Answers are drawn from HR Legal's own content database *and* external legal databases, so responses stay trustworthy and well-sourced rather than made up. - **Rich, interactive responses.** The assistant doesn't just return plain text — it blends **HTML elements directly into its answers**, so you get formatted, interactive content instead of a wall of paragraphs. - **Context-aware on every page.** It tracks where you are on the site and uses that to interpret your question. Ask something while reading a specific article or course, and it answers in *that* context. The result feels less like a search box and more like a knowledgeable colleague who already knows which page you're on and which sources matter. There's a lot more I want to do with it, but it's already one of the most fun and genuinely useful things I've built. More on the platform itself on the [HR Legal project page](/projects/hrlegal). --- - [Read on the site](https://pellef.se/updates/hrlegal-ai-assistant) - [All posts](https://pellef.se/updates) - [Back to portfolio](https://pellef.se/index.md)