Skip to main content
Glama

πŸŒ… Akatsuki (暁)

Universal CLI and Model Context Protocol (MCP) Gateway for Living System Memory and Architectural Contracts for Autonomous AI Agents.

CI License: MIT Python: 3.10+ Zero Dependencies


πŸ›οΈ What is Akatsuki?

As AI coding swarms and autonomous agents (Antigravity, Claude Code, pi, OpenCode, Cursor) write and refactor code, traditional static documentation decays. Infrastructure configurations drift, network ports clash, and architectural boundaries get silently breached.

Akatsuki solves this by providing a Living Systems Memory Substrate:

  • Machine-Verifiable Contracts: Inspect living system contracts, service boundaries, and cluster topology before mutating code.

  • Living Invariant Testing (bash:verify): Test system health against machine-executable verification assertions embedded directly within Markdown notes.

  • Fast Okapi BM25 Search: Zero-daemon, in-process SQLite full-text search with morphological expansion and excerpt ranking.

  • Native Dual-Interface (CLI + MCP): Operate seamlessly from the human terminal (akatsuki <command>) or equip autonomous agents directly through stdio Model Context Protocol (akatsuki mcp).

  • Zero Runtime Dependencies: Written entirely in Python standard library (sqlite3, pathlib, argparse, fcntl, json). No heavy dependencies, no build friction.


Related MCP server: SeekLink

πŸš€ Quick Start

1. Installation

Option A: Standard Installation (Pure Standard Library, Zero Dependencies) Runs with pure in-process Okapi BM25 ranking, instant startup, zero dependencies:

# Via pip
pip install git+https://github.com/fusuyfusuy/akatsuki.git

# Or via uv tool
uv tool install git+https://github.com/fusuyfusuy/akatsuki.git

Option B: With Semantic Vector Embeddings & Hybrid RRF Search (Optional Extra) Equips Akatsuki with local offline semantic search powered by intfloat/multilingual-e5-small (384D) clamped safely to 2 CPU threads:

# Via pip
pip install "akatsuki[embeddings] @ git+https://github.com/fusuyfusuy/akatsuki.git"

# Or via uv tool with lightweight CPU PyTorch wheel:
uv tool install --editable /path/to/akatsuki --with sentence-transformers --with torch --extra-index-url https://download.pytorch.org/whl/cpu --force

2. Bootstrap a Living Memory Vault

# Initialize a fresh living memory vault in the current directory or specified path
akatsuki init ./knowledge-base

cd ./knowledge-base

This creates the standard Akatsuki vault structure:

knowledge-base/
β”œβ”€β”€ .akatsuki/          # Local SQLite BM25 + vector search index and locks (gitignored)
β”œβ”€β”€ .gitignore          # Pre-configured multi-machine ignores
β”œβ”€β”€ AGENTS.md           # Master architectural protocol and invariants
β”œβ”€β”€ INDEX.md            # Auto-maintained catalog and domain index
β”œβ”€β”€ 01-Daily/           # Daily activity ledgers & worklogs
β”œβ”€β”€ 20-Projects/        # Active software project architectures
β”œβ”€β”€ 40-Systems/         # Host specifications, topologies & ADRs
└── _templates/         # Note, system, and daily templates

3. Basic CLI Commands

# Hybrid Search (Okapi BM25 + Dense Semantic Vectors via RRF, k=60)
akatsuki search "docker swarm routing" --mode hybrid

# Pure lexical BM25 search
akatsuki search "docker swarm routing" --mode bm25

# Pure semantic vector search
akatsuki search "hardware specifications of primary host" --mode vector

# Read a note or specific section with token budget packing
akatsuki read "Cluster-Topology" --section "Private Network Routing"

# Calculate blast radius for a service before making changes
akatsuki blast auth-service

# Run living invariant checks across system documentation
akatsuki test

# Record a telegraphic caveman ledger entry
akatsuki log -p "web" -s "migrate edge certs -> let encrypt automated; exit 0"

