Skip to content

memaxo/alfred

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

853 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

                                        │
                                       ╱│╲
                                      ╱ │ ╲
                                     ╱  ●  ╲
                                    ╱ ╱   ╲ ╲
                                   ╱ ╱     ╲ ╲
                                  ━━━━━━━━━━━━━

                                  A L F R E D

                       Intelligence emerges from the void.

Autonomous Learning Framework for Reasoning, Execution & Decision-making

MIT License TypeScript Bun PostgreSQL


┌────────────────────────────────────────────────────────────────────────────┐
│                                                                            │
│     ┌─────────────────────────────────────────────────────────────────┐    │
│     │                                                                 │    │
│     │   $ bun x alfred                                                │    │
│     │                                                                 │    │
│     └─────────────────────────────────────────────────────────────────┘    │
│                                                                            │
│                        One command. Your AI. Your hardware.                │
│                                                                            │
└────────────────────────────────────────────────────────────────────────────┘


The Void Speaks

                    ◉ ─────────────────────────────────────── ◎
                    │                                         │
                    │       YOUR DATA NEVER LEAVES            │
                    │                                         │
                    ◎ ─────────────────────────────────────── ◉

A privacy-first, fully offline personal AI assistant built for deep hyperpersonalization. ALFRED runs entirely on your hardware. No cloud dependencies. No data exfiltration. No compromises.



Surfaces

┌──────────────────┐   ┌──────────────────┐   ┌──────────────────┐   ┌──────────────────┐
│                  │   │                  │   │                  │   │                  │
│       WEB        │   │      MOBILE      │   │     CARPLAY      │   │       TUI        │
│                  │   │                  │   │                  │   │                  │
│    ┌────────┐    │   │        ◉         │   │      ╱●╲         │   │   ╔══════════╗   │
│    │  ◉  ◉  │    │   │       ╱│╲        │   │    ═══════       │   │   ║ ▓▓▓▓▓▓▓▓ ║   │
│    │────────│    │   │      ╱ │ ╲       │   │   ┌───────┐      │   │   ╠══════════╣   │
│    │        │    │   │       ─┼─        │   │   │       │      │   │   ║          ║   │
│    │        │    │   │       ╱ ╲        │   │   └───────┘      │   │   ╚══════════╝   │
│    └────────┘    │   │                  │   │                  │   │                  │
│                  │   │                  │   │                  │   │                  │
│   Desktop shell  │   │  iOS companion   │   │   Voice-first    │   │ Headless power   │
│   with Mindscape │   │   & Android      │   │   while driving  │   │   for servers    │
│                  │   │                  │   │                  │   │                  │
└──────────────────┘   └──────────────────┘   └──────────────────┘   └──────────────────┘


Signal From Noise

┌────────────────────────────────────────────────────────────────────────────────────────┐
│                                                                                        │
│    ┌──────────────────────────────────────────────────────────────────────────────┐   │
│    │                                                                              │   │
│    │   "Deploy the preview environment for the auth-refactor branch"              │   │
│    │                                                                              │   │
│    └──────────────────────────────────────────────────────────────────────────────┘   │
│                                           │                                            │
│                                           ▼                                            │
│    ┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─┐   │
│    │  ◐ Thinking...                                                              │   │
│    │                                                                             │   │
│    │     Analyzing repository structure                                          │   │
│    │     Identifying Dockerfile and compose config                               │   │
│    │     Building container: auth-refactor-preview                               │   │
│    │     Running database migrations                                             │   │
│    │     Configuring reverse proxy                                               │   │
│    │                                                                             │   │
│    │  ✓ Deployed: https://preview-auth-refactor.local                            │   │
│    │                                                                             │   │
│    └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─┘   │
│                                                                                        │
│                    ALFRED learns which deployment patterns YOU prefer.                 │
│                                                                                        │
└────────────────────────────────────────────────────────────────────────────────────────┘


The Orchestrator

        ┌───────────────┐         ┌───────────────┐         ┌───────────────┐
        │               │         │               │         │               │
        │    Wave 1     │         │    Wave 2     │         │    Wave 3     │
        │               │         │               │         │               │
        │  ┌─────────┐  │         │  ┌─────────┐  │         │  ┌─────────┐  │
        │  │ Agent A │  │         │  │ Agent D │  │         │  │ Agent F │  │
        │  │ Agent B │  │  ────►  │  │ Agent E │  │  ────►  │  │         │  │  ────►  ✓ Merge
        │  │ Agent C │  │         │  │         │  │         │  │         │  │
        │  └─────────┘  │         │  └─────────┘  │         │  └─────────┘  │
        │               │         │               │         │               │
        │   parallel    │         │   parallel    │         │   parallel    │
        │               │         │               │         │               │
        └───────────────┘         └───────────────┘         └───────────────┘

               Multi-agent wave orchestration. Complex tasks decomposed.
                Parallel execution. Conflict resolution. Self-correction.


