sgcAI — AI, LLM & MCP Components for Delphi & C++ Builder
Standalone product Windows Win32 & Win64

sgcAI — AI, LLM & MCP Components for Delphi & C++ Builder

Fifteen palette components that put large language models, the Model Context Protocol, embeddings, vector search and speech directly into your Windows application. One chat component reaches seven providers through a single property. sgcAI is a standalone product, it bundles the sgcWebSockets Core runtime it is built on, so there is no base license to buy.

No base license required
Full source code
Windows only, except the MCP pair
One component TsgcAIChat Provider is a property, not a rewrite
OpenAI aicpOpenAI
Anthropic aicpAnthropic
Gemini aicpGemini
DeepSeek aicpDeepSeek
Ollama aicpOllama
Grok aicpGrok
Mistral aicpMistral
15 Palette components One page on the component palette
7 LLM providers Values of one enumeration
3 Speech engines System, Google, Amazon Polly
2 Vector stores Local file and Pinecone
1 Unified API Same calls for every vendor

Two Things Worth Knowing First

What sgcAI needs from you, and where it runs. Both answers are short.

★ No base license required

sgcAI is self-contained

Unlike the other eSeGeCe add-ons, it does not sit on top of a base product. Everything the components need is bundled inside sgcAI: the sgcWebSockets Core runtime, the HTTP client stack, the JSON layer and the HTTP server behind the MCP server API. One SKU, one installer, nothing else to buy.

Platform scope

sgcAI is a Windows product

The AI package is compiled under MSWINDOWS only, so 13 of the 15 palette components are registered for Win32 and Win64. They do not build for macOS, Linux, iOS or Android.

The two Model Context Protocol components, TsgcWSAPIServer_MCP and TsgcWSAPIClient_MCP, are the exception. They carry no platform restriction and run wherever the sgc HTTP stack runs, including macOS, Linux, iOS and Android. See the full platform table.

Fifteen Components, Four Jobs

Every component is compiled Object Pascal with design-time properties and events. You set an API key in the Object Inspector and handle a response event. There is no Python bridge, no scripting host and no external process.

Chat & LLM4 components

Talk to a model, or let one talk back

TsgcAIChat is the unified client. Set Provider, set ChatOptions.ApiKey and ChatOptions.Model, call Chat. Token streaming arrives on OnChatStream with a Cancel flag, and ChatAsync returns a future on Delphi 2010 and later so the UI thread never blocks. The other three wrap complete conversation loops, including the voice ones.

Model Context Protocol2 components

Both ends of MCP, and the only cross-platform pair

Publish your own tools, prompts and resources to any MCP-aware client with TsgcWSAPIServer_MCP, including sessions, notifications and server-initiated requests. Consume someone else's server with TsgcWSAPIClient_MCP over HTTP, HTTP Streamable or stdio, authenticating with an API key, a custom header or OAuth2. These two carry no platform restriction, so they compile everywhere the sgc HTTP stack does.

TsgcWSAPIServer_MCP TsgcWSAPIClient_MCP HTTP · HTTP Streamable · stdio
Embeddings & vector search3 components

Retrieval over your own corpus

TsgcAIOpenAIEmbeddings turns text or a whole file into vectors, raising progress events across the batch, and writes them to whichever store is assigned to Database. Two backends ship: a local file through TsgcAIDatabaseVectorFile, which needs no server, no account and no network round trip, and a managed index through TsgcAIDatabaseVectorPinecone. Query the nearest neighbours and feed them back to the model as context.

Speech & audio6 components

Voice in, voice out

Capture the microphone through the Windows MCI or Wave API, transcribe with Whisper, send the text to a model, then speak the answer back. Three interchangeable speech engines share one interface: the engine already installed on the machine, which needs no API key and no network, plus Google Cloud Text-to-Speech and Amazon Polly. The chatbot, translator and assistant components wire the whole loop for you.

Seven Vendors, One Provider Property

These are not seven components. They are the seven values of TsgcAIChatProvider, so changing vendor changes one assignment and nothing else. The same Chat, ChatStream and ChatAsync calls, the same history handling and the same events apply to all of them.

OpenAI aicpOpenAI

GPT models through the Chat Completions API.

Anthropic aicpAnthropic

Claude models through the Messages API, with the same streaming and history handling as the rest.

Google Gemini aicpGemini

Gemini models through the Google Generative Language API.

DeepSeek aicpDeepSeek

deepseek-chat and deepseek-reasoner.

Ollama aicpOllama

Local models. Point ChatOptions.BaseUrl at your Ollama host and no data leaves the machine.

xAI Grok aicpGrok

Grok models through the xAI API.

Mistral aicpMistral

Mistral models through the Mistral API.

Ask a Model a Question

Pick a provider, set the key and the model, call Chat. Switching to a different vendor later is one assignment.

uses
  sgcAI, sgcAI_Chat;

var
  oChat: TsgcAIChat;
  vAnswer: string;
begin
  oChat := TsgcAIChat.Create(nil);
  oChat.Provider := aicpAnthropic;
  oChat.ChatOptions.ApiKey := 'sk-ant-...';
  oChat.ChatOptions.Model  := 'claude-sonnet-4-5';
  oChat.SystemMessage := 'You are a Delphi expert. Answer in one paragraph.';

  vAnswer := oChat.Chat('How do I keep a WebSocket connection alive?');

  // Same code, different vendor: one property and one key.
  oChat.Provider := aicpOpenAI;
  oChat.ChatOptions.ApiKey := 'sk-...';
  oChat.ChatOptions.Model  := 'gpt-4o';
  vAnswer := oChat.Chat('Same question, different model.');
end;
// includes: sgcAI.hpp, sgcAI_Chat.hpp

TsgcAIChat *oChat = new TsgcAIChat(NULL);
oChat->Provider = aicpAnthropic;
oChat->ChatOptions->ApiKey = "sk-ant-...";
oChat->ChatOptions->Model  = "claude-sonnet-4-5";
oChat->SystemMessage = "You are a Delphi expert. Answer in one paragraph.";

String vAnswer = oChat->Chat("How do I keep a WebSocket connection alive?");

// Same code, different vendor: one property and one key.
oChat->Provider = aicpOpenAI;
oChat->ChatOptions->ApiKey = "sk-...";
oChat->ChatOptions->Model  = "gpt-4o";
vAnswer = oChat->Chat("Same question, different model.");
uses
  sgcAI, sgcAI_MCP_Classes, sgcAI_MCP_Types;

var
  oMCP: TsgcWSAPIClient_MCP;
begin
  oMCP := TsgcWSAPIClient_MCP.Create(nil);

  // Remote server over streamable HTTP.
  oMCP.MCPOptions.Transport       := aimcptrHttpStreamable;
  oMCP.MCPOptions.HttpOptions.URL := 'https://mcp.example.com/mcp';
  oMCP.MCPOptions.ClientInfo.Name    := 'sgc-mcp-client';
  oMCP.MCPOptions.ClientInfo.Version := '1.0.0';

  oMCP.OnMCPListTools    := MCPListTools;
  oMCP.OnMCPResponseTool := MCPToolResponse;

  oMCP.Initialize;
  oMCP.ListTools;
  oMCP.RequestTool('GetTemperature', vArguments);   // vArguments: IsgcJSON
end;

// Or spawn a local MCP server as a subprocess instead:
oMCP.MCPOptions.Transport := aimcptrStdio;
oMCP.MCPOptions.StdioOptions.Command   := 'C:\tools\my-mcp-server.exe';
oMCP.MCPOptions.StdioOptions.Arguments := '--stdio';
Streaming with a stop switch

Tokens arrive on OnChatStream with a Cancel flag, so a long generation can be stopped mid-flight.

Async without blocking the UI

ChatAsync returns a future on Delphi 2010 and later, so the main thread stays responsive during a model call.

Conversation state you control

SystemMessage sets the persona once and MaxHistoryMessages caps how much of the transcript is replayed each turn, which keeps token cost predictable.

Your key never leaves your process

Requests go straight from your application to the vendor endpoint over the sgc HTTP client. There is no eSeGeCe relay in the path.

Where Each Part Runs

The AI package is gated behind MSWINDOWS in sgcVer.inc. That single define is what shapes the table below, so read it before you plan a mobile or Linux build.

13 AI components Chat, chatbot, translator, assistant, embeddings, vector stores, speech, audio
Windows Win32 Windows Win64 macOS Linux iOS Android
2 MCP components TsgcWSAPIServer_MCP and TsgcWSAPIClient_MCP, no platform restriction
Windows Win32 Windows Win64 macOS Linux iOS Android
IDE support Same source tree, design-time packages per version
Delphi C++ Builder

See the full platform table on the features page →

A Standalone Product

sgcAI is licensed on its own, starting at €149 for a single developer. All licenses include full source code, 1 year of updates and a 50% to 70% renewal discount: 50% when you renew one pack, 60% for two, 70% for three or more. sgcAI and sgcMQ each count as a pack.

sgcAI

€149

Single, Team and Site licenses available.

  • 15 AI, LLM and MCP components
  • sgcWebSockets Core runtime included
  • Delphi & C++ Builder, Windows Win32 & Win64
  • MCP pair also builds for macOS, Linux, iOS & Android
  • Full source code
  • 1 year of updates
★ No base license required View Pricing & Order
3,000+Developers
20+Years
761+Components
30+API Integrations
5Platforms
30-Day Money-Back GuaranteeNot satisfied? Request a full refund within 30 days of purchase. See refund policy

Put a Model Inside Your Application

Drop a component on a form, set an API key, and your Delphi or C++ Builder application is talking to a large language model. No base license, no relay service, full source code.

Other Products by eSeGeCe

Pair sgcAI with our other Delphi, C++ Builder and .NET component libraries.

sgcWebSockets

Enterprise WebSocket, HTTP/2, MQTT, AMQP and WebRTC components. The Enterprise edition already includes the sgcAI components.

Learn more →

sgcQUIC

QUIC (RFC 9000) and HTTP/3 (RFC 9114) client and server components built on the native OpenSSL 3.5 QUIC engine.

Learn more →

sgcHTML

Data-aware server-side HTML/UI components for Delphi, C++ Builder and .NET, with Bootstrap 5 and htmx.

Learn more →

sgcSign

Enterprise digital signatures. XAdES, PAdES, CAdES and ASiC with 10 key providers and 21 EU country profiles.

Learn more →

sgcOpenAPI

OpenAPI 3.0 parser and SDK generator. Turn any OpenAPI spec into a strongly-typed Delphi client in seconds.

Learn more →

sgcBiometrics

Native Windows Hello, fingerprint and Windows Biometric Framework components for Delphi and C++ Builder.

Learn more →