Skip to content

Companion SDK

Package@consenger/companion-sdk@0.1.0-alpha.0
Protocolcompanion.plugin.v1
RuntimeVifu Web iframe / iOS WKWebView
StatusPublic alpha

@consenger/companion-sdk is the browser SDK for companion-native agentic games. It lets a game expose safe gameplay context to the Vifu host and receive companion-triggered commands.

The production scope is intentionally narrow: browser games loaded by Vifu Web or by the iOS WKWebView runtime. Node.js and arbitrary backend integrations are not part of this SDK contract.

Compatibility

PackageProtocolCapabilityRuntime
@consenger/companion-sdk@0.1.xcompanion.plugin.v1companion.plugin.v1Vifu Web iframe, iOS WKWebView

Mental model

  • Context is readable game state, such as the current prompt, score, selected word, or scene.
  • Command is a game-owned action the companion may ask the game to run.
  • Observation is a compact event or fact the game reports.
  • Signal is a rare moment where the game asks the companion to pay attention.
  • Reaction is local feedback from the game after a signal or command.

Keep companion data compact and player-facing. Do not expose access tokens, hidden answers, private user notes, or implementation details.

Next pages