Skip to content

Connect AxisCare to AI Agents: Automate Visits and Lead Tracking

Uday Gajavalli Uday Gajavalli 10 min read AI & Agents
TrutoFor teams building AI agents

Give your AI agent AxisCare tools.

A technical guide for engineering teams on connecting AxisCare to AI agents. Learn how to bypass complex composite keys, strict filtering limits, and build autonomous home care workflows using Truto's unified tools layer for LangChain, CrewAI, and the Vercel AI SDK.

In this guide

  1. 01Understand the AxisCare API constraints
  2. 02Fetch AI-ready tools via Truto
  3. 03Bind tools to your agent framework
  4. 04Implement rate limit handling
  5. 05Deploy multi-step workflows

The guide

Learn how to connect AxisCare to AI agents using Truto's tools endpoint to automate home care visits, caregiver schedules, and lead tracking workflows.

You want to connect AxisCare to an AI agent so your system can independently manage caregiver schedules, orchestrate home care visits, track applicant leads, and update Activities of Daily Living (ADLs) based on real-time field data. Here is exactly how to do it using Truto's /tools endpoint and SDK, bypassing the engineering bottleneck of building a custom integration from scratch.

Giving a Large Language Model (LLM) read and write access to a home care management platform is an exercise in strict state management. Home care scheduling is a complex graph problem involving clients, caregivers, strict compliance regulations, and unforgiving API requirements. If your team uses ChatGPT, check out our guide on connecting AxisCare to ChatGPT, or if you are building on Anthropic's models, read our guide on connecting AxisCare to Claude. For developers building custom autonomous workflows, you need a programmatic way to fetch these tools and bind them to your agent framework.

This guide breaks down exactly how to fetch AI-ready tools for AxisCare, bind them natively to an LLM using frameworks like LangChain, LangGraph, CrewAI, or the Vercel AI SDK, and execute complex home care operations. We will look at how to handle API quirks, manage standard rate limits, and chain multiple tool calls safely. For a deeper look at the architecture behind this approach, refer to our research on architecting AI agents and the SaaS integration bottleneck.

The Engineering Reality of the AxisCare API

Giving an LLM access to external data sounds trivial in a prototype. You write a fetch request and wrap it in an @tool decorator. In production against complex vertical SaaS platforms like AxisCare, this naive approach collapses.

The AxisCare API introduces several specific integration challenges that break standard REST assumptions. If you hardcode these interactions into your agent, you will spend your sprints writing defensive integration code instead of improving your model's reasoning.

1. Composite Keys for Instantiated Visits

Standard APIs use integers or UUIDs as primary keys. AxisCare handles visits using a complex composite key structure. A scheduled visit is identified by a schedule key (e.g., s=scheduleId:d=date). Once that visit is instantiated, the key expands to a full key (e.g., v=visitId:s=scheduleId:d=date).

If you expose raw AxisCare endpoints to an LLM, the model must understand and consistently generate this proprietary string format whenever it wants to update, get, or delete a visit. Models are notoriously bad at adhering to proprietary string interpolation rules without heavy few-shot prompting. A single hallucinated colon or missing v= prefix results in a failed request.

2. Strict "AND" Fashion Filtering

When listing resources - like querying for specific caregivers, applicants, or visits - the AxisCare API enforces strict "AND" filtering. If an agent applies multiple filters, the resource must match all requested filters to be returned. There is no native "OR" logic in standard list endpoints unless you explicitly pass comma-separated arrays to specific parameters like caregiverIds.

Agents naturally default to loose search behavior. If an agent tries to find a caregiver who is either a Registered Nurse OR speaks Spanish by passing both parameters into a standard query string, AxisCare will return zero results unless a caregiver perfectly matches both criteria. This leads to agents incorrectly assuming no staff is available and failing the workflow.

3. Read-Only Linked Contacts and Strict Validation

AxisCare heavily utilizes a "Linked Contacts" feature in their UI, connecting clients and leads. However, through the API, these linked contacts are entirely read-only. Furthermore, when updating records like Leads, the API enforces strict validation rules. If you want to update a lead's name, you cannot just send a firstName patch. You must supply both firstName and lastName, and the resulting combination must be unique across the instance.

Exposing these raw endpoints pushes provider quirks into the LLM's context window. Every quirk is a hallucination waiting to happen. By utilizing a unified tool layer that normalizes these interactions into standard JSON schemas, the LLM only chooses from stable function names and receives immediate schema validation errors before the request ever hits the AxisCare servers.

Hero Tools for AxisCare AI Agents

Truto provides a comprehensive set of pre-defined tools mapped to AxisCare's resources. Instead of expecting the LLM to understand HTTP verbs and endpoint paths, these tools are exposed as named functions with explicit JSON schemas.

Here are the highest-leverage operations for automating home care workflows.

List All Visits

Retrieves a paginated list of scheduled or completed visits. This tool is heavily utilized by agents to audit daily schedules, check for coverage gaps, or compile billing reports.

"Fetch all visits scheduled for client ID 4059 today. Check the status to see if any are currently marked as unassigned or pending caregiver confirmation."

Add Visit

