Skip to content
Back to search

MakerAi

The AI Operating System for Delphi. 100% native framework with RAG 2.0, autonomous agents, MCP protocol, and universal LLM connector. Supports OpenAI, Claude, Gemini, Ollama, and more. Delphi 10.4+ (limited), full support from Delphi 12 Athens.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/gustavoeenriquez/MakerAi with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/gustavoeenriquez/MakerAi'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/gustavoeenriquez--makerai/badge.svg)](/listings/gustavoeenriquez--makerai)

HTML

<a href="/listings/gustavoeenriquez--makerai"><img src="/api/listings/gustavoeenriquez--makerai/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

git clone https://github.com/gustavoeenriquez/MakerAi.git

Step 1 — Add Library Paths

**Before compiling any package**, add all of these to **Tools > Options > Language > Delphi > Library**:

Source/Agents
Source/Chat
Source/ChatUI
Source/Core
Source/Design
Source/Embeddings
Source/MCPClient
Source/MCPServer
Source/Memory
Source/Packages
Source/RAG
Source/Realtime
Source/Resources
Source/Tools
Source/Utils
Source/WebSocket

Step 2 — Compile and Install Packages

Compile and install in this exact order:

1. `Source/Packages/MakerAI.dpk` — Runtime core (~100 units) 2. `Source/Packages/MakerAi.RAG.Drivers.dpk` — database back-ends via FireDAC: PostgreSQL/pgvector, SQL Server and SQLite for RAG, graph RAG on PostgreSQL, DB checkpoints for agents, and `TAiMemory` 3. `Source/Packages/MakerAi.UI.dpk` — FMX visual components (requires Skia) 4. `Source/Packages/MakerAiDsg.dpk` — Design-time editors (requires VCL + DesignIDE)

Open `Source/Packages/MakerAiGrp.groupproj` to compile all packages at once.

API Keys

API keys are resolved from environment variables using the `@VAR_NAME` convention. On `TAiChatConnection` the key goes through `Params` (it has no `ApiKey` property); direct drivers (`TAiOpenChat`, `TAiClaudeChat`...) and `TAiEmbeddingConnection` do have an `ApiKey` property:

AiConn.Params.Values['ApiKey'] := '@OPENAI_API_KEY';    // reads OPENAI_API_KEY from environment
AiConn.Params.Values['ApiKey'] := '@CLAUDE_API_KEY';    // reads CLAUDE_API_KEY
AiConn.Params.Values['ApiKey'] := '@GEMINI_API_KEY';    // reads GEMINI_API_KEY
AiConn.Params.Values['ApiKey'] := '@GROK_API_KEY';      // reads GROK_API_KEY (xAI chat and Grok Voice)
AiConn.Params.Values['ApiKey'] := 'sk-...';             // or set a literal key directly

Delphi Version Compatibility

| Delphi Version | Support | |----------------|---------| | 10.4 Sydney | Limited (minimum supported) | | 11 Alexandria | **Full support** | | 12 Athens | **Full support** | | 13 Florence | **Full support** | | 13.1 Florence | **Full support** (latest tested) |

