# Application runtime

An application has its own interface, business logic, data and dependencies, and opens from New tab without returning to the conversation that created it.

1. **Launch** New tab, Applications
2. **Application tab** sandboxed iframe, own HTML, CSS, JavaScript
3. `MessagePort`
4. **Host bridge** checks instance, capability, operation
5. **Runner** one process per operation
6. **Runtime** llm(), agent(), Programs, execution records
7. **Instance state** business data, events, results, questions

**What this buys, and the limits**

- Interfaces are standard Web: HTML, CSS, JavaScript, compiled React or Vue, not assembled from fixed OpenProgram components. HTML is an interface technology, not a measure of completeness; backend, state, contracts and deployment dependencies decide what the software can do.
- Value: business operations shared by buttons and Agents, model calls in existing execution records, business data independent of chat windows. A combination of product contracts, not a claim of uniqueness.
- Applications run inside OpenProgram. A later minimal-runtime deployment stays possible; removing every OpenProgram dependency needs replacement model, storage and execution implementations, so standalone export is not promised.
- Browser-executable JavaScript, Canvas, WebGL and WASM are available. System GUI, GPU drivers, arbitrary binaries and other-language services are not; those need explicit runtime adapters and dependency contracts.

## Words and surfaces

| Word | Meaning |
| --- | --- |
| Program | Callable capability; Tools and Workflows keep their definitions |
| Package | Installation unit holding these capabilities, harnesses included. Not an execution type. |
| Application | User-openable software with its own interface, version, data and lifecycle |
| Host plugin | Installation unit extending host behaviour, such as tools or themes. Managed separately; existing loaders do not guarantee application isolation, and plugins are not adapted into Applications automatically. |

| Goal | Entry | Result and failure |
| --- | --- | --- |
| See capabilities | Abilities → Programs | Plain folder per application directory, built in or installed; source, default entry, call structure. Names such as `gui_agent` unchanged. |
| Install, upgrade, uninstall a package | `openprogram programs install`, `install --upgrade`, `uninstall` | Clones into `~/.openprogram/programs/<name>/`. Development symlinks keep their targets. Unknown directories are never imported. |
| Install software | Applications → Install… | Shows declarations, source, version, enabled state. Python backends need the explicit trust checkbox. Duplicate IDs, invalid entries and failed dependency preparation return errors without overwriting. |
| Open | New tab button, or Open on Applications | Own tab, same instance. Project applications bind to the current project or a picker. Programs without UI gain no button. |
| Manage | Applications: enable, show or hide, update, uninstall | Disabling stops new opens and operations and cancels active ones; hiding removes only the button. Errors stay beside the action. Refresh and reopen read the latest catalog. |
| Call from CLI or Agent | `openprogram programs` `list`, `run`, `status`, `cancel`, `check`, `install`, `uninstall`, `enable`, `disable`, `export` | Same group as every Program; no separate application command. |

**Directories and older installations**

| Path | Holds |
| --- | --- |
| `program-sources.json` | Program sources |
| `~/.openprogram/programs/catalog.json` | Application registrations: source directory, enabled, hidden, display title, reviewed manifest. Nothing is copied. |
| `~/.openprogram/programs/.runtime/` | `state.sqlite`, `data/<instance>/data.sqlite`, `runs/`, `environments/` |

- `program_directory.migrate_user_directory` moves `workflows/` and `applications/` into `programs/`, by rename. Clones older installers made under `openprogram/programs/packages/` or `applications/` move too. Repeatable.
- On first catalog read, `kind=application` rows move out of `program-sources.json`, including disabled, hidden, source and uninstall state. The catalog is written before old rows go; a conflict keeps the originals. Migration and catalog updates are serialized.
- Reclassifying directories grants no execution authority to unregistered ones. Desktop read-only dependency limits stay: application forms cannot use package APIs to change host dependencies.

## New tab

| Topic | Behaviour |
| --- | --- |
| Order | Files, New chat, Browser and Terminal; built-in applications with a window; enabled, visible installed applications. Buttons show no model, port, runtime or path. |
| Reopening | Same application and project reuses the open tab. Separate projects open independently with explicit data scopes. |
| No active project | The saved binding is reused; an unbound project application asks once. An application never follows another chat tab's working directory. |
| First opening | May show dependency preparation. The page stays empty until its instance is read; a failed read is asked again quietly with backoff, and an instance read before draws at once. |
| Closing | Closes only the view. Service-process exit and task interruption are reported separately. |
| Creation | Starts in chat: the Agent writes the package and dependency declarations, builds and verifies it, then registers within that task's authorization. Only success adds a button; failure keeps source and errors for repair. |

