Adapter Calls

The Agistry SDK provides a unified way to interact with adapters through the AdapterExecutor. This allows you to define tool execution flows.


Overview

You can configure adapters via Agistry Hub and invoke them from your code using the SDK.

import { AdapterExecutor } from 'agistry';

const agistry = new AdapterExecutor(client);

The AdapterExecutor exposes two core methods:

  • run(input, adapters[], context)

  • list()

Example: Contract Risk Flow

const result = await agistry.run(
  "Analyze this contract for legal risks. If risky, log it and alert on Telegram.",
  [
    "pdf-text-extractor",
    "llm-analyzer",
    "db-logger",
    "telegram-alert"
  ],
  {
    docUrl: "https://cdn.agistry.ai/uploads/contract.pdf"
  }
);

Adapter Types

There are two phases where adapters can run:

Phase
Method
Use Case Examples

Content Enrichment

run

Data extraction, context building, search

Actions

run

Notifications, logging, actions

Registered Adapters

All adapters that you configure in Agistry Hub are part of your toolchain. You can easily configure its name, description, input structure, and execution context — all through the UI. No need to redeploy your app when updating logic.

Last updated