8000 GitHub - Alation/alation-ai-agent-sdk: Python library for integrating the Alation API into agentic workflows
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Alation/alation-ai-agent-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Alation AI Agent SDK

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

Overview

This SDK empowers AI agents to:

  • Retrieve contextual information from Alation's Data Catalog
  • Use natural language to search for relevant metadata
  • Customize response formats using flexible signature specifications
  • Integrate seamlessly with AI frameworks like LangChain and MCP

Components

The project is organized into multiple components:

  • Core SDK - Foundation with API client and context tools
  • LangChain Integration - Adapters for the LangChain framework
  • MCP Integration - Server implementation for Model Context Protocol

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

Getting Started

Prerequisites

  • Python 3.10 or higher
  • Access to an Alation Data Catalog instance
  • A valid refresh token or client_id and secret. For more details, refer to the Authentication Guide.

Installation

# 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

Usage

The library needs to be configured with your Alation instance credentials:

from alation_ai_agent_sdk import AlationAIAgentSDK

alation_ai_sdk = AlationAIAgentSDK(
    base_url="https://your-alation-instance.com",
    user_id=12345,  # Your numeric user ID
    refresh_token="your_refresh_token"
)

Supported Tools

alation_context

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

Functionality

  • Accepts user questions in natural language
  • Performs query rewrites to optimize search results
  • Returns relevant catalog data in JSON format
  • Can return multiple object types in a single response

Usage

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

Input Parameters

  • question (string): The natural language query
  • signature (optional dict): The configuration controlling which objects and their fields

Returns

  • JSON-formatted response of relevant catalog objects

Shape the SDK to your needs

The SDK's alation-context tool supports 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

General

Core SDK

Direct usage examples for the Alation AI Agent SDK:

Model Context Protocol (MCP)

Enable agentic experiences with the Alation Data Catalog.

LangChain

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.

About

Python library for integrating the Alation API into agentic workflows

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  
0