Build a health plan member assistant
Build a conversational agent that answers a health plan member's questions from the plan's own documents, with healthcare guardrails, a conversation that remembers, and a way to report a wrong answer. Every step shows the Dashboard, the REST API, and the JavaScript and Python SDKs.
A member of a health plan asks what a specialist visit will cost, whether they need approval for a scan, and how long they have to appeal a denied claim. The answers are in the plan's documents. The difficult part is everything around them: the assistant must answer only from those documents, must never drift into medical advice, must remember what was said two questions ago, and must give you a way to say "that answer was wrong" when it is.
In Triage card disputes you built an intent: one typed call with one input and one output. A member conversation is different. It has many turns, no fixed shape, and it needs memory. So here you build an agent, which holds a conversation, decides when to look something up, and keeps the thread. You will do it in seven steps:
- Give it knowledge: the plan's documents.
- Choose a guardrail template for healthcare.
- Create and deploy the agent.
- Hold a conversation that remembers.
- See what the guardrails stop, and what they do not.
- Review what it did.
- Report a wrong answer, so the knowledge can be fixed.
Each step has four tabs: Dashboard, API, JavaScript and Python. Every request and response in the API tabs was captured from a real run of these exact steps.
What you need
- A LiyaEngine workspace with agents enabled.
- An API key with full access, from Administration → API Keys. See Authentication.
- The setup from the first tutorial: an exported
LIYA_API_KEY, and either@liyaengine/sdkorliyaengineinstalled. - A few cents of model usage.
Not medical software
This tutorial builds an assistant that explains benefits, costs and processes. It is not a clinical tool, and nothing here makes it safe to give medical advice. Treat the guardrails as one layer, test with the people who will use it, and keep a human route for everything it declines.
The snippets below reuse a client created exactly as in the first tutorial's setup step.
The steps
1. Documents and a healthcare guardrail template
The plan's documents as knowledge, and a member-facing healthcare template that blocks clinical requests.
2. Create the agent and talk to it
Create and deploy an agent, then hold a conversation that remembers.
3. What it refuses, and how to correct it
See what the guardrails stop, review the runs, and report a wrong answer.