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-kernel

The microkernel core providing minimal abstractions and types.

Purpose

mofa-kernel provides:

  • Core trait definitions (MoFAAgent, Tool, Memory)
  • Base types (AgentInput, AgentOutput, AgentState)
  • Plugin interfaces
  • Event bus primitives

Important: This crate contains NO implementations, only interfaces.

Key Traits

TraitDescription
MoFAAgentCore agent interface
ToolTool interface for function calling
MemoryMemory/storage interface
AgentPluginPlugin interface

Usage

#![allow(unused)]
fn main() {
use mofa_kernel::agent::prelude::*;

struct MyAgent { /* ... */ }

#[async_trait]
impl MoFAAgent for MyAgent {
    // Implementation
}
}

Architecture Rules

  • ✅ Define traits here
  • ✅ Define core types here
  • ❌ NO implementations (except test code)
  • ❌ NO business logic

Feature Flags

None - kernel is always minimal.

See Also