LLM Installation Instructions

Quickly bootstrap your integration using a LLM to generate Carrier Platform client libraries and map data models


Instructions for Humans

In order to begin, please review the Instructions for LLMs section in this session prompt in a new tab, which is intended to be fed to your coding LLM in a new session:

Coding Agent LLMBash
Claude Codeclaude -p "$(curl -s 'https://root-bind-api.readme.io/docs/llm-installation-instructions.md')"
OpenAI Codex CLIcodex "$(curl -s 'https://root-bind-api.readme.io/docs/llm-installation-instructions.md')"
Gemini CLIcurl -s "https://root-bind-api.readme.io/docs/llm-installation-instructions.md" | gemini

The LLM will scan your application to infer implementation details for:

  • Generating a client library
  • Determining which API endpoints to call and when
  • Enhancing your existing application UI with Root's Carrier Platform quoting flow

Instructions for LLMs

Root Insurance Carrier Platform API Integration Agent

You are tasked with co-creating a client application for Root Insurance's Carrier Platform API. Begin immediately after reviewing your context, prompting the user as necessary.


Rules

  1. Review installed libraries before code design. Do not introduce unnecessary dependencies if functionality already exists in installed libraries/packages or utility methods.
  2. Review similar files for code samples when implementing a novel feature.
  3. Prompt the user with your top selections and reasoning if you need a new external dependency.

Resources

Official Documentation

Products Reference

ProductAgent Attribution?TypeAgent AttributionEstimated Quotes (RC1)Bindable Quotes (RC3)Bridge Destination(s)
Price-to-BridgeNohostedxHostedX
Price-to-BridgeYesagentx-rapRoot Agent Portal (RAP)
Fully EmbeddedYesembeddedHostedX; Root Agent Portal (RAP)

Implementation Guide

Phase 1: Initial Setup

1.1 Retrieve the OpenAPI Schema

Fetch the latest OpenAPI schema from Root's Carrier Platform API for client library generation:

https://app.partner-testing.joinroot.com/bind_api/docs/openapi/v3/swagger.yaml

Use this to understand endpoints, functionality, and request/response shapes.

1.2 Determine Product Requirements

Reference the Products table above and confirm the user's requirements for each API feature:

  • Agent Attribution — Is this needed?
  • Estimated Quotes (RC1) — Will they display estimated quotes?
  • Bindable Quotes (RC3) — Will they display bindable quotes in their application?
  • Bridge Destination — Where will users be redirected for completion?

Work backwards from features to confirm the product type. Do not ask the user directly for the type—instead, confirm your reasoning using the corresponding Product name from the table.

1.3 For embedded Applications, Additionally Determine:

  • Whether they intend to display bindable quotes in their application or bridge to HostedX/RAP
  • Whether they need Agent Attribution, and if so:
    • Are they building software for a single agency?
    • Or a "Comparative Rater" multi-agency application?
  • Whether their application has information about quote/policy coverages:
    • Should existing coverage preferences be re-mapped to available options, or rely on Root recommendations?
    • Do they want functionality to customize quotes?

1.4 Prefill Reports

Prompt the user to determine whether they want to run "prefill reports" for customers in scenarios where they have limited information about drivers and/or vehicles.

See "Creating a Prefill Request", "Retrieving Prefill Report", and "Submitting an Update Quote" sections of the "Getting Started" guide


Phase 2: Client Library Generation

2.1 Generate the API Client

Use the OpenAPI Generator remote service: https://api.openapi-generator.tech/api-docs

  1. Prompt for preferred language — If not obvious from the codebase, confirm with the user
  2. GET language options at https://api.openapi-generator.tech/api/gen/clients/{language}
  3. POST to generate at https://api.openapi-generator.tech/api/gen/clients/{language} with:
    • Collected options
    • Root's OpenAPI schema
  4. Prompt for installation location if no similar libraries exist in the codebase

Phase 3: Client Initialization

3.1 Initialize the Client

Prompt the user to determine where the client should be initialized (suggest your best guess).

3.2 Authentication Setup

  1. Based on application type, determine the authentication parameter:
    • hostedx or embedded without agent attribution → use tokenReference parameter
    • agentx or embedded with agent attribution → use Root-registered agentEmail parameter
  2. Ask the user to store their Integration Secret Key (see Authentication Guide) in a protected manner
    • Confirm secrets implementation and credential variable names with the user
    • Once the secrets/credential implementation has been confirmed; find code samples of secrets implementation without reading any secret files directly

3.3 Create Authentication Helper

Add a helper method for client initialization that:

  1. Receives the auth parameter value
  2. POSTs to create a new JWT auth token
  3. Uses the token for all subsequent API client interactions
  4. Guards against multiple token responses in ambiguous token creations (see "Managing Multiple Token References" in the Authentication Guide)

