AI SDK
The AI SDK gives you programmatic access to OpenMetadata through two complementary paths: MCP Tools for building custom AI applications with any LLM, and AI Studio Agents for invoking ready-to-use AI assistants directly from your code.Invoke Agent
Send a message to an AI Studio Agent and get a response, with optional streaming and multi-turn conversations.
Create Agent
Programmatically create an AI Studio Agent with a persona, abilities, and API access.
Create Persona
Create and manage personas that define the behavior and personality of AI Studio Agents.
MCP Tools
Use OpenMetadata’s MCP tools to give any LLM access to your metadata through search, lineage, glossary, and entity operations.
Available SDKs
| SDK | Package | Install |
|---|---|---|
| Python | data-ai-sdk | pip install data-ai-sdk |
| TypeScript | @openmetadata/ai-sdk | npm install @openmetadata/ai-sdk |
| Java | org.open-metadata:ai-sdk | Maven / Gradle |
| CLI | ai-sdk | Install script |
Prerequisites
You need:- An OpenMetadata instance with AI Studio Agents enabled
- A Bot JWT token for API authentication
Configuration
Set the following environment variables:| Variable | Required | Default | Description |
|---|---|---|---|
AI_SDK_HOST | Yes | - | Your OpenMetadata server URL |
AI_SDK_TOKEN | Yes | - | Bot JWT token |
AI_SDK_TIMEOUT | No | 120 | Request timeout in seconds |
AI_SDK_VERIFY_SSL | No | true | Verify SSL certificates |
AI_SDK_MAX_RETRIES | No | 3 | Number of retry attempts |
AI_SDK_RETRY_DELAY | No | 1.0 | Base delay between retries (seconds) |