Skip to content
v0.6.1 · Production hardened · Open source

Production-Grade Autonomous Agents with Deep Multilingual Intelligence

Kazma is the reliable multi-agent framework built for real deployment. Cryptographic skill signing, triple-wired human-in-the-loop safety, durable execution, and native Arabic dialect support — all in one full-stack system with live Web UI, TUI, CLI, and multi-platform gateways.

186,627 (78%)
Lines of code
pure code, verified
4,683
Test functions
across 300 files
1,637
Commits
git history
7
Contributors
and growing
144 Days
Project Age
since March 15, 2026
Lines of code by package
kazma-core 90,394
kazma-gateway 18,538
kazma-ui 26,975
kazma-tui 10,782
kazma-memory 896
kazma-skills 7,592
kazma-cli 3,857

Project timeline: March 15, 2026 – Present · Verified 2026-08-06 · 1c3aa89c Merge branch 'main' of https://github.com/Mubder/kazma (2026-08-06) — figures derived from git-tracked files via scripts/generate_metrics.py

Kazma dashboard — memory & governance, component health, and live metrics
Dashboard memory health graph /dashboard

The Kazma dashboard — memory layers, component health, and live governance in one surface.

Built on a production stack

LangGraph ChromaDB FastAPI SQLite Postgres Docker LiteLLM NetworkX Pagefind LangGraph ChromaDB FastAPI SQLite Postgres Docker LiteLLM NetworkX Pagefind

The origin

What does "Kazma" mean?

A name rooted in Kuwaiti history — and engineered into architecture.

Kazma (كاظمة) was an ancient coastal oasis in Kuwait — a network of wells and a gateway for trade between civilizations. It was also the site of the legendary Battle of Chains (ذات السلاسل, 633 CE): the Persian army chained its soldiers into a single, rigid wall, yet Khalid ibn al-Walid shattered it through precise, decentralized maneuvering — and won.

We engineered Kazma on those same pillars — not as metaphor, but as architecture:

The Wells

Deep memory that holds context across sessions. The agent draws from it when it needs to remember, like caravans drawing from oasis wells.

The Gateway

One supervisor brain routed to Telegram, Discord, Slack, Web, and TUI — the way ancient Kazma routed trade between civilizations.

Breaking the Chains

The chains in that battle were rigidity — and rigidity is what makes monolithic agent pipelines fragile. Kazma runs decentralized swarm patterns and self-healing circuit breakers instead, adapting and recovering where rigid chains would snap.

Secured by design

Guarded by humans, hardened by cryptography.

Never let an LLM run unsafe code or modify production files unsupervised. Kazma intercepts dangerous operations fail-closed at three layers.

Email: Gmail, Microsoft, sandbox

Native email-manager skill — list, read, send, categorize, and analyze. Connect via Settings with OAuth, IMAP, or POP for Gmail and M365. Zero-config sandbox mailbox for demos. Send/delete/categorize stay HITL-gated.

Triple-Wired HITL Safety Gates

Three-tier approval gates — graph interrupt, swarm bus, and pipeline checkpoints. Danger tools require human approval across Web, Telegram, Discord, and Slack. YOLO is hard-blocked in production unless explicitly overridden.

Cryptographic Skill Checksums

Every downloaded skill and plugin is validated against a timing-safe HMAC-SHA256 checksum matching your secret. Altered signatures trigger an immediate fail-closed abort.

Authenticated MCP Servers

Bearer tokens, custom headers, and configurable trust tiers. Every MCP tool is classified by risk for appropriate gating; untrusted tools force HITL in production.

Self-Healing Circuit Breakers

Real-time status badges — red, yellow, hidden. Automatic recovery with configurable thresholds. Start, stop, cancel, retry with lineage tracking.

Multi-Platform Approvals

Interactive sliding cards over live SSE in the Web client. Inline buttons in Telegram, Discord, and Slack. Approve or deny from any surface.

V2 Cognitive Engine & KB

Bi-temporal belief graph with Local Ego-Graph PPR recall, automatic per-turn RAG, auto-store, and LLM consolidator with prompt fence. Dashboard belief graph explorer + multi-tenant isolation + nightly backups.

Time-travel replay & thread forking

