Skip to content

The runtime engine for MUXI formations. Runs locally, in the cloud, or embedded in any app.

License

Notifications You must be signed in to change notification settings

muxi-ai/runtime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2,676 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

MUXI Runtime

License Python 3.10+

The execution engine for AI agent formations.

For most users: Install MUXI CLI for the complete experience. This repo is for contributors and developers embedding the runtime directly.

Important

MUXI Ecosystem

This repository is part of the larger MUXI ecosystem.

πŸ“‹ Complete architectural overview: See muxi/ARCHITECTURE.md - explains how core repositories fit together, dependencies, status, and roadmap.

What is MUXI Runtime?

MUXI Runtime transforms declarative YAML configurations into running AI systems. It's the core engine that powers the MUXI Server.

Core responsibilities:

  • Formation execution - Loads and runs agent configurations from YAML
  • Overlord orchestration - Routes requests, manages clarifications, coordinates workflows
  • Memory systems - Three-tier memory (buffer, persistent, vector)
  • Tool integration - MCP protocol support for external tools
  • Multi-tenant isolation - User and session management

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  MUXI Server (Go) - Formation lifecycle management  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                         β”‚
                         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  MUXI Runtime (Python) ◄── THIS REPO                β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚  Formation Engine (YAML loader & validator)   β”‚  β”‚
β”‚  β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€  β”‚
β”‚  β”‚  Overlord β”‚ Agents β”‚ Workflow β”‚ Background    β”‚  β”‚
β”‚  β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€  β”‚
β”‚  β”‚  Memory β”‚ MCP β”‚ A2A β”‚ LLM β”‚ Observability     β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                         β”‚
                         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  External Services (LLM APIs, MCP Servers, DBs)     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Package Structure

The runtime uses src/muxi/runtime/ to share the muxi namespace with the Python SDK:

src/muxi/runtime/
β”œβ”€β”€ formation/          # Formation engine
β”‚   β”œβ”€β”€ overlord/       # Central orchestration
β”‚   β”œβ”€β”€ agents/         # Agent implementations
β”‚   β”œβ”€β”€ workflow/       # Task decomposition, SOPs
β”‚   β”œβ”€β”€ server/         # Formation API (FastAPI)
β”‚   └── background/     # Webhooks, scheduling, async
β”œβ”€β”€ services/           # Runtime services
β”‚   β”œβ”€β”€ memory/         # Memory systems
β”‚   β”œβ”€β”€ mcp/            # MCP client
β”‚   β”œβ”€β”€ a2a/            # Agent-to-agent
β”‚   └── llm/            # LLM abstraction
└── datatypes/          # Type definitions

Quick Start

Using with MUXI Server (recommended)

# Install MUXI CLI
curl -fsSL https://muxi.ai/install | sh

# Create and run a formation
muxi new my-assistant
cd my-assistant
muxi dev

Embedding directly

pip install muxi-runtime
from muxi.runtime import Formation
import asyncio

async def main():
    formation = Formation()
    await formation.load("formation.afs")
    overlord = await formation.start_overlord()

    response = await overlord.chat(
        "Hello!",
        user_id="user123"
    )
    print(response)

asyncio.run(main())

Development

git clone https://github.com/muxi-ai/runtime
cd runtime
pip install -e ".[dev]"

# Run tests
pytest tests/unit -v
pytest tests/integration -v
pytest e2e/tests -v

See contributing/README.md for contributor documentation.

Related Repositories

Repo Description
muxi-ai/muxi Main repo with architecture docs
muxi-ai/server Go server that hosts this runtime
muxi-ai/cli Command-line tool
muxi-ai/sdks Python, TypeScript, Go SDKs
muxi-ai/schemas API schemas

Documentation

License

Elastic License 2.0 - Free to use, modify, and embed in products. Cannot be offered as a hosted service.

About

The runtime engine for MUXI formations. Runs locally, in the cloud, or embedded in any app.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors 3

  •  
  •  
  •  

Languages