Sandbox — LSD is in active testing. All systems operational·payments are test-mode (no real charges).
Overview Use Cases News Docs Tool Store Support Community Get LSD
All docs
Context· property

Context.events

the running app's event bus, to subscribe or emit

Python
events: EventBus

Returns EventBus — the running app's event bus, or None

Example#

Python
@tool.command("demo/watch")
def watch(ctx: Context):
    ctx.events.on("engine/run/finished", on_done)

Notes#

Subscribe with on(pattern, handler) or emit topics — use the topic enums (Events, ViewerEvents, …), not raw strings. Handlers are async. A lazily populated slot — None when no bus is available.

See also#

API: emit · engine · Context

Guides: Commands & actions

By LSD Team · Last updated Jul 17, 2026 Ask on Discord View as Markdown