SULTAAN.AI

Sovereign intelligence kernel

Building the whole AI stack, on hardware you own.

Sultaan is a research project building a local-first intelligence kernel: inference, an agent that uses tools, memory that persists, sandboxed code execution and, in time, a foundation model trained from scratch.

In developmentCurrent phase: pretraining infrastructure

Inside the kernelThe first-contact run

Article I

What the name means

Any entity that becomes the author of its environment rather than a character trapped inside it.

The definition of “Sultaan”, as recorded in the project’s founding identity document

The project’s README names the person it is for: someone who wants the full stack of a modern AI assistant running on their own hardware, with memory that persists, tools that run safely, and a model that is theirs rather than rented from a vendor.

The project’s stated north star follows from the name: every layer built, owned and understood, not assembled from other people’s weights. It still stands on proven open foundations such as PyTorch, Candle and llama.cpp, and it writes every architectural decision down. You cannot author an environment you are not allowed to inspect.

Article II

Seven chambers of the kernel

A hybrid Python and Rust codebase. Rust carries the hot paths; Python orchestrates everything else.

  • Inference

    Two backends behind one contract: Candle, written in Rust and shipped as a single Python wheel, and llama.cpp for quantised GGUF models. Both generate text today.

  • The agent

    An in-house agent loop of a few hundred lines, with no LangGraph, CrewAI or AutoGen underneath. It calls tools, reads their results and stops at a final answer.

  • Memory

    A SOUL.md identity file read at the start of every session, a local-only conversational memory built on mem0, and a SQLite knowledge graph with trust tiers.

  • Retrieval

    Hybrid search over your own documents: BM25 keyword matching plus optional dense vectors, fused with reciprocal rank fusion.

  • Grounding

    A verifier that needs no model checks each sentence of an answer against its sources, flags unsupported claims and cites the best supporting passage.

  • The sandbox

    A hardened Docker container for untrusted code: no network, Linux capabilities dropped, and quotas on CPU, memory and time. It is built and tested, but not yet wired into the command line.

  • The model

    A from-scratch trainer for a Llama-style decoder, with streamed data, checkpoint and resume, and a size ladder from about 20 million to 1.5 billion parameters.

How the chambers fit together

Article III

Where it stands, honestly

Status is “in development”. This is the ledger the project keeps on itself.

Built and tested

  • Text generation on both inference backends.
  • The agent loop answering a multi-step maths question with its Python tool.
  • Retrieval, the knowledge graph, SOUL.md and the grounding verifier, each covered by tests.
  • The pretraining loop, proven end to end on CPU and in a first-contact run on a 6 GB laptop GPU.
  • More than 300 automated tests.

Built, not yet shown live

  • Memory across sessions is wired in; showing it live needs the mem0 package installed on a host.
  • The sandbox is hardened, but no command uses it yet and its escape test needs a running Docker daemon. Until then the agent’s Python tool runs on the host and is for trusted use only.
  • A fine-tuning pipeline (QLoRA) exists as a scaffold; the first adapter for a 7B open model has not been trained.

Not done yet

  • A model anyone can use. The only model trained so far is a 34-million-parameter proof of life.
  • A real tier run (about 200 million parameters) on a rented GPU.
  • Safe multi-GPU training. The model is wrapped for FSDP, but data sharding and checkpoint writes are single-GPU for now.
  • Any app, API, chat window or download.

Article IV

The charter

Rules the project has written down for itself.

  1. Never claim what has not been demonstrated

    Written into the project’s own identity document, pointed inward as well as outward. It is why this site says “not yet” so often.

  2. Open data, clean provenance

    Pretrain on open datasets such as FineWeb-Edu and public-domain books. Learn from other models only where their licences allow it: open-weight models, never closed APIs whose terms forbid it.

  3. Local first

    Built on a laptop with a 6 GB GPU, and CPU-only is enough for hello-world. Rented Linux GPUs are for the tiers that genuinely need them.

  4. Decisions on the record

    Any architectural decision that outlives a single change gets an Architecture Decision Record. There are 26 on the main line so far.

  5. Reproducible by default

    Seeded runs, a check that two greedy generations are byte-identical, and training that resumes from its last checkpoint.

Article V

Follow the work

The next milestone is a real training run on a rented GPU, aiming for a model that writes reasonable English. No release date is promised.

See the roadmapContact via askshiva.in