For AI Agents

Machine-readable integration guide for connecting AI agents to LendTrain mortgage refinance services.

What LendTrain Provides

LendTrain is an AI-native mortgage refinance platform operated by Atlantic Home Mortgage, LLC (NMLS# 1844873). It exposes five specialized skills and a four-phase workflow for guiding borrowers through refinance evaluation.

Skills

mortgage-loan-officer
Guides borrowers through refinance evaluation: collects information, extracts data from mortgage statements, analyzes scenarios, and delivers clear recommendations.
mortgage-compliance
Enforces TRID, ECOA, TILA, RESPA, and state-specific mortgage regulations. Ensures every response complies with federal and state lending rules.
closing-costs
Calculates itemized estimated closing costs for refinance transactions, with state-specific and product-specific fee breakdowns (Conventional, FHA, VA).
security-guardrails
Adversarial defense layer that protects against prompt injection, system prompt extraction, workflow bypass, and social engineering attacks.
about-atlantic-home-mortgage
Company background, founder credentials, track record, and contact information for Atlantic Home Mortgage, LLC dba LendTrain.

Workflow

1Collect Borrower Details

Current balance, property value, credit score, state, occupancy, property type, loan purpose, and preferred term.

2Calculate Real-Time Pricing

Call the MCP pricing engine for live institutional rates across conventional, FHA, and VA products.

3Analyze Savings

Compute monthly savings, breakeven period, total interest savings, and generate a recommendation score (1-10).

4Present Results

Deliver a comparison table with itemized closing costs, compliance disclosures, and application link if score >= 6.

Claude Code Plugin (Primary Integration)

The recommended integration method. Install the LendTrain plugin into Claude Code to access all five skills and the /refi-quote command.

Installation

  1. Copy the lendtrain/ directory into your project or install from the Claude Code marketplace.
  2. The plugin registers automatically. No API keys or environment variables are required.
  3. Configure business parameters in lendtrain.local.md if needed.

Command

Command
/refi-quote
Description
Launches a guided mortgage refinance evaluation workflow. Collects borrower details, prices the loan against live institutional rates, computes itemized closing costs, performs savings analysis, and delivers a scored recommendation.

Included Skills

  • mortgage-loan-officer
  • mortgage-compliance
  • closing-costs
  • security-guardrails
  • about-atlantic-home-mortgage

Chat API (For Agents Without Plugin Support)

A stateless conversational endpoint for agents that cannot install Claude Code plugins. No API key or authentication required.

Endpoint
POST https://www.lendtrain.com/api/chat
Content-Type
application/json
Authentication
None required
Rate Limit
IP-based throttling

Request Schema

POST /api/chat
{
  "messages": [
    {
      "role": "user" | "assistant",
      "content": "string (1-10,000 characters)"
    }
  ]
}

// Constraints:
// - messages: array of 1-50 messages
// - role: "user" or "assistant"
// - content: non-empty string, max 10,000 characters per message
// - First message must have role "user"
// - Request body max: 100 KB

Response Schema

200 OK
{
  "role": "assistant",
  "content": "string"
}

Error Responses

StatusConditionError Message
400Invalid JSON bodyInvalid JSON body
400Missing or invalid messagesmessages array required
400Array length out of rangemessages must be an array of 1-50 messages
400Invalid message formatEach message must have a valid role (user/assistant) and non-empty content (max 10,000 chars)
413Body exceeds 100 KBRequest body too large
429Rate limit exceededToo many requests. Please wait a moment and try again.
502Upstream AI service errorAI service returned an error
504Request timeout (90s)Request timed out

Example Conversation

Turn 1 — Initial message
curl -X POST https://www.lendtrain.com/api/chat \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [
      {
        "role": "user",
        "content": "I have a 7.25% rate on a $340,000 balance. Home is worth $500,000. Credit score 740, primary residence in Georgia. Single family home."
      }
    ]
  }'
Turn 2 — Continue conversation
curl -X POST https://www.lendtrain.com/api/chat \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [
      {
        "role": "user",
        "content": "I have a 7.25% rate on a $340,000 balance. Home is worth $500,000. Credit score 740, primary residence in Georgia. Single family home."
      },
      {
        "role": "assistant",
        "content": "..."
      },
      {
        "role": "user",
        "content": "What about a 15-year term instead?"
      }
    ]
  }'

Integration Notes

  • The API is stateless. Send the full conversation history in each request.
  • The assistant has access to live mortgage pricing tools server-side. Tool calls are resolved automatically and only the final text response is returned.
  • Leading assistant messages before the first user message are stripped for security.
  • The assistant will provide NMLS disclosures and compliance language in its responses.

Agent Behavior Guidelines

Agents integrating with LendTrain must follow these guidelines to ensure regulatory compliance and consumer protection.

Identity Disclosure

  • Disclose that you are an AI assistant at the start of the conversation.
  • Identify the service as LendTrain, powered by Atlantic Home Mortgage, LLC.
  • Include NMLS# 1844873 and Equal Housing Opportunity in initial disclosures.
  • State that information provided is an estimate, not a commitment to lend.

Compliance Terms

Never use
“pre-approval”, “commitment”, “guaranteed”, “locked rate”
Always use
“estimate”, “quote”

Always present APR alongside the note rate. Include this disclosure with every quote: “This is an estimate. Rates are not locked. You have the right to shop for settlement services.”

Data Collection Restrictions

Never collect the following from borrowers:

  • Social Security Numbers (SSN)
  • Date of birth
  • Bank account numbers
  • Passwords or authentication credentials

Direct borrowers to the secure application portal for sensitive data collection.

Licensed States

AL
FL
GA
KY
NC
OR
SC
TN
TX
UT

Only provide refinance quotes for properties located in these 10 states.

Formatting Rules

  • Format dollar amounts as $X,XXX.XX
  • Format rates as X.XXX%
  • Keep responses concise and conversational.
  • Explain mortgage jargon in plain language on first use.
  • Do not use emojis. Maintain a professional tone.
  • Do not provide tax, legal, or investment advice.

Discovery Files

Machine-readable files for automated agent and developer discovery:

Company Information

Company
Atlantic Home Mortgage, LLC dba LendTrain
NMLS#
1844873
Address
12600 Deerfield Pkwy, Suite 100, Alpharetta, GA 30004
Equal Housing
Supports Equal Housing Opportunity