MagicAF is a modular, production-grade Rust framework that provides the foundational building blocks for AI-powered systems: embeddings, vector search, LLM orchestration, and RAG workflows.

It is designed from the ground up for air-gapped, on-premises environments — no cloud dependencies, no vendor lock-in. MagicAF is a defense-grade, HIPAA-compliant AI toolkit suitable for classified, healthcare, and regulated deployments.


Getting Started →

Install MagicAF, set up local services, and run your first RAG pipeline in under 5 minutes.

Core Concepts →

Understand the architecture, layered design, and trait-based extensibility model.

Guides →

Step-by-step tutorials for building custom adapters, structured output parsing, and more.

API Reference →

Complete reference for every trait, struct, configuration option, and error type.

Deployment →

Docker Compose, air-gapped setup, edge/mobile deployment, observability, and scaling.

Examples →

Working code for minimal RAG, document Q&A, and multi-source analysis pipelines.


Design Philosophy

PrincipleRationale
Extensibility over clevernessClean trait boundaries; domain logic lives in adapters, not the framework.
Clarity over abstractionFlat DTO structs, explicit error codes, straightforward module layout.
Interface stability over optimizationPublic API surface is small and versioned; internals can change freely.
Local-firstEvery component assumes a local endpoint — no cloud SDK required.
FFI-readyFlat structs + numeric error codes prepare the surface for C / Swift / Python / Java bindings.

What’s in the Box

CratePurpose
magicaf-coreTraits, DTOs, config, error types, RAG engine, adapter interfaces, in-memory vector store
magicaf-qdrantQdrant vector store implementation (REST API)
magicaf-local-llmOpenAI-compatible local LLM client