AI Open SDK
for Business Central
Call any LLM from AL through one client API: structured output, tools, retries, and a mock provider. Core plus provider extensions you install as needed, not Copilot.
Anthropic: Codeunit "AIOS Anthropic";
Client: Codeunit "AIOS Client";
Result: Codeunit "AIOS Generate Result";
ApiKey: SecretText;
begin
Result := Client.GenerateText(
Anthropic.Model('claude-sonnet-4-5', ApiKey),
'Draft a purchase order confirmation');
Message(Result.Output());
end;Same client API across Anthropic, OpenAI, Gemini, xAI, DeepSeek, OpenCode Zen, Mock & Custom.
Provider-agnostic
Swap Anthropic, OpenAI, OpenCode Zen, Mock, or your own adapter without rewriting callers.
Structured output
JSON Schema validation as a first-class primitive, with optional RecRef binding.
Tools & retries
Automatic tool loops, SecretText keys, and shared backoff for rate limits and timeouts.
Testable by design
Mock provider so AI-dependent AL code ships with tests. No live keys required.
Why it exists
System.AI and Copilot are right for Microsoft-hosted capabilities. AI Open SDK is for everything else: third-party providers, self-hosted endpoints, and AI logic you can unit-test without network or API keys.