Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Runtime API Reference

The runtime layer (mofa-runtime) manages agent lifecycle and execution.

Core Components

Overview

#![allow(unused)]
fn main() {
use mofa_sdk::runtime::AgentRunner;
use mofa_sdk::kernel::{AgentInput, AgentContext};

// Create runner with an agent
let mut runner = AgentRunner::new(my_agent).await?;

// Execute
let output = runner.execute(AgentInput::text("Hello")).await?;

// Shutdown
runner.shutdown().await?;
}

Modules

runner

Agent execution with lifecycle management.

builder

Builder pattern for constructing agents.

registry

Agent registration and discovery.

coordination

Multi-agent coordination patterns.

Feature Flags

FlagDescription
doraDora-rs distributed runtime
monitoringBuilt-in monitoring

See Also