Emergent Trust

         Day 1                         Week 2                        Month 3
    ┌─────────────┐               ┌─────────────┐               ┌─────────────┐
    │             │               │             │               │             │
    │  █░░░░░░░░  │    ──────►    │  █████░░░░  │    ──────►    │  █████████  │
    │             │               │             │               │             │
    │  Autonomy:  │               │   Trust:    │               │    Full     │
    │     10%     │               │     55%     │               │   Autonomy  │
    │             │               │             │               │             │
    └─────────────┘               └─────────────┘               └─────────────┘

                         Bayesian learning from every interaction.
                    Success increases trust. Failure adds caution.
                        Your patterns. Your infrastructure.


Local & Secure

┌────────────────────────────────────────────────────────────────────────────────────────┐
│                                                                                        │
│                                                                                        │
│      ┌─────────────────────────────────────────────────────────────────────────┐      │
│      │                                                                         │      │
│      │   🔒  Biometric elevation for dangerous operations                      │      │
│      │   🔑  Ed25519 token signing with policy engine                          │      │
│      │   📋  Full audit logging — every action traced                          │      │
│      │                                                                         │      │
│      │   🎤  Local STT (Faster-Whisper) — no cloud transcription               │      │
│      │   🔊  Local TTS (Piper/Maya1) — conversations stay private              │      │
│      │   📊  Local embeddings (KaLM-12B) — zero external API calls             │      │
│      │                                                                         │      │
│      └─────────────────────────────────────────────────────────────────────────┘      │
│                                                                                        │
│                           Trust nothing. Verify everything.                            │
│                                                                                        │
└────────────────────────────────────────────────────────────────────────────────────────┘


The Orb



                                    ░░░░░░░░░░░░░░░░░
                                ░░░░░░░░░░░░░░░░░░░░░░░░░
                              ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
                            ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
                           ░░░░░░░░░░░░░░███░░░░░░░░░░░░░░░░
                          ░░░░░░░░░░░░░░░███░░░░░░░░░░░░░░░░░
                          ░░░░░░░░░░░░░░░███░░░░░░░░░░░░░░░░░
                          ░░░░░░░░░░░░░░░███░░░░░░░░░░░░░░░░░
                           ░░░░░░░░░░░░░░███░░░░░░░░░░░░░░░░
                            ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
                              ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
                                ░░░░░░░░░░░░░░░░░░░░░░░░░
                                    ░░░░░░░░░░░░░░░░░


                               Your presence indicator.
                          Breathing. State-reactive. Alive.
                       Voice-responsive bioluminescent corona.


Extensible

┌─────────────────────────┐     ┌─────────────────────────┐     ┌─────────────────────────┐
│                         │     │                         │     │                         │
│   40+ Built-in Tools    │     │    MCP Compatible       │     │   Custom Agents         │
│                         │     │                         │     │                         │
│   • Docker lifecycle    │     │   • Filesystem server   │     │   • Define tools        │
│   • Git operations      │     │   • Git server          │     │   • Set policies        │
│   • Proxmox management  │     │   • Custom servers      │     │   • Tune personality    │
│   • Linear integration  │     │   • Third-party MCP     │     │   • Train on your data  │
│   • Knowledge graph     │     │                         │     │                         │
│                         │     │                         │     │                         │
└─────────────────────────┘     └─────────────────────────┘     └─────────────────────────┘


Quick Start

# Clone
git clone https://github.com/memaxo/alfred.git && cd alfred

# Install
bun install

# Configure
cp config/env.example .env
bun scripts/gen-keys.ts >> .env
# Edit .env: add OPENAI_API_KEY (or run fully local)

# Database
bun run db:start      # PostgreSQL + pgvector
bun run db:migrate    # Apply schema

# Launch
bun run dev           # → http://localhost:3000

Full local privacy? See Local Models Installation for offline STT/TTS/embeddings.



Architecture

┌─────────────────────────────────────────────────────────────────────────────────────────┐
│                                    INTERFACES                                           │
│         Web (TanStack Start)  ·  Desktop (Buntralino)  ·  Mobile (Expo)  ·  TUI        │
└───────────────────────────────────────────┬─────────────────────────────────────────────┘
                                            │
