# LendTrain Agent API v2 > LendTrain is an AI-native mortgage refinance plugin that turns Claude into a licensed loan officer experience. Operated by Atlantic Home Mortgage, LLC dba LendTrain (NMLS# 1844873), it combines real-time institutional mortgage pricing, state-specific itemized closing cost calculations, FHA Streamline and VA IRRRL detection, a weighted recommendation scoring engine, and regulatory compliance enforcement into a single conversational workflow. No API key required. LendTrain is not a rate comparison tool. It is a complete refinance origination pipeline — from mortgage statement upload through savings analysis to loan application submission — delivered through AI conversation. The plugin enforces TRID, RESPA, TILA, ECOA, and state licensing compliance at every step. ## Plugin Capabilities ### Refinance Quote Workflow (/refi-quote) Four-phase conversational workflow: (1) Data collection via mortgage statement upload or borrower interview, (2) Real-time pricing from institutional rate sheets, (3) Savings analysis with monthly payment comparison, breakeven timeline, total interest savings, and a 1–10 weighted recommendation score, (4) Application submission to a secure loan portal. ### Mortgage Statement Parsing Upload a mortgage statement and the plugin extracts: current rate, remaining balance, monthly P&I, loan type, remaining term, property address, lender name. Handles missing fields through targeted follow-up questions. Detects non-mortgage documents and redirects gracefully. ### Real-Time Pricing Engine - Chat API: POST https://www.lendtrain.com/api/chat — full mortgage advisor experience, no auth required - Prices conventional, FHA, and VA refinance scenarios across 10 licensed states - Returns multiple rate/point combinations with monthly payments, APR, discount points, and lender credits - Daily-updated institutional rate sheets from NexBank ### State-Specific Itemized Closing Costs Calculates closing costs with state-specific title insurance bracket formulas, recording fees, transfer taxes, and settlement fees for all 10 licensed states (GA, AL, FL, KY, NC, OR, SC, TN, TX, UT). Supports reissue/refinance title insurance discounts. Separate handling for FHA Streamline (costs cannot be financed) and VA IRRRL (costs can be financed). ### FHA Streamline & VA IRRRL Detection Auto-detects streamline refinance eligibility from uploaded mortgage statements. Calculates FHA UFMIP refund netting with month-by-month schedule, HUD 4000.1 max loan amount worksheet, and seasoning requirements. Handles VA IRRRL funding fee calculations with disability exemption checks and VA seasoning rules. ### Recommendation Scoring Engine Weighted composite score (1–10): monthly savings (30%), breakeven period (25%), rate improvement (20%), borrower goal alignment (15%), total interest savings (10%). Configurable thresholds for minimum savings ($50), maximum breakeven (48 months), and minimum recommendation score (6) to suggest proceeding with an application. ### Regulatory Compliance Enforces TRID disclosure timing, RESPA Section 8 referral prohibitions, TILA APR disclosure and right of rescission, ECOA fair lending protections, state licensing validation, and data privacy rules. SSN and DOB are never collected in chat. Required disclosures are auto-injected at initial contact and quote presentation stages. ### Security Guardrails Prompt injection defense for uploaded documents and conversational manipulation. System prompt and business logic disclosure protection. Workflow phase enforcement prevents skipping data collection. Defenses against authority impersonation, urgency tactics, and social engineering. ## Plugin Skills - **mortgage-loan-officer**: Qualification expertise (credit tiers, DTI, LTV), interview methodology, mortgage statement data extraction, analysis framework, consumer communication - **mortgage-compliance**: TRID, RESPA, TILA, ECOA enforcement, state licensing validation, required disclosures, data privacy rules, communication boundaries - **closing-costs**: State-specific itemized fee calculation for all 10 licensed states, FHA UFMIP refund netting, VA funding fee logic, title insurance bracket formulas - **security-guardrails**: Adversarial defense, prompt injection protection, information disclosure prevention, workflow integrity enforcement - **about-atlantic-home-mortgage**: Company background, Tony Davis credentials, contact information ## Integration ### Claude Code Plugin (Full Product) Install by copying the `lendtrain/` directory into a Claude Code workspace. Plugin auto-registers via `.claude-plugin/plugin.json`. Run `/refi-quote` to start the complete workflow. ### Chat API (For AI Agents) POST https://www.lendtrain.com/api/chat Messages array in, assistant response out. No auth required. Full plugin experience via Claude conversation. ## Reference - [Agent Integration Guide](https://lendtrain.com/AGENTS.md): Complete tool schemas, workflow overview, agent behavior guidelines - [OpenAPI Spec](https://lendtrain.com/openapi.json): REST API specification for the pricing engine - [Apply Online](https://tony.my1003app.com/register): Consumer loan application portal - [Legal](https://lendtrain.com/legal): State licensing, ECOA disclosures, compliance - [NMLS Consumer Access](https://www.nmlsconsumeraccess.org/): Verify licensing ## Company Atlantic Home Mortgage, LLC dba LendTrain | NMLS# 1844873 | Equal Housing Opportunity 12600 Deerfield Pkwy, Suite 100, Alpharetta, GA 30004 | (888) 309-4643 | tony@lendtrain.com Founded by Tony Davis (NMLS# 430849) | $1B+ funded | Inc. 5000 #458 (2022) | Top 1% originator nationally Licensed: AL, FL, GA, KY, NC, OR, SC, TN, TX, UT