{"id":49936431,"url":"https://github.com/maxidonkey/pythia-webview2","last_synced_at":"2026-05-27T02:04:10.362Z","repository":{"id":356034034,"uuid":"1226541360","full_name":"MaxiDonkey/Pythia-webView2","owner":"MaxiDonkey","description":"AI chat workspace for Delphi VCL/FMX desktop applications, built on WebView2, with vendor calls and application logic kept under Delphi control.","archived":false,"fork":false,"pushed_at":"2026-05-17T05:44:38.000Z","size":26332,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-17T07:08:53.067Z","etag":null,"topics":["ai","chat-interface","delphi","desktop-application","fmx","llm","vcl","webview2","windows"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MaxiDonkey.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-01T14:32:44.000Z","updated_at":"2026-05-17T05:28:59.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/MaxiDonkey/Pythia-webView2","commit_stats":null,"previous_names":["maxidonkey/pythia-webview2"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/MaxiDonkey/Pythia-webView2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxiDonkey%2FPythia-webView2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxiDonkey%2FPythia-webView2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxiDonkey%2FPythia-webView2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxiDonkey%2FPythia-webView2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MaxiDonkey","download_url":"https://codeload.github.com/MaxiDonkey/Pythia-webView2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxiDonkey%2FPythia-webView2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33546836,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-27T02:00:06.184Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","chat-interface","delphi","desktop-application","fmx","llm","vcl","webview2","windows"],"created_at":"2026-05-17T07:05:26.267Z","updated_at":"2026-05-27T02:04:10.351Z","avatar_url":"https://github.com/MaxiDonkey.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pythia-Webview2 for Delphi\n![Version](https://img.shields.io/badge/version-0.9-blue)\n![Status](https://img.shields.io/badge/status-first%20public%20release-2ea44f)\n![Delphi](https://img.shields.io/badge/Delphi-11%2F12%2F13-ffffba)\n![Platform](https://img.shields.io/badge/platform-Windows%20only-0078D4?logo=windows\u0026logoColor=white)\n[![Requires](https://img.shields.io/badge/requires-WebView2-5C2D91)](https://developer.microsoft.com/microsoft-edge/webview2)\n[![WebView4Delphi](https://img.shields.io/badge/dependency-WebView4Delphi-2ea44f?logo=github)](https://github.com/salvadordf/WebView4Delphi)\n\n**A modern AI interaction layer for Delphi VCL and FMX desktop applications.**\n\n**Pythia-Webview2** lets you embed a ChatGPT- or Claude-style chat workspace into a Delphi desktop application while keeping application logic, vendor integration, persistence, security, and business rules under Delphi control.\n\n\u003e **Platform note**  \n\u003e **Pythia-Webview2** is built on **Microsoft WebView2**.  \n\u003e In practice, this means the component targets **Windows desktop applications**.\n\n## NEW\n- [Managed Agents walkthrough (part 1)](demos/VCL/pythia-anthropic/Agent-sample-doc.md#discovering-the-agent-cards)\n\n## Table of Contents\n\n- [Changelog](docs/changelog.md#2026-may-27---version-095)\n- [Get started in a few lines](#get-started-in-a-few-lines)\n- [What Pythia-Webview2 is](#what-pythia-webview2-is)\n- [Vendor-native by design](#vendor-native-by-design)\n- [What Pythia-Webview2 is not](#what-pythia-webview2-is-not)\n- [Demos](#demos)\n- [Documentation](#documentation)\n- [Recommended reading path](#recommended-reading-path)\n- [Current feature scope](#current-feature-scope)\n- [Integration model](#integration-model)\n- [Architecture at a glance](#architecture-at-a-glance)\n- [Repository structure](#repository-structure)\n- [Prerequisites](#prerequisites)\n- [Design principles](#design-principles)\n- [Status](#status)\n- [License](#license)\n\n\u003cbr\u003e\n\n## Get started in a few lines\n\n### VCL\n\n```pascal\nuses\n  VCL.WVPythia.Chat, WVPythia.Types;\n\ntype\n  TForm1 = class(TForm)\n    Panel1: TPanel;\n  public\n    Pythia: TVCLPythia;\n  end;\n\nprocedure TForm1.FormCreate(Sender: TObject);\nbegin\n  Pythia := TVCLPythia.Create(Panel1);\n  Pythia.Update;\nend;\n```\n\n### FMX\n\n```pascal\nuses\n  FMX.WVPythia.Chat, WVPythia.Types;\n\ntype\n  TForm1 = class(TForm)\n    Layout1: TLayout;\n  public\n    Pythia: TFMXPythia;\n  end;\n\nprocedure TForm1.FormCreate(Sender: TObject);\nbegin\n  Pythia := TFMXPythia.Create(Layout1);\n  Pythia.AttachHost(Self);\n  Pythia.Update;\nend;\n```\n\n\u003e [!IMPORTANT]\n\u003e **Note — WebView4Delphi**\n\u003e\n\u003e **Pythia-Webview2** relies heavily on [`WebView4Delphi`](https://github.com/salvadordf/WebView4Delphi), an open-source project maintained by [`salvadordf`](https://github.com/salvadordf) and released under the MIT license.\n\u003e\n\u003e The version included in `dependencies/` is not necessarily the latest one.\n\u003e For project use, it is recommended to clone the official `WebView4Delphi` repository and then add its source path to the `Browser` project options, under **Source**.\n\u003e\n\u003e The `dependencies/` directory provided here is mainly intended to make the examples quick to compile and to improve the discovery experience.\n\u003e\n\u003e If the `WebView4Delphi` code is included in this repository, the original project’s license and copyright notices must be preserved in the corresponding third-party files. (Please refer to those files.)\n\nThis is the smallest valid setup: it hosts the Pythia-Webview2 interface.\n\nFor a real integration, add a service adapter and vendor/plugin wiring.\nIf an action requires host-side services that are not connected yet, the\ncomponent reports a warning instead of failing silently or crashing.\n\nIn a real application, you will typically add a service adapter, a capabilities configuration, a model list, and one or more vendor services.\n\n\u003cbr\u003e\n\n## What Pythia-Webview2 is\n\n**Pythia-Webview2** provides the reusable desktop interaction layer around AI features:\n\n- chat interface;\n- input bar;\n- streaming display;\n- model selector;\n- files and attachments;\n- cards for functions, MCP, skills, agents, and custom integrations;\n- slash commands;\n- media rendering;\n- sessions;\n- themes and templates;\n- Delphi event bridge.\n\n**Pythia-Webview2** gives Delphi applications a modern AI workspace without forcing them into a web architecture.\n\nThe interface is embedded.  \n\u003e Control stays on the Delphi side.\n\n\u003cbr\u003e\n\n### overview\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd width=\"50%\" align=\"center\"\u003e\n      \u003cimg src=\"docs/images/screenshots/pythia-workspace-dark.png?raw=true\" width=\"100%\"/\u003e\n    \u003c/td\u003e\n    \u003ctd width=\"50%\" align=\"center\"\u003e\n      \u003cimg src=\"docs/images/screenshots/pythia-workspace-light.png?raw=true\" width=\"100%\"/\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\n\u003e [!NOTE]\n\u003e Interface shown in French. **Pythia-Webview2** supports internationalization through dictionaries and currently offers 23 languages.\n\n\u003cbr\u003e\n\n## Vendor-native by design\n\n**Pythia-Webview2** is not an LLM SDK.\n\nIt does not replace the OpenAI, Anthropic, Gemini, Mistral, or any other vendor SDK.\n\nNor does it try to reduce all vendors to a minimal common API. Each provider has its own request model, its own streaming behavior, and its own feature surface. **Pythia-Webview2** lets each integration keep that native logic.\n\n**Pythia-Webview2** standardizes the **interaction layer**, not the **vendor layer**.\n\nYour application receives a structured prompt state and decides how to transform it into a native request for the selected vendor.\n\n\u003cbr\u003e\n\n## What Pythia-Webview2 is not\n\n**Pythia-Webview2** is deliberately not:\n\n- a vendor SDK;\n- a REST wrapper;\n- a universal LLM abstraction;\n- an agent orchestrator;\n- a replacement for your business layer;\n- a framework that decides how your application should call a model.\n\n**Pythia-Webview2** handles the interaction surface.  \nYour Delphi code handles the execution semantics.\n\n\u003cbr\u003e\n\n## Demos\n\nThe repository ships seven runnable demos, grouped into three families.\n\n### Starter projects\n\nMinimal hosts to copy when starting a new application — no vendor wired, no plugin registered.\n\n|Project|Folder|\n|-|-|\n|`NewVCLproject`|[`demos/VCL/new-projet`](demos/VCL/new-projet)|\n|`NewFMXproject`|[`demos/FMX/new-projet`](demos/FMX/new-projet)|\n\n### Showcase demos\n\n|Project|Folder|Documentation|\n|-|-|-|\n|`PythiaSampleVCL`|[`demos/VCL/pythia-sample`](demos/VCL/pythia-sample)|[Discovery walkthrough](docs/PythiaSampleVCL.md) — UI tour and component capabilities|\n|`VCL_Anthropic`|[`demos/VCL/pythia-anthropic`](demos/VCL/pythia-anthropic)|[Anthropic vendor integration](docs/VCL_Anthropic.md) — connects **Pythia-Webview2** to a real LLM via the Delphi Anthropic SDK with native async/await support|\n\n[NEW]: **Managed Agents walkthrough (part 1).** Tour of the five agent cards pre-installed in `VCL_Anthropic`, taken in order — from a single web-research agent to a multi-agent flow that edits a sandbox copy and applies the diff to the local folder after user confirmation. A second part will follow with advanced agent usage — MCP servers, skills, Vault and memories integrated inside an agent card. See [`Agent-sample-doc.md`](demos/VCL/pythia-anthropic/Agent-sample-doc.md#discovering-the-agent-cards).\n\n### Plugin demos\n\nCustom slash commands that extend the chat with host-side logic. Each plugin ships a dedicated developer document under `docs/`.\n\n|Project|Folder|Command|Documentation|\n|-|-|-|-|\n|`PythiaSnippetDemo`|[`demos/FMX/plugin-snippet`](demos/FMX/plugin-snippet)|`/snippet`|[Local prompt library](demos/FMX/plugin-snippet/README.md)|\n|`PythiaGitDemo`|[`demos/FMX/plugin-git`](demos/FMX/plugin-git)|`/git`|[Git context collector](demos/FMX/plugin-git/README.md)|\n|`PythiaGrepDemo`|[`demos/FMX/plugin-grep`](demos/FMX/plugin-grep)|`/grep`|[Interactive code-context picker](demos/FMX/plugin-grep/README.md)|\n\nThese demos do not try to demonstrate a fake universal LLM API.\n\nThey show how **Pythia-Webview2** provides a common interaction workspace while letting each integration keep its native vendor logic.\n\n\u003cbr\u003e\n\n## Documentation\n\n- [Integrator guide](docs/integrator/index.md) — build a first application based on **Pythia-Webview2**.\n- [Technical reference](docs/reference/index.md) — interfaces, events, templates, JSON files.\n- [Complete single-file guide](docs/pythia-documentation.md) — exhaustive documentation in Markdown format.\n\nThe README intentionally focuses on quickly understanding the project.  \nThe detailed documentation is split into focused pages, while the complete guide remains available as a single Markdown file to serve as an exhaustive reference.\n\n\u003cbr\u003e\n\n## Recommended reading path\n\nFor a first exploration:\n\n1. Read this README.\n2. Run `PythiaSampleVCL` to discover the chat surface and the component's capabilities.\n3. Open one of the starter projects (`NewVCLproject` or `NewFMXproject`) to see a minimal host.\n4. Read the integrator guide.\n5. Study `VCL_Anthropic` to see how **Pythia-Webview2** connects to a real LLM SDK.\n6. Explore the plugin demos (`/snippet`, `/git`, `/grep`) to understand the command layer and the JS↔Delphi bridge.\n7. Use the technical reference for interfaces, events, JSON formats, and template details.\n\n\u003cbr\u003e\n\n## Current feature scope\n\n|Area|Status|Notes|\n|-|-:|-|\n|VCL component|Available|Desktop chat component for VCL applications|\n|FMX component|Available|Desktop chat component for FireMonkey applications|\n|WebView2-based UI|Available|HTML/JavaScript rendering hosted in Delphi; targets Windows|\n|Delphi event bridge|Available|UI events are routed to Delphi handlers and services|\n|Streaming display|Available|Vendor services can push text and reasoning deltas|\n|Markdown rendering|Available|Chat content, code blocks, and final rendering pipeline|\n|Chat sessions|Available|Persistence, restoration, and pagination|\n|Model selector|Available|Model list and categories driven by JSON|\n|Capabilities system|Available|Feature visibility controlled by JSON configuration|\n|Slash commands|Available|Plugin-based command layer, with built-in API key commands|\n|API key management|Available|Logical names, local secret storage, and update notifications|\n|Card system|Available|Functions, MCP, skills, agents, and custom cards|\n|Files and attachments|Available|Images, documents, knowledge files, and transcription-related entries|\n|Media rendering|Available|Images, audio, video, and files returned by vendor services|\n|Internationalization|Available|Dictionary loading and translation hooks|\n|Theme and look \u0026 feel|Available|UI templates and synchronization hooks with the host application|\n|Custom JavaScript templates|Available|Replaceable or extensible UI fragments|\n|Vendor integration|Defined by the host|**Pythia-Webview2** exposes the state; the application chooses how to call vendors|\n|Agent / MCP / skill semantics|Defined by the host|**Pythia-Webview2** transports selections; execution remains application-specific|\n\n\u003cbr\u003e\n\n## Integration model\n\nA **Pythia-Webview2** application generally follows this flow:\n\n```\nUser interaction\n    ↓\nHTML / JavaScript template\n    ↓\nWebView2 message bridge\n    ↓\nDelphi event handler\n    ↓\nService adapter\n    ↓\nApplication logic\n    ↓\nVendor SDK or internal backend\n    ↓\nStreamed response and final result\n    ↓\nPythia-Webview2 UI rendering and session persistence\n```\n\nThe key point is that **Pythia-Webview2** does not own the vendor call.\n\nIt provides the application with a structured interaction state and a rendering pipeline. The application decides how that state becomes an OpenAI, Anthropic, Gemini, Mistral, or internal request.\n\n\u003cbr\u003e\n\n## Architecture at a glance\n\n**Pythia-Webview2** is based on a clear separation:\n\n|Layer|Responsibility|\n|-|-|\n|Embedded UI|Chat surface, input bar, panels, selectors, rendering, templates|\n|WebView2 bridge|Communication between HTML/JavaScript and Delphi|\n|Delphi event layer|Routing, validation, handlers, adapters|\n|Host application|Vendor calls, business logic, security, persistence decisions|\n|Vendor SDKs|Native access to OpenAI, Anthropic, Gemini, Mistral, or any other backend|\n\nThe component provides the application with a modern AI workspace without taking ownership of the vendor API.\n\n\u003cbr\u003e\n\n## Repository structure\n\n```\nassets/                 Embedded HTML and JavaScript templates\nsource/                 Delphi source code\ndemos/                  VCL, FMX, vendor, and plugin examples\ndocs/                   Exhaustive guide, integrator docs, reference docs\ndependencies/           Optional third-party dependencies for quickly compiling the demos\n```\n\n\u003cbr\u003e\n\n## Prerequisites\n\n|Prerequisite|Notes|\n|-|-|\n|Delphi|Delphi 11, 12, or 13|\n|UI framework|VCL and/or FMX|\n|Platform|Windows|\n|WebView2 Runtime|Microsoft Edge WebView2 Evergreen Runtime|\n|WebView4Delphi|Used to host WebView2 from Delphi|\n\n\u003cbr\u003e\n\n## Design principles\n\n### Keep the desktop application in control\n\n**Pythia-Webview2** is designed for real Delphi applications, where the host software owns the workflow, permissions, data, persistence, and vendor decisions.\n\n### Do not flatten vendors\n\nEach provider has its strengths and its API model. **Pythia-Webview2** lets integrations remain vendor-native instead of reducing them to a simplified common subset.\n\n### Make the UI reusable\n\nThe chat interface, panels, selectors, rendering, commands, and sessions should not have to be rewritten for every application.\n\n### Keep extension points explicit\n\n**Pythia-Webview2** exposes clear contracts for adapters, commands, templates, capabilities, cards, models, and vendor services.\n\n\u003cbr\u003e\n\n## Status\n\n**Pythia-Webview2** is available as a first public release.\n\nThe component, documentation, and demos are ready for evaluation and integration\nin Delphi VCL/FMX desktop applications.\n\nThe public API is intended to remain stable, although minor adjustments may\nstill occur before the first long-term stable release.\n\n\u003cbr\u003e\n\n## License\n\nThis project is licensed under the [MIT](https://choosealicense.com/licenses/mit/) License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxidonkey%2Fpythia-webview2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxidonkey%2Fpythia-webview2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxidonkey%2Fpythia-webview2/lists"}