How gandhismit06/insuremate works
InsureMate prepares health-insurance claims through document extraction, completeness validation, coverage and identity checks, and policy-driven missing-evidence detection; its agent can plan and execute these tools and synthesize a readiness result. The graph preserves the documented Phase 1–5 capabilities and the internal planning, decision, state, and tool-adapter layers. Several Phase 4/5 and PDF-rendering connections rely on source-index references or explicit documentation rather than fully shown call sites, so those links are marked unverified where appropriate.
Main entry points: insuremate_agent.py Claim orchestrator · tools.py Tool adapters · detector.py Requirement matching · llm_gateway.py LLM reasoning gateway
Components 21
Agent orchestration
- Claim orchestrator
agent/insuremate_agent.py - Plan creation
agent/planner.py - Action decisions
agent/decision.py - Claim session state
agent/state.py - Tool adapters
agent/tools.py
Document processing
- Extraction tool
tools/qwen_vl_tool.py - PDF page rendering
services/qwen_vl/pdf_processor.py - Vision extraction
services/qwen_vl/extractor.py
Claim verification
- Validation tool
tools/document_validation_tool.py - Field completeness rules
services/document_validation/validator.py - Validity tool
tools/validity_checker_tool.py - Coverage and identity checks
services/validity_checker/checker.py
Evidence requirements
- Missing evidence tool
tools/missing_document_tool.py - Requirement matching
services/missing_document/detector.py - LLM reasoning gateway
services/missing_document/llm_gateway.py - Requirement prompts
services/missing_document/prompt_builder.py - Evidence schemas
services/missing_document/schemas.py - Ollama client
services/missing_document/ollama_client.py
Other components
- Policyholder or adjudicator
- CLI entry
main.py - Ollama model service
Connections 23
- Policyholder or adjudicator → CLI entry: submits claim
README.md - CLI entry → Claim orchestrator: starts agent
main.py - Claim orchestrator → Plan creation: creates plan
agent/insuremate_agent.py - Claim orchestrator → Action decisions: requests decisions
agent/insuremate_agent.py - Claim orchestrator → Claim session state: tracks session
agent/insuremate_agent.py - Claim orchestrator → Tool adapters: executes tools
agent/insuremate_agent.py - Tool adapters → Extraction tool: invokes extraction
agent/tools.py - Tool adapters → Validation tool: invokes validation
agent/tools.py - Tool adapters → Validity tool: invokes validity
agent/tools.py - Tool adapters → Missing evidence tool: invokes detection
agent/tools.py - Extraction tool → Vision extraction: runs extraction
tools/qwen_vl_tool.py - Vision extraction → PDF page rendering: renders pages
services/qwen_vl/extractor.py - Validation tool → Field completeness rules: validates fields
tools/document_validation_tool.py - Validity tool → Coverage and identity checks: checks coverage
tools/validity_checker_tool.py - Missing evidence tool → Requirement matching: detects missing evidence
tools/missing_document_tool.py - Requirement matching → LLM reasoning gateway: requests reasoning
services/missing_document/detector.py - LLM reasoning gateway → Requirement prompts: builds prompts
services/missing_document/llm_gateway.py - LLM reasoning gateway → Evidence schemas: validates output
services/missing_document/llm_gateway.py - LLM reasoning gateway → Ollama client: sends requests
services/missing_document/llm_gateway.py - Ollama client → Ollama model service: calls model
services/missing_document/ollama_client.py - Requirement matching → Vision extraction: uses extracted output
- Requirement matching → Field completeness rules: uses validation output
- Requirement matching → Coverage and identity checks: uses validity output