---

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 1,181 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # MakerAI Suite v3.8 — The AI Ecosystem for Delphi
  2. 🌐 **Official Website:** [https://makerai.cimamaker.com](https://makerai.cimamaker.com)
  3. 📖 **Manual:** [https://www.gustavoenriquez.com/book-makerai](https://www.gustavoenriquez.com/book-makerai) — available in English and Spanish
  4. [![GitHub Stars](https://img.shields.io/github/stars/gustavoeenriquez/MakerAi?style=social)](https://github.com/gustavoeenriquez/MakerAi)
  5. [![GitHub Issues](https://img.shields.io/github/issues/gustavoeenriquez/MakerAi)](https://github.com/gustavoeenriquez/MakerAi/issues)
  6. [![License](https://img.shields.io/github/license/gustavoeenriquez/MakerAi)](LICENSE.txt)
  7. [![Telegram](https://img.shields.io/badge/Join-Telegram%20Chat-blue.svg)](https://t.me/+7LaihFwqgsk1ZjQx)
  8. [![Delphi Supported Versions](https://img.shields.io/badge/Delphi%20Support-11%20Alexandria%20to%2013%20Florence-blue.svg)](https://www.embarcadero.com/products/delphi)
  9. [![Free Pascal](https://img.shields.io/badge/Free%20Pascal-3.2%2B-orange.svg)](https://github.com/gustavoeenriquez/MakerAi/tree/fpc)
  10. > **Free Pascal / Lazarus port available** — Full port of MakerAI Suite for FPC 3.2+ (12 LLM drivers, RAG, Agents, MCP, Embeddings). See the [`fpc` branch](https://github.com/gustavoeenriquez/MakerAi/tree/fpc).
  11. ---
  12. ## MakerAI is more than an API wrapper
  13. Most AI libraries for Delphi stop at wrapping REST calls. **MakerAI is different.**
  14. 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.
  15. But on top of that, MakerAI is a **complete AI application ecosystem** that lets you build production-grade intelligent systems entirely in Delphi:
  16. - **RAG pipelines** (vector and graph-based) with SQL-like query languages (VQL / GQL)
  17. - **Autonomous Agents** with graph orchestration, checkpoints, and human-in-the-loop approval
  18. - **MCP Servers and Clients** — expose or consume tools using the Model Context Protocol (dual-era: stateless spec 2026-07-28 + legacy handshake)
  19. - **Native ChatTools** — bridge AI reasoning with deterministic real-world capabilities (PDF, Vision, Speech, Web Search, Shell, Computer Use)
  20. - **Skills** — reusable instructions in the SKILL.md format (Agent Skills / PPM), loaded on demand by the model
  21. - **A2A** — expose your agent graphs to other agents and call remote ones (Agent-to-Agent protocol 1.0)
  22. - **Production controls** — tool-call guardrails, evals, OpenTelemetry tracing, persistent memory, and calibrated decisions with Jev
  23. - **FMX Visual Components** — drop-in UI for multimodal chat interfaces
  24. - **Universal Connector** — switch providers at runtime without changing your application code
  25. 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**.
  26. ---
  27. ## 🚀 What's New in v3.9
  28. ### OpenAI GPT-Live — full-duplex voice with delegation
  29. `TAiOpenAiLiveChat` (`gpt-live-1`, DriverName `OpenAiLive`) listens while it speaks: you can interrupt it, and it hands the heavy thinking to another model — a Responses model run by OpenAI (web search, your `TAiFunctions` and MCP tools executed locally) or **any `TAiChatConnection`** through `DelegateChat` (Claude, Ollama, an agent graph). Conversation turns are rebuilt from the session timeline, so overlapping speech no longer splits answers. Demo `092-GPTLiveVoice`: microphone, speaker, local functions, RAG over MCP with a read-only guardrail, anti-echo speaker mode and a quick guide. Tested live.
  30. ### Jev decisions on local models (Ollama)
  31. Ollama 0.35+ serves the Jev contract at `/v1/systemone` with local decision models — `nimble`, `tev1` and Cloudflare's `clef`/`clef-flash`. `TAiJev` only needs `Url := 'http://localhost:11434/v1/'`; the eight Jev adapters gained `Url`, `TAiJev.Ask` takes images for Clef (PNG/JPEG/WebP), and the TypeSafe price is no longer charged on other servers. Tested with `nimble` (routing, prompt guard, batch labeling) and `clef` 27B on images.
  32. ### Memory leaks fixed
  33. An MCP server leaked every tool schema on each `tools/list` (it grew forever in production), the MCP client leaked the `tools/list` response on each `Initialize`, and `TAiRealtimeFactory` never freed its dictionary.
  34. ### ⚠️ Behaviour changes
  35. - **OpenAI audio defaults:** `TAiOpenAiAudio` / `TAiOpenAiSpeechTool` use `gpt-transcribe` and `gpt-4o-mini-tts` (OpenAI shuts down `whisper-1` on 2027-02-26 and `tts-1` on 2027-01-06). `gpt-transcribe` returns JSON only — srt/vtt/timestamps are reported in `TTranscriptionResult.Warning`; set `tmWhisper1` to keep them until the shutdown.
  36. - **Custom MCP tools:** `IAiMCPTool.GetInputSchema` returns a new object owned by the caller (what the built-in tools already did). A custom tool that returned a cached field must return a copy.
  37. - **OpenAI Responses driver:** `Max_Tokens` is now sent as `max_output_tokens` (it was silently ignored), so a low limit can cut answers that used to be complete.
  38. ## What came in v3.8
  39. Released 2026-09-29. Six items change existing behaviour; they are marked ⚠️ below — two of them
  40. (TLS certificate checks on POSIX and the `IAiMemoryStorage` signature) can require code changes.
  41. ### Jev — calibrated decisions before spending an LLM
  42. `TAiJev` (`Source/Tools/uMakerAi.Jev.pas`) wraps **Jev**, TypeSafe AI's "System One" model.
  43. Jev does not generate text: it answers typed questions — *Choice*, *Score*, *Noul* (yes/no) —
  44. with calibrated probabilities and a confidence value your code can threshold. It is meant for
  45. the fast, cheap decisions that today cost a full LLM round-trip: routing a query to the right
  46. specialised agent, deciding whether that agent needs its RAG variant, classifying, gating.
  47. Several questions travel in one request (~700 input tokens at US$0.042 per million). Questions
  48. are validated locally, 429/529 are retried with backoff, and the model is pinned to
  49. `jev-1.13.0` so thresholds stay valid. Demo: `084-JevRouter`.
  50. For agent graphs, `TAiJevRouterTool` (`Source/Agents/uMakerAi.Agents.Tools.JevRouter.pas`) is a
  51. node tool that writes the chosen route to `Blackboard['next_route']`, so an existing
  52. `lmConditional` link follows it — no engine change. Low confidence or a failing API falls back
  53. to `NextNo` instead of breaking the graph, and yes/no flags asked in the same call land in the
  54. blackboard for `lmExpression` or an `OnRoute` handler. Twenty-one new regression cases run all
  55. of it offline against a fake transport.
  56. Two more hand-offs make Jev a drop-in for decisions the framework already takes:
  57. - **SmartDispatch without the classification LLM call.** `ChatTools.DispatchClassifier` (new,
  58. provider-neutral) receives the tags whose tools are assigned; `TAiJevDispatchClassifier` answers
  59. with Jev. Tool requests skip one LLM round-trip, and CHAT replies are now generated **with the
  60. conversation history** (the LLM pass answered in an isolated two-message context). Unsure or
  61. failing → the usual LLM pass. 15/15 on Spanish and English requests.
  62. - **Semantic guardrails.** `TAiGuardrails.Classifier` (new) judges the tool calls the allow/block
  63. lists let through; `TAiJevGuardrailClassifier` blocks when P(risk) ≥ 0.5. Lists still catch the
  64. enumerable (`rm -rf`) for free; Jev catches what no list anticipates — an e-mail carrying a
  65. password to an outside address, a transfer to an unknown account. Safe calls scored ≤ 0.17 and
  66. harmful ones ≥ 0.88 across 13 calibration cases. Fails closed by default. Optional **permission
  67. categories** (`read`, `write`, `financial`, `system`, …) are judged in the same call: block whole
  68. categories, audit each call via `OnCategorized`, and describe domain-named tools with
  69. `ToolDescriptions` (20/20 on 20 calibration calls).
  70. - **Input guardrail.** `ChatTools.PromptGuard` (new) checks the user's message *before* it reaches
  71. the LLM, right after the existing regex sanitizer. `TAiJevPromptGuard` asks in one call about
  72. prompt injection, credentials in the message, harmful requests and — given a `Scope` — off-topic
  73. questions. On nine test messages the regex caught 1 of 6 problematic ones; Jev caught all 6 and
  74. let the greeting and the legitimate questions through. A blocked message never touches the network.
  75. Demo: `085-JevDispatchGuard`.
  76. And two more for quality and retrieval:
  77. - **Calibrated eval judge.** `TAiEvalRunner.Scorer` (new) answers `ExpectScore('criterion', 0.7)`
  78. with the probability that the output meets the criterion — faster and cheaper than an LLM
  79. judge, and the bar is set in code. `TAiJevEvalScorer`: passing answers ≥ 0.97, failing ≤ 0.02
  80. on 10 calibration pairs.
  81. - **Semantic reranking for RAG.** `TAiRAGVector.Reranker` (new) replaces the cosine second stage
  82. of VQL `RERANK`: `TAiJevRAGReranker` scores each passage for usable evidence and **drops
  83. passages that try to instruct the model** (prompt injection). No embeddings are recomputed;
  84. if the reranker fails, the search falls back to cosine. Demo: `086-JevEvalsRag`.
  85. - **Bulk labeling.** `TAiJevBatchLabeler` runs the same questions over many rows in parallel and
  86. returns labels, confidence, top-3 suggestions, total cost and the rows worth a human look; a
  87. failing row never stops the batch. Validated by reproducing the prototype: 126 accounting
  88. entries against 225 chart-of-accounts codes in 4.2 s for US$0.05 — 92.9% overall and **100% on
  89. the 61% it would book automatically** (confidence ≥ 0.8). Demo: `087-JevBatchLabeling`.
  90. - **Model routing.** `TAiJevModelRouter` sends each request to the cheapest model that can handle
  91. it. Jev describes the request (task, difficulty, sensitivity); readable rules in code pick the
  92. tier. Switching provider on a `TAiChatConnection` used to drop the conversation — the router
  93. migrates the text history, so a chat can start on Groq and escalate to Claude and still
  94. remember the first turn. Live, with Groq → DeepSeek → Claude Sonnet → Opus: 7 of 8 answers
  95. judged useful, the trivial ones in under a second. Demo: `088-JevModelRouter`.
  96. - **Metering for usage-based billing.** `TAiJev` and all eight adapters expose `Usage` (requests,
  97. input/output tokens, cost in USD) and an `OnUsage` event fired once per operation — one guard
  98. check, one rerank, one batch — on the thread that ran it, so a server can charge the right
  99. customer. The parallel reranker reports a single total after joining its calls. Previously only
  100. the batch labeler exposed tokens; the other adapters received them and dropped them.
  101. **Also fixed:** `lmExpression` parsed numbers with the regional settings only, so on a Windows
  102. using a decimal comma `'10.25' > 9.5` was compared as text and returned `False`. It now falls
  103. back to a decimal point.
  104. ### Computer Use on Linux
  105. `TAiLinuxExecutor` (`Source/Tools/uMakerAi.Tools.ComputerUse.Linux.pas`) drives X11 through
  106. **xdotool** and captures with **scrot**, covering the 19 canonical actions with the same
  107. public interface as the Windows and macOS executors. The framework itself needed no change:
  108. `TAiComputerUseTool` only ever used the RTL and delegates everything to
  109. `OnExecuteAction` / `OnRequestScreenshot`, so it cross-compiled to Linux64 untouched — what
  110. was missing was only the executor. Runtime-tested on Xvfb with `gpt-6-astra` and
  111. `claude-opus-4-8`, driving both a text editor and Chrome. Demo: `083-ComputerUseLinux`.
  112. ### Computer Use delegation — handing the call to a remote client
  113. A headless process (a broker on a VPS) can now claim a `computer_call` and forward it to
  114. whoever actually owns a screen. The contract already existed in the base class and in Claude
  115. — fill `ToolCall.Response` from `OnCallToolFunction` and the driver does not execute
  116. locally — but **OpenAI ignored it and Gemini never even fired the event**. Both now honour
  117. it. For OpenAI the delegation is *atomic over the batch*: `gpt-6-astra` sends an array of
  118. actions that admits a single `computer_call_output`, so splitting it between a local and a
  119. remote executor would leave the final screenshot ownerless. Demo: `082-ComputerUsePassthru`.
  120. ### ⚠️ TLS certificates are now verified on POSIX
  121. `TOpenSSLTransport` used to run with `SSL_VERIFY_NONE` — it accepted **any** certificate,
  122. from anyone, and that is the transport the Realtime module uses on Linux and macOS. It now
  123. verifies the chain against the system CA store **and the hostname** (`SSL_set1_host`;
  124. `SSL_VERIFY_PEER` alone validates the chain but not that the certificate was issued for the
  125. host you dialed). Verified against badssl.com, 7/7, including the `wrong.host` case.
  126. > **Breaking**: pointing Realtime at an endpoint with a self-signed certificate (a local LM
  127. > Studio, an internal proxy) now fails until you set `InsecureSkipVerify := True`.
  128. ### ⚠️ Gemini executed no user functions at all
  129. `TAiGeminiChat.DoCallFunction` had its `inherited` commented out and answered
  130. `'Command <name> not found'` to every non-Computer-Use tool call — and it is the driver's
  131. only dispatch point. Neither `AiFunctions` nor `OnCallToolFunction` ever ran. Restored.
  132. > **Behaviour change**: tools that silently returned "not found" with Gemini now execute.
  133. ### ⚠️ TAiShell crashed on non-English Windows
  134. Shell output was decoded with `TEncoding.UTF8.GetString`, which *validates* its input and
  135. raises `EEncodingError`. `cmd.exe` writes in the console **OEM** codepage (cp850 on a Spanish
  136. Windows) and even its own banner carries accents, so the component died on the **first
  137. command**. Invisible in English (pure ASCII) and on Linux (bash does emit UTF-8). Decoding
  138. now falls back to the OEM codepage. Two more, found while exercising it on Linux: stderr was
  139. dropped whenever the sentinel arrived in the same read, and a timeout left the session
  140. permanently unusable (the `Restart` was written but commented out).
  141. ### ⚠️ TAiMemory: namespaces are now enforced on id-based operations
  142. `TAiMemory` isolated namespaces in its searches, but `Get`, `Update`, `Delete`, `Link` and
  143. `Unlink` addressed memories by id alone — and ids are sequential, so an agent could read,
  144. change or delete another namespace's memories by guessing one, including through the
  145. `memory_delete` / `memory_link` MCP tools. `ImportFromJSON` also honoured the `namespace` field
  146. of the JSON and could write into another namespace. Every id-based operation now requires the
  147. active namespace (a foreign id behaves exactly like a missing one), and imports always land in
  148. the active namespace. Reported responsibly in #127.
  149. > **Breaking for custom storages**: the id-based methods of `IAiMemoryStorage` now take the
  150. > namespace. The bundled SQLite storage is updated; a custom implementation must add the
  151. > parameter.
  152. ### ⚠️ A forced tool_choice applies to the first call only
  153. With `Tool_choice := 'required'` (or a named function) the driver re-sent the forcing on
  154. every round, including the one that returns tool results, so the model had to call a tool
  155. again each time and the agentic loop never ended — 231 requests on `claude-sonnet-5` before
  156. it was killed. `TAiChat.Tool_choice` now reads `auto` in those rounds, which fixes every driver
  157. at once. The first call of a turn is still forced.
  158. ### ⚠️ TLLMNode.DriverName now defaults to empty
  159. The constructor used to set `DriverName := 'Claude'`, which always overrode the driver of an
  160. assigned `TAiSkill`. It is now empty and resolves node → skill → `'Claude'`, so a node without
  161. a skill behaves exactly as before and forms saved with the old default keep `'Claude'`
  162. explicitly. See the skills section below for the rest of the precedence fix.
  163. ### Qwen — native Alibaba Model Studio driver
  164. `TAiQwenChat` (`Source/Chat/uMakerAi.Chat.Qwen.pas`, driver name `Qwen`) talks to DashScope's
  165. OpenAI-compatible endpoint (international region by default; key in `DASHSCOPE_API_KEY`).
  166. Hybrid Qwen models think by default on the API side, so the driver always sends
  167. `enable_thinking`: off unless `cap_Reasoning` is in `ModelCaps`, with `ThinkingLevel` mapped to
  168. `thinking_budget`. Thinking-only models (`qwq-plus`, `*-thinking-*`) and open-weight models
  169. (which only think when streaming) are handled for you. Registered models are the ones tested
  170. live: `qwen3.8-flash` (default), `qwen3.8-max`, `qwen3.7-plus`, `qwen3-vl-flash`,
  171. `qwen3.8-omni-flash` with vision; `qwen3-max`, `qwen-plus/flash/turbo`, `qwen3-coder-plus/flash`;
  172. and `qwq-plus`, which only answers when streaming and is registered as asynchronous.
  173. Beyond chat, the same key covers the rest of Model Studio, all tested live from Delphi:
  174. - **Image generation and editing** (`cap_GenImage`): `qwen-image-3.0`, `qwen-image-2.0`,
  175. `qwen-image-max`, `z-image-turbo`, `wan2.7-image`. Attach one to three images to the prompt and
  176. the same call edits them (`qwen-image-edit-plus` by default), keeping the original aspect ratio
  177. unless you set a size. The driver downloads the result into `MediaFiles`.
  178. - **Video** (`cap_GenVideo`, Wan): text to video, image to video (attach one image) or first
  179. and last frame (attach two). 720p by default instead of the API's 1080p; `VideoParams.Params`
  180. passes through (duration, audio, seed...). Wan 2.5+ videos come with an audio track.
  181. - **Text to speech** (`cap_GenAudio`): `qwen3-tts-flash`, voice and language from `TtsParams`.
  182. - **Transcription**: `qwen3-asr-flash` in `cmTranscription`, where the prompt is passed as
  183. context so proper names come out right. A text model with `cap_Audio` in `SessionCaps` uses it
  184. to transcribe before answering, and `qwen3.8-omni-flash` understands audio natively.
  185. - **Realtime** (`TAiRealtimeConnection`, new unit `uMakerAi.Realtime.Qwen`): `DriverName := 'Qwen'`
  186. for voice conversation, `'QwenSTT'` for live transcription and `'QwenTranslate'` for simultaneous
  187. translation with a translated voice. Same events as the Grok and OpenAI drivers; nothing in the
  188. realtime module changed. Driver-specific settings (voice, instructions, target language) go in
  189. the connector's new `DriverParams`, which works for every realtime driver. `TAiQwenRealtimeTTS` goes the other way — text in, audio out while it
  190. is generated — so an LLM answer can be spoken as it streams (first audio ~0.5 s after the first
  191. text; 2.5 s from question to voice with qwen3.8-flash).
  192. - **Text translation** with `qwen-mt-plus/flash/turbo/lite`: set `TranslateTo` (and optionally
  193. `TranslateFrom`, `TranslateDomain`, a `TranslateTerms` glossary) and each message is translated.
  194. The driver sends only the latest message, as the API requires, and fixes plus/turbo streaming,
  195. which repeats the accumulated text in every chunk.
  196. Demo `089-QwenShowcase` walks through all of it with one key.
  197. - **Custom voices**: `TAiQwenVoices` clones a voice from a sample or designs one from a text
  198. description, and lists or deletes them. Put the returned id in `TtsParams.Voice`; the driver
  199. switches to the TTS model that voice requires. Clone only voices you have consent to use.
  200. - **Embeddings**: `TAiQwenEmbeddings` (driver `Qwen`), `text-embedding-v4` by default.
  201. - **Rerank**: `TAiQwenRAGReranker` plugs `qwen3-rerank` into `TAiRAGVector.Reranker`, up to 500
  202. passages per call, with an optional task instruction.
  203. ### Skills — SKILL.md, loaded on demand
  204. MakerAI now speaks **SKILL.md**, the format of Claude's Agent Skills and of the PPM registry's
  205. `skill` packages: YAML frontmatter (name, when to use it) plus Markdown instructions. One parser
  206. (`uMakerAi.Skills.Format`) serves the whole framework, from a string, a file, a folder or the
  207. registry.
  208. - **`TAiSkills`** (new, `Source/Tools/uMakerAi.Tools.Skills.pas`) gives any chat with function
  209. calling on-demand skills. The model sees only a one-line-per-skill catalog in the description
  210. of `use_skill` and loads the full instructions when it needs them, so dozens of skills cost no
  211. tokens until used. Folder-based skills can ship supporting files, read with `read_skill_file`,
  212. which is confined to the skill folder (no `..`, absolute paths, links or binaries, never
  213. executes anything). Veto and audit events; guardrails apply as to any tool. Live, 9/9 on
  214. OpenAI, Claude and Groq: the right skill for each request, none for an unrelated one, and
  215. `use_skill` → `read_skill_file` chained when the instructions asked for it.
  216. - **`TAiSkill.FromPPM` works.** It requested a URL that returns the website's HTML and a JSON
  217. format no package publishes; it now downloads the real SKILL.md (`'code-review'` also finds
  218. `skill-code-review`). New `FromFolder` / `FromSkillFile`; the JSON format still works for local
  219. files. A SKILL.md never supplies an API key.
  220. - **`TLLMNode` respects its skill.** New `ResolveConfig`: driver from the node, else the skill,
  221. else Claude; the skill's model only if it belongs to that driver; the skill's system prompt
  222. followed by the node's. Previously the skill's driver was always overridden and switching
  223. driver lost the skill's model and key.
  224. - **`TAiPrompts`** loads local skills (`LoadSkillFromFile`, `LoadSkillsFromFolder`) and
  225. `ApplySkill` copies one into any `SystemPrompt`. Registry versions are now picked by semver.
  226. Guides: `Docs/Version 3/uMakerAi-Skills.EN.md` (Spanish: `uMakerAi-Skills.md`). Demo `091-Skills`.
  227. ### Also
  228. - **Every driver on the shared streaming parser returned the answer twice.** In asynchronous
  229. mode `OnReceiveDataEnd` received `'Done'#13#10'Done'`: the end of the stream re-added the
  230. accumulated text. Affected all drivers built on the common parser (verified on Groq and
  231. DeepSeek; Kimi, Grok and Mistral now return it once too).
  232. - **Files generated by Groq's code interpreter were lost when streaming.** `gpt-oss` sends
  233. `executed_tools` inside each delta, in two chunks per tool; the parser only looked at the
  234. top level, the format of the retired `groq/compound`. They are now merged and delivered as
  235. in the synchronous path.
  236. - **Groq catalog brought up to date with the API.** `llama-3.1-8b-instant` and
  237. `llama-3.3-70b-versatile` no longer exist and were the driver's default, so a Groq connection
  238. without an explicit model came back empty. The default is now `openai/gpt-oss-20b`, and both
  239. old names are aliases (to `gpt-oss-20b` and `gpt-oss-120b`), so existing code keeps working.
  240. `groq/compound` was removed without a replacement. `qwen/qwen3.6-27b` was registered with a
  241. token limit the API rejects; fixed, and `qwen/qwen3.8-27b` added. Demo 014 now runs Groq's
  242. code interpreter on `gpt-oss-20b` (`--groq`).
  243. - **Claude sometimes sends coordinates as a JSON array and sometimes as a string** containing
  244. one — *within the same turn*. `TryGetValue<TJSONArray>` missed the second form, the
  245. coordinate was lost and the action landed on (0,0): a click in the screen corner, after
  246. which the model retried until it ran out of turns. Affected `coordinate`,
  247. `start_coordinate` and `region`, i.e. click, double/triple click, drag and zoom.
  248. - **OpenTelemetry validated against a real collector** for the first time (Jaeger): the trace
  249. crosses the A2A boundary, so `traceparent` propagation through `_meta` works. Fixed
  250. `otel.scope.version`, hardcoded to `3.5` while the framework was on 3.7.
  251. - **Demos 031 and 077 now build and run on Linux64** — which also makes FireDAC on Linux a
  252. tested path (PostgreSQL 18 + pgvector 0.8.1 through `libpq.so.5`).
  253. - Documented that the Realtime module needs `CheckSynchronize` in console apps and services:
  254. every event is dispatched with `TThread.Queue`, so without a message loop **no event ever
  255. fires** — not even `OnError`.
  256. ---
  257. ## What's New in v3.7
  258. ### Computer Use, Refreshed on Both Live Providers
  259. 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.
  260. 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.
  261. ### GLM (Zhipu AI / Z.ai) — New Provider
  262. `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`).
  263. ### Correctness Pass
  264. 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.
  265. ---
  266. ## What's New in v3.6
  267. ### MCP Specification 2026-07-28 — Stateless, Dual-Era
  268. 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).
  269. ### Observability — OpenTelemetry Tracing
  270. **`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.
  271. ### A2A — Agent-to-Agent Protocol (first Delphi implementation)
  272. 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`.
  273. ### Guardrails & Evals
  274. **`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.
  275. ### First Automated Regression Suite
  276. `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.
  277. ---
  278. ## What's New in v3.5
  279. ### Typed ModelConfig Channel
  280. 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.
  281. ### Full-Duplex Voice Suite
  282. - **`TAiGrokRealtimeChat`** — xAI Grok Voice speech-to-speech (function calling, session resumption with replay, binary audio transport, ephemeral tokens)
  283. - **`TAiOpenAiRealtimeTranslate`** — continuous streaming speech translation (one WebSocket per direction; demo 071-VoiceBridgeTranslate)
  284. - **`TAiRealtimeVoiceBase`** — shared full-duplex base; voice events flow through the universal `TAiRealtimeConnection`
  285. - **gpt-transcribe / gpt-live-transcribe** — OpenAI's Whisper successors, fully integrated
  286. ### August 2026 Provider Refresh — All 9 Cloud Providers, Runtime-Tested
  287. Claude 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.
  288. ### Grok Native Video & Image Generation
  289. `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.
  290. ---
  291. ## What's New in v3.4
  292. ### Delphi 13.1 Florence Support
  293. 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.
  294. ### Selective Driver Registration
  295. 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:
  296. ```pascal
  297. // Load only what you need
  298. uses uMakerAi.Chat.AiConnection, uMakerAi.Chat.OpenAi, uMakerAi.Chat.Claude;
  299. // Load all drivers at once (legacy behavior)
  300. uses uMakerAi.Chat.Initializations;
  301. ```
  302. ### Real-Time STT — TAiRealtimeConnection
  303. New universal connector for real-time speech-to-text via WebSocket:
  304. - **`TAiRealtimeConnection`** — provider-agnostic STT connector; switch providers via `DriverName`
  305. - **`TAiOpenAiRealtimeSTT`** — full OpenAI Realtime API implementation (24 kHz PCM16, VAD modes, streaming transcription)
  306. - Pure-Pascal WebSocket client with native TLS via Windows SChannel — no extra DLLs required
  307. - Thread-safe PCM16 resampler; supports push-based audio streaming from any source
  308. ### GPT-Transcribe — Next-Gen OpenAI Transcription (Whisper successors) 🆕
  309. OpenAI's new transcription models (Aug 2026) are fully integrated — better accuracy on real-world audio, accents, numbers, specialized terminology and loud background noise:
  310. | Model | Use case | Word Error Rate |
  311. |-------|----------|-----------------|
  312. | `gpt-live-transcribe` | Live low-latency STT (Realtime WebSocket) | 9.60% (vs 11.65% Whisper) |
  313. | `gpt-transcribe` | Completed files and batch workloads | 8.98% (vs 15.21% Whisper) |
  314. - **`TAiOpenAiRealtimeSTT`** now defaults to `gpt-live-transcribe`, with new context properties: `TranscriptionPrompt` (free-form topic), `TranscriptionKeywords` (domain terms), `Languages` (multi-language guided autodetection) and `LowDelay`
  315. - **`TAiOpenAiAudio`** gains `tmGptTranscribe` / `tmGptLiveTranscribe` with `TranscriptionKeywords` + `TranscriptionLanguages` for REST/batch transcription
  316. - Legacy models (`whisper-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 model
  317. - VoiceBridge demos (062–065) migrated: live channels use `gpt-live-transcribe` with contextual prompts and guided language detection; diarized channels stay on `gpt-4o-transcribe-diarize`
  318. ### Grok Voice — Real-Time Speech-to-Speech (xAI) 🆕
  319. Full-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:
  320. - **`TAiGrokRealtimeChat`** — complete driver for `wss://api.x.ai/v1/realtime` (OpenAI Realtime-compatible protocol, 24 kHz PCM16)
  321. - **`TAiRealtimeVoiceBase`** — new base class for full-duplex voice drivers; adds `OnAssistantText`, `OnAssistantTextDelta`, `OnAudioChunk`, `OnAudioDone` (shared with `TAiMakerAiRealtimeChat`)
  322. - Live user transcription (`OnTranscriptDelta` / `OnTranscriptCompleted`), server VAD, streamed assistant text and TTS audio
  323. - **Function calling by voice**: assign a `TAiFunctions` 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)
  324. - **xAI native tools**: `EnableWebSearch` / `EnableXSearch` — executed server-side by xAI
  325. - Session options: `Voice` (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`)
  326. - `ForceMessage()` — scripted TTS utterance bypassing the model (IVR prompts, disclosures)
  327. - **Session resumption**: `EnableResumption` + `ConversationId` — reconnect and the server replays the cached turns (transcripts, tool calls and outputs; 30-min window)
  328. - **Binary audio transport**: `BinaryAudio := True` — raw PCM over WebSocket binary frames, ~33% less bandwidth than base64
  329. - **Ephemeral tokens** for mobile/browser clients: `MintEphemeralToken()` on your backend + `EphemeralToken` on the client — the API key never leaves the server
  330. - **`file_search`** over xAI Collections (`FileSearchCollections`) and remote MCP servers via `CustomToolsJson`
  331. - Works through `TAiRealtimeConnection` too — just set `DriverName := 'Grok'`
  332. ```pascal
  333. uses uMakerAi.Realtime.AiConnection, uMakerAi.Realtime.Grok;
  334. Voice := TAiRealtimeConnection.Create(nil);
  335. Voice.DriverName := 'Grok';
  336. Voice.ApiKey := '@GROK_API_KEY';
  337. Voice.Language := 'es';
  338. Voice.OnTranscriptCompleted := HandleUserText; // what the user said
  339. Voice.OnAssistantText := HandleGrokText; // what Grok answered
  340. Voice.OnAudioChunk := HandleGrokAudio; // Grok's voice (PCM16 24 kHz)
  341. Voice.Connect;
  342. // ... stream microphone audio via Voice.SendAudioChunk(Data) ...
  343. // For file-based audio (non-continuous), close the turn explicitly:
  344. // Voice.CommitAudio; TAiGrokRealtimeChat(Voice.Instance).CreateResponse;
  345. ```
  346. ### cmSmartDispatch — Intelligent Chat Routing
  347. New `ChatMode` value for automatic two-pass routing:
  348. - **Pass 1** — classifies the user intent and rewrites the prompt for the target capability (image generation, speech synthesis, web search, etc.)
  349. - **Pass 2** — dispatches to the appropriate bridge or tool based on classification
  350. - Works with all existing ChatTools (`IAiImageTool`, `IAiSpeechTool`, `IAiWebSearchTool`, etc.)
  351. ### Models Updated (May 2026)
  352. | Provider | New / Updated Models |
  353. |----------|----------------------|
  354. | OpenAI | **gpt-5.4**, **gpt-5.4-mini**, **gpt-5.5**, gpt-image-1 |
  355. | Claude | **claude-opus-4-7** (Adaptive Thinking), claude-sonnet-4-6, claude-haiku-4-5 |
  356. | Gemini | **gemini-3.1-pro**, **gemini-3-flash**, gemini-3.1-flash-lite, gemini-3.1-flash-image |
  357. | Grok | **grok-4-fast**, grok-3, grok-code-fast-1 |
  358. | Mistral | magistral-medium/small, devstral, voxtral |
  359. | Groq | llama-4-scout/maverick, kimi-k2, qwen3, compound-beta |
  360. | Kimi | **kimi-k2**, kimi-k2.5, kimi-k2-thinking |
  361. | Cohere | command-a-03-2025, command-a-reasoning, command-a-vision |
  362. ### Agent Improvements
  363. - **`TAiAgentManager.Run`** declared `virtual` — proper subclassing now supported
  364. - **jmAll join node fix** — `FJoinInputs` cleared after each execution; eliminates premature firing on retries and loops
  365. - **`TChatInput.EnterAsSend`** — new property (default `False`): Enter sends the prompt, Shift+Enter / Ctrl+Enter inserts a line break
  366. - **`TChatBubble`** — eliminated spurious vertical scrollbar (`ShowScrollBars := False`)
  367. ### Bug Fixes
  368. - **Claude Opus 4.7 Adaptive Thinking** — temperature, top_p, top_k and the `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.
  369. - **`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`.
  370. - **`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.
  371. ### Bug Fixes (March 2026)
  372. - **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 `TTask`s. 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.
  373. - **`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.
  374. ---
  375. ## 🏗️ Architecture
  376. ```
  377. ┌──────────────────────────────────────────────────────────────────┐
  378. │ Your Delphi Application │
  379. └────┬──────────────────┬─────────────────┬────────────────────────┘
  380. │ │ │
  381. ┌────▼────┐ ┌─────────▼──────────┐ ┌──▼────────────────────────┐
  382. │ ChatUI │ │ Agents │ │ Design-Time │
  383. │ FMX │ │ TAIAgentManager │ │ Property Editors │
  384. │ Visual │ │ TAIBlackboard │ │ Object Inspector support │
  385. │ Comps │ │ Checkpoint/Approve │ └───────────────────────────┘
  386. │ │ │ A2A server/client │
  387. └────┬────┘ └─────────┬──────────┘
  388. │ │
  389. ┌────▼──────────────────▼──────────────────────────────────────────┐
  390. │ TAiChatConnection — Universal Connector │
  391. │ Switch provider at runtime via DriverName property │
  392. └──────────────────────────────┬───────────────────────────────────┘
  393. │
  394. ┌──────────────────────────────▼───────────────────────────────────┐
  395. │ Native Provider Drivers (direct API access, full fidelity) │
  396. │ OpenAI · Claude · Gemini · Grok · Mistral · DeepSeek · Kimi │
  397. │ GLM · Qwen · Groq · Cohere · Ollama · LM Studio · GenericLLM │
  398. └──────────────────────────────┬───────────────────────────────────┘
  399. │
  400. ┌─────────────────────────┼────────────────────────┐
  401. │ │ │
  402. ┌────▼────────┐ ┌────────────▼────────┐ ┌───────────▼─────────┐
  403. │ ChatTools │ │ RAG │ │ MCP │
  404. │ PDF/Vision │ │ Vector (VQL) │ │ Server (HTTP/SSE │
  405. │ Speech/STT │ │ Graph (GQL) │ │ StdIO/Direct) │
  406. │ Web Search │ │ PostgreSQL/SQLite │ │ Client │
  407. │ Shell │ │ SQL Server │ │ TAiFunctions bridge│
  408. │ ComputerUse│ │ HNSW · BM25 · RRF │ └─────────────────────┘
  409. │ Skills │ │ Rerank · Documents │
  410. └─────────────┘ └─────────────────────┘
  411. ┌──────────────────────────────────────────────────────────────────┐
  412. │ Cross-cutting: Guardrails · Evals · OpenTelemetry · TAiMemory │
  413. │ Jev (calibrated decisions: routing, guards, rerank, labeling) │
  414. └──────────────────────────────────────────────────────────────────┘
  415. ┌──────────────────────────────────────────────────────────────────┐
  416. │ Realtime Voice — parallel WebSocket stack │
  417. │ TAiRealtimeConnection · OpenAI STT/Translate · Grok Voice S2S │
  418. │ Qwen voice/STT/translate/TTS · MakerAI │
  419. │ Pure-Pascal RFC 6455 + TLS (SChannel / OpenSSL / Android) │
  420. └──────────────────────────────────────────────────────────────────┘
  421. ```
  422. ---
  423. ## 📡 Supported AI Providers
  424. MakerAI gives you **two ways to work with each provider**, which you can mix freely:
  425. ### Direct Provider Components
  426. Full, provider-specific access to every API feature. Use when you need complete control:
  427. | Component | Provider | Latest Models |
  428. |-----------|----------|---------------|
  429. | `TAiOpenChat` | OpenAI | **gpt-6-sol** (default), gpt-6-luna, gpt-6-astra, gpt-5.6-sol/-terra/-luna, gpt-image-2.5 |
  430. | `TAiClaudeChat` | Anthropic | claude-opus-5-5, claude-sonnet-5-5, claude-fable-5-1, **claude-haiku-4-5** (default) |
  431. | `TAiGeminiChat` | Google | **gemini-3.8-flash** (default), gemini-3.7-flash, gemini-3.1-pro, gemini-3.8-flash-tts, Nano Banana |
  432. | `TAiGrokChat` | xAI | grok-4.3, grok-4.5, grok-build, grok-imagine (image/video) |
  433. | `TAiMistralChat` | Mistral AI | mistral-large/medium/small, magistral, devstral, voxtral (STT/TTS) |
  434. | `TAiDeepSeekChat` | DeepSeek | deepseek-flash, deepseek-v4-pro |
  435. | `TAiKimiChat` | Moonshot | kimi-k3, kimi-k2.7-code, kimi-k2.6 |
  436. | `TAiGLMChat` | GLM (Zhipu / Z.ai) | glm-4.7, glm-5.3, glm-5v-turbo, free tiers: glm-4.7-flash / glm-4.6v-flash |
  437. | `TAiQwenChat` | Qwen (Alibaba Model Studio) | qwen3.8-flash, qwen3.8-max, qwen3.7-plus, qwq-plus, qwen3-coder-plus, qwen3-vl-flash |
  438. | `TAiGroqChat` | Groq | openai/gpt-oss-20b, openai/gpt-oss-120b, qwen3.8, whisper-large-v3 |
  439. | `TCohereChat` | Cohere | command-a-plus, command-a-03-2025, north-mini-code |
  440. | `TAiOllamaChat` | Ollama | Any local model |
  441. | `TAiLMStudioChat` | LM Studio | Any local model |
  442. | `TAiGenericChat` | OpenAI-compatible | Any OpenAI-API endpoint |
  443. ### Universal Connector
  444. Provider-agnostic code. Switch models or providers by changing one property:
  445. ```pascal
  446. AiConn.DriverName := 'OpenAI';
  447. AiConn.Model := 'gpt-6-sol'; // leave Model empty to get the driver's default
  448. AiConn.Params.Values['ApiKey'] := '@OPENAI_API_KEY'; // resolved from the environment variable
  449. // Switch to Gemini without changing anything else
  450. AiConn.DriverName := 'Gemini';
  451. AiConn.Model := 'gemini-3.8-flash';
  452. AiConn.Params.Values['ApiKey'] := '@GEMINI_API_KEY';
  453. // Or to GLM (Zhipu / Z.ai) — glm-4.7-flash is free
  454. AiConn.DriverName := 'GLM';
  455. AiConn.Model := 'glm-4.7-flash';
  456. AiConn.Params.Values['ApiKey'] := '@GLM_API_KEY';
  457. ```
  458. ---
  459. ## 📊 Feature Support Matrix
  460. | Feature | OpenAI (GPT-6) | Claude (5 / 5.5) | Gemini (3.8) | Grok (4.5) | Mistral | DeepSeek | Ollama |
  461. |:--------|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
  462. | Text Generation | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
  463. | Streaming (SSE) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
  464. | Function Calling | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
  465. | JSON Mode / Schema | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
  466. | Image Input | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ |
  467. | PDF / Files | ✅ | ✅ | ✅ | ⚠️ | ✅ | ❌ | ⚠️ |
  468. | Image Generation | ✅ | ❌ | ✅ | ✅ | ❌ | ❌ | ❌ |
  469. | Video Generation | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ |
  470. | Extended Thinking | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ⚠️ |
  471. | Speech (TTS/STT) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | ⚠️ |
  472. | Realtime Voice (WebSocket) | ✅ STT | ❌ | ⚠️ | ✅ S2S | ❌ | ❌ | ❌ |
  473. | Web Search | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ |
  474. | Computer Use ¹ | ✅ | ✅ | ⚠️ | ❌ | ❌ | ❌ | ❌ |
  475. | RAG (all modes) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
  476. | MCP Client/Server | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
  477. | Agents | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
  478. > **Legend:** ✅ Native | ⚠️ Tool-Assisted bridge | ❌ Not Supported
  479. > ¹ **Computer Use is opt-in.** `cap_ComputerUse` hands the model the real mouse and
  480. > keyboard, so no model enables it by default — you add the capability yourself (see
  481. > the **Computer Use** section below). Native support: OpenAI
  482. > `gpt-6-astra`; Claude `claude-opus-4-8` / `-opus-5` / `-sonnet-5` / `-fable-5`.
  483. > Gemini is marked ⚠️ because the registry still points at the
  484. > `gemini-2.5-computer-use-preview` model (3.7/3.8 Flash list computer use as a preview
  485. > tool, not yet wired or tested). The Claude 5.5 / Fable 5.1 models use the same
  486. > `computer_toolset` but have not been runtime-tested with it yet.
  487. ---
  488. ## 🎨 Component Palette
  489. Every one of the 108 components has its own palette icon. The tile color identifies the
  490. provider (maroon = MakerAI framework, black = OpenAI, blue = Gemini, purple = Qwen, teal = Jev…).
  491. ![MakerAI 3.8 component palette](Docs/Version%203/images/social/MakerAI-3.8-palette-1200x675.png)
  492. The **[full sheet](Docs/Version%203/images/MakerAI-Component-Palette.png)** groups them by
  493. category, with the class name and the palette tab each one lands on. Icons are generated by
  494. `Source/Resources/gen_icons.py` and the sheet by `gen_palette_sheet.py`; see
  495. [`Source/Resources/CLAUDE.md`](Source/Resources/CLAUDE.md) to add an icon for a new component.
  496. ---
  497. ## 🧩 Ecosystem Modules
  498. ### 🧠 RAG — Retrieval-Augmented Generation
  499. Two complementary retrieval engines with their own query languages:
  500. **Vector RAG** — semantic and hybrid search over document embeddings:
  501. - HNSW index for approximate nearest-neighbor search
  502. - BM25 lexical index for keyword matching
  503. - Hybrid search with RRF (Reciprocal Rank Fusion) or weighted fusion
  504. - Reranking and Lost-in-the-Middle reordering for LLM context
  505. - **VQL** (Vector Query Language) — SQL-like DSL for complex retrieval queries:
  506. ```sql
  507. MATCH documents SEARCH 'machine learning'
  508. USING HYBRID WEIGHTS(semantic: 0.7, lexical: 0.3) FUSION RRF
  509. WHERE category = 'tech' AND date > '2025-01-01'
  510. RERANK 'neural networks' WITH REGENERATE
  511. LIMIT 10
  512. ```
  513. - Drivers: PostgreSQL/pgvector, SQLite, in-memory
  514. **Graph RAG** — knowledge graph with semantic search over entities and relationships:
  515. - Nodes and edges with embeddings and metadata
  516. - **MakerGQL** — Graph Query Language based on ISO/IEC 39075:2024 (GQL standard):
  517. ```gql
  518. MATCH (p:Person)-[r:WORKS_AT]->(c:Company)
  519. WHERE c.city = 'Madrid' DEPTH 2
  520. RETURN p, r, c
  521. ```
  522. - Dijkstra shortest path, centrality analysis, hub detection
  523. - Export to GraphViz DOT, GraphML (Gephi), native JSON format
  524. - Document lifecycle management (ingest → chunk → embed → link)
  525. ### 🤖 Agents — Autonomous Orchestration
  526. Graph-based multi-agent workflows with full thread safety:
  527. - **`TAIAgentManager`** — executes directed graphs of AI nodes via thread pool
  528. - **`TAIAgentsNode`** — single execution unit; runs an LLM call, a tool, or custom logic
  529. - **`TAIBlackboard`** — thread-safe shared state dictionary between all nodes
  530. - **Link modes:** `lmFanout` (parallel broadcast), `lmConditional` (routing), `lmExpression` (binding), `lmManual`
  531. - **Join modes:** `jmAny` (first arrival wins), `jmAll` (wait for all inputs)
  532. - **Durable execution:** `IAiCheckpointer` persists full agent state between process restarts; built-in implementations: `TAiFileCheckpointer` (JSON files) and `TAiDatabaseCheckpointer` (FireDAC — SQLite, PostgreSQL, Firebird, etc.)
  533. - **Human-in-the-loop:** `Node.Suspend(Reason, Context)` pauses a node and saves the checkpoint; `TAiWaitApprovalTool` provides a drop-in approval tool; resume with `ResumeThread(ThreadID, NextNode, HumanInput)`
  534. - Supports any LLM provider via `TAiChatConnection`
  535. ### 🔗 MCP — Model Context Protocol
  536. Full **dual-era** implementation of the MCP standard for both consuming and exposing tools: supports the stateless **spec revision 2026-07-28** (per-request `_meta`, `server/discover`, MRTR elicitation) and interoperates automatically with legacy peers that still use the `initialize` handshake.
  537. **MCP Server** — expose Delphi functions as MCP tools, callable by any MCP client (Claude Desktop, AI agents, etc.):
  538. - Transports: **HTTP** (Streamable HTTP — stateless per spec 2026-07-28), **StdIO**, **Direct** (in-process), **SSE** (legacy — see deprecation note below)
  539. - Dual-era per request: modern clients are served stateless (per-request `_meta` identity + `OnClientConnect` vetting); legacy clients keep the `initialize` handshake and `Mcp-Session-Id` session gating
  540. - **MRTR** (Multi Round-Trip Requests): tools can pause and ask the user for confirmation or data via elicitation (`resultType: "input_required"` + opaque `requestState`) — working example in `Demos/031-MCPServer/uTool.ConfirmDemo.pas`
  541. - Bridge `TAiFunctions → IAiMCPTool` — any existing `TAiFunctions` component becomes an MCP server instantly
  542. - API Key authentication, CORS configuration
  543. - `TAiMCPResponseBuilder` for structured responses (text + files + media)
  544. - RTTI-based automatic JSON Schema generation from parameter classes
  545. **MCP Client** — consume any external MCP server from your Delphi app:
  546. - Dual-era probe: tries `server/discover` first and falls back to the legacy handshake automatically; the negotiated mode is exposed in `NegotiatedProtocol`
  547. - `OnInputRequired` event resolves MRTR elicitations (retry loop with `requestState` echo; assigning the handler declares the `elicitation` capability)
  548. - Connect to Claude Desktop tools, filesystem servers, database tools, etc.
  549. - Integrated into `TAiFunctions` component alongside native function definitions
  550. Quick way to try `TMCPClientHttp` against a public MCP server — this example uses [Parallel Search](https://search.parallel.ai/mcp), a **third-party commercial service** (Parallel Web Systems, not affiliated with MakerAI) that exposes `web_search` / `web_fetch` tools over MCP:
  551. ```pascal
  552. var
  553. MCPClient: TMCPClientHttp;
  554. begin
  555. MCPClient := TMCPClientHttp.Create(nil);
  556. try
  557. MCPClient.URL := 'https://search.parallel.ai/mcp';
  558. if MCPClient.Initialize then
  559. Writeln(MCPClient.Tools.Text);
  560. finally
  561. MCPClient.Free;
  562. end;
  563. end;
  564. ```
  565. > **Note:** at the time of writing (Aug 2026) Parallel offers a rate-limited free tier that works without an API key, but **pricing, limits and availability are set by Parallel and may change at any time** — check [their terms](https://parallel.ai/) before relying on it in production. Be aware that your search queries and any fetched URLs are sent to their servers. MakerAI has no relationship with this service; it is shown only as a convenient public endpoint for testing the MCP HTTP client, and any spec-compliant MCP server works the same way.
  566. > **⚠️ SSE transport deprecation (spec 2026-07-28):** the classic HTTP+SSE transport (GET `/sse` + POST `/messages`) was formally moved to *Deprecated* state by MCP spec revision 2026-07-28 under the project's feature-lifecycle policy, which mandates a minimum 12-month window. Its **earliest possible removal from the spec is July 2027** — actual removal happens in the first spec revision published after that date, at the maintainers' discretion, and may come later. Removal deletes the transport from future spec revisions only: existing MakerAI SSE endpoints keep working between themselves, but third-party clients (Claude Desktop, official SDKs) will progressively drop it. **Use the HTTP or StdIO transports for anything new.** Note that SSE *as a streaming response format* survives inside Streamable HTTP — only the standalone HTTP+SSE transport is being retired.
  567. ### 🛠️ ChatTools — AI × Deterministic Capabilities
  568. ChatTools bridge the gap between AI reasoning and real-world operations. They activate automatically based on gap analysis between `SessionCaps` and `ModelCaps`:
  569. | Tool Interface | What it does | Implementations |
  570. |----------------|-------------|-----------------|
  571. | `IAiPdfTool` | Extract text from PDFs | Mistral OCR, Ollama OCR |
  572. | `IAiVisionTool` | Describe / analyze images | Any vision model |
  573. | `IAiSpeechTool` | Text-to-speech / speech-to-text | Whisper, Gemini Speech, OpenAI TTS |
  574. | `IAiWebSearchTool` | Live web search | Gemini Web Search |
  575. | `IAiImageTool` | Generate images | gpt-image-2.5, Gemini (Nano Banana), Grok Imagine, Qwen Image |
  576. | `IAiVideoTool` | Generate video | Sora, Gemini Veo, Grok Imagine, Qwen Wan |
  577. | `TAiShell` | Execute shell commands | Windows/Linux |
  578. | `TAiTextEditorTool` | Read/write/patch files | Diff-based editing |
  579. | `TAiComputerUseTool` | Control mouse and keyboard | Claude `computer_toolset`, OpenAI `computer` (gpt-6-astra) |
  580. Tools follow a common pattern: `SetContext(AiChat)` + `Execute*()`. They can run standalone, as function-call bridges, or as automatic capability bridges.
  581. ### 🖱️ Computer Use — Driving the Desktop
  582. `TAiComputerUseTool` lets a model look at the screen and drive the real mouse and
  583. keyboard. One canonical action model is shared by every provider, so the same
  584. executors and the same event handlers work regardless of who is driving:
  585. ```pascal
  586. // Opt-in: no model ships with cap_ComputerUse enabled
  587. TAiChatFactory.Instance.RegisterUserParam('OpenAi', 'gpt-6-astra',
  588. 'ModelCaps', '[cap_Image, cap_Reasoning, cap_ComputerUse]');
  589. TAiChatFactory.Instance.RegisterUserParam('OpenAi', 'gpt-6-astra',
  590. 'SessionCaps', '[cap_Image, cap_Reasoning, cap_ComputerUse]');
  591. AiConn.ChatTools.ComputerUseTool := MyComputerUseTool; // + OnExecuteAction / OnRequestScreenshot
  592. ```
  593. | Provider | Tool declared | Action shape |
  594. |----------|---------------|--------------|
  595. | OpenAI (`gpt-6-astra`) | `computer` (no parameters) | one `computer_call` carrying an **array of actions** |
  596. | Claude (opus-4-8 / family 5) | `computer_toolset_20260801` (no parameters) | **17 individually named tools**, several `tool_use` blocks per turn |
  597. | Gemini | `computerUse` (`ENVIRONMENT_BROWSER`) | one function call per action, coordinates normalised 0–1000 |
  598. The two APIs refreshed in 2026 (OpenAI and Claude) converged independently on the same
  599. design: the tool declares **no screen dimensions** — the model infers them from the
  600. screenshot — and coordinates come back as **pixels of the image you sent**.
  601. `ScreenWidth`/`ScreenHeight` are therefore local-only now: they must match the image you
  602. actually submit, because that is the divisor used to translate coordinates back to
  603. physical pixels.
  604. - **Safety**: `OnSafetyConfirmation` gates risky actions (human-in-the-loop); denying
  605. is the default when no handler is assigned
  606. - **Executors**: Windows VCL and FMX (Win32 `SendInput`) and **Linux/X11**
  607. (`TAiLinuxExecutor`, xdotool + scrot), all runtime-tested. A macOS executor (CGEvent) is
  608. written but has not yet been compiled or tested on macOS. They are interchangeable: an
  609. executor is just the pair of handlers, so `TAiComputerUseTool` itself is platform-agnostic
  610. - **Delegation**: fill `ToolCall.Response` from `OnCallToolFunction` and the driver will not
  611. execute locally — a headless process can forward the call to whoever owns a screen
  612. - **Capture area**: `AreaLeft`/`AreaTop`/`AreaWidth`/`AreaHeight` select a sub-region;
  613. multi-monitor works but is still lightly tested
  614. - **Demos**: `066-ComputerUseTest` (Windows, real desktop — `-provider=openai|claude|gemini`,
  615. `-prompt=...`, `-autorun`, `run.log` next to the executable), `082-ComputerUsePassthru`
  616. (who executes the call: delegated, missing tool, local — self-verifying, does not touch the
  617. screen) and `083-ComputerUseLinux` (real agentic loop on Xvfb)
  618. ### 🎙️ Realtime Voice — WebSocket STT & Speech-to-Speech
  619. A parallel component stack for live audio over WebSocket, with the same universal-connector pattern as chat (`TAiRealtimeConnection.DriverName`):
  620. | Driver | Type | Endpoint |
  621. |--------|------|----------|
  622. | `TAiOpenAiRealtimeSTT` | STT only — streaming transcription (`gpt-live-transcribe` default) | OpenAI Realtime API |
  623. | `TAiOpenAiRealtimeTranslate` | **Simultaneous translation** — translated text and voice in one stream | OpenAI Realtime API |
  624. | `TAiGrokRealtimeChat` | **Full-duplex speech-to-speech** — the user talks, Grok answers with voice | xAI `wss://api.x.ai/v1/realtime` |
  625. | `TAiQwenRealtimeChat` / `…STT` / `…Translate` | Voice conversation, live transcription and simultaneous translation (`DriverName` `Qwen` / `QwenSTT` / `QwenTranslate`) | Alibaba DashScope |
  626. | `TAiQwenRealtimeTTS` | Streaming text-to-speech: speak an LLM answer while it is generated | Alibaba DashScope |
  627. | `TAiMakerAiRealtimeChat` | STT + LLM + TTS in one socket | MakerAI server |
  628. | `TAiGeminiRealtimeSTT` | STT (planned) | Gemini Live |
  629. - **`DriverParams`** on `TAiRealtimeConnection` — driver-specific settings (`Voice`, `Instructions`, `TargetLanguage`…) as `Property=Value` lines, applied to whichever driver is active
  630. - **`TAiRealtimeVoiceBase`** — shared base for full-duplex drivers: `OnAssistantText[Delta]`, `OnAudioChunk`, `OnAudioDone`, on top of the STT events (`OnTranscriptDelta/Completed`, `OnSpeechStarted/Stopped`)
  631. - **Voice function calling** (Grok): plug a `TAiFunctions` component and the model invokes your Delphi functions mid-conversation
  632. - **Session resumption, binary audio transport, ephemeral tokens** for mobile/browser clients (Grok)
  633. - **Audio pipeline**: `TAIVoiceMonitor` (mic) → thread-safe PCM16 resampler → provider rate (24 kHz); push audio from any source via `SendAudioChunk`
  634. - **Pure-Pascal WebSocket stack** (`TAiWSClient`, RFC 6455) with pluggable TLS: Windows SChannel (zero DLLs), OpenSSL (Linux/macOS), `javax.net.ssl` (Android). The POSIX transport verifies the server certificate — chain **and** hostname — with `InsecureSkipVerify` as an explicit opt-out
  635. ### 🌐 A2A — Agent-to-Agent Protocol
  636. First Delphi implementation of **A2A 1.0** (Linux Foundation), certified against the official TCK (MUST 89/89, SHOULD 8/8):
  637. - **`TAiA2AServer`** exposes any `TAIAgentManager` graph as an A2A agent: Agent Card at `/.well-known/agent-card.json`, `SendMessage` / `GetTask` / `CancelTask` / `ListTasks`, SSE streaming, push notifications, bearer auth, a pool of managers for concurrent tasks, and human-in-the-loop (a suspended node becomes `input-required`)
  638. - **`TAiA2AClient`** consumes remote agents; **`TAiA2ARemoteAgentTool`** federates a graph node to a remote agent, and **`TAiA2AAgentTool`** exposes a remote agent to a chat as a function
  639. - Demos: `072-A2AFederation`, `074-A2AOrchestration`, `079-A2ASutAgent`, `080-A2APushNotifications`
  640. ### 📚 Skills — Reusable Instructions on Demand
  641. Skills use the **SKILL.md** format (Claude Agent Skills / PPM registry): YAML frontmatter with a name and when to use it, plus Markdown instructions. The same file works in a chat, an agent node or a prompt:
  642. - **`TAiSkills`** — plug it into `TAiFunctions` and the model sees only a one-line catalog in `use_skill`; it loads the instructions it needs, and reads supporting files with `read_skill_file` (confined to the skill folder). Works with any provider that supports function calling
  643. - **`TAiSkill` + `TLLMNode.Skill`** — a skill as the fixed personality of an agent node
  644. - **`TAiPrompts.ApplySkill`** — copy a skill into any `SystemPrompt`
  645. - Load from a folder (`Skills\<name>\SKILL.md`), a file, code, or the PPM registry (`LoadFromPPM('skill-code-review')`)
  646. - Guide: [`Docs/Version 3/uMakerAi-Skills.EN.md`](Docs/Version%203/uMakerAi-Skills.EN.md) · Demo: `091-Skills`
  647. ### 🛡️ Guardrails & Evals
  648. - **`TAiGuardrails`** — assigned to `TAiFunctions.Guardrails`, it checks every tool call (local, MCP or AutoMCP) **before** it runs: allow/block lists with wildcards, forbidden argument patterns, a pluggable semantic `Classifier` and an `OnCheckToolCall` veto. A blocked call never executes; the model gets the reason and can replan
  649. - **`ChatTools.PromptGuard`** — the input-side guardrail: checks the user's message before it reaches the model
  650. - **`TAiEvalRunner`** — fluent test cases (`ExpectContains`, `ExpectRegex`, `ExpectEquals`, `ExpectJudge` with an LLM judge, `ExpectScore` with a calibrated scorer) against any target, with text and JSON reports. The framework's own regression suite (117 cases, no API keys) is built on it
  651. - Demo: `073-GuardrailsEvals`
  652. ### 📈 Observability — OpenTelemetry
  653. **`TAiTelemetry`** exports traces over OTLP/HTTP (collector on `localhost:4318`: Jaeger, Grafana Tempo, Langfuse, Arize Phoenix) following the OpenTelemetry **GenAI semantic conventions**: chat turns with token usage, tool executions, agent graphs and nodes, RAG searches, MCP and A2A requests, and skill loads. The W3C `traceparent` travels through MCP `_meta` and A2A, so a call that crosses processes stays in one trace. Zero overhead when disabled. Validated against a real Jaeger.
  654. ### 💾 Memory — TAiMemory
  655. Persistent semantic memory on SQLite: FTS5 lexical search, optional embeddings with hybrid RRF fusion, importance and decay, TTL, links between memories, and **namespaces** that isolate agents or projects. `Context(prompt)` builds a memory block ready for the system prompt, and `uMakerAi.Memory.MCP` exposes it as MCP tools. Demo: `076-Memory`.
  656. ### 🧭 Jev — Calibrated Decisions
  657. **`TAiJev`** wraps Jev (TypeSafe AI), a model that does not generate text: it answers typed questions (choice, score, yes/no) with **calibrated probabilities**, for the fast and cheap decisions that would otherwise cost a full LLM call. Adapters plug it into the framework: agent routing (`TAiJevRouterTool`), SmartDispatch, tool-call and input guardrails, eval scoring, RAG reranking with injection filtering, bulk labeling (`TAiJevBatchLabeler`) and model routing (`TAiJevModelRouter`, the cheapest model that can handle each request), with usage metering for billing. Needs `TYPESAFE_API_KEY`. Demos `084`–`088`.
  658. ### ⚙️ Model Capabilities — TAiCapabilities
  659. Introduced in v3.3 and refined in v3.4, the `TAiCapabilities` system replaces all manual feature flags with two declarative sets:
  660. - **`ModelCaps`** — what the model natively supports (e.g., `[cap_Image, cap_Reasoning]`)
  661. - **`SessionCaps`** — what the session needs
  662. - **Gap = SessionCaps − ModelCaps** — any missing capability activates an automatic ChatTool bridge; for example, a text-only model with `cap_GenImage` in `SessionCaps` automatically routes image generation requests through a DALL-E or Gemini bridge
  663. ```pascal
  664. // Default capabilities for all models of a provider
  665. TAiChatFactory.Instance.RegisterUserParam('MyProvider', 'ModelCaps', '[cap_Image, cap_Pdf]');
  666. TAiChatFactory.Instance.RegisterUserParam('MyProvider', 'SessionCaps', '[cap_Image, cap_Pdf, cap_GenImage]');
  667. // Per-model override (e.g., a reasoning model)
  668. TAiChatFactory.Instance.RegisterUserParam('MyProvider', 'my-model', 'ModelCaps', '[cap_Image, cap_Reasoning]');
  669. TAiChatFactory.Instance.RegisterUserParam('MyProvider', 'my-model', 'ThinkingLevel', 'tlMedium');
  670. ```
  671. Available capabilities:
  672. - **Input / understanding:** `cap_Image`, `cap_Audio`, `cap_Video`, `cap_Pdf`, `cap_WebSearch`, `cap_Reasoning`, `cap_CodeInterpreter`, `cap_Memory`, `cap_TextEditor`, `cap_ComputerUse`, `cap_Shell`
  673. - **Output / generation** (a gap activates a ChatTool or a dedicated endpoint): `cap_GenImage`, `cap_GenAudio` (TTS), `cap_GenVideo`, `cap_GenReport`, `cap_ExtractCode`
  674. `ThinkingLevel` controls reasoning depth across the full effort ladder: `tlNone`, `tlMinimal`, `tlLow`, `tlMedium`, `tlHigh`, `tlXHigh`, `tlMax` (`tlDefault` = let the provider decide). Each driver maps it to what its models accept — for example Gemini 3 has no `minimal` and cannot turn thinking off, so both are sent as `LOW`.
  675. ### 🎨 FMX Visual Components
  676. Two generations of FireMonkey components for building multimodal chat UIs:
  677. **Next-generation (v3.4) — Skia-native, virtualized, zero FMX child controls:**
  678. - **`TAIChatView`** — single-canvas virtualized conversation renderer; only visible messages are painted; supports multi-message text selection, dark/light theme, context menu, long-press (mobile), copy-button feedback with timer, and a scrollbar that doesn't interfere with content
  679. - **`TAIChatInput`** — fully Skia-painted input bar with custom dropdown overlay (no `TPopupMenu` required), voice-mode indicator, file attachment chips, and `TAIVoiceMonitor` integration; layout adapts from 1 to N attachment chips automatically
  680. **Classic components — FMX-layout-based, simpler to subclass:**
  681. - **`TChatList`** — scrollable message container with Markdown rendering, code blocks, copy buttons
  682. - **`TChatBubble`** — individual message bubble (user / assistant / tool)
  683. - **`TChatInput`** — text input bar with voice recording, file attachment, and send button
  684. Both sets are compatible with all providers and work with streaming responses.
  685. ### 📐 Design-Time Integration
  686. Full Delphi IDE support via the `MakerAiDsg.dpk` design-time package:
  687. - `DriverName` property shows a dropdown of all registered providers in the Object Inspector
  688. - `Model` property lists all models for the selected provider
  689. - MCP Client configuration editor with transport type selection
  690. - Embedding connection editor
  691. - Version/About dialog
  692. ---
  693. ## 📦 Installation
  694. ```bash
  695. git clone https://github.com/gustavoeenriquez/MakerAi.git
  696. ```
  697. ### Step 1 — Add Library Paths
  698. **Before compiling any package**, add all of these to **Tools > Options > Language > Delphi > Library**:
  699. ```
  700. Source/Agents
  701. Source/Chat
  702. Source/ChatUI
  703. Source/Core
  704. Source/Design
  705. Source/Embeddings
  706. Source/MCPClient
  707. Source/MCPServer
  708. Source/Memory
  709. Source/Packages
  710. Source/RAG
  711. Source/Realtime
  712. Source/Resources
  713. Source/Tools
  714. Source/Utils
  715. Source/WebSocket
  716. ```
  717. ### Step 2 — Compile and Install Packages
  718. Compile and install in this exact order:
  719. 1. `Source/Packages/MakerAI.dpk` — Runtime core (~100 units)
  720. 2. `Source/Packages/MakerAi.RAG.Drivers.dpk` — database back-ends via FireDAC: PostgreSQL/pgvector, SQL Server and SQLite for RAG, graph RAG on PostgreSQL, DB checkpoints for agents, and `TAiMemory`
  721. 3. `Source/Packages/MakerAi.UI.dpk` — FMX visual components (requires Skia)
  722. 4. `Source/Packages/MakerAiDsg.dpk` — Design-time editors (requires VCL + DesignIDE)
  723. Open `Source/Packages/MakerAiGrp.groupproj` to compile all packages at once.
  724. ### API Keys
  725. API keys are resolved from environment variables using the `@VAR_NAME` convention. On `TAiChatConnection` the key goes through `Params` (it has no `ApiKey` property); direct drivers (`TAiOpenChat`, `TAiClaudeChat`...) and `TAiEmbeddingConnection` do have an `ApiKey` property:
  726. ```pascal
  727. AiConn.Params.Values['ApiKey'] := '@OPENAI_API_KEY'; // reads OPENAI_API_KEY from environment
  728. AiConn.Params.Values['ApiKey'] := '@CLAUDE_API_KEY'; // reads CLAUDE_API_KEY
  729. AiConn.Params.Values['ApiKey'] := '@GEMINI_API_KEY'; // reads GEMINI_API_KEY
  730. AiConn.Params.Values['ApiKey'] := '@GROK_API_KEY'; // reads GROK_API_KEY (xAI chat and Grok Voice)
  731. AiConn.Params.Values['ApiKey'] := 'sk-...'; // or set a literal key directly
  732. ```
  733. ### Delphi Version Compatibility
  734. | Delphi Version | Support |
  735. |----------------|---------|
  736. | 10.4 Sydney | Limited (minimum supported) |
  737. | 11 Alexandria | **Full support** |
  738. | 12 Athens | **Full support** |
  739. | 13 Florence | **Full support** |
  740. | 13.1 Florence | **Full support** (latest tested) |
  741. ---
  742. ## 🗂️ Demo Projects
  743. Open `Demos/DemosVersion31.groupproj` to access all demos.
  744. | Demo | Description |
  745. |------|-------------|
  746. | `010-Minimalchat` | Minimal chat with Ollama and TAiChatConnection |
  747. | `012-ChatAllFunctions` | Full-featured multimodal chat (images, audio, streaming, tools) |
  748. | `012-ChatWebList` | Chat with web-based content list |
  749. | `021-RAG+Postgres-UpdateDB` | Build a vector RAG database with PostgreSQL/pgvector |
  750. | `022-1-RAG_SQLite` | Lightweight vector RAG with SQLite |
  751. | `023-RAGVQL` | VQL query language for semantic search |
  752. | `025-RAGGraph` | Knowledge graph RAG with GQL queries |
  753. | `026-RAGGraph-Basic` | Simplified graph RAG patterns |
  754. | `027-DocumentManager` | Document ingestion and management |
  755. | `031-MCPServer` | Multi-protocol MCP server (HTTP, SSE, StdIO) |
  756. | `032-MCP_StdIO_FileManager` | File manager exposed via MCP StdIO |
  757. | `032-MCPServerDataSnap` | MCP server using DataSnap transport |
  758. | `034-MCPServer_Http_FileManager` | File manager via MCP HTTP |
  759. | `035-MCPServerWithTAiFunctions` | TAiFunctions bridge to MCP |
  760. | `036-MCPServerStdIO_AiFunction` | StdIO MCP server with AI functions |
  761. | `041-GeminiVeo` | Video generation with Google Veo |
  762. | `051-AgentDemo` | Visual agent graph builder and runner |
  763. | `052-AgentConsole` | Console-based agent execution (conditional and parallel flows) |
  764. | `053-DemoAgentesTools` | Agents with integrated tool use |
  765. | `054-AgentCheckpointDB` | Durable agent execution: suspend/resume with `TAiDatabaseCheckpointer` (SQLite via FireDAC) |
  766. | `060-AIChatUI` | Next-generation `TAIChatView` + `TAIChatInput` components — full multimodal demo |
  767. | `072-A2AFederation` | Agent federation over the A2A 1.0 protocol: expose a graph as an A2A agent, consume it, and delegate a local node to a remote agent (no LLM required; `--otel` for tracing) |
  768. | `077-RagPostgresConsole` | Headless vector RAG on PostgreSQL + pgvector with local Ollama embeddings — no API key. Runs on Windows and Linux64 |
  769. | `082-ComputerUsePassthru` | Who executes a `computer_call`: delegated to a remote client, missing tool, or local. Self-verifying with an exit code; never touches the screen |
  770. | `083-ComputerUseLinux` | Computer Use on Linux/X11 over Xvfb — the headless counterpart of `066` |
  771. | `084-JevRouter` … `088-JevModelRouter` | Jev (TypeSafe AI): agent routing, SmartDispatch and guardrails, evals and RAG reranking, bulk labeling, model routing. Need `TYPESAFE_API_KEY` |
  772. | `089-QwenShowcase` | Everything Qwen (Alibaba Model Studio) with one key: chat, vision, image editing, voice, translation, embeddings + rerank, realtime |
  773. | `091-Skills` | SKILL.md skills three ways: on demand in a chat (`TAiSkills`), as the base of an agent node (`TAiSkill`), copied into the prompt (`TAiPrompts.ApplySkill`) |
  774. ---
  775. ## 🔄 Changelog
  776. ### v3.9.0 (2026-10-05)
  777. - Changed: **the PPM registry moved to `https://registry.cimamaker.com`** — new default in `TAiFunctions` (AutoMCP, PPM search), `TAiPrompts`, `TAiSkill`, the SKILL.md client and the demos. Code that sets `registry.pascalai.org` explicitly keeps working while that host stays up
  778. - ⚠️ Fix: **the OpenAI Responses driver never sent `max_output_tokens`** — `Max_Tokens` was silently ignored in the whole driver. `response.incomplete` now closes the stream with its finish reason, and `response.failed` / stream `error` events end the turn through the error path instead of leaving the caller waiting for its timeout
  779. - Fix: **parallel `tools/call` on a shared `TMCPClientSSE` lost responses** (a call waited 180 s and came back empty) — two races on the request id
  780. - New: **`TAiMCPServer.BindAddress`** (or the `MCP_BIND_ADDRESS` environment variable) binds SSE/HTTP MCP servers to one local IP; they always listened on 0.0.0.0
  781. - Fix: **Grok** — `reasoning_effort` reaches the grok-4 models and streaming returns usage (it came back as zeros)
  782. - Fix: `EnforceStrictSchema` crashed on JSON Schema union types (`"type": ["integer", "string"]`); Claude `code_execution` files keep their real names
  783. - New: **palette icons for every component** — 76 were missing (A2A, bridges, realtime, Jev, Qwen, GLM, Cohere, llama.cpp, tools, embeddings…), and the `MakerAi.UI` and `MakerAi.RAG.Drivers` packages had none because only `MakerAI` linked a resource. Each package now links its own `.res`. Generator and category sheet in `Source/Resources/`
  784. - Fix: **debug logs wrote to `C:\Temp` unconditionally** — the SChannel TLS transport (`schannel_diag.txt`), the Gemini Veo upload (`responses.txt`, which also leaked a stream) and the MakerAI realtime driver; the MCP client shutdown log did so in every Debug build. All off by default (opt-in: `MAKERAI_SCHANNEL_DIAG`, `MAKERAI_MCP_SHUTDOWN_LOG`). `MakerAiGrp.groupproj` now builds in the documented order and demo 059 lost an absolute `E:` path. Reported in #130
  785. - Fix: **`TAiMemory.Delete`, `Link` and `Unlink` return `Boolean`** — after the namespace isolation of 3.8 an operation on a foreign id does nothing, but the `memory_delete` / `memory_link` MCP tools still answered "deleted"/"linked". They now return `False` (existing calls still compile) and the tools answer `not_found`. `IAiMemoryStorage` is unchanged
  786. - New: **`TAiOpenAiLiveChat` — OpenAI GPT-Live** (`gpt-live-1`, DriverName `OpenAiLive`), full-duplex voice: it listens while it speaks and delegates reasoning. By default to a Responses model run by OpenAI, with web search and your `TAiFunctions` executed locally; or, assigning `DelegateChat`, to **any `TAiChatConnection`** (Claude, Ollama, an agent graph, RAG) — the driver builds the task from the transcript and speaks the answer back. Turns are rebuilt from the session timeline, so overlapping speech no longer splits answers. Tested live: conversation, interruptions, a 2-minute story, local function (≈ 2 s delegation round trip) and `DelegateChat` (≈ 4.9 s). Demo `092-GPTLiveVoice` (FMX: microphone, speaker, delegation mode, local functions, anti-echo speaker mode)
  787. - New: **Jev decisions on local models through Ollama 0.35+** (`/v1/systemone`: `nimble`, `tev1`, Cloudflare's `clef`/`clef-flash`). `TAiJev` works as is with `Url := 'http://localhost:11434/v1/'`; the eight Jev adapters gained a `Url` property (keeping parallelism in the RAG reranker and the batch labeler), `TAiJev.Ask` accepts images for Clef (PNG/JPEG/WebP, validated by their bytes), and the TypeSafe default price is no longer charged on other servers. Tested live with `nimble` (routing, prompt guard and parallel batch labeling, at zero cost) and with `clef` 27B on images (PNG/JPEG/WebP and a control chart told apart at 0.99). `clef-flash` fails in Ollama 0.35.1 itself (ollama#18769); `clef` needs a smaller context (`num_ctx 4096`) to fit in 24 GB of VRAM
  788. - ⚠️ Behaviour change: **`TAiOpenAiAudio` and `TAiOpenAiSpeechTool` default to `gpt-transcribe` and `gpt-4o-mini-tts`** (before `whisper-1` and `tts-1`, which OpenAI shuts down on 2027-02-26 and 2027-01-06). Forms that kept the default switch automatically. `gpt-transcribe` returns JSON only: srt/vtt/verbose_json, timestamps and logprobs downgrade and are reported in `TTranscriptionResult.Warning` — set `TranscriptionModel := tmWhisper1` to keep them until the shutdown. `gpt-4o-mini-tts` is also deprecated (no replacement on `/audio/speech` yet) but sounds better and supports `TTSInstructions`. Tested live (speech → transcription round trip). `TAIWhisper` is unchanged
  789. - ⚠️ Fix: **an MCP server grew in memory with every `tools/list`** — the schema of each tool was cloned and the original leaked (~32 blocks per request), since a June change. `IAiMCPTool.GetInputSchema` now documents what both implementations already did: it returns a new object the caller owns. Custom `IAiMCPTool` implementations must not return a cached field
  790. - Fix: **the MCP client leaked the `tools/list` response on every `Initialize`** (HTTP and base transports), and `TAiRealtimeFactory` never freed its driver dictionary — both reported as leaks when closing an app with MCP or realtime. Regression case `mcp.initialize.no-leak`
  791. - New: **demo 037 (MCP RAG server) runs on PostgreSQL + pgvector** (`Driver=postgres` in its ini; values starting with `@` are read from the environment, e.g. `Password=@PGPASSWORD`). Tested at runtime; SQL Server 2025 stays the default. **Demo 092** consumes it by voice through MCP, with a read-only `TAiGuardrails` policy, and gained a quick guide of example questions
  792. - Fix: **`TAiOpenAiAudio.Transcribe` left the raw JSON in `Text`** when the model could not honour the requested format — e.g. `gpt-transcribe` with `trfText`, or a `gpt-4o` model with `trfSrt`/`trfVtt`: the request was downgraded to `json` but the response was parsed as plain text. It is now parsed with the format actually requested. New **`TTranscriptionResult.Warning`**: one line per thing that was requested but not honoured (format downgraded, timestamps, logprobs or known speakers ignored by the model) and a deprecation notice for the old models
  793. - Deprecated (OpenAI): **`whisper-1`, `gpt-4o-transcribe`, `gpt-4o-mini-transcribe` and `gpt-4o-transcribe-diarize`** shut down on 2027-02-26, and **`tts-1`, `tts-1-hd` and `gpt-4o-mini-tts`** on 2027-01-06. Their replacements have no srt/vtt/verbose_json, timestamps, logprobs, diarization or translation to English, so those features (and `TAiOpenAiAudio.TranslateToEnglish`) end on that date. Marked in the enums, the catalog and the docs; defaults are unchanged for now. Realtime docs and demos no longer use the retired `gpt-4o-realtime-preview`
  794. ### v3.8.0 (2026-09-29)
  795. - ⚠️ Fix: **a forced `tool_choice` looped forever** — `required` (or a named function) was re-sent on every round, including the one that returns tool results, so the model had to call a tool again each time: measured on `claude-sonnet-5`, 231 requests until killed. `TAiChat.Tool_choice` now reads `auto` in follow-up rounds, which fixes every driver at once. **Behaviour change**: forcing applies to the first call of a turn only
  796. - Fix: **`TAiOpenChat` dropped on a form used `gpt-5`**, not the documented default — the base constructor set `gpt-5` and the driver only assigned its own default when the model was empty. The OpenAI default is now **`gpt-6-sol`** (the successor of `gpt-5.1` at the same price point) for both the component and `TAiChatConnection`; `gpt-6-sol` and `gpt-6-luna` registered. `TAiMakerAiChat`, which inherits from it, now defaults to `mk-gpt-oss-20b` like its connection. GPT-6 rejects effort `minimal`; it is sent as `low`. Tested live
  797. - New: **Claude Opus 5.5, Sonnet 5.5 and Fable 5.1** registered. They reject forced tool use with a 400: the driver sends `auto` instead. `tlXHigh`/`tlMax` now reach Claude as `xhigh`/`max`. `claude-opus-4-1`, retired on 2026-08-05, is now an alias of `claude-opus-5-5`. Tested live. The default stays `claude-haiku-4-5` (still the current Haiku)
  798. - Fix: **Gemini defaults pointed to models new accounts cannot use** — `gemini-2.5-flash` (driver default) is restricted to accounts that already used the 2.5 family, and the transcription and web-search tools defaulted to `gemini-2.0-flash`, shut down on 2026-06-01. The driver, `TAiGeminiWebSearchTool` and transcription now default to **`gemini-3.8-flash`**, and `TAiGeminiSpeechTool` TTS to **`gemini-3.8-flash-tts`**. `gemini-3.8-flash`, `gemini-3.7-flash` and both 3.8 TTS models registered; `gemini-3-pro-preview` and the three `imagen-4.0-*` (shut down) became aliases of their successors. Sampling is now omitted by **version** (3.5 and later) instead of a name list, which missed 3.7/3.8, and the new effort levels map to what Gemini 3 accepts (`minimal` is rejected by 3.7/3.8). *Checked against the official docs; not runtime-tested (no API key).* Forms saved with the old model keep it
  799. - ⚠️ Fix (security): **`TAiMemory` enforced namespaces only in searches** — `Get`, `Update`, `Delete`, `Link` and `Unlink` addressed memories by id alone, and ids are sequential, so an agent could read, change or delete another namespace's memories by guessing one, including through the `memory_delete` / `memory_link` MCP tools. `ImportFromJSON` also honoured the `namespace` of the JSON. Every id-based operation now requires the active namespace (a foreign id behaves like a missing one) and imports land in the active namespace. **Breaking for custom storages**: the id-based methods of `IAiMemoryStorage` take the namespace. Reported responsibly in #127
  800. - New: **Skills in SKILL.md format** — one parser for the whole framework (`uMakerAi.Skills.Format`, with a read-only PPM registry client: semver version resolution, `skill-` prefix fallback, clear errors on a missing package, a non-skill package or an HTML page). **`TAiSkills`** gives any chat with function calling on-demand skills: the model sees a catalog in `use_skill` and loads the instructions it needs; folder skills ship supporting files read with `read_skill_file`, confined to the skill folder. Live 9/9 on OpenAI, Claude and Groq. Guide: `Docs/Version 3/uMakerAi-Skills.EN.md`, demo `091-Skills`
  801. - Fix: **`TAiSkill.FromPPM` never worked** — it requested a URL that returns the website's HTML and a JSON format no package publishes. It now downloads the real SKILL.md; new `FromFolder` / `FromSkillFile`, the JSON format still works for local files, and a SKILL.md never supplies an API key
  802. - ⚠️ Fix: **`TLLMNode` ignored its skill's driver** — the constructor's `DriverName := 'Claude'` always won, and applying the skill before the node lost the skill's model and key whenever the driver changed. New `ResolveConfig` / `ConfigureChat`: driver node → skill → Claude, the skill's model only if it belongs to that driver, skill prompt followed by the node's. `DriverName` now defaults to `''` (no change without a skill)
  803. - New: **`TAiPrompts` local skills** — `LoadSkillFromFile`, `LoadSkillsFromFolder`, `ApplySkill` (into any `SystemPrompt`) and `SkillDescription`
  804. - New: **Jev (TypeSafe AI)** — `TAiJev` for calibrated typed decisions (Choice / Score / Noul) and adapters for agent routing (`TAiJevRouterTool`), SmartDispatch (`TAiJevDispatchClassifier`), tool-call and input guardrails (`TAiJevGuardrailClassifier`, `TAiJevPromptGuard`), eval scoring (`TAiJevEvalScorer`), RAG reranking with injection filtering (`TAiJevRAGReranker`), bulk labeling (`TAiJevBatchLabeler`) and model routing (`TAiJevModelRouter`), with usage metering for billing. New provider-neutral hooks: `ChatTools.DispatchClassifier`, `ChatTools.PromptGuard`, `TAiGuardrails.Classifier`, `TAiEvalRunner.Scorer`, `TAiRAGVector.Reranker`. Demos 084–088
  805. - New: **`TAiThinkingLevel` covers the full effort ladder** (`none`/`minimal`/`low`/`medium`/`high`/`xhigh`/`max`, the historical values unchanged) — `xhigh`/`max` on `gpt-6-astra` silently fell back to the default. Also **async tool calling** (`TFunctionActionItem.IsAsync`)
  806. - New: **`gpt-image-2.5` flare/sunburst** (`iqXHigh` / `iqMax` quality, real alpha transparency), `TAiDalle.ModelName` for OpenAI-compatible services that serve a named checkpoint, and `EAiDalleHTTPError` with `StatusCode` and `RetryAfter`
  807. - Fix: **`deepseek-flash` billed reasoning with `ModelCaps=[]`** — the thinking gate only matched `deepseek-v4*`, so the canonical name let the API default (thinking on) through
  808. - Fix: **`TOpenSSLTransport` never sent SNI** — `SSL_set_tlsext_host_name` is a macro, not an export, so no host behind a CDN could be reached (alert 40). Now through `SSL_ctrl`
  809. - Fix: **`TMCPClientSSE` destructor spun forever** on an empty queue after shutdown, burning a core
  810. - Fix: `TAiVoiceMonitor` compiles outside Windows (Linux64, Android)
  811. - Docs: `Source/Memory` added to the Library Paths list — packages compile without it, but an app using `TAiMemory` did not
  812. - ⚠️ Behaviour change: **a connection with `DriverName` but no `Model` now gets its default model's catalog parameters** — the registry only applied per-model settings when `Model` was set, so the default model ran without them (Qwen without vision, Groq without reasoning or code interpreter and with an 8192 token limit, Gemini without audio/PDF/search; 9 of 15 drivers differed). An empty `Model` now behaves exactly like setting the driver's default model explicitly. `Model` itself stays empty, so nothing changes in forms
  813. - New: **`TAiRealtimeConnection.DriverParams`** — driver-specific properties (`Voice`, `Instructions`, `TargetLanguage`, `ReasoningEffort`, `Keyterms`...) set through the universal connector as `Property=Value` lines, applied by RTTI on driver creation and on `Connect`. Previously only the base properties reached the driver. Unknown keys are reported through `OnError` (`driver_param`) on connect
  814. - Fix: **asynchronous answers arrived duplicated in `OnReceiveDataEnd`** (`'Done'#13#10'Done'`) in every driver on the shared streaming parser — the end-of-stream message re-added the accumulated text. `TAiDeepSeekChat` has its own copy of the parser and got the same fix
  815. - Fix: **Groq `executed_tools` were ignored when streaming** — `gpt-oss` sends them inside `choices[0].delta`, two chunks per tool with the same `index`; the parser only read the top-level field of the retired `groq/compound`. Files generated in the code-interpreter sandbox now arrive in asynchronous mode too
  816. - Fix: **Groq catalog** — the retired `llama-3.1-8b-instant` (driver default) and `llama-3.3-70b-versatile` are now aliases of `openai/gpt-oss-20b` / `gpt-oss-120b`, the new default is `gpt-oss-20b`, `groq/compound` and `compound-mini` removed, `qwen/qwen3.6-27b` token limit fixed (16384) and `qwen/qwen3.8-27b` added. Demo 014 runs Groq's code interpreter on `gpt-oss-20b` (`--groq`)
  817. - Fix: **`Invalid pointer operation` when freeing a chat right after `OnReceiveDataEnd` in asynchronous mode** — the final event fires before the HTTP client closes the request, and closing it (on the HTTP thread) frees the request stream the destructor was freeing at the same time. Intermittent, and it reached `OnError`. The destructor now waits for the request to close (bounded), through a fixed layer between the HTTP client and the drivers' virtual handlers, so every driver is covered. No wait when nothing is in flight
  818. - Fix: **audio-to-text bridge fired `OnReceiveDataEnd` with the raw transcript** before the model's answer (Cohere, Groq, Mistral, OpenAI) when a text model received audio in conversation mode. Outside `cmTranscription` the transcript is now only input for the model
  819. - Fix: **`Voice_Format` was silently ignored** — the OpenAI TTS catalog entry and demo 012 use that key, but the property is `TtsParams.VoiceFormat`. Accepted as an alias now
  820. - Fix: **OpenAI and Mistral embeddings leaked the request JSON on every successful call** (the variable was reused for the response). Measured: +62 KB over 40 calls before, +176 bytes after. `TAiQwenEmbeddings` inherited it
  821. - New: **Qwen driver** (`TAiQwenChat`, Alibaba Model Studio / DashScope, OpenAI-compatible). Always sends `enable_thinking` (the API thinks by default on hybrid models), `ThinkingLevel` → `thinking_budget`, `qwq-plus` registered async (it answers empty without streaming), open-weight models only think when streaming. Runtime-tested: sync, async, reasoning on/off, tools (sync and streaming), vision, qwq-plus. Also image generation and editing (1–3 attached images, aspect ratio preserved), video with Wan (text, image or first/last frame; 720p by default), three realtime drivers (voice conversation, live STT, simultaneous translation; new unit, no change to the realtime module) plus `TAiQwenRealtimeTTS` for streaming text-to-speech, text translation with `qwen-mt` (glossary, domain, streaming fixed for the models that resend the accumulated text), custom voices (`TAiQwenVoices`: clone, design, list, delete), TTS and transcription through the capability gap, native audio input on omni models (the API needs a data URI, the driver rewrites it), `TAiQwenEmbeddings` and `TAiQwenRAGReranker` (`qwen3-rerank`, batched above 500 passages). Twelve new offline regression cases
  822. - Fix: **`TAiChatConnection` did not pass media sub-parameters edited in place** — `C.VideoParams.Params.Values['duration'] := '3'`, `C.TtsParams.Voice := ...` or `C.ImageParams.Params.Values['size'] := ...` after the chat existed changed only the connection's copy; they reached the driver only when the whole object was assigned or `Params` changed. Affected every driver. They are now copied on each `Run` / `AddMessageAndRun`. Found when a 3 s Wan video came back at 5 s
  823. - New: **Computer Use on Linux** — `TAiLinuxExecutor` (X11 via xdotool + scrot) covers the 19 canonical actions with the same public interface as the Windows and macOS executors. The framework needed no change: `TAiComputerUseTool` only uses the RTL and delegates through its two events, so it cross-compiled to Linux64 untouched. Runtime-tested on Xvfb with `gpt-6-astra` and `claude-opus-4-8` against a text editor and Chrome. Demo `083-ComputerUseLinux`, plus a repeatable setup script for a headless VPS
  824. - New: **Computer Use delegation** — OpenAI and Gemini now honour the framework contract (fill `ToolCall.Response` from `OnCallToolFunction` and the driver does not execute locally), which is what lets a headless broker forward the call to a remote client. OpenAI ignored `Response` and executed anyway; Gemini never fired the event at all. For OpenAI the delegation is atomic over the batch, since `gpt-6-astra` sends an array of actions that admits exactly one `computer_call_output`. Without a `TAiComputerUseTool` assigned the synchronous path used to emit an output with no `image_url`, which the API rejects with 400; it now ends the turn and reports through `LastError`. Demo `082-ComputerUsePassthru`
  825. - Fix: **Claude sends coordinates as an array *and* as a string containing one, within the same turn** — `"coordinate": [299, 282]` in the first calls, `"coordinate": "[299, 400]"` later. `TryGetValue<TJSONArray>` does not match the second form, so the coordinate was lost and the action fell back to (0,0): a click in the screen corner, after which the model retried until the turn ran out. Affected `coordinate`, `start_coordinate`, `region` (zoom) and numeric fields (`"duration": "1"`), i.e. click, double/triple click, drag and zoom. Not a Linux issue — it hit Windows and macOS just the same
  826. - Fix: **`TAiGeminiChat` executed no user functions** — `DoCallFunction` had its `inherited` commented out and answered `'Command <name> not found'` to every non-Computer-Use tool call, and it is the driver's only dispatch point. Neither `AiFunctions` nor `OnCallToolFunction` ever ran. Present since before v3.3. **Behaviour change**: those tools now execute
  827. - Fix (security): **`TOpenSSLTransport` did not validate the server certificate** — it ran with `SSL_VERIFY_NONE`, and that is the transport the Realtime module uses on Linux and macOS. Now verifies the chain (system CA store) **and the hostname** via `SSL_set1_host`; `SSL_VERIFY_PEER` on its own checks the chain but not that the certificate was issued for the host you dialed, which is the classic half-done validation. Failures carry the `X509_V` code. Verified against badssl.com 7/7 (self-signed 18, expired 10, untrusted root 19, **hostname mismatch 62**). **Breaking**: self-signed endpoints need `InsecureSkipVerify := True`
  828. - Fix: **`TAiShell` died on the first command on any non-English Windows** — output was decoded with `TEncoding.UTF8.GetString`, which validates and raises `EEncodingError`, while `cmd.exe` writes in the console OEM codepage (cp850 on a Spanish Windows) and even its banner carries accents. Invisible in English and on Linux. Also: stderr was dropped when the sentinel arrived in the same read (a failing command reported nothing), and a timeout left the session unusable for the life of the process (the `Restart` was written but commented out). Documented that `TimeOut` is an *inactivity* timeout, not a total one
  829. - Fix: **`otel.scope.version` was hardcoded to `3.5`** with the framework on 3.7 — every span lied about which version produced it. Found while looking at the traces in a real Jaeger for the first time, which also confirmed that the trace **crosses the A2A boundary** (client and server spans share a trace, so `traceparent` propagation through `_meta` works)
  830. - Fix: **demos `031-MCPServer` and `077-RagPostgresConsole` now build and run on Linux64**. `031` called the Windows API from the body of its `system_info` tool, which took the whole MCP server down outside Windows; `077` needed `FireDAC.ConsoleUI.Wait` and assumed its catalogue tables already existed. Verified end to end on Ubuntu 26.04 — which also makes **FireDAC on Linux a tested path** (PostgreSQL 18.6 + pgvector 0.8.1 through `libpq.so.5`)
  831. - Docs: the Realtime module needs `CheckSynchronize` in console apps and services — every event is dispatched with `TThread.Queue(nil, ...)`, so without a message loop **no event ever fires**, not even `OnError`, while the WebSocket connects and the audio is sent
  832. ### v3.7.0 (2026-09-10)
  833. - Fix: **Claude Computer Use was broken, not merely outdated** — the driver still declared `computer_20251124`, a tool type the Anthropic API now rejects for *every* model (`does not match any of the expected tags`). Updated to **`computer_toolset_20260801`**, which changed shape as well as date: it is a *toolset* entry taking **no parameters** at all (no `name`, no `display_width_px`/`display_height_px`, no `enable_zoom` — the API answers *"Extra inputs are not permitted"*) and it needs no beta header. Structurally the single `computer` tool with an `action` discriminator was exploded into **17 individually named tools** (`left_click`, `right_click`, `middle_click`, `double_click`, `triple_click`, `left_click_drag`, `left_mouse_down`, `left_mouse_up`, `mouse_move`, `cursor_position`, `key`, `hold_key`, `type`, `scroll`, `wait`, `screenshot`, `zoom`), so dispatch now goes by `tool_use.name`; Claude emits several of them per turn. Coordinates arrive as **pixels of the submitted screenshot**. Supported only on `claude-opus-4-8`, `claude-opus-5`, `claude-sonnet-5` and `claude-fable-5` — every older model lost computer use entirely. Also removed `TAiClaudeChat.TranslateClaudeComputerArgs`, dead private code that had silently diverged from the live translator
  834. - New: **OpenAI Computer Use — `gpt-6-astra`** — the Responses API tool `{"type":"computer"}` (no parameters; it replaces `computer_use_preview`, whose dedicated model was shut down on 2026-07-23 and which astra rejects). Unlike Claude and Gemini, astra sends a **batch**: one `computer_call` carrying an `actions` array (e.g. `keypress[WIN,r]` → `type "notepad"` → `keypress[ENTER]`). The driver runs them in order and answers with a **single** `computer_call_output` holding the final screenshot, which is what the API expects per `call_id` — and as a side effect avoids the screenshot amplification the per-action providers suffer. Implemented on **both** the synchronous and the streaming paths, including history serialisation of `computer_call` / `computer_call_output`. New `TAiComputerUseTool.TranslateOpenAIToolCall` keeps the canonical action model in the tool, next to the Claude translator. Runtime-tested end-to-end (screenshot → click → type → screenshot, against a real desktop)
  835. - Fix: **agentic loop stalled after the first Computer Use step (OpenAI)** — the synchronous continuation condition was `(last message is 'tool') and (FLastContent = '')`, written for shell/patch calls, which never emit commentary. astra *does* emit text (`phase:'commentary'`) in the same turn as the `computer_call`, so `FLastContent` was never empty and the loop stopped after one action. Recursion is now forced when a computer call was processed
  836. - New: **`gpt-6-astra` registered** — 1.05M context (272K before surcharge), 128K output, vision + reasoning + tools. Note: astra accepts `xhigh` and `max` reasoning efforts, which `TAiThinkingLevel` (`tlDefault`/`tlLow`/`tlMedium`/`tlHigh`) cannot yet express — capped at `tlHigh`
  837. - Update: **demo `066-ComputerUseTest`** — third provider option (`OpenAI (gpt-6-astra)`), command-line startup (`-provider=`, `-prompt=`, `-autorun`) and a `run.log` next to the executable, so the loop can be exercised without touching the GUI
  838. - New: **GLM driver (Zhipu AI / Z.ai)** — `TAiGLMChat` (`DriverName='GLM'`, `@GLM_API_KEY`), OpenAI-compatible endpoint `https://api.z.ai/api/paas/v4/` (mainland China via the `URL` property). The API ships with thinking ON by default — the driver controls it explicitly (`cap_Reasoning` → `thinking:{enabled}`, disabled otherwise; `glm-5.3` uses forced thinking and is always sent enabled); `reasoning_effort` (`low`/`high`/`max`) sent on glm-5.2/5.3 per `ThinkingLevel`; `reasoning_content` captured in parse and streaming and re-sent in multi-turn history (required by Z.ai). Registered models: `glm-4.7` (driver default), `glm-4.7-flash` (**free**), `glm-4.7-flashx`, `glm-5.3`/`glm-5.2`/`glm-5.1`/`glm-5` (reasoning), `glm-5-turbo`, and vision `glm-5v-turbo`/`glm-4.6v` (native tool calling)/`glm-4.6v-flash` (**free**)/`glm-4.6v-flashx`/`glm-4.5v` (no tools, 16K output). Sampling clamped to the Z.ai ranges (temperature [0,1], top_p [0.01,1], max_tokens ≤131072); `tool_choice` supports only `auto`. Capabilities verified against the official docs; *not runtime-tested yet*
  839. ### v3.6.0 (2026-08-02)
  840. - New: **Regression suite — `Tests/RegressionSuite/`** — the framework finally has an automated safety net: 17 cases covering MCP dual-era + MRTR, agent graphs, A2A 1.0 + federation, guardrails and the evals runner itself. Fully in-process (spins up its own MCP and A2A servers, plus a legacy-only MCP server to exercise the dual-era fallback), no API keys, runs in under a second. Built **on `TAiEvalRunner`**, so it doubles as the canonical usage example. `--json` writes a CI-friendly report; `--otel` traces every case as an `eval.case` span
  841. - New: **Guardrails — `TAiGuardrails`** — policy layer that intercepts every tool call *before* execution (the single choke point in `TAiFunctions.DoCallFunction`, so it covers local functions, MCP tools and AutoMCP alike). Strict allowlist and blocklist with wildcard masks, forbidden substring patterns in tool arguments, and a programmatic `OnCheckToolCall` veto; blocked calls never execute and the LLM receives the reason as a JSON error so it can replan. `OnBlocked` for auditing, `BlockedCount` for metrics, and a `guardrail.blocked` span attribute. Assign via `TAiFunctions.Guardrails` (opt-in, zero impact when unassigned)
  842. - New: **Evals — `TAiEvalRunner`** — lightweight evaluation framework for AI pipelines: fluent test cases (`AddCase('x').Input(...).ExpectContains(...).ExpectRegex(...).ExpectMaxLength(...)`) run against a generic target function, so the same suite can evaluate a `TAiChat`, an agent graph, an MCP tool or an A2A agent. Deterministic checks plus optional **LLM-as-judge** (`ExpectJudge('criteria')` with a `Judge` chat). Reports offer `ToText` for consoles and `ToJSON` for CI, and each case emits an `eval.case` OTel span
  843. - New: **A2A protocol (Agent-to-Agent, Linux Foundation) — MVP** — first Delphi implementation of the A2A 1.0 spec: `TAiA2AServer` exposes any `TAIAgentManager` graph as an A2A agent (Agent Card at `/.well-known/agent-card.json`, JSON-RPC `SendMessage`/`GetTask`/`CancelTask` with 0.x method aliases; graph suspension maps to `TASK_STATE_INPUT_REQUIRED` for human-in-the-loop) and `TAiA2AClient` consumes remote A2A agents (`FetchAgentCard`, `SendText`, task lifecycle). No streaming/push yet (declared `false` per spec, `UnsupportedOperationError` on streaming calls). OTel spans `a2a.client`/`a2a.server` included. **Agent federation**: `TAiA2ARemoteAgentTool` lets any graph node delegate its input to a remote A2A agent (assign it as the node's `Tool`). Runtime-tested e2e (card + SendMessage → COMPLETED + GetTask, plus a local graph federating to a remote A2A graph)
  844. - New: **OpenTelemetry tracing — `TAiTelemetry`** (observability phase 1) — opt-in OTLP/HTTP JSON exporter (standard collector endpoint `localhost:4318`; works with Jaeger, Grafana Tempo, Langfuse, Arize Phoenix). Spans follow the OpenTelemetry **GenAI semantic conventions**: chat turns (`chat <model>` with `gen_ai.request.model`, `gen_ai.system`, `gen_ai.usage.input/output_tokens`, sync and async), tool executions (`execute_tool <name>`), agent graphs (`agent.graph` + `agent.node <name>` nested across pool threads via explicit trace context), RAG retrieval (`rag.search` with top-K/results/hybrid flags), and MCP client/server requests — with W3C `traceparent` propagated through MCP `_meta` (spec 2026-07-28 convention) so client and server processes share one distributed trace. Zero overhead when no `TAiTelemetry` instance is enabled. Demo 031 gains an `--otel` flag. Runtime-tested end-to-end (27 spans, cross-process trace propagation, live OpenAI chat span with token usage)
  845. - New: **MCP spec 2026-07-28 (stateless) — dual-era support** — the server implements `server/discover`, per-request `_meta` (protocol version, client identity, capabilities), `resultType` + `serverInfo` on every result, `ttlMs`/`cacheScope` cache hints on list results, and the reserved error codes `-32020` (HeaderMismatch) / `-32022` (UnsupportedProtocolVersion with `data.supported`). Modern stateless requests bypass the session gate with per-request `OnClientConnect` vetting; the legacy `initialize` handshake + `Mcp-Session-Id` gating remain fully functional
  846. - New: **MCP client dual-era probe** — `TMCPClientStdIo` / `TMCPClientHttp` try `server/discover` and fall back to the legacy handshake automatically (`NegotiatedProtocol` exposes the result); modern requests carry `_meta` plus the `MCP-Protocol-Version` / `Mcp-Method` / `Mcp-Name` headers; the StdIO reader now rescues JSON-RPC embedded in noisy stdout lines
  847. - New: **MRTR (Multi Round-Trip Requests)** — tools can request user input via elicitation: the server plumbs `params.inputResponses` / `params.requestState` into `TAiAuthContext`; the client's new `OnInputRequired` event drives the retry loop (max 3 rounds, opaque `requestState` echo; assigning the handler declares the `elicitation` capability). New demo tool `confirm_demo` in `031-MCPServer`
  848. - Update: MCP spec alignment — deterministic `tools/list` / `resources/list` ordering (client caching + LLM prompt-cache friendly); unknown tool/resource now returns `-32602` Invalid Params; the 031 demo sends banners to stderr in stdio mode (stdout is protocol-only)
  849. - Note: the legacy **HTTP+SSE transport is formally Deprecated** by MCP spec 2026-07-28 (earliest removal from the spec: **July 2027**, 12-month minimum window); MakerAI keeps it as frozen legacy — prefer HTTP or StdIO for new work
  850. ### v3.5.0 (2026-08-01)
  851. - New: **Typed ModelConfig channel** — `ModelCaps`/`SessionCaps`/`Tool_Active`/`ThinkingLevel` moved out of Params/RTTI into a typed surface with per-field user pins (`UserFields`) and transparent compatibility migration
  852. - New: **MSSQL driver for RAG Vector** (FireDAC SQL Server)
  853. - New: **Agents hardening** — strict JSON graph validation, public RTTI mapper `TAiToolParams`, `[TSecret]` attribute, `out_failure` in conditional mode, `Compile` no longer clears the Blackboard
  854. - New: **ChatTools single surface** with `OnChange` propagation; `ToolCall.ResMsg` available in streaming; media delivered at `OnReceiveDataEnd`
  855. - Fix: **`LastError` now populated on every error path** — `DoError` assigns `FLastError`, so synchronous callers can diagnose HTTP 4xx/5xx (previously empty string with no exception)
  856. - New: **Grok video generation** — `TAiGrokChat.InternalRunNativeVideoGeneration` implements the grok-imagine async video job (`POST /videos/generations` + polling + mp4 download as `TAiMediaFile`), with new `VideoDurationSeconds` property; activated via `cmVideoGeneration` or the `[cap_GenVideo]` gap. Runtime-tested (image generation also verified live)
  857. - New: **xAI Grok Aug 2026** — full catalog turnover: `grok-4.3` (new driver default, 1M ctx, vision + always-on reasoning), `grok-4.5` (premium), `grok-build-0.1` (coding), `grok-imagine-image-quality` and `grok-imagine-video-1.5` registered; entire grok-3/grok-4-fast/4.1 families and grok-2 models retired with compatibility aliases (`grok-3`→`grok-4.3`, etc.). Runtime-tested 6/6
  858. - New: **Groq Aug 2026** — `qwen/qwen3.6-27b` registered (replaces retired `qwen3-32b`, alias kept) plus `allam-2-7b`; retired entries removed (`llama-4-scout`, `moonshotai/kimi-k2-instruct(-0905)`). Fix: `openai/gpt-oss-120b` is text-only on Groq — `cap_Image` removed (no vision chat model on Groq currently). Runtime-tested 4/4
  859. - New: **Cohere Aug 2026** — `command-a-plus-05-2026` flagship (436K ctx, vision + always-on reasoning) and `north-mini-code-1-0` registered; thinking-mode control via `cap_Reasoning` (blocks captured into `ReasoningContent`/`OnReceiveThinking`, non-streaming and streaming); Rerank v4.0 and tiny-aya noted; retired 8b Aya entries removed. Fix: synchronous tool-calling return was always empty (second round now reuses the same `ResMsg`). Runtime-tested 5/5
  860. - New: **DeepSeek V4** — `deepseek-v4-flash` (new driver default) and `deepseek-v4-pro` (1M ctx, 384K output); explicit thinking-mode control (`cap_Reasoning` + `ThinkingLevel` → `thinking`/`reasoning_effort`, disabled otherwise since the API defaults to thinking ON); retired aliases `deepseek-chat`/`deepseek-reasoner` flagged (officially sunset Jul 24, 2026). Runtime-tested 4/4 including tool calling in thinking mode
  861. - New: **Kimi K3 family** — `kimi-k3` (new driver default, 1M ctx, vision + reasoning), `kimi-k2.7-code`/`-highspeed` and `kimi-k2.6` registered; retired models (`kimi-k2`, `kimi-k2-thinking`) removed and Aug 31 sunsets flagged (`kimi-k2.5`, `moonshot-v1-*`). Fix: the new family rejects `top_p` (400) — removed from Kimi defaults. Runtime-tested 4/4 including K3 vision
  862. - New: **Mistral Voxtral TTS** — `voxtral-mini-tts-2603` via `POST /v1/audio/speech` (`TtsVoice` from the `/v1/audio/voices` catalog + `TtsFormat`); activated by the `[cap_GenAudio]` gap; runtime-tested. Plus OCR 4 support: `OcrIncludeBlocks` (paragraph-level bounding boxes) and page-range syntax
  863. - New: **Gemini 3.5/3.6 family registered** (`gemini-3.5-flash` + `gemini-flash-latest` alias, `gemini-3.6-flash`, `gemini-3.5-flash-lite`), Nano Banana GA image models (`gemini-3.1-flash-image`, `gemini-3-pro-image`, `gemini-3.1-flash-lite-image`), `gemini-omni-flash-preview` (video) and `gemini-embedding-2`; the driver omits deprecated sampling params (`temperature`/`topP`) on the 3.5+/3.6/omni family. Veo 2.0/3.0 profiles removed (shut down by Google Jun 30) and Imagen 4.0 shutdown (Aug 17) flagged. *Not runtime-tested — no Gemini API key available*
  864. - New: Claude driver phase 2 — `FastMode` (`speed:"fast"`, Opus 5/4.8, research preview — requires org quota), mid-conversation `system` messages in the history (cache-preserving on Opus 5/4.8/Fable; auto-degraded to `<system-reminder>` user turns elsewhere), `EnableCompaction` (server-side compaction with compaction-block echo), `RefusalFallbackModel` (server-side fallback on refusals), and `aa_claude-sonnet-5-thinking` / `aa_claude-opus-5-thinking` / `aa_claude-opus-5-agent` profiles; runtime-tested 4/4 (Fast mode blocked only by org quota)
  865. - New: **Claude 5 family support** — `claude-opus-5`, `claude-sonnet-5`, `claude-fable-5`, plus `claude-opus-4-7`/`claude-opus-4-8` registered; the driver now sends `thinking: {type: "adaptive"}` on the 4.6+ families and maps `ThinkingLevel` → `output_config.effort` (`budget_tokens`/sampling params return 400 on 4.7+ and are only sent on legacy models). Runtime-tested (sonnet-5, opus-4-6 adaptive, haiku legacy)
  866. - Update: Claude driver — `output_format` migrated to `output_config.format`; web search upgraded to `web_search_20260209` (dynamic filtering) on 4.6+; `stop_reason: "refusal"` now parses `stop_details` and fires `OnError`
  867. - New: **`TAiOpenAiRealtimeTranslate`** — streaming speech translation via `gpt-realtime-translate` (`wss://api.openai.com/v1/realtime/translations`); continuous stream without VAD/turns; emits translated text (`OnAssistantTextDelta`), translated TTS audio (`OnAudioChunk`) and optional source transcript (`SourceTranscription`); runtime-tested (es→en)
  868. - New: demo **`071-VoiceBridgeTranslate`** — the 063 voice bridge refactored with `TAiOpenAiRealtimeTranslate`: one WebSocket per direction replaces the STT→LLM→TTS pipeline (lower latency, ~1/3 of the code)
  869. - New: **GPT-5.6 family registered** (`gpt-5.6-sol` / `-terra` / `-luna` + `gpt-5.6` alias) — 1.05M ctx, vision + reasoning + tools; `gpt-5.6-luna` runtime-tested
  870. - Update: Realtime session default model → **`gpt-realtime-2.1`** (better alphanumeric recognition and noise handling) in `TAiOpenAiRealtimeSTT` and demos 062–064
  871. - Update: **`TAiDalle` / `TAiDalleImageTool` default model → `gpt-image-1`** — the `dall-e-2`/`dall-e-3` snapshots were deprecated by OpenAI (May 2026); both remain selectable while the API accepts them
  872. - New: **OpenAI `gpt-transcribe` / `gpt-live-transcribe`** (Whisper successors, Aug 2026) — `TAiOpenAiAudio` gains `tmGptTranscribe`/`tmGptLiveTranscribe` with `TranscriptionKeywords` + `TranscriptionLanguages`; `TAiOpenAiRealtimeSTT` defaults to `gpt-live-transcribe` with new context props (`TranscriptionPrompt`, `TranscriptionKeywords`, `Languages`, `LowDelay`); both runtime-tested. Registry entries added
  873. - Update: VoiceBridge demos (062–065) migrated to `gpt-live-transcribe` on live channels (contextual prompt + guided language autodetection); diarized channels stay on `gpt-4o-transcribe-diarize` (new models don't support diarization)
  874. - New: **`TAiGrokRealtimeChat`** — xAI Grok Voice speech-to-speech driver (`wss://api.x.ai/v1/realtime`, OpenAI Realtime-compatible, 24 kHz PCM16); live user transcription + streamed assistant text and TTS audio; runtime-tested against the live API
  875. - New: **Voice function calling for Grok Voice** — `AiFunctions` (`TAiFunctions`: local functions + MCP) declared as session tools; automatic tool round-trip (worker-thread execution, `function_call_output`, single continuation `response.create`); `OnCallToolFunction` fallback event; runtime-tested end-to-end
  876. - New: Grok Voice extras — `EnableWebSearch` / `EnableXSearch` (xAI server-side tools), `OutputSpeed`, `Keyterms`, `PronunciationReplace`, `ForceMessage()` (scripted TTS)
  877. - New: Grok Voice phase 3 — session resumption with turn replay (`EnableResumption` + `ConversationId`), binary audio transport (`BinaryAudio`), ephemeral tokens (`MintEphemeralToken` + `EphemeralToken`), `file_search` over Collections and remote MCP via `CustomToolsJson`; all runtime-tested except MCP declarations
  878. - New: **`TAiRealtimeVoiceBase`** — shared base for full-duplex voice drivers (`OnAssistantText`, `OnAssistantTextDelta`, `OnAudioChunk`, `OnAudioDone`); `TAiMakerAiRealtimeChat` and `TAiRealtimeConnection` now inherit from it, so voice events flow through the universal connector
  879. ### v3.4 (May 2026)
  880. - Tested with Delphi 13.1 Florence
  881. - Selective driver registration — each driver self-registers only when imported
  882. - New: **`TAIChatView`** — next-generation Skia-native virtualized chat renderer (single canvas, no FMX child controls, multi-message text selection, dark/light theme, mobile long-press)
  883. - New: **`TAIChatInput`** — fully Skia-painted input bar with custom dropdown overlay, attachment chips, voice indicator (no `TPopupMenu` / no FMX buttons)
  884. - New: `TAiRealtimeConnection` + `TAiOpenAiRealtimeSTT` — real-time STT via WebSocket (24 kHz PCM16, VAD, streaming transcription; pure-Pascal TLS via Windows SChannel)
  885. - New: `cmSmartDispatch` chat mode — two-pass intelligent routing
  886. - Models: claude-opus-4-7, gpt-5.4/5.5, gemini-3.1-pro, grok-4-fast, kimi-k2, groq llama-4
  887. - Fix: Claude Opus 4.7 Adaptive Thinking — HTTP 400 eliminated (temperature/top_p/top_k + thinking block now omitted for claude-opus-4-7)
  888. - Fix: AV on async abort — nil guard in `TAiChatConnection.OnInternalReceiveDataEnd`
  889. - Fix: `TStringStream` leak in async HTTP requests — `FCurrentPostStream` lifetime now correctly tied to request completion
  890. - Fix: `RegisterDefaultParams` `Max_Tokens` key corrected in 10 drivers
  891. - Fix: `ApplyParamsToChat` `TryStrToFloat` now locale-independent
  892. - Fix: Agent jmAll join node premature firing on retries
  893. - Fix: `TChatBubble` spurious vertical scrollbar eliminated
  894. - New: `TChatInput.EnterAsSend` property
  895. - New: **`TAiDatabaseCheckpointer`** — FireDAC-based checkpoint persistence; works with SQLite, PostgreSQL, Firebird, MySQL, SQL Server, and any other FireDAC driver
  896. - Fix: **D11 Alexandria compatibility** — `TInterlocked.Exchange(Boolean)` (D12-only) replaced with Integer-based atomic; `AddStream(AShareOwnership)` boundary corrected to `CompilerVersion >= 36`; `THashSet<T>` boundary corrected to `CompilerVersion >= 36`
  897. - Fix: **`ModelCaps` / `SessionCaps` duplicated in the Object Inspector** — `TAiChat` published these at both the root level and inside `ModelConfig`, out of sync with each other. Now there's a single source of truth (`ModelConfig.ModelCaps` / `ModelConfig.SessionCaps`); the root shortcuts still work in code but were moved out of `published`, so the Object Inspector shows the property only once
  898. ### v3.3 (February 2026)
  899. - New `TAiCapabilities` system (`ModelCaps` / `SessionCaps` / `ThinkingLevel`)
  900. - Models updated: OpenAI gpt-5.2, Claude 4.6, Gemini 3.0, Grok 4, Mistral Magistral, DeepSeek-reasoner, Kimi k2.5
  901. - Agents: durable execution (checkpoints), human-in-the-loop approval tool
  902. - RAG: Graph Document management (`uMakerAi.RAG.Graph.Documents`)
  903. - Fix: `reasoning_content` preserved in multi-turn tool calls (DeepSeek, Kimi, Groq)
  904. - New: `TAiEmbeddingsConnection`, `TAiAudioPushStream`
  905. - New demos: DocumentManager, ChatWebList
  906. ### v3.2 (January 2026)
  907. - Native ChatTools framework (`IAiPdfTool`, `IAiVisionTool`, `IAiSpeechTool`, etc.)
  908. - Unified deterministic tool orchestration and capability bridges
  909. ### v3.1 (November 2025)
  910. - GPT-5.1, Gemini 3.0, Claude 4.5 initial support
  911. - FMX multimodal UI components
  912. - RAG Rerank + Graph RAG engine
  913. - MCP Server framework (SSE, StdIO, HTTP)
  914. ### v3.0 (October 2025)
  915. - Major architecture redesign
  916. - Visual FMX chat components
  917. - Graph-based vector database
  918. - Delphi 10.4–13 compatible (limited: 10.4 Sydney; full support: 11 Alexandria+)
  919. ### v2.5 (August 2025)
  920. - MCP Client/Server (Model Context Protocol)
  921. - Agent graph orchestration
  922. - Linux/POSIX full support
  923. ---
  924. ## 💬 Community & Support
  925. - **Website:** [https://makerai.cimamaker.com](https://makerai.cimamaker.com)
  926. - **Manual (EN/ES):** [https://www.gustavoenriquez.com/book-makerai](https://www.gustavoenriquez.com/book-makerai)
  927. - **Telegram (Spanish):** [https://t.me/MakerAi_Suite_Delphi](https://t.me/MakerAi_Suite_Delphi)
  928. - **Telegram (English):** [https://t.me/MakerAi_Delphi_Suite_English](https://t.me/MakerAi_Delphi_Suite_English)
  929. - **Email:** gustavoeenriquez@gmail.com
  930. - **GitHub Issues:** [https://github.com/gustavoeenriquez/MakerAi/issues](https://github.com/gustavoeenriquez/MakerAi/issues)
  931. ---
  932. ## 📜 License
  933. MIT License — see `LICENSE.txt` for details.
  934. Copyright © 2024–2026 Gustavo Enríquez — CimaMaker

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.