Embarcadero’s new Kai extension brings chat, code‑completion and an MCP server to RAD Studio, letting developers plug in any cloud or local LLM. The article explains how Kai works, what it requires from users, and the practical implications for Delphi and C++ Builder teams.
Agentic AI Arrives for Delphi and C++ Builder
Embarcadero has launched Kai, an agentic AI assistant that ships as an optional extension for RAD Studio – the integrated development environment that powers Delphi and C++ Builder. By default the IDE has no AI features; Kai adds a chat window, on‑the‑fly code completion, and a Model Context Protocol (MCP) server that lets external AI agents interact directly with the editor.
Featured image
What Kai Requires
| Requirement | Detail |
|---|---|
| Subscription | $249 USD per developer per year (free trial available). |
| API key | Users must supply their own key for the LLM service they intend to use (OpenAI, Anthropic, Azure, etc.). |
| LLM source | Supports cloud‑hosted APIs and local models via Ollama or LM Studio. |
| Hardware | Local inference demands a modern CPU, at least 16 GB RAM, and a GPU for larger models to achieve interactive latency. |
| RAD Studio version | Works with RAD Studio 13.1 and later; earlier releases lack the required extension APIs. |
Because Kai is an add‑on, the core IDE remains unchanged. The extension registers a new Tools > Kai menu, where developers can configure model endpoints, set temperature and token limits, and enable or disable the various UI components (ghost‑text suggestions, completion list, or separate chat panel).
How the Extension Operates
- Model selection – In the Kai settings panel you choose a provider (e.g., OpenAI GPT‑4o, Claude 3.5, or a locally hosted Ollama model). The UI stores the endpoint URL and API token securely in the Windows Credential Manager.
- MCP server launch – When the IDE starts, Kai spawns a lightweight HTTP server on
localhost(default port 5040). Other tools can send JSON‑encoded requests such as{"action":"resolveError","message":"E2255"}and receive structured responses. - Chat interaction – The chat pane behaves like a normal messaging window. Prompts are sent to the selected LLM, and the response is streamed back for immediate display. Developers can ask Kai to generate code, explain compiler errors, or perform file‑system operations (e.g., create a new unit).
- Completion injection – For inline suggestions Kai uses the IDE’s Code Insight API. Ghost text appears directly in the editor; pressing Tab accepts the suggestion. Alternatively, a drop‑down list shows multiple candidates, similar to traditional IntelliSense.
Practical Implications for Teams
Immediate Benefits
- Speed on routine tasks – Generating boilerplate forms, wiring up event handlers, or creating simple conversion functions can be done in seconds.
- Error triage – Kai can parse a compiler error message, suggest a fix, and even apply the change automatically after user confirmation.
- Cross‑language support – While Delphi code sometimes suffers from outdated style (the model may fall back to Delphi 7 syntax), C++ Builder benefits from the broader training data available for modern C++.
Limitations to Watch
- Model freshness – If you rely on a local model, updates must be applied manually. Cloud providers automatically receive the latest improvements, but you pay per‑token usage.
- Context size – The MCP protocol sends the current file’s content (up to 8 KB) plus a short history of recent edits. Very large units may be truncated, reducing suggestion quality.
- Guardrails – Kai does not enforce sandboxing. Embarcadero advises that all AI‑generated code be reviewed by a human before committing to source control. Prompt‑injection attacks are possible if an attacker can influence the chat input (e.g., via a malicious bug report). Teams should treat Kai as an assistive tool, not an autonomous code author.
Deployment Checklist
- Verify RAD Studio version – Ensure all developers run 13.1 or newer.
- Provision API keys – Create a shared secret for the chosen LLM service and store it in a secure vault (e.g., Azure Key Vault) before distributing it to developers.
- Test local model performance – Spin up an Ollama container, load a 7B or 13B model, and run a few completion queries to gauge latency. If response times exceed 2 seconds, consider a GPU‑accelerated setup.
- Configure MCP security – Restrict the MCP server to
localhostand enable HTTPS if you plan to expose it to other machines on the network. - Establish review policy – Add a step in the pull‑request checklist: “All AI‑generated code must be manually inspected for correctness and security.”
Community Reaction
Feedback from the recent Kai webinar was mixed:
- Some developers argued that AI should be bundled with the RAD Studio subscription, given that the extension merely connects to external services.
- Others felt the $249 per‑year price is justified by the time saved on repetitive coding tasks.
- A minority suggested that Embarcadero focus on core IDE improvements rather than AI features, noting that many of them already use command‑line AI tools (Claude Code, Codex) outside the IDE.
Regardless of opinion, the consensus is clear: AI is now a realistic option for Delphi and C++ Builder teams, and Kai provides the first officially supported bridge.
Bottom Line
Kai does not reinvent the RAD Studio experience, but it lowers the friction of bringing modern LLM capabilities into a legacy‑rich environment. By treating the extension as a productivity aid—with a clear subscription model, explicit API‑key management, and a mandatory human‑review step—organizations can adopt it without compromising security or code quality.
Developers who need high‑performance native GUIs will find that the combination of Delphi’s compiled code and Kai’s on‑demand assistance can accelerate delivery while preserving the platform’s traditional strengths.

Comments
Please log in or register to join the discussion