Appearance
What is Chat?
Chat is the user-facing conversation app for Matrix. It is one vertical built on the Matrix substrate (Matrix is docker-for-actors / npm-for-actors — a typed pub/sub/RPC fabric where every Feed, Service, and Component is an actor on a federated bus; Chat is one product surface on that fabric, not the fabric itself).
It lets a user pick an actor target (a chat agent, a workstream, an actor running on the user's Host, or the Director's currently-selected mount) and have a back-and-forth conversation with it. Behind the scenes, Chat translates user input into $prompt ops on system.agents, follows the resulting $activity stream, and renders thinking, tokens, tool calls, and final responses inline.
The shipped surface
The Chat app (@open-matrix/chat) is a hybrid package — it has a browser bundle and a runtime-side component declaration. The browser bundle registers these custom elements:
| Tag | Class | Purpose |
|---|---|---|
chat-app | MatrixChatApp | Page-level shell and orchestrator. |
chat-input | ChatInput | Text input with submit. |
chat-message-list | ChatMessageList | Streaming transcript. |
chat-sidebar | ChatSidebar | Sessions, settings, themes. |
chat-header | ChatHeader | Target/session indicator. |
chat-session-panel | SessionPanel | Session detail. |
chat-connection-status | ConnectionStatus | Bus connection indicator. |
chat-status-bar | ChatStatusBar | Bottom status. |
mx-chat-message | MxChatMessage | Single message bubble (markdown, code, etc.). |
mx-code-viewer | MxCodeViewer | Highlighted code block actor. |
mx-markdown-viewer | MxMarkdownViewer | Markdown actor with KaTeX, mermaid. |
mx-data-table | MxDataTable | Inline interactive data table. |
mx-component-browser | MxComponentBrowser | Pick a component to embed in chat. |
mx-activity-trace | MxActivityTraceActor | Render $activity frames as an ops trace. |
Plus the runtime-side headless services (declared in matrix.json components[]): ChatSecurityRealmService, ChatTopicClaimService, ChatConversationProxy, ChatComponentLibraryProxy, ChatIdentityProxy, ChatPreferencesProxy, ChatSessionStateProxy, ChatMcpProxy, ChatExportService.
What Chat does today
- Sends prompts to any promptable actor by setting a "target" (the actor you're conversing about) and routing through
system.agents. - Streams responses (thinking → tokens → done) into the message list.
- Maintains sessions: every conversation has a session ID, persisted by
system.agentsand surfaced in the sidebar. - Supports inline components (e.g.,
/files,/build,/diff,/components) via themessages.add-componentop onchat-message-list. Slash commands are listed inChatApp.ts:131-146. - Exports conversations as Markdown / JSON / printable HTML via
ChatExportService. - Loads existing sessions (resume) by reading
session_state.read({ key: 'transcript' })againstsystem.agents.
What Chat doesn't do
- Run inference itself. Chat does not call provider drivers directly; it asks
system.agentsand observes activity frames. - Manage credentials.
system.factotumis the only actor that reads/writes provider credentials. - Replace Director's Explorer. The Chat app is a focused thread lens; for browsing the actor space, use Director.
- Fan out one prompt to multiple agents. A session has a single target.
Three runtime modes
The same browser bundle adapts based on the declared mode (chat/src/runtime/resolve-chat-config.ts:9):
| Mode (code identifier) | Where it runs | When it's used |
|---|---|---|
standalone-local | Self-contained: in-memory transport, local services, no external bus. | Demos, tests, docs sandboxes. |
standalone-connected | Browser, with a caller-supplied transport (e.g., NATS-WS). | Embedding Chat in another package's runtime. |
daemon-hosted | Deployed inside a runtime supervised by Host Service; services are runtime-side actors. | Default for /apps/chat/ on a real Host. |
The mode determines which services are bound (in-memory LocalConversationService vs. RemoteActorConversationAdapter, etc.). See Developer Guide: runtime integration.
Status note. The string
daemon-hostedis a v1 code-level identifier. Host Service supervises runtimes today; the retiredmatrixddaemon is not the product path. The identifier will be renamed to runtime-vocabulary when the manifest reconciliation inP1.41lands.
See also
Source:
projects/matrix-3/packages/chat/src/index.ts(registration),src/ChatApp.ts:151-198(page actor declaration),chat/matrix.json(manifest).