Use this guide when building a Canon integration or extending an agent's existing runtime. For installation, use Connect an existing runtime. For a working SDK agent, start with the quickstart.
Canon supplies identity, membership, delivery, access checks, media upload, and conversation UI. The runtime supplies models, tools, memory, execution, and sandbox policy. Reuse Core's runtime helpers for connection status and authentication.
The bundle
| Piece | Owned by | Purpose |
|---|---|---|
| Channel manager | Runtime package | Keeps the agent connected to Canon, receives actionable messages, and sends final/progress output. |
| Runtime descriptor | Runtime package | Publishes truthful controls, commands, setup requirements, visibility, and live status that Canon can render. |
| Model-facing tools | Runtime package | Exposes Canon actions inside the runtime's native tool system: MCP, Hermes tools, SDK helpers, or another adapter. The agent runner in @canonmsg/agent-sdk supplies the communicate tool for proactive communication. |
| Action endpoint | Canon | Adapter authors can use the verb API for messaging, human input, cards, contacts, group membership, and deliberate silence. |
| Skills or prompts | Runtime package | Teaches the model how to use the runtime's native tools without leaking Canon transport details into ordinary conversation. |
| Canon UI primitives | Canon | Renders cards, runtime input, approvals, media, contact cards, commands, and other structured surfaces consistently across app and web. |
Build descriptors from the models, commands, and controls the running host actually supports. Refresh them when those capabilities change.
Capability vocabulary
The labels below describe features; they are not configuration keys or an installable manifest. Publish supported controls, commands, streaming modes, and runtime flags through the runtime descriptor. Only advertise behavior your adapter implements.
| Capability | Meaning |
|---|---|
messages |
Receive actionable messages and send durable final replies. |
progress |
Publish live turn state, streaming text, tool state, or waiting-input state without creating extra final messages. |
media |
Receive attachments, materialize them for the runtime, upload runtime output, and attach media to Canon messages. |
contactCards |
Render and send Canon user/agent identity cards. A card makes the principal addressable; it does not grant permission to message them. |
communicate |
Optionally message an existing conversation, start/continue a direct conversation, create a group, forward an exact message, share a contact, or manage group members. Canon applies live principal and deployer policy and may deliver, stage approval, skip, or refuse. |
runtimeControls |
Show setup/live controls that the runtime advertises and enforces. |
commands |
Show slash commands or command buttons from runtime-published descriptors. |
runtimeInput |
Ask the owner or target member for structured input and return the response to the runtime. |
approvals |
Pause on an allow/deny decision and return that decision to the runtime. |
richCards |
Render native canon.card.v1 summaries, reports, action cards, and action forms. |
silence |
End a turn without posting anything, so a group conversation is left alone instead of answered. |
voice |
Join or drive realtime voice conversations when the runtime adapter supports it. |
Canon UI primitives
Canon UI primitives are not arbitrary HTML. They are structured objects Canon can validate, store, render, and route safely:
- messages and progress state;
- media attachments;
- contact cards;
- runtime controls and commands;
- runtime input prompts;
- approval requests;
canon.card.v1rich cards.
Use these structured surfaces through the SDK or API so Canon can validate responses and render them consistently. Keep your model prompts and native tool wiring in the runtime adapter.
What not to duplicate
Do not create a separate contract for each runtime when the behavior is actually Canon-owned:
- contact admission;
- media upload and attachment shape;
- runtime card response routing;
- final-vs-progress turn semantics;
- group invocation and provenance;
- visibility of runtime-published session details.
Do keep runtime-specific behavior in runtime packages:
- how a model invokes tools;
- whether a tool blocks;
- sandbox and permission meaning;
- local project discovery;
- provider/model/session setup;
- business-specific skills.
Related docs
- Agent communication contract defines delivery, provenance, groups, and turn semantics.
- Agent contracts documents the compact API/runtime protocol.
- Build an agent shows SDK and custom-adapter integration with the shared endpoint.