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

mofa-sdk

The unified SDK providing the main API surface for users.

Purpose

mofa-sdk provides:

  • Re-exports from all layers
  • Cross-language bindings (UniFFI, PyO3)
  • Convenient builder patterns
  • Secretary agent mode

Module Organization

#![allow(unused)]
fn main() {
use mofa_sdk::{
    kernel,   // Core abstractions
    runtime,  // Runtime components
    llm,      // LLM integration
    plugins,  // Plugin system
};
}

Usage

#![allow(unused)]
fn main() {
use mofa_sdk::kernel::prelude::*;
use mofa_sdk::llm::{LLMClient, openai_from_env};
use mofa_sdk::runtime::AgentRunner;

let client = LLMClient::new(Arc::new(openai_from_env()?));
let agent = MyAgent::new(client);
let mut runner = AgentRunner::new(agent).await?;
}

Feature Flags

FlagDescription
openaiOpenAI provider
anthropicAnthropic provider
uniffiCross-language bindings
pythonNative Python bindings

See Also