Every supervisor iteration is snapshotted to snapshots.db. Restore (/replay) any past conversation state in-place, branch (/fork) into a new thread without modifying original history, and view visual timeline diffs.

Transport-agnostic IDE backend

Single source of truth (kazma_core/ide) for file operations, pytest execution, and git management. Supports per-task ContextVar workspace scoping and build_env_context awareness across Web, TUI, and Chat gateways.

Sees images & documents

Send a photo, screenshot, or PDF on Telegram, Discord, Slack, or Web. Images inline as vision blocks; documents are saved and opened with file_read — so the agent actually reads what you attach.

Hears & speaks on every channel

Voice notes transcribed (OpenAI/Groq/faster-whisper) and replies spoken back (Edge TTS/OpenAI) across Telegram, Discord, Slack, and the real-time Web voice WebSocket — one setting controls all platforms.

Calendar, browser & document tools

Native skills that ship in-process: headless browser automation (Playwright), calendar (Google/Outlook), PDF/DOCX/XLSX generation, multi-backend image generation, and read-only database queries (Postgres/MySQL/Mongo).

Research system with traceable results

Chat-triggered swarm research is now a first-class system. Browse all research outputs with cost and duration, compare two runs side-by-side with text diffs, and export any result to DOCX or PDF for academic use.

Advanced features

Learns from swarm outcomes. Protects your secrets.

A real swarm self-improvement loop and an encrypted secret vault — described as the code behaves today.

Self-Improvement Engine

Kazma-wide: after every chat turn (Web / Telegram / …) and every swarm task, Kazma analyzes the outcome and updates the main agent Soul or the worker Soul — automatically, no hand-tuning.

  • Successes are reinforced; failures get a Meta-Refiner corrective delta (or a safe template fallback).
  • Chat: persisted in agent_evolution.json and injected every turn. Swarm: worker system_prompt on the registry.
  • Optional kill-switch: KAZMA_SELF_IMPROVEMENT=0. Caps keep prompts from growing forever.

Encrypted Secret Vault

Store API keys and tokens with AES-256-GCM in a separate vault.db. Tools: vault_store, vault_list, vault_retrieve, vault_delete. Retrieve and delete require HITL approval.

  • vault_retrieve and vault_delete are danger tools — human approval before a secret is revealed or removed.
  • Disabled until KAZMA_VAULT_KEY is set (env master key, not a UI passphrase). Values are never stored as plaintext in the vault DB.
  • Optional tenant scoping; sensitive ConfigStore keys can be stored as vault refs instead of raw secrets.

IDE Subsystem

Transport-Agnostic IDE Backend

A single source of truth (kazma_core/ide) for file operations, test execution, and git management across Web, TUI, Telegram, Discord, and Slack.

Web IDE

A 3-pane interface — file tree, multi-tab editor (CodeMirror with find & replace), and integrated AI chat. Runs in the browser, zero setup.

Kazma Web IDE — file tree, multi-tab editor, and AI chat

TUI Editor

A full-screen Textual editor inside the TUI. Edit files, run commands, and review diffs — without leaving the terminal.

/ide commands

ls, edit, read

Browse and modify files across any channel

run

Execute code and see results

grep, search

Search across the entire repository

git, diff, clone

Full Git operations agent-driven

/ide commands work on

Web · TUI · Telegram · Discord · Slack

Workspace awareness

Automatically injects the current repo and branch (build_env_context) — the agent always knows where it's working.

Time Travel & Replay

Restore any state, or fork into a new thread.

Every supervisor iteration is snapshotted into snapshots.db. Kazma lets you rewind mistakes and explore alternate paths without destroying original history.

Replay State (/replay)

Rewind the conversation to any previous snapshot. This rewrites the current session from that point forward.

Fork Thread (/fork)

Clone the conversation from any point into a brand new thread. Leaves the original history untouched for safe exploration.

Compare execution paths

Thanks to safe thread forking, you can try alternate solutions and compare them without losing your original context.

Live telemetry · mock stream
Token throughput
0 tok/s
Active agents
0
p95 response
0 ms
Swarm patterns
0

SSH command console

The dual-command center.

