eligibility_check, the insurance eligibility tool exposed through the Agents Platform.
The tool checks a patient’s coverage with an eligibility vendor and returns plan status, deductibles, out-of-pocket figures, copays and coinsurance. Stedi is the default vendor. When Stedi cannot answer, the tool retries the same check on pVerify.
Authentication and enablement
The tool uses Nanonets-wide vendor accounts, so the agent supplies no credentials. It is off by default; enable it on the agent. Stedi needsSTEDI_API_KEY set on the worker. When it is not set, every call goes to pVerify.
Inputs
Required:patient_first_name,patient_last_namepatient_dob:MM/DD/YYYY.patient_state: 2-letter code. It is used to prefer an in-state payer match.insurance_carrier_name: the carrier as a human would write it, such asAetnaorBlue Cross Blue Shield of California.member_idprovider_npi,provider_first_name,provider_last_name: the rendering provider.
appointment_date:YYYY-MM-DD. Defaults to tomorrow. The date of service runs from the day after this date to the day after that.practice_type_code:21checks mental-health benefits (X12 service typeMH). Leave it empty for general plan coverage (X1230).provider:stedi(the default) orpverify. Withstedi, a failed Stedi check is retried on pVerify. Withpverify, Stedi is not called.
Vendor selection and fallback
Withprovider: "stedi" the tool does the following:
- It resolves the carrier name to a Stedi payer ID through Stedi’s payer search. Only payers that support eligibility are considered, and one operating in
patient_stateis preferred. - It sends a real-time eligibility check. A date of service in the future is sent as today, because CMS rejects future dates.
- It falls back to pVerify if any of these happens: Stedi is not configured, no payer matches, the request fails, Stedi returns a non-200 status, or the payer refuses the lookup and returns no plans (an AAA error such as “Subscriber Not Found”).
Outputs
structuredContent has the same shape whichever vendor answers:
On a Stedi answer,
eligibility fills plan status, plan name, policy type, plan dates, gender, network flag, member ID, the deductible and out-of-pocket figures, and the mental-health copay, coinsurance and covered flags. Stedi errors returned alongside plans (for example one service type refused) go into ExceptionNotes and do not mark the check as failed. pVerify-only sections stay empty: Medicare, coordination of benefits, specialist office, PCP/auth and the payer’s free-text notes. Read those from stedi_response when a step needs them. A benefit the payer did not return is left blank. It is never reported as $0.00.
The result is registered as an eligibility_check task variable, so a later step can pass ${VAR_n}.eligibility.PlanCoverageSummary. It is not injected into calls automatically.
Monitoring
Every call writes one log line,eligibility_check: vendor outcome, carrying field_agent_id, field_agent_group_id, field_workspace_id, field_task_id, eligibility_vendor (stedi, pverify, or none when no vendor answered), and stedi_fallback_code (pverify_requested when the call set provider: "pverify" and Stedi was not tried). The line holds IDs and codes only, never patient or payer text. In Loki:
base_tool_name: agents can call the tool under an alias, such as aph_eligibility_check. fallback_code is set on a pVerify answer that followed a Stedi attempt, for example payer_unmatched, payer_error_75, http_451 or not_configured. Steps from before Stedi carry no provider and count as pVerify.