Agent Runtime
The Agent Runtime defines how an AI-native game runs. It loads the playable artifact, connects the VifuHub SDK, manages lifecycle events, and exposes only the state, resources, tools, and host capabilities declared by the project.
Runtime contract
| Part | Responsibility |
|---|---|
| Project manifest | Declares the build output, runtime entry, resources, and requested capabilities. |
| Runtime gateway | Delivers the entry HTML and executable release assets from an isolated origin. |
| Agent Runtime | Runs game code, agents, state, resources, tools, and lifecycle events. |
| VifuHub SDK | Provides the game-facing API for runtime services and host capabilities. |
| VifuHub CLI | Builds and checks the release before upload. |
An Agent is a runtime participant with its own instructions, tools, and run state. Use separate Agents when NPCs, tutors, directors, or other participants must remain isolated. A single model call does not require a separate Agent.
Release flow
vf deployvalidates the project manifest.- The CLI builds and scans the playable artifact.
- VifuHub records the release and its runtime metadata.
- The public project page resolves the playable release.
- The Agent Runtime loads the release from the runtime origin.
- The VifuHub SDK connects declared game tools and host capabilities.
The Agent Runtime does not make arbitrary browser code trusted. Uploaded game code stays isolated, while authorization remains enforced by the service that owns each protected operation.