Monitor and command your swarm directly over lightweight SSH sessions or terminal panels. Track multi-step workflows without screen corruption — Kazma isolates complex Mermaid.js rendering to explicit DOM nodes, neutralizing style leakage.

  • Scrolling metrics sparklines. Real-time CPU, Memory, and VRAM history inside your terminal.
  • Vim-style console bar. Activate with : to jump tabs, reload themes, clear caches.
  • ASCII NOC topology map. Inter-node comms and live handoff paths across the swarm.
  • Bi-lingual RTL mirroring. Perfect layout alignment for Arabic-first environments.
kazma-tui · ssh connected
Kazma TUI dashboard — live metrics, swarm topology, and sparklines in the terminal
Kazma TUI Memory view
Kazma TUI Chat view
Kazma TUI Files view
Kazma TUI Settings view
Kazma TUI Swarms view
Kazma TUI Traces view

Zero to autonomous in three steps.

Clone, configure, deploy — three entry points for every workflow.

01

Install & configure

Clone the repo, run uv sync, point at your LLM provider. Web UI, TUI, or CLI — your choice.

02

Connect channels

Plug in Telegram, Discord, or Slack via the headless gateway. One backend, many adapters.

03

Deploy & monitor

Pick a persona, enable RAG, set safety gates, spawn swarm workers. Watch it live via SSE.

The product

One brain, every surface.

A single LangGraph supervisor drives the dashboard, chat, swarm playground, skills, and MCP servers — bilingual, RTL-ready, live.

Kazma Web IDE

Web IDE

File tree, multi-tab editor, and integrated AI chat.

Kazma Chat

Chat

Streaming agent chat with HITL approval cards.

Kazma Swarm Task Builder

Swarm Task Builder

Dispatch patterns with live aggregation.

Kazma Skills

Skills

Signed, validated skill registry.

Kazma MCP Servers

MCP Servers

Authenticated external tool servers.

Kazma Dashboard

Dashboard

Observability, cost, tokens, and system health.

See it running right now.

The live Arabic dashboard — monitoring, pending HITL approvals, cost tracking, and swarm status. No signup.

Architecture

Three pillars of production-grade orchestration.

Immutable security, triple-wired HITL gates, and self-healing dual-UI telemetry — layered, decoupled, and independently replaceable.

kazma-ui

Web DAG · SSE telemetry

FastAPI dashboard — chat, swarm panel, circuit breakers, lineage, bilingual RTL, and a full in-browser IDE. Default bind 127.0.0.1:9090.

kazma-tui

Terminal UI · dual-palette

Lightweight SSH console. Scrolling metrics sparklines, ASCII NOC topology, and a full-screen code editor.

kazma-cli

Command line · scriptable

Unified control plane — banner, status, hub, gateway, swarm management, and cross-platform /ide commands.

kazma-core ReAct supervisor · SQLite/Postgres · HITL · MCP gateway TG · Discord · Slack · memory Chroma · per-turn RAG · providers OpenAI-compatible

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).

Kazma workshop GitHub

ShipX

In Development

An AI-powered delivery platform that runs entirely through WhatsApp — text or voice notes in Khaleeji Arabic. Tracks orders, predicts arrivals, auto-dispatches couriers, and screens for fraud (NVIDIA Morpheus) with full GCC data sovereignty.

Kazma workshop Python

KCA

In Development

An Institutional Intelligence System — an operating layer above an organization's tools. Genesis (validation), OS (execution/memory), Guardian (risk/governance), Network (connections), Evolution (growth). Turns institutional know-how into a measurable asset.

Kazma workshop Python

From clone to first message.

Three commands — clone, install, serve. Up and running in under 10 minutes.

~/kazma — bash
# Clone & install
$git clone https://github.com/Mubder/kazma && cd kazma
$uv sync --all-extras
# Web coordinator
$kazma serve
# Terminal UI
$kazma-tui

For builders, enterprises & programs

Built for serious adoption.

Kazma is open-source, MIT-licensed, and production-tested. Whether you're evaluating for an enterprise pilot, a startup program, or contributing as a developer — there's a clear path forward.

  • 787+ commits, 3,700+ tests across 5 suites, real working demo
  • Arabic-first with extensible multilingual architecture
  • Solo-founded in Kuwait, built with full-stack execution

Ready to ship reliable agents?

Clone, install, and serve. Free, open-source, MIT licensed.