LiyaEngine Docs

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.

Dashboard

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:

  1. Give it knowledge: the plan's documents.
  2. Choose a guardrail template for healthcare.
  3. Create and deploy the agent.
  4. Hold a conversation that remembers.
  5. See what the guardrails stop, and what they do not.
  6. Review what it did.
  7. 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/sdk or liyaengine installed.
  • 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

On this page