charm init --template interactive starter. Use any scaffold (for example python), then set runtime.lifecycle: interactive in charm.yaml as shown below.
Use Case
Use this lifecycle for chat-style agents that need low-latency streaming, thread history, and real-time user interaction.Prerequisites
- Charm CLI.
- A supported interactive runtime.
- Published version available in Charm Store for end-to-end UI testing.
Configuration Surface
Document these fields:runtime.lifecycle: interactiveruntime.adapter.typeinterface.inputruntime.adapter.environment_variables
How Interactive Runs Work
- The Store sends the user’s message to the runner.
- The runner authenticates the user and creates a run record.
- The runner forwards the request to the interactive worker.
- The worker streams assistant output back to the browser.
- Completion callbacks persist the run and messages.
Local and Staging Testing
- Use the Store UI to test thread behavior.
- Confirm the published version has
runtime.lifecycle: interactive. - Confirm the runner has
CHARM_INTERACTIVE_WORKER_URLconfigured in staging or production. - Confirm required environment variables are available to the worker.