┌───────────────────────────────────────────┴─────────────────────────────────────────────┐
│                                   API LAYER (tRPC v11)                                  │
│                    Streaming  ·  Workflows  ·  Voice  ·  Admin                          │
└───────────────────────────────────────────┬─────────────────────────────────────────────┘
                                            │
         ┌──────────────────────────────────┼──────────────────────────────────┐
         │                                  │                                  │
         ▼                                  ▼                                  ▼
┌─────────────────┐              ┌─────────────────┐              ┌─────────────────┐
│                 │              │                 │              │                 │
│    COGNITIVE    │              │    KNOWLEDGE    │              │    LEARNING     │
│     CORTEX      │              │    HYPERGRAPH   │              │     SYSTEM      │
│                 │              │                 │              │                 │
│  State machine  │              │  Content-addr   │              │  Self-supervise │
│  Physiology     │              │  Active recall  │              │  Pattern detect │
│  Autonomy       │              │  Memory decay   │              │  Mistake ledger │
│                 │              │                 │              │                 │
└─────────────────┘              └─────────────────┘              └─────────────────┘
         │                                  │                                  │
         └──────────────────────────────────┼──────────────────────────────────┘
                                            │
┌───────────────────────────────────────────┴─────────────────────────────────────────────┐
│                                   INFRASTRUCTURE                                        │
│           PostgreSQL + pgvector  ·  Local Voice  ·  Local Embeddings                   │
└─────────────────────────────────────────────────────────────────────────────────────────┘


Performance Budgets

┌────────────────────────────────────────────────────────────────────────────┐
│                                                                            │
│   Cognitive transitions         <100 µs      ████████████████████  FAST    │
│   Graph lookups                 <1 ms        ████████████████░░░░          │
│   RAG retrieval                 <10 ms       ████████████░░░░░░░░          │
│   Context building              <100 ms      ████████░░░░░░░░░░░░          │
│   UI render cycles              <16 ms       ██████████████░░░░░░  60fps   │
│                                                                            │
│                        Budget violations are defects.                      │
│                                                                            │
└────────────────────────────────────────────────────────────────────────────┘


Local Models

For complete offline operation:

# Voice (STT + TTS)
cd packages/voice && bun run setup

# Embeddings (KaLM-12B)
cd packages/embed && bun run install-deps && bun run download-model

# Configure
echo "USE_LOCAL_MODELS=true" >> .env
Model Purpose Size
Faster-Whisper Speech-to-text 3GB
Piper/Maya1 Text-to-speech 3GB
KaLM-Embedding-Gemma3-12B Embeddings 12GB


Project Structure

alfred/
├── apps/
│   ├── web/                 # Desktop shell (TanStack Start)
│   └── native/              # iOS/Android (Expo + React Native)
│
├── packages/
│   ├── cognitive/           # State machine, physiology, autonomy
│   ├── cortex/              # WebGPU Mindscape visualization
│   ├── knowledge/           # Hypergraph memory system
│   ├── runtime/             # Agent wave orchestration
│   ├── agent/               # Tool registries (40+ tools)
│   ├── voice/               # Local STT/TTS pipelines
│   ├── embed/               # Local embedding models
│   ├── policy/              # Security & biometric elevation
│   ├── db/                  # Drizzle schema & migrations
│   ├── api/                 # tRPC routers
│   └── tui/                 # Terminal UI (OpenTUI React)
│
├── docker/                  # Production deployment
└── docs/                    # Architecture & guides


Development

bun run dev           # Start all workspaces
bun run build         # Build everything
bun run typecheck     # Solution-style tsc -b
bun run test          # Run all tests
bun run check         # Lint and format (Biome)


Roadmap

Phase Focus
Active AI-Native Workflow System, Generative UI
Next Preference-Driven Adaptation, Suspend/Resume
Future Neural Face, Home Assistant, Desktop Evolution



╔════════════════════════════════════════════════════════════════════════════════════════╗
║                                                                                        ║
║                                                                                        ║
║                                   →  alfred.ai  ←                                      ║
║                                                                                        ║
║                                                                                        ║
║                          See it live. Watch the demos.                                 ║
║                          Install in under 60 seconds.                                  ║
║                                                                                        ║
║                                                                                        ║
╚════════════════════════════════════════════════════════════════════════════════════════╝


MIT Licensed · TypeScript · Bun · PostgreSQL · Offline-First

Signal in the void.

About

AI-powered automation and assistant system for developer workflows

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors