Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to athenahealth

Scalekit connector
Open markdown

The athenahealth connector lets your AI agent act in each user's athenahealth account. Each user signs in to athenahealth once, and Scalekit stores and refreshes their tokens, so your agent never handles credentials. It comes with 55 tools.

Tools
55
What they doRead · write · destructive
55 · 0 · 055 read0 write0 destructive
Users sign in with

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. Create the athenahealth connection

    In AgentKit > Connections, create an athenahealth connection. The name you give it is the connection_name your code passes. See Configure connections.

    Console steps with screenshots

    athenahealth connections use SMART on FHIR and act as the signed-in clinician, through athenaOne’s certified FHIR R4 API. The tools read data only. The connection already has athenahealth’s production authorization and token endpoints; you add the audience (aud), the FHIR server domain, and the client ID and secret of your athenahealth app.

    1. Create the connection and copy the redirect URI

      In the Scalekit dashboard, go to AgentKit > Connections > Create Connection, find athenahealth and click Create. Copy the Redirect URI.

    2. Register a provider app with athenahealth

      Register a confidential provider app with athenahealth that uses user-context scopes, and note its client ID and client secret:

      • Add the redirect URI you copied.
      • Request refresh tokens (offline_access).

      Confirm the exact scope names athenahealth registers for your app; select the same ones on the connection.

    3. Enter the values on the connection

      Back on the athenahealth connection, enter:

      • Client ID and Client Secret: from your athenahealth app.
      • Audience (aud): https://api.platform.athenahealth.com/fhir/r4
      • FHIR Server Domain: api.platform.athenahealth.com/fhir/r4

      Select openid, fhirUser and offline_access, plus the resource scopes your agent needs, such as user/Patient.read. Click Save.

      To test in athenahealth’s preview environment, replace the production values with these:

      FieldPreview value
      Authorization Endpointhttps://api.preview.platform.athenahealth.com/oauth2/v1/authorize
      Token Endpointhttps://api.preview.platform.athenahealth.com/oauth2/v1/token
      Audience (aud)https://api.preview.platform.athenahealth.com/fhir/r4
      FHIR Server Domainapi.preview.platform.athenahealth.com/fhir/r4

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • athenahealth_allergy_intolerance_readRetrieve one athenahealth FHIR AllergyIntolerance resource by its logical ID.Read-only

    Get Allergy

    Retrieve one athenahealth FHIR AllergyIntolerance resource by its logical ID. Returns the AllergyIntolerance resource: allergies and intolerances recorded on a patient's chart, with substance code, clinical status, reaction, and criticality. Use this when you already have the allergy ID. Use athenahealth_allergy_intolerance_search to find allergies.

    Inputs

    allergy_intolerance_idstringrequired
    Logical ID of the AllergyIntolerance resource (the id element, without the AllergyIntolerance/ prefix).
  • athenahealth_appointment_readRetrieve one athenahealth FHIR Appointment resource by its logical ID.Read-only

    Get Appointment

    Retrieve one athenahealth FHIR Appointment resource by its logical ID. Returns the Appointment resource: a scheduled appointment, with status, start and end time, appointment type, participants (patient, provider, location), and athenahealth appointment extensions. Use this when you already have the appointment ID, for example from an Encounter or a scheduling workflow; athenahealth's FHIR API does not offer an open appointment search.

    Inputs

    appointment_idstringrequired
    Logical ID of the Appointment resource (the id element, without the Appointment/ prefix).
  • athenahealth_binary_readRetrieve one athenahealth FHIR Binary resource by its logical ID.Read-only

    Get Binary

    Retrieve one athenahealth FHIR Binary resource by its logical ID. Returns the Binary resource: raw document content (for example a clinical document or image referenced by a DocumentReference attachment), returned as a FHIR Binary with contentType and base64 data. Use this to fetch the document content referenced by a DocumentReference attachment URL (Binary/<id>).

    Inputs

    binary_idstringrequired
    Logical ID of the Binary resource (the id element, without the Binary/ prefix).
  • athenahealth_care_plan_readRetrieve one athenahealth FHIR CarePlan resource by its logical ID.Read-only

    Get Care Plan

    Retrieve one athenahealth FHIR CarePlan resource by its logical ID. Returns the CarePlan resource: assessment-and-plan care plans, with category, status, intent, period, and narrative text. Use this when you already have the care plan ID. Use athenahealth_care_plan_search to find care plans.

    Inputs

    care_plan_idstringrequired
    Logical ID of the CarePlan resource (the id element, without the CarePlan/ prefix).
  • athenahealth_care_team_readRetrieve one athenahealth FHIR CareTeam resource by its logical ID.Read-only

    Get Care Team

    Retrieve one athenahealth FHIR CareTeam resource by its logical ID. Returns the CareTeam resource: a patient's care team, with status and participants (practitioners, organizations, and their roles). Use this when you already have the care team ID. Use athenahealth_care_team_search to find care teams.

    Inputs

    care_team_idstringrequired
    Logical ID of the CareTeam resource (the id element, without the CareTeam/ prefix).