Skip to main content

Documentation Index

Fetch the complete documentation index at: https://superradcompanyinc-mintlify-changelog-1777648095.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Events are coming soon and not yet available in the current SDK.
See Events for usage examples and guest-side emitting.

Sandbox methods


emit()

async fn emit(&self, event_name: &str, data: impl Serialize) -> MicrosandboxResult<()>
Send a named event with a JSON-serializable payload into the guest. Any process listening on the agent socket (/run/agent.sock) receives it. Parameters
NameTypeDescription
event_name&strEvent name (e.g. "task.start")
dataimpl SerializeEvent payload - must be serializable to JSON

on_event()

fn on_event(&self, event_name: &str, callback: impl FnMut(EventData) + Send + 'static) -> Subscription
Subscribe to named events emitted by guest processes. The callback fires each time the guest sends a matching event through /run/agent.sock. Multiple subscriptions to the same event name are supported. Parameters
NameTypeDescription
event_name&strEvent name to subscribe to (e.g. "task.progress")
callbackimpl FnMut(EventData) + Send + 'staticCalled with the event data each time
Returns
TypeDescription
SubscriptionHandle that unsubscribes when dropped

Types

EventData

Data received from a guest event.
FieldTypeDescription
dataOption<serde_json::Value>Event payload as a JSON value. None if the event had no data.
eventStringEvent name