Creates a new visit instance. The agent must supply the minimum required information: a client ID, caregiver ID, visit date, start time, and end time. Because the schema is strict, the agent cannot attempt to create a visit without assigning a specific duration.

"Caregiver John Doe (ID 948) has agreed to cover the emergency shift for client Mary Smith (ID 4059) tomorrow. Create the visit for tomorrow starting at 09:00 AM and ending at 01:00 PM."

Update Client ADL

Updates an existing Activity of Daily Living (ADL) assignment for a specific client. This tool supports partial updates, allowing the agent to modify care instructions or update the scheduled events when the ADL must be performed.

"Client Mary Smith's physician requested we add 'medication reminders with food' to her morning routine. Update her existing Medication ADL (ID 204) to include this instruction for all morning events."

List All Caregivers

Searches the caregiver database. This tool is critical for dispatch workflows, allowing the agent to filter staff by various values to find available, active personnel to fill open shifts.

"List all active caregivers in the system. I need to review their profiles to find a suitable replacement for a weekend shift."

Add Applicant

Adds a new applicant to the AxisCare recruiting pipeline. This is typically used by inbound conversational agents engaging with prospective employees via SMS or chat widgets.

"A new applicant named Sarah Jenkins just completed the preliminary SMS screening. Create a new applicant record for her so HR can review her profile."

Add Schedule

Adds a long-term schedule (grouped into plans) rather than a single instantiated visit. The tool schema strictly enforces that the agent must provide either a service code or a description, but not both - preventing a common API rejection.

"Create a recurring weekly schedule for the new client, James Wilson (ID 5012). He needs coverage on Mondays, Wednesdays, and Fridays from 10:00 AM to 02:00 PM starting next Monday. Use the 'Companionship' service code."

For the complete inventory of available AxisCare tools, query schemas, and return types, visit the AxisCare integration page.

Workflows in Action

Integrating AI agents with AxisCare allows you to automate complex, multi-step operations that previously required manual intervention from scheduling coordinators or HR staff.

Automating Caregiver Call-outs and Replacements

When a caregiver calls in sick at 5:00 AM, a scheduling coordinator normally scrambles to find a replacement. An AI agent can handle this entire workflow autonomously.

"Caregiver ID 883 just reported they are sick and cannot make their shifts today. Find all their visits for today, unassign them, find a replacement caregiver, and update the visits."

  1. The agent calls list_all_axis_care_visits filtering by the caregiver's ID and today's date.
  2. For each returned visit, the agent calls update_a_axis_care_visit_by_id, passing null for the caregiverId to unassign the sick employee and mark the shift as open.
  3. The agent analyzes the client requirements from the visit data, then calls list_all_axis_care_caregivers to find active staff.
  4. (Optional) The agent could use an external SMS tool to message available caregivers.
  5. Once a replacement is selected, the agent calls update_a_axis_care_visit_by_id again, slotting the new caregiver ID into the schedule.

The scheduling team arrives at the office to find the emergency handled and the schedule fully staffed, with notes appended to the visit.

Processing Inbound Leads and Setting Tasks

Inbound client leads often fall through the cracks if not actioned immediately. An agent can process intake forms and structure the CRM data in real-time.

"We received a web lead for a new prospective client named Arthur Pendelton. Add him as a lead, then create a task note to follow up with him on Tuesday."

  1. The agent calls create_a_axis_care_lead with the parsed name and contact details from the web payload.
  2. AxisCare returns the new Lead ID.
  3. The agent calls create_a_axis_care_entity_note, passing the entity_type as 'lead', the new Lead ID as the entity_id, and writing a note dictating the required follow-up on Tuesday.

The sales team logs in and sees a structured lead record with a clear, timestamped directive ready for action.

Building Multi-Step Workflows

To execute these operations, your agent framework needs to understand what tools are available and how to call them. Truto acts as the proxy layer, abstracting away pagination and authentication, while exposing a clean REST-based CRUD API for the LLM.

This architectural pattern works across any major framework. Below, we demonstrate fetching tools via the Truto SDK and binding them to a LangChain agent.

Fetching Tools and Binding to LangChain

First, initialize the Truto SDK and retrieve the proxy APIs for your specific AxisCare integrated account.

import { ChatOpenAI } from "@langchain/openai";
import { TrutoToolManager } from "truto-langchainjs-toolset";
import { AgentExecutor, createToolCallingAgent } from "langchain/agents";
import { ChatPromptTemplate } from "@langchain/core/prompts";
 
