Skip to content

Latest commit

Β 

History

148 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

arkai

An orchestration backbone for AI pipelines.

License Rust Fabric

Event-sourced orchestration for Fabric and beyond.

Quick Start β€’ Why arkai? β€’ Features β€’ Docs


The Problem

Building AI workflows today means:

  • Results vanish after each chat session
  • Pipelines fail with no way to resume
  • No audit trail of what happened or why
  • Spaghetti code as complexity grows

The Solution

arkai gives your AI a spine, a Rust-based orchestration layer that:

  • Remembers everything (event-sourced state)
  • Recovers from failures (idempotent resume)
  • Replays any operation (full audit trail)
  • Scales without spaghetti (YAML pipelines)

πŸš€ Quick Start

# Install arkai
cargo install --git https://github.com/arkaigrowth/arkai

# Install Fabric (AI pattern library)
go install github.com/danielmiessler/fabric@latest
fabric --setup

# Ingest your first video
arkai ingest "https://youtube.com/watch?v=..." --tags "ai,learning"

# Search your library
arkai search "transformers"

That's it. Your knowledge base grows with every ingest.


Fabric Binary Override

If Arkai picks the wrong fabric on your host, override it explicitly:

export ARKAI_FABRIC_BIN=/opt/homebrew/bin/fabric-ai
arkai doctor --json

Or set it in .arkai/config.yaml:

fabric:
  binary: /opt/homebrew/bin/fabric-ai

Verify the selected binary with:

arkai doctor --json

πŸ€” Why arkai?

Without arkai With arkai
Results vanish after chat Searchable library forever
Pipeline fails β†’ start over Resume from exact failure point
"What did the AI do?" 🀷 Full event log, replay any step
Copy-paste prompt spaghetti Composable YAML pipelines

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    NATURAL LANGUAGE                          β”‚
β”‚              (Claude Code + /arkai skill)                    β”‚
β”‚                                                              β”‚
β”‚   "ingest this video" β†’ arkai ingest "https://..."          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    RUST SPINE (arkai)                        β”‚
β”‚              Orchestration β€’ State β€’ Reliability             β”‚
β”‚                                                              β”‚
β”‚   βœ“ Event-sourced    βœ“ Idempotent    βœ“ Auditable            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    FABRIC (patterns)                         β”‚
β”‚              AI Transformation β€’ 200+ Prompts                β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    LLM PROVIDER                              β”‚
β”‚         (Claude, GPT, Ollama, local models, etc.)           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
πŸ“Š Mermaid: Data Flow
flowchart LR
    subgraph Input
        URL[URL/Text]
    end

    subgraph arkai [arkai Spine]
        ES[Event Store]
        ORCH[Orchestrator]
        CAT[Catalog]
    end

    subgraph Fabric
        PAT[Patterns]
    end

    subgraph Output
        LIB[Library]
    end

    URL --> ORCH
    ORCH --> ES
    ORCH --> PAT
    PAT --> ORCH
    ORCH --> CAT
    ORCH --> LIB
Loading
πŸ“Š Mermaid: Event Sourcing
sequenceDiagram
    participant User
    participant arkai
    participant EventStore
    participant Fabric
    participant LLM

    User->>arkai: ingest URL
    arkai->>EventStore: RunStarted
    arkai->>Fabric: fetch transcript
    Fabric->>LLM: extract_wisdom
    LLM-->>Fabric: wisdom.md
    arkai->>EventStore: StepCompleted
    arkai->>User: βœ… Content ingested

    Note over EventStore: Full replay possible
Loading

✨ Features

Content Ingestion

# YouTube (auto-detected)
arkai ingest "https://youtube.com/watch?v=..." --tags "ai,ml"

# Web articles
arkai ingest "https://example.com/article" --tags "tech"

Massive Context Analysis (RLM)

# Analyze entire repositories that exceed context windows
# Uses a Recursive Language Model approach for context that exceeds the window

# In Claude Code, RLM tools are available as MCP:
rlm_load_context      # Load files as external variables
rlm_filter_context    # Regex-based filtering (deterministic)
rlm_sub_query         # LLM call on chunks (budgeted)
rlm_exec             # Sandboxed Python execution (HITL)

Searchable Library

arkai library                    # List all
arkai library --content-type youtube  # Filter
arkai search "transformer"       # Full-text search
arkai show <id> --full           # View content

Pipeline Orchestration

arkai run my-pipeline            # Execute pipeline
arkai status <run_id>            # Check status
arkai resume <run_id>            # Resume failed run

Debug & Observability

arkai config                     # Show resolved paths
arkai runs                       # List recent runs

πŸ“ Project Structure

your-project/
β”œβ”€β”€ .arkai/
β”‚   β”œβ”€β”€ config.yaml        # Project config
β”‚   β”œβ”€β”€ catalog.json       # Searchable index
β”‚   └── runs/              # Event logs (gitignore)
β”‚
β”œβ”€β”€ library/               # Knowledge base (git-track!)
β”‚   β”œβ”€β”€ youtube/
β”‚   └── articles/
β”‚
└── pipelines/             # Custom workflows
    └── my-workflow.yaml

πŸ“ Pipeline Definition

name: youtube-wisdom
description: Extract wisdom from YouTube videos

safety_limits:
  max_steps: 10
  step_timeout_seconds: 300

steps:
  - name: fetch
    action: __youtube__
    input_from: pipeline_input

  - name: wisdom
    action: extract_wisdom
    input_from: fetch

  - name: summary
    action: summarize
    input_from: wisdom

πŸ”„ Comparison

Feature Raw LLM LangChain Fabric arkai + Fabric
Persistent state ❌ ⚠️ ❌ βœ…
Resume failed runs ❌ ❌ ❌ βœ…
Full audit trail ❌ ❌ ❌ βœ…
200+ AI patterns ❌ ⚠️ βœ… βœ…
Content library ❌ ❌ ❌ βœ…
Single binary ❌ ❌ βœ… βœ…
Massive context (RLM) ❌ ⚠️ ❌ βœ…
Evidence provenance ❌ ❌ ❌ βœ…

πŸ“š Documentation


πŸ› οΈ Prerequisites

  • Rust 1.70+: Install
  • Fabric: Install
  • LLM API key: Configure via fabric --setup

⚠️ Status and Limitations

  • Early-stage and under active development. Commands and interfaces may change.
  • Developed on macOS. Linux and Windows are not tested, and voice capture relies on macOS-specific paths.
  • Requires an external Fabric install and your own LLM API key.
  • The RLM (large-context) integration depends on a separate RLM server and is optional.
  • Some items in the docs and roadmap describe planned or in-progress work rather than shipped features.

πŸ“œ License

MIT. Use it, fork it, build on it.


Built with πŸ¦€ Rust + 🧡 Fabric

"A really smart AI with a bad system is way worse than a well-designed system with a less smart model."

About

Arkai is a Rust-based orchestration kernel for AI workflows. It coordinates tools like Fabric, RAG systems, and schedulers using event-sourced, resumable pipelines with strict safety and cost controls.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages