
Write HTML. Render video. Built for agents.
MakerAI provides native Delphi components for working with multiple LLM providers, autonomous agents, retrieval pipelines, and MCP tool connections. It also includes FMX UI components, realtime speech features, and demo projects that show how the pieces fit together.
Builders who are adding chat, agents, retrieval, or tool use to Delphi or Free Pascal apps.
You can build AI features in Delphi with reusable components instead of wiring every provider and workflow by hand.
`TAiChatConnection` lets you switch providers at runtime through `DriverName` while keeping one app code path.
Includes Delphi components for OpenAI, Claude, Gemini, Grok, Mistral, DeepSeek, Kimi, GLM, Groq, Cohere, Ollama, LM Studio, and generic OpenAI-compatible endpoints.
Supports vector and graph retrieval with VQL, GQL, pgvector, SQLite, in-memory storage, hybrid search, reranking, and document lifecycle tools.
Provides graph-based agent orchestration, checkpoints, human approval, and multi-agent workflows.
Implements Model Context Protocol connections over HTTP, SSE, StdIO, and direct bridges to expose or consume tools.
Adds WebSocket-based speech-to-text and speech-to-speech components, including OpenAI realtime and Grok voice support.
Ships deterministic tools for PDF, vision, speech, web search, shell, and computer use.
Includes many runnable demos for chat, RAG, agents, MCP, voice, and orchestration across Delphi versions.
git clone https://github.com/gustavoeenriquez/MakerAi.git
π Official Website: https://makerai.cimamaker.com π Manual: https://www.gustavoenriquez.com/book-makerai β available in English and Spanish
Free Pascal / Lazarus port available β Full port of MakerAI Suite for FPC 3.2+ (12 LLM drivers, RAG, Agents, MCP, Embeddings). See the
fpcbranch.
Most AI libraries for Delphi stop at wrapping REST calls. MakerAI is different.
Yes, MakerAI includes native, provider-specific components that give you direct, full-fidelity access to each provider's API β every model parameter, every response field, every streaming event, exactly as the provider defines it.
But on top of that, MakerAI is a complete AI application ecosystem that lets you build production-grade intelligent systems entirely in Delphi:
Whether you need a simple one-provider integration or a multi-agent, multi-provider, retrieval-augmented production system, MakerAI covers the full stack β natively in Delphi.
Both vendor APIs changed under our feet, and one of them had gone silently dead. Claude was broken: the driver still declared computer_20251124, a tool type the Anthropic API now rejects for every model. It is now computer_toolset_20260801, which takes no parameters and explodes the old single computer tool into 17 individually named tools. OpenAI joins natively with gpt-6-astra and the parameterless computer tool, which sends a whole batch of actions per turn β the driver runs them in order and answers with one final screenshot.
Both APIs converged on the same design: the tool declares no screen dimensions (the model infers them from the screenshot) and coordinates come back as pixels of the image you sent.
TAiGLMChat brings a 14th provider: OpenAI-compatible endpoint, explicit thinking control (the API ships it ON by default, the driver decides), reasoning_content captured and re-sent across turns, and free tiers (glm-4.7-flash, glm-4.6v-flash).
RAG on pgvector (OFFSET was trimming instead of paginating; the vector did not survive the round trip), token and cache accounting across OpenAI, Claude and MakerAi streams, a race where the model travelled through the global registry, tool-calling continuation off the main thread, and reasoning no longer leaking into the user-visible answer.
The Model Context Protocol dropped sessions and the initialize handshake. MakerAI implements the new stateless revision on both sides and keeps talking to legacy peers: clients probe with server/discover and fall back automatically; the server serves modern per-request _meta requests statelessly while the legacy handshake and session gating keep working. Includes the MRTR pattern, so a tool can pause and ask the user for confirmation (OnInputRequired on the client, TAiAuthContext.InputResponses on the server).
TAiTelemetry exports OTLP traces to any standard collector (Jaeger, Grafana Tempo, Langfuse, Arize Phoenix) following the GenAI semantic conventions. Spans cover chat turns with token usage, tool executions, agent graphs and nodes, RAG retrieval and MCP requests β with W3C traceparent propagated through MCP _meta, so a client and a server in different processes share one distributed trace. Opt-in, zero overhead when disabled.
If MCP is the agent-to-tool layer, A2A (Linux Foundation) is the agent-to-agent layer. TAiA2AServer publishes any agent graph as a standard A2A agent (Agent Card + JSON-RPC), TAiA2AClient consumes remote agents, and TAiA2ARemoteAgentTool federates: a node in your graph can delegate its work to a remote agent β including one written in another language or framework. Demo: 072-A2AFederation.
TAiGuardrails intercepts every tool call before it executes (allowlists, blocklists, forbidden argument patterns, programmatic veto) β blocked calls never run and the LLM gets the reason so it can replan. TAiEvalRunner brings systematic evaluation: fluent test cases against any target, deterministic checks plus optional LLM-as-judge, with ToJSON reports for CI.
Tests/RegressionSuite/ β 17 in-process cases covering MCP, agents, A2A, guardrails and evals. No API keys, under a second, exit code for CI. Built on TAiEvalRunner itself.
Capability configuration now lives in a single typed surface: ModelConfig.ModelCaps / SessionCaps / Tool_Active / ThinkingLevel moved out of the string-based Params/RTTI channel, with per-field user pins and transparent compatibility migration β existing code keeps working unchanged.
TAiGrokRealtimeChat β xAI Grok Voice speech-to-speech (function calling, session resumption with replay, binary audio transport, ephemeral tokens)TAiOpenAiRealtimeTranslate β continuous streaming speech translation (one WebSocket per direction; demo 071-VoiceBridgeTranslate)TAiRealtimeVoiceBase β shared full-duplex base; voice events flow through the universal TAiRealtimeConnectionClaude 5 family (adaptive thinking, FastMode, compaction, server-side fallbacks) Β· Gemini 3.5/3.6 + Nano Banana GA Β· Mistral Voxtral TTS + OCR 4 Β· Kimi K3 Β· DeepSeek V4 (explicit thinking control) Β· Cohere Command A+ Β· Groq qwen3.6 Β· xAI grok-4.3/4.5/build β with retired-model cleanup and compatibility aliases throughout.
TAiGrokChat now generates video with grok-imagine (async job + polling + mp4 as TAiMediaFile, new VideoDurationSeconds property) and images with grok-imagine-image β activated by cmVideoGeneration/cmImageGeneration or the [cap_GenVideo]/[cap_GenImage] gaps.
v3.4 is fully tested and compatible with Delphi 13.1 Florence (CompilerVersion 37.1), in addition to the existing range from Delphi 10.4 Sydney through Delphi 13 Florence.
The biggest infrastructure change in v3.4: TAiChatConnection no longer force-loads all providers at startup. Each driver now self-registers only when explicitly imported, eliminating unnecessary initialization overhead:
// Load only what you need
uses uMakerAi.Chat.AiConnection, uMakerAi.Chat.OpenAi, uMakerAi.Chat.Claude;
// Load all drivers at once (legacy behavior)
uses uMakerAi.Chat.Initializations;
New universal connector for real-time speech-to-text via WebSocket:
TAiRealtimeConnection β provider-agnostic STT connector; switch providers via DriverNameTAiOpenAiRealtimeSTT β full OpenAI Realtime API implementation (24 kHz PCM16, VAD modes, streaming transcription)OpenAI's new transcription models (Aug 2026) are fully integrated β better accuracy on real-world audio, accents, numbers, specialized terminology and loud background noise:
| Model | Use case | Word Error Rate |
|---|---|---|
gpt-live-transcribe | Live low-latency STT (Realtime WebSocket) | 9.60% (vs 11.65% Whisper) |
gpt-transcribe | Completed files and batch workloads | 8.98% (vs 15.21% Whisper) |
TAiOpenAiRealtimeSTT now defaults to gpt-live-transcribe, with new context properties: TranscriptionPrompt (free-form topic), TranscriptionKeywords (domain terms), Languages (multi-language guided autodetection) and LowDelayTAiOpenAiAudio gains tmGptTranscribe / tmGptLiveTranscribe with TranscriptionKeywords + TranscriptionLanguages for REST/batch transcriptionwhisper-1, gpt-4o-transcribe) remain available β they're still required for subtitles (SRT/VTT), word timestamps and diarization (gpt-4o-transcribe-diarize), which the new models don't support; the components degrade formats safely per modelgpt-live-transcribe with contextual prompts and guided language detection; diarized channels stay on gpt-4o-transcribe-diarizeFull-duplex voice conversation with xAI's Grok Voice models (grok-voice-think-fast-2.0) over a single WebSocket β the user speaks, Grok listens, reasons and answers back with voice:
TAiGrokRealtimeChat β complete driver for wss://api.x.ai/v1/realtime (OpenAI Realtime-compatible protocol, 24 kHz PCM16)TAiRealtimeVoiceBase β new base class for full-duplex voice drivers; adds OnAssistantText, OnAssistantTextDelta, OnAudioChunk, OnAudioDone (shared with TAiMakerAiRealtimeChat)OnTranscriptDelta / OnTranscriptCompleted), server VAD, streamed assistant text and TTS audioTAiFunctions component (local functions + MCP) and Grok invokes your Delphi code mid-conversation β the driver handles the whole round-trip (execution on worker threads, function_call_output, continuation)EnableWebSearch / EnableXSearch β executed server-side by xAIVoice (eva, ara, rex, sal, leo or custom voice_id), Instructions, ReasoningEffort (high / none for lower latency), OutputSpeed, Keyterms (transcription biasing), PronunciationReplace (TTS corrections), automatic regional language hints (esβes-MX, ptβpt-BR)ForceMessage() β scripted TTS utterance bypassing the model (IVR prompts, disclosures)EnableResumption + ConversationId β reconnect and the server replays the cached turns (transcripts, tool calls and outputs; 30-min window)BinaryAudio := True β raw PCM over WebSocket binary frames, ~33% less bandwidth than base64MintEphemeralToken() on your backend + EphemeralToken on the client β the API key never leaves the serverfile_search over xAI Collections (FileSearchCollections) and remote MCP servers via CustomToolsJsonTAiRealtimeConnection too β just set DriverName := 'Grok'uses uMakerAi.Realtime.AiConnection, uMakerAi.Realtime.Grok;
Voice := TAiRealtimeConnection.Create(nil);
Voice.DriverName := 'Grok';
Voice.ApiKey := '@GROK_API_KEY';
Voice.Language := 'es';
Voice.OnTranscriptCompleted := HandleUserText; // what the user said
Voice.OnAssistantText := HandleGrokText; // what Grok answered
Voice.OnAudioChunk := HandleGrokAudio; // Grok's voice (PCM16 24 kHz)
Voice.Connect;
// ... stream microphone audio via Voice.SendAudioChunk(Data) ...
// For file-based audio (non-continuous), close the turn explicitly:
// Voice.CommitAudio; TAiGrokRealtimeChat(Voice.Instance).CreateResponse;
New ChatMode value for automatic two-pass routing:
IAiImageTool, IAiSpeechTool, IAiWebSearchTool, etc.)| Provider | New / Updated Models |
|---|---|
| OpenAI | gpt-5.4, gpt-5.4-mini, gpt-5.5, gpt-image-1 |
| Claude | claude-opus-4-7 (Adaptive Thinking), claude-sonnet-4-6, claude-haiku-4-5 |
| Gemini | gemini-3.1-pro, gemini-3-flash, gemini-3.1-flash-lite, gemini-3.1-flash-image |
| Grok | grok-4-fast, grok-3, grok-code-fast-1 |
| Mistral | magistral-medium/small, devstral, voxtral |
| Groq | llama-4-scout/maverick, kimi-k2, qwen3, compound-beta |
| Kimi | kimi-k2, kimi-k2.5, kimi-k2-thinking |
| Cohere | command-a-03-2025, command-a-reasoning, command-a-vision |
TAiAgentManager.Run declared virtual β proper subclassing now supportedFJoinInputs cleared after each execution; eliminates premature firing on retries and loopsTChatInput.EnterAsSend β new property (default False): Enter sends the prompt, Shift+Enter / Ctrl+Enter inserts a line breakTChatBubble β eliminated spurious vertical scrollbar (ShowScrollBars := False)thinking block are now correctly omitted for claude-opus-4-7 models. Anthropic manages sampling internally for these models; sending these parameters caused HTTP 400 errors.RegisterDefaultParams β Max_Tokens key β corrected in 10 drivers (Claude, Gemini, Mistral, Groq, DeepSeek, Grok, Kimi, LMStudio, GenericLLM, Ollama). The wrong key MaxTokens was never resolved by RTTI to the Max_tokens property, causing Max_Tokens to be silently ignored when set via RegisterDefaultParams.ApplyParamsToChat β locale-independent float parsing β TryStrToFloat now tries invariant format (dot decimal) first, then falls back to the system locale. Both Temperature=0.7 and Temperature=0,7 are valid regardless of regional settings.MCP concurrent tool calls β race condition (uMakerAi.MCPClient.Core.pas): When a model responded with two or more tools from the same MCP server in a single turn, ParseChat launched all tool calls as parallel TTasks. Since TMCPClientStdIo shares a single process/pipe per instance (no synchronization), concurrent calls corrupted the JSON-RPC communication, causing intermittent failures. Fixed by adding FCallLock: TCriticalSection to TMCPClientCustom β calls to the same server are now serialized while calls to different servers still run in parallel.
EAggregateException on tool errors β Claude driver (uMakerAi.Chat.Claude.pas): The local _CreateTask procedure in TAiClaudeChat.ParseChat lacked the try/except present in the base class. Any exception raised inside a tool task (MCP timeout, network error, etc.) escaped unhandled, causing TTask.WaitForAll to wrap it in an EAggregateException and crash the application. Fixed to match base class behavior: exceptions are caught, reported via OnError, and the tool receives an error response so the conversation can continue.
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Your Delphi Application β
ββββββ¬βββββββββββββββββββ¬ββββββββββββββββββ¬βββββββββββββββββββββββββ
β β β
ββββββΌβββββ βββββββββββΌβββββββββββ ββββΌβββββββββββββββββββββββββ
β ChatUI β β Agents β β Design-Time β
β FMX β β TAIAgentManager β β Property Editors β
β Visual β β TAIBlackboard β β Object Inspector support β
β Comps β β Checkpoint/Approve β βββββββββββββββββββββββββββββ
ββββββ¬βββββ βββββββββββ¬βββββββββββ
β β
ββββββΌβββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββ
β TAiChatConnection β Universal Connector β
β Switch provider at runtime via DriverName property β
ββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββ
β Native Provider Drivers (direct API access, full fidelity) β
β OpenAI Β· Claude Β· Gemini Β· Grok Β· Mistral Β· DeepSeek Β· Kimi β
β GLM Β· Groq Β· Cohere Β· Ollama Β· LM Studio Β· GenericLLM β
ββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββΌβββββββββββββββββββββββββ
β β β
ββββββΌβββββββββ ββββββββββββββΌβββββββββ βββββββββββββΌββββββββββ
β ChatTools β β RAG β β MCP β
β PDF/Vision β β Vector (VQL) β β Server (HTTP/SSE β
β Speech/STT β β Graph (GQL) β β StdIO/Direct) β
β Web Search β β PostgreSQL/SQLite β β Client β
β Shell β β HNSW Β· BM25 Β· RRF β β TAiFunctions bridgeβ
β ComputerUseβ β Rerank Β· Documents β βββββββββββββββββββββββ
βββββββββββββββ βββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Realtime Voice β parallel WebSocket stack β
β TAiRealtimeConnection Β· OpenAI STT Β· Grok Voice S2S Β· MakerAI β
β Pure-Pascal RFC 6455 + TLS (SChannel / OpenSSL / Android) β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
MakerAI gives you two ways to work with each provider, which you can mix freely:
Full, provider-specific access to every API feature. Use when you need complete control:
| Component | Provider | Latest Models |
|---|---|---|
TAiOpenChat | OpenAI | gpt-6-astra, gpt-5.6-sol/-terra/-luna, gpt-5.5, gpt-image-1 |
TAiClaudeChat | Anthropic | claude-opus-5, claude-sonnet-5, claude-fable-5, claude-haiku-4-5 |
TAiGeminiChat | gemini-3.5-flash, gemini-3.6-flash, gemini-3.1-pro | |
TAiGrokChat | xAI | grok-4.3, grok-4.5, grok-build, grok-imagine (image/video) |
TAiMistralChat | Mistral AI | mistral-large/medium/small, magistral, devstral, voxtral (STT/TTS) |
TAiDeepSeekChat | DeepSeek | deepseek-v4-flash, deepseek-v4-pro |
TAiKimiChat | Moonshot | kimi-k3, kimi-k2.7-code, kimi-k2.6 |
TAiGLMChat | GLM (Zhipu / Z.ai) | glm-4.7, glm-5.3, glm-5v-turbo, free tiers: glm-4.7-flash / glm-4.6v-flash |
TAiGroqChat | Groq | llama-3.3-70b, openai/gpt-oss-120b, qwen3.6, whisper-large-v3 |
TCohereChat | Cohere | command-a-plus, command-a-03-2025, north-mini-code |
TAiOllamaChat | Ollama | Any local model |
TAiLMStudioChat | LM Studio | Any local model |
TAiGenericChat | OpenAI-compatible | Any OpenAI-API endpoint |
Provider-agnostic code. Switch models or providers by changing one property:
AiConn.DriverName := 'OpenAI';
AiConn.Model := 'gpt-5.6';
AiConn.ApiKey := '@OPENAI_API_KEY'; // resolved from environment variable
// Switch to Gemini without changing anything else
AiConn.DriverName := 'Gemini';
AiConn.Model := 'gemini-3.6-flash';
AiConn.ApiKey := '@GEMINI_API_KEY';
// Or to GLM (Zhipu / Z.ai) β glm-4.7-flash is free
AiConn.DriverName := 'GLM';
AiConn.Model := 'glm-4.7-flash';
AiConn.ApiKey := '@GLM_API_KEY';
| Feature | OpenAI (gpt-6-astra) | Claude (5) | Gemini (3.6) | Grok (4.5) | Mistral | DeepSeek | Ollama |
|---|---|---|---|---|---|---|---|
| Text Generation | β | β | β | β | β | β | β |
| Streaming (SSE) | β | β | β | β | β | β | β |
| Function Calling | β | β | β | β | β | β | β |
| JSON Mode / Schema | β | β | β | β | β | β | β |
| Image Input | β | β | β | β | β | β | β |
| PDF / Files | β | β | β | β οΈ | β | β | β οΈ |
| Image Generation | β | β | β | β | β | β | β |
| Video Generation | β | β | β | β | β | β | β |
| Extended Thinking | β | β | β | β | β | β | β οΈ |
| Speech (TTS/STT) | β | β | β | β | β | β | β οΈ |
| Realtime Voice (WebSocket) | β STT | β | β οΈ | β S2S | β | β | β |
| Web Search | β | β | β | β | β | β | β |
| Computer Use ΒΉ | β | β | β οΈ | β | β | β | β |
| RAG (all modes) | β | β | β | β | β | β | β |
| MCP Client/Server | β | β | β | β | β | β | β |
| Agents | β | β | β | β | β | β | β |
Legend: β Native | β οΈ Tool-Assisted bridge | β Not Supported
ΒΉ Computer Use is opt-in.
cap_ComputerUsehands the model the real mouse and keyboard, so no model enables it by default β you add the capability yourself (see the Computer Use section below). Native support: OpenAIgpt-6-astra; Claudeclaude-opus-4-8/-opus-5/-sonnet-5/-fable-5. Gemini is marked β οΈ because the registry still points at thegemini-2.5-computer-use-previewmodel, which has not been re-verified since the 3.5/3.6 generation shipped.
Two complementary retrieval engines with their own query languages:
Vector RAG β semantic and hybrid search over document embeddings:
MATCH documents SEARCH 'machine learning'
USING HYBRID WEIGHTS(semantic: 0.7, lexical: 0.3) FUSION RRF
WHERE category = 'tech' AND date > '2025-01-01'
RERANK 'neural networks' WITH REGENERATE
LIMIT 10
Graph RAG β knowledge graph with semantic search over entities and relationships:
MATCH (p:Person)-[r:WORKS_AT]->(c:Company)
WHERE c.city = 'Madrid' DEPTH 2
RETURN p, r, c
Graph-based multi-agent workflows with full thread safety:
Sign in to join the discussion.
No comments yet. Be the first to say what this is good for.

Write HTML. Render video. Built for agents.
Ultra-lightweight, open-source, self-hosted personal AI agent framework in Python with WebUI, tools, memory, MCP, multi-agent workflows, automation, and chat apps
SkillOpt is a text-space optimizer that trains reusable natural-language skills for frozen LLM agents through trajectory-driven edits, validation-gated updates, and deployable best_skill.md artifacts.

Omnigent is an open-source AI agent framework and meta-harness: orchestrate Claude Code, Codex, Cursor, Pi, and custom agents β swap harnesses without rewriting, enforce policies and sandboxing, and collaborate in real time from any device.
A theoretical reconstruction of the Claude Mythos architecture, built from first principles using the available research literature.
π·οΈ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!