## Application contract

```
{
  "id": "local.paper-reader",
  "title": "Paper reader",
  "icon": "book-open",
  "version": "1.0.0",
  "ui": { "root": "web/dist", "entry": "index.html" },
  "backend": { "kind": "python", "entry": "paper_reader.app:operations" },
  "scope": "project",
  "capabilities": ["model.invoke", "storage.app", "files.project.read"],
  "dataSchema": 1,
  "operations": {
    "summarize": { "agent": true, "input": { "type": "object" }, "output": { "type": "string" } }
  }
}
```

Static applications omit `backend`. `id` is stable package identity, never title, path or creation-chat ID. Field rules and public APIs: [Applications](https://fzkuji.github.io/OpenProgram/docs/capabilities/applications.html).

| Object | Holds |
| --- | --- |
| Definition | Manifest read from the source plus the content digest of the source tree, computed at load and on every reload |
| Installation | Catalog row: source directory, settings, reviewed data identity and trust. Package limit 100 MiB, no symlinks or special files. |
| Instance | App ID, owner, project scope; business-data location. A window is not a database. |
| View | Tab, instance, UI route, displayed run. Disposable. |
| Operation run | Run ID, instance, definition, input, request key, state, event sequence, result. Links existing execution records without copying the DAG. |

- Operations have input and output schemas. Clients cannot choose import paths, source paths or owners; the server resolves them. Trusted identity comes from the authenticated connection, not a JSON field.
- Operation names exist only at the UI and process boundary. Python internals use ordinary imports, with no second string dispatcher.
- Events have increasing sequences; clients resume by cursor. Results and errors persist. State is at most 4 MiB as JSON, an event 1 MiB; large outputs use references.
- Project-path changes update bindings, not instance identity. Runtime databases hold execution facts; application state references run IDs. `localStorage` caches disposable view preferences only.
- User data never lives in the source directory.
- Python environments: one per application and pinned dependency set, created on first use, never installing into the main worker. Listing reads manifests only and starts no process. A static application starts no Python. Published UI uses build artifacts: no dev server, no latest dependencies, no regeneration per click.
- Runners start ahead: opening a window, and every operation after it, keeps two runners per application version waiting with Python, the framework and the backend loaded, so an operation does not pay about a second of startup. Each still runs one operation; a stale version's runners are stopped, and an idle one exits when the worker goes away.

## Models and business operations

| Aspect | Rule |
| --- | --- |
| Shared path | A button and an Agent call share input validation, permissions and implementation. Only `agent: true` operations are exposed, as `<id>__<operation>`; internal database methods never become tools. Agent calls bind instances and cannot switch project data. |
| Model calls | The runner creates Runtime from the manifest's model name or host defaults, bound to run records (`SessionNodeWriter` under `runs/`). Context is operation input and explicitly supplied app data, independent of the active chat. No chat is needed before a button. |
| Credentials | The page gets progress and results, never provider keys |
| Questions | `context.ask()` emits a question event; an answer binds run and request ID and applies only to the pending question. No second `ExecutionStatus`. |
| Commit | Ordinary code validates model output before a transactional commit. "Saved" in natural language is not evidence. |
| Retries | A request key dedupes submissions; reuse with different input is rejected. Non-idempotent external effects inspect existing records or ask the user; a network timeout never repeats execution. |
| Conversations | With `chat` a window keeps ordinary conversations of its own, one per key, a draft ID adopted on its first message. The host draws the real composer over the iframe where the page asks and hides the right sidebar; the page draws messages from a feed the host posts. The page's note rides beside each message as the `application` attachment, stored on the user node. The agent works in the folder like any chat; nothing passes through the backend. |
| Sending for the owner | A button of the page can send a message as the owner's (`chat.send`); it waits in the send queue behind a running reply. |

## Host services

What only the host can do, a package asks for through a capability, so its backend imports nothing of OpenProgram and the same package can later run on a trimmed runtime that answers the same calls. Meetings is the first built-in application built this way ([Meetings](https://fzkuji.github.io/OpenProgram/docs/reference/design/runtime/programs/meetings.html#host)).

| Mechanism | Rule |
| --- | --- |
| Host calls | The runner writes `{"type": "host", request_id, method, params}` on stdout and waits for the answer on stdin; the service answers in the worker (`host_calls.py`) after checking the method's capability. Methods: `speech.transcribe`, `speech.diarize`, `speech.readiness`, `conversation.open`, `conversation.ask`. Paths are relative to the instance's files. |
| Recordings | Owned by the host (`audio.py`), one per instance: the App's page records the microphone for the sandboxed window, the worker the computer's sound; chunks go to `recording.ingest` in order, then `recording.finish`. Disabling cancels. |
| Change events | A saved state document signals `application-state`, a recording `application-audio`; the window gets them as `state` and `audio` events. |
| Appearance | The host posts its theme attributes, colour scheme, language and custom properties; `openprogramApp.appearance` resolves once they are on the page, so a window built from the App's kit looks like the App. |

## Running on its own

The Applications page's **Export as an application of its own…** (`POST /api/applications/{id}/export`) writes into a folder the owner chooses, numbering it beside an earlier export; only an export the worker wrote can then be shown in the file manager. `openprogram programs export <id|folder>` does the same from a terminal.

The result is a macOS `.app`, or a folder with `run.sh` and `run.cmd`. Opening it runs the same window and the same backend as in the App, with no worker, web app, chat, channel or scheduler.

| Part | Rule | Why |
| --- | --- | --- |
| What runs | The application runtime the worker runs (catalog, runners, state, recordings, host calls), for this one package. `OPENPROGRAM_STANDALONE_APPLICATION` keeps every other Program from loading; `OPENPROGRAM_STATE_DIR` makes the application's data folder the state folder. | LangGraph, AgentOS and OpenHands show that leaving a desktop client does not remove the runtime an application needs. Shipping that runtime keeps the package contract unchanged: the window and backend are not rewritten for a second host. |
| Bundle | `app/` holds the package. `python/` holds the App's standalone CPython with OpenProgram, minus the App's web front end, the other built-in applications, Playwright, CPython's tests and Tk (Meetings: 287 MB, from 575 MB). Without a copyable Python, the launcher names the exporting interpreter (`--python reference`). | A copy of the runtime that already runs the App needs no new build pipeline. Trimming removes only what a single application cannot reach. |
| Window | A local server on 127.0.0.1 serves a page that frames the window in the same sandboxed iframe and answers the same bridge as the App's tab. The page records the microphone with the App's recorder. It uses the App's default theme in the computer's light or dark mode and the browser's language. A Chromium browser opens it as an app window (`--app`); otherwise the default browser opens it. | Chainlit and DeerFlow deploy a service with its own web front end; MCP Apps keep the sandboxed iframe and postMessage bridge. A native shell such as Electron or Tauri would need a build per export and per platform. |
| Sign-in | The launcher's link carries a token after `#`. The page exchanges it for an HttpOnly, SameSite=Strict cookie, and every route except the page, its assets and the window's resources requires that cookie. A Host header other than 127.0.0.1 or localhost is refused. The token sits in the data folder with mode 0600. | Any local program can reach a loopback port; the cookie and the Host check also stop other web pages and DNS rebinding. |
| Models and voice | Each launch copies `config.json` and `auth/` from the computer's OpenProgram (the exporting profile, else `~/.openprogram`) and links `voice/`. The bundle carries no settings or keys. | A bundle may be passed on. As in the App, the page never sees provider keys; a key changed in OpenProgram reaches the application on its next launch. |
| Conversations | `conversation.open` and `conversation.ask` are answered by the standalone host. It keeps each conversation as a file in the data folder and answers with the configured model, without tools, with earlier messages as context. `conversation.show` opens a panel drawn with the App's message styles and a follow-up composer. | The same semantics as the App, where a backend's conversation turn runs without tools; only the storage differs. |
| Refused | Applications that declare `chat` (they need the App's composer and agent) or have project scope (they need the App's projects) | Neither can be answered faithfully without the App |
| Lifetime | The launcher starts the server unless one answers for the same data folder, then opens a window. The server stops after ten minutes with no open window, recording or running operation. | Closing the window leaves no process running, and a recording or a summary still being written is not cut off. |
| Signing | The bundle is not signed or notarized. An export made on the same Mac opens directly; a copied one needs Open from the context menu once. | No certificate is bought |

## Lifecycle

| Path | Sequence |
| --- | --- |
| Open | Read verified definitions → select → resolve instance and project → reuse or create tab → load resources at the digest → connect capability port → read state and active runs. No business code imported, no model request. |
| Task | Persist input, request key and accepted event; the existing Attempt manages running; persist questions; finish completed, failed or cancelled. Stop terminates owned process trees and reports cancelled only after cleanup; late results cannot overwrite a terminal state. Process-tree ownership persists so children end after the parent exits. Concurrent writes need transactions or version checks, not disabled buttons. |
| Restart | Reopening restores view and state. After a worker restart, incomplete runs follow owner-loss rules: interrupted, or requested cancellation completes. Inputs, progress and results stay. Python stacks do not resume; an application may read saved state and submit a new operation. |
| Update | `install --replace` or Update from source: validate manifest and tree, check the backend in a separate process, recheck the digest, check `dataSchema` and `scope`, then switch the catalog row atomically. A changed source reloads with a fresh digest. Submitting from a view at an old digest is refused with "reopen". |
| Uninstall | Cancels operations, hides the application, keeps the source directory, data and schema and scope identity. A compatible reinstall restores the instance. No business-data deletion API. |

Incompatible `dataSchema` or `scope` is rejected; automatic migration, which would need backup, validation and explicit recovery, is not built.

## Isolation and portability

- Iframes use `sandbox="allow-scripts"` with a restrictive CSP and an opaque origin. Host and page talk through a validated MessageChannel handshake. Existing same-origin plugin pages prove no isolation; CORS is not authentication.
- Resources are addressed by digest and restricted to the published UI directory, with a credential that permits UI reads only. The bridge rejects page-supplied owners, URLs and other-instance runs. Pages cannot reach `/api/*`. Capabilities are rechecked per operation; disabling or uninstalling revokes.
- Separate Python processes isolate dependencies and crashes, not host files or network. Backends are explicitly trusted local code, and manifest capabilities are no malicious-code sandbox. Untrusted remote code would need platform restrictions or containers, covering children, install scripts and inherited environments.
- Ordinary applications render only in their tabs and get a small stable API, not React stores or session managers. Global toolbars, chat editors, themes and system services are trusted host extensions.

| Runtime mode | Needs | Commitment |
| --- | --- | --- |
| Pure static | Browser and own resources | Independently hostable; data migration is the application's job |
| Inside OpenProgram | UI, backend, OpenProgram Runtime | Current implementation |
| Independent, same runtime | Package, trimmed runtime, settings from the computer's OpenProgram, own data folder | Implemented: [Running on its own](#standalone) |
| Cross-host MCP Apps | MCP server, compatible host | Shared UI and tool contract; OpenProgram background APIs are not portable |
| No OpenProgram dependency | Replacement models, tasks, storage | No guarantee; build and test separately |

## Adopted, adapted, deferred

| Choice | Basis | Handling |
| --- | --- | --- |
| Adopt: standard Web interfaces | MCP Apps, OpenAI Plugins | Free frontend builds, optional theme components, stable host APIs |
| Adopt: explicit contributions and lifecycles | [Hermes Desktop Plugin SDK](https://hermes-agent.nousresearch.com/docs/developer-guide/desktop-plugin-sdk), DeepSeek Harness | Applications contribute only within their pages; global slots stay trusted-plugin capabilities |
| Adopt: state separate from pages | LangGraph, AgentOS | Persisted state and run records; neither `localStorage` nor chat history is the database |
| Adapt: MCP Apps | MCP Apps | Standard-bridge adaptation reserved; local contracts first. Persistent tasks use explicit host extensions, never claimed as standard. |
| Adapt: UI event streams | AG-UI | Existing event semantics; adapters when cross-framework integration is needed |
| Optional: declarative UI | A2UI | Suits confirmations and common forms; not required |
| Defer: arbitrary dynamic code in host | Host stability, isolation | Code becomes a reviewable build before registration; `eval` is not publication |
| Defer: marketplace, other-language runners, native GUI embedding | Not needed for install, open, operate, recover | Not dependencies of the current version |

## Survey of public frameworks

For each project: what is delivered, who loads and executes it, who renders UI, where business state lives, whether it can leave the host. Code generation, code execution, UI and application installation are judged separately.

**Host extension (9)**

| Project | Mechanism | UI | Host dependency |
| --- | --- | --- | --- |
| [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (Local distribution code inspected) | Cordis lifecycle and service injection; dynamic plugins have host/client parts. | Host React slots; dynamic frontends invoke registered backend handlers. | Plugins depend on DSH services/loaders and do not automatically become standalone software. |
| [dsh-worktable](https://github.com/Aisland-SJL/dsh-worktable) (Plugin source inspected) | Installation package supplies backend routes and frontend worktable. | Project entries and split view; generated artifacts load in iframes using widget-result.json. | Worktable depends on DSH; generated pages are standalone only if their own dependencies allow it. |
| [Pi](https://github.com/earendil-works/pi/blob/main/packages/coding-agent/docs/extensions.md) (Official documentation) | TypeScript extensions: tools, events, commands, context. | ctx.ui custom terminal components, message rendering, and overlays. | Extensions require Pi; terminal components are not HTML. |
| [OpenCode](https://opencode.ai/docs/plugins/) (Official documentation) | JS/TS plugin event hooks, custom tools, SDK client. | Reviewed docs list TUI notifications and related interfaces; this does not establish arbitrary business-page plugin support. | Plugins depend on OpenCode; generated application independence is separate. |
| [Claude Code](https://code.claude.com/docs/en/plugins-reference) (Official documentation) | Plugins package skills, agents, hooks, MCP, LSP, and more. | Public contracts mainly extend Agents; arbitrary React-page registration is unconfirmed. | Plugins depend on Claude Code; plugin packages are not desktop applications. |
| [Hermes](https://hermes-agent.nousresearch.com/docs/developer-guide/plugins/) (Official documentation) | Python register(ctx) and multiple capability registrations. | Also Desktop SDK and Dashboard extensions, beyond terminal plugins. | Local host extensions; compatibility with other plugin formats covers only explicit subsets. |
| [OpenClaw](https://docs.openclaw.ai/tools/plugin) (Official documentation) | Gateway plugins provide tools, services, channels, and runtime capabilities. | Interactive Dashboard and macOS widget panel have different contracts. | Plugins require Gateway; HTML panel rendering does not imply complete runtime capability. |
| [Gemini CLI](https://geminicli.com/docs/extensions/) (Official documentation) | Extensions package prompts, MCP, commands, and other Agent configuration/capabilities. | CLI extension mechanism, not arbitrary application-page installation. | Extensions use Gemini CLI loading/runtime environments. |
| [goose](https://block.github.io/goose/index.html) (Official documentation) | MCP extensions, recipes, CLI/API. | Desktop explicitly supports MCP Apps interactive interfaces. | MCP services may deploy separately; UI requires compatible hosts. |

**Agent service (4)**

| Project | Mechanism | UI | Host dependency |
| --- | --- | --- | --- |
| [Codex App Server](https://learn.chatgpt.com/docs/app-server) (Official documentation) | Bidirectional JSON-RPC: threads, turns, events, approvals. | Clients implement their own UI; this interface is not an application installation manifest. | Independent clients are possible, but Agent capabilities still require Codex services. |
| [OpenHands](https://docs.openhands.dev/sdk) (Official documentation) | Python/REST SDK, tools, sessions, and remote Agent Server. | SDK supports custom developer experiences. | Embeddable in applications, not a generic application menu or arbitrary host-UI extension. |
| [DeerFlow](https://github.com/bytedance/deer-flow) (Official repository description) | Gateway, long-running Agents, skills, files, execution environments. | Complete Web client; read-only static demos differ explicitly from backend-backed runtime mode. | Full capability requires its backend; demo pages do not establish service independence. |
| [Agno / AgentOS](https://docs.agno.com/agent-os/introduction) (Official documentation) | FastAPI runs agents, teams, workflows, with database state and APIs. | Control Plane manages them; products may have independent frontends. | Applications can deploy services independently while requiring AgentOS/storage configuration. |

**Coding tool (6)**

| Project | Mechanism | UI | Host dependency |
| --- | --- | --- | --- |
| [Aider](https://aider.chat/docs/) (Official documentation) | Primarily code changes, tests, and Git workflows. | CLI product; generic application-UI plugin contract unverified here. | Generated source may deploy with its own dependencies, separate from Aider extensions. |
| [mini-SWE-agent](https://github.com/SWE-agent/mini-swe-agent) (Official repository description) | Simplified Agent loop, independent shell actions, linear history. | CLI and trajectory viewer. | Can generate programs; reviewed contracts do not install them as host applications. |
| [Mistral Vibe](https://github.com/mistralai/mistral-vibe) (Official repository description) | CLI coding Agent, programmatic mode, streaming output. | Terminal; business-page plugin contract unverified here. | Programmatically callable; output formats do not define UI rendering. |
| [Cline](https://docs.cline.bot/mcp/mcp-overview) (Official documentation) | MCP extends external tools/services. | Reviewed pages establish tool integration, not arbitrary UI extensions. | MCP servers may run independently; hosts invoke tools. |
| [Roo Code](https://roocodeinc.github.io/Roo-Code/features/mcp/using-mcp-in-roo/) (Official documentation) | Project/global MCP with stdio, HTTP, and other connections. | In-editor Agent interaction. | MCP services and editor extensions are distinct deployment objects. |
| [Continue](https://docs.continue.dev/customize/deep-dives/mcp) (Official documentation) | Configure MCP tools for Agents. | Editor/Agent integration; arbitrary business-page registration unverified here. | Tool services work across hosts; Continue configuration still depends on Continue. |

**Closed-source product (2)**

| Project | Mechanism | UI | Host dependency |
| --- | --- | --- | --- |
| [Cursor](https://cursor.com/docs) (Official overview; internals unknown) | Public docs provide Agent, Rules, MCP, and other entries. | Product UI is visible; internal plugin runtime unverified here. | Do not infer internal architecture or arbitrary application-hosting contracts from public feature lists. |
| [Windsurf / Devin Desktop](https://docs.devin.ai/desktop/cascade/mcp) (Official docs; internals unknown) | Public Cascade MCP integration. | In-editor interaction; internal mechanism unverified. | MCP capabilities do not imply portable business-application pages. |

**Embedded framework (10)**

| Project | Mechanism | UI | Host dependency |
| --- | --- | --- | --- |
| [Claude Agent SDK](https://code.claude.com/docs/en/agent-sdk/overview) (Official documentation) | Embed Claude Agent capabilities into Python/TypeScript programs. | Applications provide their own UI. | Independent of Claude Code’s interactive UI, with SDK/runtime dependencies retained. |
| [LangGraph](https://docs.langchain.com/oss/python/langgraph/overview) (Official documentation) | State graphs, persistence, recovery, human intervention. | Graphs/events do not prescribe final business UI. | Usable as a standalone-program library; persistence needs actual configuration. |
| [Deep Agents](https://docs.langchain.com/oss/python/deepagents/overview) (Official documentation) | Combines tools, files, context, and sub-agents atop LangGraph. | Agent harness is separate from final application UI. | Embeddable, depending on its libraries/runtime configuration. |
| [Google ADK](https://adk.dev/) (Official documentation) | Agent development, orchestration, tools, deployment. | Evaluate development tools and business UI separately. | Builds/deploys Agents; not a desktop application-registration protocol. |
| [Microsoft Agent Framework](https://learn.microsoft.com/en-us/agent-framework/overview/) (Official documentation) | Agent/workflow development, continuing relevant AutoGen/Semantic Kernel capabilities. | Applications integrate their own UI and channels. | SDK/service dependencies, without requiring a particular desktop host page. |
| [CrewAI](https://docs.crewai.com/en/concepts/flows) (Official documentation) | Flows express business processes and state. | Flow execution does not prescribe business frontends. | Application libraries/deployment dependencies, not a page-plugin format. |
| [PydanticAI](https://pydantic.dev/docs/ai/integrations/ui/overview/) (Official documentation) | Typed Agents and UI-event-stream integration. | UI Event Streams adapts events for frontend consumption. | Frontend and Agent runtime may separate; not a complete application-installation protocol. |
| [Mastra](https://mastra.ai/docs) (Official documentation) | TypeScript agents, workflows, services, storage. | Next.js, React/Vite, and other integrations; Studio manages development. | Business applications deploy independently with Mastra service/library dependencies. |
| [NeMo Agent Toolkit](https://github.com/NVIDIA/NeMo-Agent-Toolkit) (Official repository description) | Functions, models, workflow configuration, multi-framework integration. | Reviewed entries primarily run/optimize Agent workflows. | Deployment toolchain; generic desktop application plugins unconfirmed. |
| [smolagents](https://github.com/huggingface/smolagents) (Official repository description) | CodeAgent executes code and tools; Agents can be shared. | Application UI is implemented/integrated separately. | Supports ordinary Python programs; not a host-page extension protocol. |

**Application platform (3)**

| Project | Mechanism | UI | Host dependency |
| --- | --- | --- | --- |
| [Dify](https://github.com/langgenius/dify-plugin-daemon) (Official repository description) | Plugin Daemon manages local/debug/serverless execution. | Plugin execution and Dify application display are separate; backend plugins are not arbitrary UI. | Local subprocesses or remote execution still depend on Dify plugin-call protocols. |
| [Open WebUI](https://docs.openwebui.com/features/extensibility/plugin/) (Official documentation) | Python Tools/Functions extend inference/platform behavior. | Actions can add chat buttons; event-driven interaction extensions also exist. | Platform extensions depend on Open WebUI, not automatically standalone software. |
| [Chainlit](https://docs.chainlit.io/api-reference/elements/custom) (Official documentation) | Python applications with custom elements and callbacks. | CustomElement uses React; custom frontends are also possible. | Elements depend on Chainlit context; complete applications may deploy as services. |

**Interface protocol (4)**

| Project | Mechanism | UI | Host dependency |
| --- | --- | --- | --- |
| [OpenAI Plugins (formerly Apps SDK path)](https://developers.openai.com/plugins/build/chatgpt-ui) (Official documentation) | MCP tools provide UI resources, a standard bridge, and host-specific extensions. | iframe Web UI; current official documentation builds on MCP Apps. | Portable across compatible hosts; window.openai-specific capabilities are not automatically portable. |
| [MCP Apps](https://modelcontextprotocol.io/extensions/apps/overview) (Official documentation) | Tools associate with ui:// resources; JSON-RPC / postMessage. | Sandboxed Web UI with frontend-framework choice. | Compatibility covers UI/tool interaction, not local installation, business databases, or background tasks. |
| [AG-UI](https://docs.ag-ui.com/introduction) (Official documentation) | Event communication between Agents and UI. | Does not prescribe HTML, native components, or page frameworks. | Solves streaming interaction, not application packages, permissions, or deployment. |
| [A2UI](https://a2ui.org/) (Official documentation) | Generates structured UI descriptions rendered by trusted component catalogs. | Limited to available components and renderer contracts. | Cross-platform rendering, not execution of arbitrary generated frontend code. |

**Evidence limits**

- "Official repository description" means reading public descriptions, not auditing a repository. Compatibility without measurement does not count as accepted. Links support nearby claims, not whole implementations.
- Relevant DSH distribution, worktable and OpenProgram code was checked; other projects rest on current official documents, public examples or repository descriptions. Not every product was installed and tested.
- "Unverified" means insufficient evidence, not absence. Cursor and Windsurf internals are unknown. AutoGen and Semantic Kernel are treated within Microsoft Agent Framework's evolution.
- The list is not closed: commercial products, community forks and private harnesses are not exhausted. Relevant Qwen Code and Strands pages could not be obtained; Trae, Kimi CLI and cloud software-generation services are outside the matrix. These gaps limit uniqueness claims, not the requirements here.
- DSH details use installed distribution 0.1.5-rc.1, worktable source 0.3.3. Neither received full compatibility acceptance; one version's demo is not evidence for another's capabilities.

**Mechanisms that shaped the choices**

| Project | Finding |
| --- | --- |
| [dsh-worktable](https://github.com/Aisland-SJL/dsh-worktable) | Host services, UI slots, React split layout; not standalone. Generated windows read HTML, URLs or files from artifact manifests. Pages using only their own resources can be hosted separately; pages on DSH routes, sessions or plugin services lose them outside DSH. |
| [DSH dynamic Cordis plugins](https://github.com/deepseek-ai/deepseek-harness) | Host parts register handlers; client parts run in the host and call the backend. Real logic, but bound to supported APIs, loading lifecycle and code formats. Node `vm` is not OS-level isolation. |
| [Hermes](https://hermes-agent.nousresearch.com/docs/user-guide/features/extending-the-dashboard) | Pane, page, sidebar, status-bar and palette contributions; local plugins load directly in the host, unlike isolated HTML previews; Dashboard has pages and slots. Taken: explicit contributions and lifecycles, without giving generated applications host internals. |
| Pi | Custom UI uses terminal components: not all plugin interfaces are HTML. |
| [OpenClaw widget panel](https://docs.openclaw.ai/platforms/mac/canvas) | Rendering only. Host actions and A2UI belong to Control UI and the session dashboard; sharing the name canvas transfers no capability. |
| MCP Apps, AG-UI, A2UI | Portable Web resources and host communication; Agent-to-UI events; declarative rendering from component catalogs. None supplies installation, data migration or background lifecycles. |
| LangGraph, AgentOS, OpenHands | Applications can deploy independently yet still need libraries and services: leaving the desktop client is not removing every dependency. |
| [Chainlit custom React frontend](https://docs.chainlit.io/deploy/react/overview) | A complete application may deploy as a service with its own frontend. |

## Implementation status

| Phase | Delivers | State |
| --- | --- | --- |
| 1. Definition and source | One definition and source identity, validation, enabled state; discovery executes no code | Implemented |
| 2. Menu and pages | Static applications open, reuse tabs, bind instances, isolate resources | Implemented |
| 3. Business operations and Runtime | Python operations on model and Workflow contracts; cancellation, questions, results persist | Implemented |
| 4. Complete lifecycle | Dependencies, background tasks, restart interruption, digest checks, uninstall | Implemented |
| 5. Independent deployment | `programs export`: the same window and operations run outside the App with a trimmed runtime. Accepted with Meetings: window, operations, conversation panel and a model follow-up | Implemented |
| 6. Compatibility | MCP Apps adapter; other-language runners later. Acceptance: the same UI and operations run on another vendor's host | Not built |

Also not built: attachment APIs, automatic schema migration, conversation-context import, manual menu order, PDF import in the paper-reader sample, automatic plugin-to-Application adaptation.

**Code map**

| File | Role |
| --- | --- |
| `apps/web/components/center-tabs/pages/new-tab-page.tsx` | Launch buttons; list refreshed on focus and every ten seconds |
| `apps/web/components/center-tabs/pages/application-tab-pane.tsx` | Sandbox iframe and MessagePort instance API |
| `openprogram/programs/_host/ui/loader.py` | Mounts each application through one `ProgramContext` |
| `openprogram/programs/_host/ui/catalog.py`, `catalog_store.py` | Registrations, digest, environments, trust |
| `openprogram/programs/_host/ui/service.py` | Operations on `ExecutionStore`, Attempts and Drivers; shared cancellation cleanup |
| `openprogram/programs/_host/ui/runner.py` | One trusted operation per process; Runtime and `context` |
| `openprogram/programs/_host/ui/state.py` | Instances, operation metadata, events, instance data |
| `openprogram/programs/_host/ui/host_calls.py`, `audio.py` | Host calls and recordings for packages |
| `openprogram/interfaces/server/routes/catalog/applications.py` | `/api/applications`, instance, run and asset routes |
| `openprogram/interfaces/standalone/` | Running on its own: `server.py` (server, launcher), `shell/` (page, built from `web/`), `conversations.py`, `settings.py`, `export.py` |

Follows [Programs code structure](https://fzkuji.github.io/OpenProgram/docs/reference/design/runtime/programs/programs-architecture.html); broader comparison in [Framework comparison](https://fzkuji.github.io/OpenProgram/docs/reference/design/framework-comparison/overview.html).

**Acceptance**

- Sample applications: a non-model calculator, a paper reader saving annotations and generating summaries from pasted text, batch file analysis with progress and restart interruption.
- Checked through public entries (API, CLI, real browser): install, update, disable, reinstall after uninstall, failures, repeated clicks, reopen and restart. Default-App checks: harnesses under Applications, management and menu reuse of an instance, preserved notes and analysis results, menu hiding and restoration, tabs and results restored after restart.
- Integration tests cover model success and failure, cancellation, duplicate submission and interruption; offline tests do not guarantee live model availability.
- Performance targets: listing New tab starts no business process; repeated opening creates no second same-scope instance; opening triggers no code generation or model request. No unmeasured latency commitments.