async function runAxisCareAgent() {
  // 1. Initialize the LLM
  const llm = new ChatOpenAI({
    modelName: "gpt-4o",
    temperature: 0,
  });
 
  // 2. Initialize Truto Tool Manager with your Integrated Account ID
  // This ID comes from the Truto UI after connecting an AxisCare instance.
  const trutoManager = new TrutoToolManager({
    integratedAccountId: process.env.AXISCARE_INTEGRATED_ACCOUNT_ID,
    trutoApiKey: process.env.TRUTO_API_KEY,
  });
 
  // 3. Fetch all available AxisCare tools for this account
  const tools = await trutoManager.getTools();
  
  // 4. Bind the tools to the LLM
  const prompt = ChatPromptTemplate.fromMessages([
    ["system", "You are an autonomous home care scheduling assistant. You have full access to AxisCare."],
    ["human", "{input}"],
    ["placeholder", "{agent_scratchpad}"],
  ]);
 
  const agent = createToolCallingAgent({
    llm,
    tools,
    prompt,
  });
 
  const agentExecutor = new AgentExecutor({
    agent,
    tools,
    // Return tool execution errors to the LLM so it can attempt to fix schema mistakes
    handleParsingErrors: true, 
  });
 
  // 5. Execute a multi-step workflow
  const result = await agentExecutor.invoke({
    input: "List all active caregivers, find one, and create a new visit for client ID 9021 today at 2pm for 3 hours."
  });
 
  console.log(result.output);
}

Handling Rate Limits and Exponential Backoff

When building autonomous agents, rate limits are a critical failure point. A highly capable agent can easily fire dozens of tool calls in seconds, triggering HTTP 429 Too Many Requests errors from the upstream provider.

Factual note on Truto architecture: Truto acts as a transparent proxy. It does not retry, throttle, or apply backoff on rate limit errors automatically. When AxisCare returns a 429, Truto passes that exact error to the caller. However, Truto does normalize the upstream rate limit information into standardized headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset) per the IETF specification.

The caller (your application) is responsible for implementing retry and backoff logic. If you allow the agent framework to crash on a 429, the entire multi-step workflow dies mid-execution.

Here is how a robust system handles this pattern:

sequenceDiagram
    participant Agent as AI Agent
    participant App as App Backend (Retry Logic)
    participant Truto as Truto API
    participant Upstream as AxisCare API

    Agent->>App: Call create_a_axis_care_visit
    App->>Truto: POST /proxy/visit (Attempt 1)
    Truto->>Upstream: POST /visits
    Upstream-->>Truto: 429 Too Many Requests
    Truto-->>App: 429 + Normalized ratelimit headers
    Note over App: App pauses based on<br>ratelimit-reset header
    App->>Truto: POST /proxy/visit (Attempt 2)
    Truto->>Upstream: POST /visits
    Upstream-->>Truto: 201 Created
    Truto-->>App: 201 Created (Normalized JSON)
    App-->>Agent: Success + Tool Output

To implement this in Node.js, you should wrap your agent execution or tool invocation layer with an exponential backoff utility like async-retry, ensuring that the LLM is completely insulated from transient network failures.

import retry from 'async-retry';
 
// Example wrapper to demonstrate how your backend should handle the 429
async function executeWithRetry(agentExecutor, inputStr) {
  return await retry(
    async (bail, attemptNumber) => {
      try {
        console.log(`Agent execution attempt ${attemptNumber}`);
        return await agentExecutor.invoke({ input: inputStr });
      } catch (error) {
        // If the error is a 429, throw it so 'async-retry' catches and retries it.
        if (error.status === 429) {
          // In a production system, you would inspect error.headers['ratelimit-reset'] 
          // to set a precise delay instead of relying purely on exponential backoff.
          throw error; 
        }
        // For 400 Bad Request or 401 Unauthorized, bail immediately. Retrying won't fix it.
        bail(error);
      }
    },
    {
      retries: 3,
      factor: 2,
      minTimeout: 2000, // wait 2 seconds before first retry
    }
  );
}

By normalizing the data schema and standardizing the rate limit headers, Truto removes the highest-friction parts of API integration, allowing your engineering team to focus entirely on the agent's logic, prompt engineering, and core product value.

Strategic Wrap-Up

Connecting an AI agent to a complex platform like AxisCare requires more than just valid API credentials. It requires shielding the LLM from proprietary filtering logic, composite keys, and fragmented error handling.

By leveraging Truto's /tools endpoint, you provide your agents with a stable, predictable, and fully typed array of tools. The agent interacts with a standardized REST schema, while Truto handles the translation layer between your application and AxisCare. This fundamentally changes the development timeline of an AI feature from months of integration maintenance to days of workflow design.

Two ways to put AxisCare to work

Truto

For product teams

Give your agent AxisCare tools

Your customers connect their own AxisCare accounts. Your product gets one API and MCP tools for AxisCare, through Truto.

FAQ

How do AI agents handle AxisCare's rate limits?
Truto normalizes AxisCare's rate limit information into standard headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset) per the IETF spec. Truto passes HTTP 429 errors directly to the caller, meaning your agent framework or application logic must implement its own retry and exponential backoff.
Can I use these AxisCare tools with LangGraph or CrewAI?
Yes. Truto's /tools endpoint returns standard JSON schemas that can be converted into native tools for any framework, including LangChain, LangGraph, CrewAI, or the Vercel AI SDK.
How does Truto handle sensitive patient data in AxisCare?
By default, AxisCare excludes sensitive fields like SSNs from responses. Truto respects this behavior. To access sensitive data, your token must have specific permissions, and you must explicitly request it using the requestedSensitiveFields parameter.
AxisCare AxisCareAI agent tools Get a sandbox

More from our Blog