A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/Alation/alation-ai-agent-sdk below:

Alation/alation-ai-agent-sdk: Python library for integrating the Alation API into agentic workflows

The Alation AI Agent SDK enables AI agents to access and leverage metadata from the Alation Data Catalog.

This SDK empowers AI agents to:

The project is organized into multiple components:

Core SDK (alation-ai-agent-sdk)

The core SDK provides the foundation for interacting with the Alation API. It handles authentication, request formatting, and response parsing.

Learn more about the Core SDK

LangChain Integration (alation-ai-agent-langchain)

This component integrates the SDK with the LangChain framework, enabling the creation of sophisticated AI agents that can reason about your data catalog.

Learn more about the LangChain Integration

MCP Integration (alation-ai-agent-mcp)

The MCP integration provides an MCP-compatible server that exposes Alation's context capabilities to any MCP client.

Learn more about the MCP Integration

# Install core SDK
pip install alation-ai-agent-sdk

# Install LangChain integration
pip install alation-ai-agent-langchain

# Install MCP integration
pip install alation-ai-agent-mcp

The library needs to be configured with your Alation instance credentials. Depending on your authentication mode, you can use either UserAccountAuthParams or ServiceAccountAuthParams.

Service Account Authentication (Recommended)
from alation_ai_agent_sdk import AlationAPI, ServiceAccountAuthParams

# Initialize the SDK with Service Account Authentication
auth_params = ServiceAccountAuthParams(
    client_id="your_client_id",
    client_secret="your_client_secret"
)
alation_api = AlationAPI(
    base_url="https://your-alation-instance.com",
    auth_method="service_account",
    auth_params=auth_params
)

If you cannot obtain service account credentials (admin only), see the User Account Authentication Guide for instructions.

A retrieval tool that pulls contextual information from the Alation catalog based on natural language queries.

Functionality

Usage

response = alation_ai_sdk.get_context(
    "What certified data set is used to make decisions on providing credit for customers?"
)

Input Parameters

Returns

A retrieval tool that pulls data products from the Alation catalog based on product ID or natural language queries.

Functionality

Usage

response = alation_ai_sdk.get_data_products(
    "12345"  # Example product ID
)

response = alation_ai_sdk.get_data_products(
    "Show me all data products related to sales"
)

Input Parameters

Returns

A retrieval tool that pulls a set of objects from the Alation catalog based on a signature.

Functionality

Usage

# Get tables from a specific datasource
bulk_signature = {
    "table": {
        "fields_required": ["name", "description", "columns"],
        "search_filters": {
            "fields": {"ds": [123]}  # Specific datasource
        },
        "limit": 100,
        "child_objects": {
            "columns": {
                "fields": ["name", "data_type", "description"]
            }
        }
    }
}

response = sdk.bulk_retrieval(signature=bulk_signature)

Input Parameters

Returns

A tool for checking the status of asynchronous jobs.

Functionality

Input Parameters

Returns

A tool to updates metadata for Alation catalog assets by modifying existing objects.

Supported object types

Functionality

Input Parameters

Returns

A tool that provides complete instructions and schema for creating Alation Data Products.

Functionality

Input Parameters

Returns

A lineage retrieval tool to identify upstream or downstream objects relative to the starting object. Supports Column level lineage.

NOTE: This BETA feature must be enabled on the Alation instance. Please contact Alation support to do this. Additionally, the lineage tool within the SDK must be explicitly enabled.

Functionality

Input Parameters

Returns

get_custom_fields_definitions A retrieval tool that fetches all custom field definitions from the Alation instance.

Functionality

Input Parameters

No parameters required

Returns

get_data_dictionary_instructions A tool that generates comprehensive instructions for creating Alation Data Dictionary CSV files.

Functionality

Input Parameters

No parameters required

Returns

Complete instruction set with custom fields and examples for generating data dictionary.

Shape the SDK to your needs

The SDK's alation-context and bulk_retrieval tools support customizing response content using signatures. This powerful feature allows you to specify which fields to include and how to filter the catalog results. For instance:

# Define a signature for searching only tables that optionally
# include joins and filters if relevant to the user question
signature = {
    "table": {
        "fields_required": ["name", "title", "description"],
        "fields_optional": ["common_joins", "common_filters"]
    }
}

# Use the signature with your query
response = sdk.get_context(
    "What are our sales tables?",
    signature
)

For more information about signatures, refer to Using Signatures

Guides and Example Agents

Direct usage examples for the Alation AI Agent SDK:

Model Context Protocol (MCP)

Enable agentic experiences with the Alation Data Catalog.

Harness the SDK to build complex agents and workflows.

Integrating with other toolkits

The number of published agent frameworks and toolkits appears to be increasing every day. If you don't happen to see the framework or toolkit you're using here, it's still possible to adapt alation-ai-agent-sdk to your needs. It may be as simple as writing a wrapping function where a decorator is applied.

While we want to reach as many developers as possible and make it as convenient as possible, we anticipate a long tail distribution of toolkits and won't be able to write adapters for every case. If you'd like support for a specific toolkit, please create an issue to discuss.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4