Skip to content
kazma.
Search Kazma Documentation & Site
ع Star 7 Get Started
v0.11.0 · Hands · Open Source (MIT)

The Autonomous Multi-Agent Framework Built for Continuous Reliability.

Self-hosted LangGraph supervisor core with Pure V2 bi-temporal cognitive memory, decentralized swarm autoscaling, and 3-path human verification gates. Unified across Web, TUI, CLI, and team chat channels with native Arabic dialect intelligence.

Shipped 2026-09-03 · Unified Turn-State Surface

⚙ file_search · 14s · step 2/4 journaled turn_heartbeat
04:52
Approval Required (Path A Interrupt) auto-denies if unattended

Agent requested dangerous tool: file_write(path="src/router.py").

Policy: default-deny

Turn Execution Steps

00:02 Bi-temporal memory recall: 4 belief nodes retrieved via Local Ego-Graph PPR
00:06 Commitment Gate: Resolved intent against Task Ledger (proposal #42)
00:14 Phase: Awaiting operator authorization in hitl_gates.db...
409K+ Lines of Code 7 packages in monorepo
7,892 Automated Tests across 563 test files
3,147+ Git Commits production hardened
6 Dispatch Patterns autoscaled swarm specialists
The Kazma Core Architecture

Engineered for Continuous Reliability.

Decentralized swarms, bi-temporal cognitive memory, and three-path human verification. Built to operate without forgetting, crashing, or unsupervised damage.

Bi-Temporal Belief Graph

Pure V2 Cognitive Memory Engine

Agents retain grounded context across months of sessions without hallucination or historical corruption. Fact assertions are tracked with two distinct dimensions: assertion time and validity interval (valid_from / valid_until).

Local Ego-Graph PPR Associative multi-hop recall over entity beliefs via Personal PageRank.
RRF Hybrid Search Dense embeddings (pgvector / sqlite-vec) + FTS5 lexical ranking.
Prompt-Fenced Injection Recalled data is safely wrapped in <kazma:data untrusted> to prevent prompt injection.
Automated Backup Ops 6h WAL-safe snapshots of every SQLite DB plus validated Postgres dumps, kept offsite via encrypted restic.
Backed by memory_state.db & Postgres Memory Docs
Fail-Closed CAS

3 HITL Paths & Gate Registry

Every mutating action is intercepted across 3 execution paths and arbitrated by a central SQLite gate registry (hitl_gates.db):

  • Path A Graph Interrupt: LangGraph interrupt() in graph_tool_worker.py suspends the thread before danger tools run.
  • Path B Swarm Bus Gates: SafetyMiddleware.check renders tri-state approval buttons on Telegram, Discord, and Slack.
  • Path C Pipeline Checkpoints: Hard stops managed by CheckpointManager before executing multi-phase batch operations.
  • Watchdog Auto-Deny: Unanswered cards count down to deadline and auto-deny, preventing hung turns.
Default-deny: Unclassified tools locked Safety Docs
Resolve-Before-Act

Commitment Layer

A strict policy gate between the LLM and durable state. Intent is resolved against stored memory before executing actions, preventing hallucinated overwrites.

Durable Task Ledger "Proceed" binds to declared steps in SQLite, not raw chat transcripts.
Structural Clarify Gate Ambiguous intent can only output 1 clarification card with tools stripped.
Proposal-Backed Contract External publications enforce proposal_id save-first requirement.
Git write actions always require human gate Commitment Docs
Single Source of Truth

Transport-Agnostic IDE & X Studio

The kazma_core/ide subsystem provides a unified engine for file trees, CodeMirror editing, git diffing, and pytest execution across the Web dashboard, Terminal UI (TUI), and chat channels.

Web & TUI IDE Full in-browser code editor with diff reviewer and integrated chat assistant.
MCP IDE Server Stdio JSON-RPC server exposing file & test tools directly to VS Code / Cursor.
X Studio (/x) Official X API v2 publisher with proposal-backed HITL, drafts, and scheduling.
Zero DOM leakage · ContextVar workspace isolation IDE Docs
Self-Healing

Non-Stop Watchdog

Supervised execution tracks node heartbeats. If a stall or error is detected, the turn automatically rolls back to a clean checkpoint state.

  • Automatic checkpoint rollback
  • [KAZMA RECOVERY] reflection injection
  • Multi-provider failover chains
  • Durable call ledger (llm_calls.db)
Chaos testing framework verified Chaos Docs
EN · AR · Full RTL

Bilingual by Design: Full English & Arabic

Every surface ships in complete English and Arabic — UI, docs, agent replies, and generated documents — with per-request RTL layout and Gulf-native Arabic understanding. No plugins, no afterthought: both languages are first-class.

Full English UI Complete interface, docs, and agent replies.
Native Arabic & RTL Per-request RTL layout with MSA search normalization.
Gulf Majlis Protocol Gulf-cultural conversational flow, on by default.
Full English & MSA · GCC Arabic · RTL UI النسخة العربية
Decentralized Swarms

Breaking the Chains of Rigid Pipelines

Monolithic agent chains fail when real-world conditions shift. Kazma deploys dynamic specialist autoscalers across 6 decentralized dispatch patterns.

Interactive Swarm Dispatch Engine

6 battle-tested dispatch patterns built directly into the LangGraph supervisor core.

Dynamic Autoscaling Enabled

Fan-Out & Voting

Parallel Consensus
Topology: 1 → [3 Parallel] → 1

Dispatches identical or partitioned tasks across multiple isolated workers simultaneously, aggregating outputs via weighted voting or consensus deduplication.

Execution Flow Nodes

Supervisor Worker Alpha (Coder) Worker Beta (Tester) Worker Gamma (Security) Consensus Aggregator
Recommended for: Complex audits, competitive code synthesis, and high-assurance verification.
From the workshop

Built alongside Kazma.

These aren't products “powered by” Kazma as a runtime stack — they grew up next to it. Each one taught us something about agents, trust, and real interfaces, and that craft shaped the framework in return.

IndexArc

Open Source

A portable personal vault for secrets, API keys, tokens, and notes. Auto-extracts multiple values from a single paste, organizes scattered credentials, and answers queries in English and Arabic. Works fully offline (Ollama) or cloud (Gemini).

TypeScript · Kazma workshop
GitHub

ShipX

In Development

A conversational commerce intelligence engine — unifies entire commerce operations across WhatsApp, Instagram, Email, and Web. Catalog browsing, price bargaining, payment links, courier dispatch, order tracking, returns, and fraud screening — all in Khaleeji Arabic with full GCC data sovereignty.

Python · Kazma workshop
In Development

KCA

In Development

A unified executive command center — a real-time dashboard that brings multi-departmental operations, smart task delegation, company metrics, and integration bridges into one cockpit. Auto-converts business events into assigned tasks with progress tracking and a bidirectional Arabic/English interface.

Python · Kazma workshop
In Development
Deploy in Minutes

Ready to ship reliable agents?

Clone the repository, sync dependencies via uv, and serve with zero cloud lock-in.

~/kazma — bash
Python 3.11+ · uv
# 1. Clone the monorepo
$ git clone https://github.com/Mubder/kazma && cd kazma
# 2. Sync all extras (rag, ide, channels)
$ uv sync --all-extras
# 3. Launch the Web coordinator & dashboard
$ kazma serve
# 4. (Optional) Launch the Terminal UI
$ kazma-tui