Treatment Planning Agent

Agent Description:

The Treatment Planning Agent is a healthcare-focused AI system designed to automate clinical decision support by generating personalized treatment plans based on extracted patient data. It processes unstructured medical documents to extract clinical attributes and then applies Retrieval-Augmented Generation (RAG) techniques over a medical protocol knowledge base to suggest safe and effective treatment plans tailored to individual patients.

Purpose and Components
  • Purpose: To extract clinical information from medical reports and generate personalized treatment plans using a structured knowledge base and RAG-based search.
  • Components:
    • A patient data extractor to convert unstructured medical documents into structured, schema-aligned data.
    • A treatment planning engine that uses the extracted information to recommend protocols, medications, and follow-up schedules.
    • A reporting system that generates easy-to-read treatment recommendations with contextual explanations.
Supported Capabilities
  • Extraction of medical entities from PDFs, images, and raw text.
  • Structuring data into a clinical schema for downstream processing.
  • Retrieval of condition-specific treatment protocols using RAG.
  • Identification of medication conflicts (e.g., allergy-related) and suggestion of safe alternatives.
  • Generation of formatted treatment plans including medications, lifestyle advice, and follow-up timing.
LLM Used
  • Google Vertex
    Note: To learn more about the LLM and to modify its behavior, refer to the Configuring LLM settings section.

Sub-Agents

1. Patient Data Extractor

  • Role:Data Extractor.
  • Scope:Processes input files (PDFs, images, text) and populates a predefined patient database schema.
  • Description: This sub-agent accepts raw medical reports and extracts structured data points aligned to a standard schema. It identifies and normalizes key fields including:
    • Patient ID, Age, Gender, Condition, Symptoms, Diagnosis, Allergies, Vitals, Chronic Conditions, Medications Already Taken, Test Results, Timestamp, and Doctors Note.

    • Handles format inconsistencies and missing fields using defaults like NULL or N/A.

    • Normalizes shorthand expressions (for example, BP: 140/90 → Vitals) and outputs either structured JSON or SQL INSERT commands.

  • LLM Used: Google Vertex (inherits from parent).
  • Tool Used: MCP Client Tool

2. Treatment Planner and Reporter

  • Role:Treatment Reporter.
  • Scope:Uses the patient's clinical attributes to perform RAG-based search and generate context-aware treatment recommendations.
  • Description: This sub-agent receives structured patient data and performs the following:
    • Uses Diagnosis and Condition as primary query terms.

    • Applies additional filters using Age, ChronicConditions, and Allergies for precision.

    • Conducts RAG search over a medical knowledge base (for example, treatment_protocols.txt).

    • Synthesizes the protocol content into a patient-specific treatment plan.

    • Avoids unsafe treatments (for example, allergic medications) and proposes alternatives when needed.

    • Generates a readable report including:

      • Medications (with dosage)

      • Lifestyle recommendations

      • Monitoring and follow-up schedule

  • LLM Used: Google Vertex (inherits from parent).
Tools Used:
  • MCP Client Tool over treatment_protocols.txt
  • PDF Reader Tool
Note: For details on modifying the Tools, refer Tools Library section.
Agent Workflow Behavior Summary
  • The Patient Data Extractor receives an unstructured patient file (e.g., patient_report.txt, scanned PDF).
  • It extracts key medical entities and normalizes them into a structured schema (e.g., JSON or SQL-ready).
  • The Treatment Planner and Reporter accepts this structured data and uses fields like Diagnosis, Condition, and Allergies to query a RAG-enabled medical knowledge base.
  • The agent retrieves appropriate treatment protocols, checks for contraindications (e.g., allergies), and synthesizes a safe and personalized treatment plan.
  • It outputs two key artifacts:
    • A clinical plan for healthcare providers

    • A patient-friendly explanation that includes next steps, medication details, and advice

Sample Questions:
  • Which treatment options are recommended for these symptoms according to clinical guidelines?
  • Can you generate a care plan based on this patient’s latest diagnosis report?