# Surgically update frontmatter without corrupting note bodies
akatsuki set "20-Projects/filament" -k status -v "live"

πŸ€– MCP Server Setup (for AI Agents)

Akatsuki runs as a native stdio Model Context Protocol (MCP) server exposing 17 specialized architectural tools:

akatsuki mcp

Claude Desktop Configuration (claude_desktop_config.json)

{
  "mcpServers": {
    "akatsuki": {
      "command": "akatsuki",
      "args": ["mcp"],
      "env": {
        "AKATSUKI_VAULT": "/path/to/your/knowledge-base"
      }
    }
  }
}

Cursor Configuration (.cursor/mcp.json)

{
  "mcpServers": {
    "akatsuki": {
      "command": "akatsuki",
      "args": ["mcp"]
    }
  }
}

Antigravity / OpenCode / pi Configuration

{
  "mcpServers": {
    "akatsuki": {
      "command": "akatsuki",
      "args": ["mcp"]
    }
  }
}

πŸ› οΈ MCP Tools Reference

MCP Tool

Description

akatsuki_search

Search notes using Okapi BM25 ranking, stemming, and contextual snippets.

akatsuki_read

Read full notes or extract individual headings with token budget packing.

akatsuki_contract

Extract structured machine boundary contracts (APIs, ports, schemas) from notes.

akatsuki_get

$O(1)$ exact property getter across frontmatter keypaths.

akatsuki_query

Run read-only SQL queries directly against the internal SQLite FTS index.

akatsuki_blast

Compute upstream callers and downstream dependencies for architectural blast radius.

akatsuki_test

Execute machine-verifiable bash:verify assertion blocks.

akatsuki_set

Surgically update YAML frontmatter keys with JSON/primitive values.

akatsuki_lint

Validate vault notes against strict schema contracts.

akatsuki_append_section

Append markdown content under specific headings.

akatsuki_services

Read active service matrices, container prefixes, and port allocations.

akatsuki_projects

List all tracked software repositories and production deployments.

akatsuki_daily

Read today's or specified daily horizon and task list.

akatsuki_record_log

Append telegraphic ledger entries to today's active worklog.

akatsuki_verify

Verify internal wikilink graph integrity.


⚑ Vault Discovery Ladder

Akatsuki locates the target knowledge base automatically using a multi-tiered resolution ladder:

  1. CLI Flag: --vault /path/to/vault (or -V)

  2. Environment Variable: AKATSUKI_VAULT=/path/to/vault

  3. Upward Directory Walk: Traverses upwards from the current directory looking for .akatsuki/ or INDEX.md + AGENTS.md.

  4. Well-Known Locations: Checks ~/configs/knowledge-base/akatsuki, ~/.akatsuki, ~/akatsuki.

  5. Fallback: Current working directory.


πŸ§ͺ Testing

Akatsuki comes with a comprehensive standard test suite with zero test dependencies:

# Run tests using Python standard library unittest
python3 -m unittest discover tests -v

πŸ“œ License

MIT License. Copyright (c) 2026 Yusuf AkΓ§akaya.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    A
    maintenance
    A local-first CLI and MCP server that helps you build and search a personal knowledge vault from Markdown notes, with semantic search and AI-powered features like stale note detection and session memory harvesting. It’s provider-agnostic, requires no GPU in its default mode, and exposes your vault as long-term memory to any MCP-compatible AI tool like Claude Code.
    47
    Apache 2.0
  • A
    license
    Not graded
    quality
    B
    maintenance
    Local-first Markdown vault retrieval for agents. Read-only MCP stdio server exposing search, get, status, and doctor over Obsidian-compatible Markdown with hybrid BM25/vector/wikilink/title retrieval and first-class CJK support.
    11
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Provides persistent, local-first memory for coding agents with Markdown as the source of truth, exposed via CLI, loopback API, MCP, and Codex hooks for context retrieval and durable writes.
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Local-first long-term memory for AI agents via a Markdown vault, offering MCP tools to query, ingest, lint, distill, and manage agent lessons and profile suggestions.
    6
    Apache 2.0