Phase 4: Entity Mapping

Prompt the user to confirm which application models will be used to create quoted customer entities:

Home Address

  • Confirm the data model
  • If the home address entity refers to similar data, confirm +Garaging Address mapping

Drivers

  • Confirm data model for the primary named insured driver
  • Confirm data model for additional included/excluded drivers (may differ)

Vehicles

  • Ideally use a full VIN
  • A short VIN may work in scenarios described in the "Estimated Quote Requirements" documentation

Phase 5: Application Integration

5.1 Determine Integration Point

Prompt the user to determine where to build/insert the Carrier Platform API quoting application.

  • Ensure corresponding controllers and/or views correctly initialize the generated client with appropriate parameters
  • If no application exists yet, build from scratch but confirm assumptions when ambiguous

5.2 Create Initial Quote

Before displaying the quote, call the Quoting API's create quote method using all known address, driver, and vehicle data.

Prompt the user to determine whether/where the quote id should be associated with the end-user or agent.

5.3 Prefill Report Implementation (if applicable)

If the user wants prefill reports:

  1. POST to the prefill report endpoint with known information
  2. Review the "How to Use the Prefill Report" documentation
  3. Note: This adds latency to polling operations
  4. Confirm where this report should be requested
  5. Confirm whether polling should be considered in the application (runs independently of quote estimates)

Application-Specific Implementation

Note: For all quoting operations, refer to the Quote Calculation Timing documentation for polling timing suggestions. Follow only the instructions matching your application type.


Type: hostedx (Price-to-Bridge without Agent Attribution)

Implement the Hosted Embedded Experience

Steps:

  1. Poll for quote completion

    • Use the quote ID from the create operation to GET quote information
    • Re-request until status indicates a terminal value
  2. Display quote price

    • Confirm where to display the result quote price in the user's application
  3. Implement bridge functionality

    • Confirm where to add the bridge functionality / redirect to HostedX
    • Create bridge with experience: "default" parameter
    • Redirect to the resulting bridge url

Type: agentx-rap (Price-to-Bridge with Agent Attribution)

Implement a modified Hosted Embedded Experience for agents

Steps:

  1. Poll for quote completion

    • Use the quote ID from the create operation to GET quote information
    • Re-request until status indicates a terminal value
  2. Display quote price

    • Confirm where to display the result quote price in the agent-facing application
  3. Implement bridge functionality

    • Confirm where to add the bridge functionality / redirect to RAP
    • Create bridge with experience: "agent" parameter
    • Redirect to the resulting bridge url

Type: embedded (Fully Embedded)

Implement the Fully Embedded Experience

Steps:

Quote Display Configuration
  1. Determine price display strategy

    • Will prices be displayed throughout quoting, or only facilitating checkout?
    • If displaying prices: estimates, bindable quotes, or both?
    • Implement appropriate polling before displaying prices
  2. Quote manipulation UI

    • For adding/manipulating drivers and vehicles, or confirming prefill results
    • Prompt for placement of logic and appearance
Quote Management
  1. Poll for quote completion

    • Use the quote ID to GET quote information
    • Re-request until status indicates a terminal value
    • Verify whether the customer-linked quote_id should be persisted
  2. Coverage customization (if applicable)

    • Closely follow the Coverage Customization API documentation
    • If the application has knowledge of customer's current/prior coverages, confirm all key re-mapping questions before implementation
  3. Quote selection

    • Prompt for where user/agent quote selection occurs
    • Trigger the Quoting API's Finalize Quote operation to signal Root to complete report analysis
    • Note: This may (rarely) recalculate the quote, requiring additional polling
Checkout Flow
  1. Legal documents

    • Use the Legal Documents API to GET all legal documents
    • Display with a progress spinner during loading
    • Each line item must display the document title and link/redirect to the url
    • The "proceed"/continue UI must use the Legal Documents API to affirm all documents (prerequisite to checkout/bind)
  2. Payment collection

    • If checkout destination is unclear, prompt for specs
    • Implement Braintree's JS client (see Collecting Payment documentation)
    • Prompt user to choose between:
      • Braintree's Drop-in UI
      • Braintree's Hosted Fields JS library
  3. Bind policy

    • Confirm the UI element that triggers bind
    • POST to the Quoting API's Bind Policy endpoint with desired start date
    • A successful checkout returns a policy number for subsequent operations
    • Prompt for where the resulting policy id should be associated with the customer/agent
  4. Policy confirmation

    • Confirm the level of policy detail to display
    • Use the Policy API's GET Policy Documents endpoint for confirmations or inline details