Mac · Free Community Edition · v1.5.0 β

The Semantic Hyper-Tree.
A new database for AI memory.

Rigid tree for O(log N) retrieval. Hypergraph for infinite cross-linking. The grammar that predates algebra.

Your AI forgets every session.
KOSHA remembers forever.

One memory. Across Claude, Cursor, Antigravity — every tool that speaks MCP. Auto-extracted Pāṇinian structure. Always local. Always yours.

No more building graph nodes by hand. The Pāṇinian schema extracts who did what to whom automatically — Karta, Karma, Kriya, Karana — every time you save a paragraph. Zero schema work.

No more re-teaching ChatGPT what you told Claude. KOSHA is the cross-tool memory layer. Save once in any MCP-aware agent. Recall it from any other agent — Tuesday, Friday, six months later. The agent's session ends. KOSHA's never does.

No more "kinda similar" vector matches. Same question, same answer — every time. Facts come back precise, ordered, scoped to the right branch. Auditable. Deterministic. Sequential.

Always local on your Mac. Smart features (auto-routing, kāraka extraction, prose answers) use a local Gemma model that never touches the cloud. No cloud LLMs ever. Zero API costs.

v1.5.0 β · ~10 MB · Apple Silicon (M1+) · Signed + notarized — just double-click

Rosetta Stone

You already know how this works.

KOSHA's labels are pure Sanskrit, but the structure maps cleanly to anything you've ever queried. If you've worked with row-based or graph-based storage, you can read a KOSHA tree on first sight.

KOSHA term What it is SQL equivalent Graph equivalent
KOSHA Entire storage unit (one local file) Database Property graph
NABHA Workspace inside a Kosha Schema Labelled subgraph
SURYA Root branch (depth-0; max 8 per Nabha) Parent table Top-level node
GRAHA Tree node with source content (depth 1-7) Row / record Node
ASHRU V| pipe row extracted from graha content Normalized row Edge / relationship
Four classes of structured storage

Row. Graph. Tree. Hyper-Tree.

Four classes of structured storage have shipped over the last 50 years, each shaped by the workloads of its era. A vector index is not in this list — it's a similarity-search index that sits inside a storage layer as an implementation detail.

1970s

Row-based

Rows in tables. Relations between tables. Query by joining tables and filtering rows.

Strength:
Transactional integrity
Designed for:
Forms & ledgers
2000s

Graph-based

Nodes and typed edges. Query by traversing relationships. Multi-hop becomes first-class.

Strength:
Path queries
Designed for:
Networks & chains
2010s

Tree-based

Hierarchical nodes. Document stores, file systems, recursive joins. Query by descent through the tree.

Strength:
Bounded depth retrieval
Designed for:
Hierarchical content
2026 →

Hyper-Tree · KOSHA

Rigid 9-level octree for the address space (134.2M addressable rooms), dynamic hypergraph of Ashrus for unlimited cross-linking. The first database designed around the data shape an LLM actually reads cleanly.

Strength:
O(log N) + cross-links
Designed for:
AI memory
What's a Hyper-Tree?

TREE — the rigid, physical 9-level octree. 8 children per parent at every level. 8⁹ = 134,217,728 addressable leaves. Mathematically proven O(log N) retrieval with bounded fanout.

HYPER — the dynamic hypergraph of Ashrus (atomic Pāṇinian facts) that cross-link freely between branches. Same atom, many forms — like Krishna's 16,000 manifestations. One physical address, unlimited logical attachments.

Together: the rigidity of a B-tree filesystem married to the cross-linking of a graph database. A new category in computer science.

Note on vector indexes. A vector index stores embeddings and ranks by cosine similarity. Useful for finding similar text. It has no semantic structure of its own — it sits underneath a storage layer the same way a B-tree sits underneath a row store.
Why KOSHA exists

Two guarantees a vector index cannot make.

A vector index returns the top-K most cosine-similar chunks for a query. Two failure modes are baked in: chunks come from anywhere in the embedding space (boundary leak), and they arrive ranked by similarity, not by sequence (temporal scramble). The LLM has to re-derive context every time.

Guarantee 1

Absolute boundary

Your query searches only the relevant branch. KOSHA's SURYA structure scopes the question to one part of the tree — same question, same branch, every time. No answers from unrelated data.

Guarantee 2

Sequential integrity

Facts come back in their ingestion order. The LLM reads them in the sequence they were saved in, not reshuffled by similarity scores.

How it works

A storage tool. Not a chat box.

Today · V1.0

What ships in this build

  • · Three-pane IDE: schema browser, KoshaLang editor, results pane
  • · Dashboard ↔ Query ↔ Help — three top-bar tabs
  • · Multiple Koshas per Mac, switcher dropdown, three templates (Empty / Enterprise / Developer)
  • · KoshaLang DSL — plain English: list suryas · summary "Work" · add "..." to "Day Job" · rename · delete · find
  • · Right-click in the schema tree to rename / delete / add child
  • · AES-256-GCM content encryption with key in Mac Keychain
  • · 8 GB hard cap per Kosha file (forces multi-Kosha sharding)
  • · Localhost JSON-RPC on port 4096 (SDKs, CLI, external tools)
  • · MCP server on /mcp — kosha_ingest + kosha_search + kosha_compute_embeddings; works with any MCP-aware AI client
  • · Path embeddings via Ollama + Gemma 4 (Power Steering — autonomous routing)
  • · Self-driving ingest: kosha_ingest(content, auto_route=true)
  • · Hardware-aware model picker (e2b / e4b / 26b based on RAM)
Coming · V1.1+

The full query loop

  • · First-run auto-install of Ollama + Gemma 4 with progress bar
  • · Per-Google-account encryption keys (HKDF derive — closes the same-macOS-user gap)
  • · Pre-populated tutorial Nabha (KOSHA_TUTORIAL — learn by clicking)
  • · Right-click "+ New Nabha" on the Kosha node, protected default Nabha
  • · Ask in plain English → KOSHA returns answer plus source grahas, in order
  • · ASHRU extraction: 10-column V\| kāraka rows for structural SQL queries
  • · Per-Google-account encryption keys (HKDF-derived)
Privacy & honest limits

Personal memory. Local by definition.

Always local. KOSHA stores everything on your Mac — the 8-branch structure, the facts, the registry, all local. No cloud LLMs are required to use V1.0; you read and write entirely without network.

Zero API costs. V1.0 has no cloud LLM toggles. No Gemini key, OpenAI key, or Anthropic key fields anywhere in the UI. Local Gemma 4 (when installed via Ollama) handles inference. You pay nothing per query.

Apple Silicon (M1+) required. This is your personal memory — it never leaves your laptop.

Anonymous usage stats during the beta. KOSHA records counts (number of grahas, KoshaLang commands run) once a day so we can improve the product. Never the content of your queries or your stored data. The telemetry endpoint table exists in the V1.0 schema; the daily ping wires up in V1.1.

Your data, your files. Each Kosha is one file on disk at ~/Library/Application Support/com.sumaproai.kosha/koshas/<name>.db. Drag it to a USB stick. Hand it to a coworker. Delete it. It's yours.

Provenance

Built on the original formal grammar.

KOSHA's structural model is the kāraka case roles formalized in Pāṇini's Aṣṭādhyāyī (~5th century BCE) — one of humanity's earliest formal grammars. Six syntactic-semantic roles (kartā, karma, karaṇa, sampradāna, apādāna, adhikaraṇa) describe how nouns relate to verbs in any sentence.

Two and a half millennia of linguistic refinement turned out to be a remarkably good shape for representing LLM-extracted facts. We're using a structure that has been in the public domain for over two thousand years.

Get the build

Drop a fact. Watch the chain hold.

v1.5.0 β · ~10 MB · Apple Silicon (M1+) Mac. Signed + Apple-notarized — just double-click to open.

Download KOSHA 1.5.0 →

Always local · No cloud LLMs required · Zero API costs

Developer quickstart

Plug any AI agent into KOSHA.

KOSHA runs an MCP server at 127.0.0.1:4096/mcp. Two tools — kosha_ingest (write) and kosha_search (read). One question in, one answer out. Every call is a sealed Chakra.

Pattern

Each agent gets its own bounded brain.

Open KOSHA. In the KoshaLang editor type create kosha "qa" with template Empty, then create kosha "dev" with template Empty. Switch between them in the dropdown — each is a separate encrypted file with its own SURYA tree. The QA agent never sees Dev's facts. The Dev agent never sees QA's facts. Branch-scoped retrieval, deterministic by construction.

Multi-machine networking, cross-agent writes, and federation arrive in V1.1+ (the MYRA layer). Today: per-agent bounded memory on one Mac.

List the tools — curl
curl -s -X POST http://127.0.0.1:4096/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
Search & ingest — Python (stdlib only)
import json, urllib.request

def kosha_call(method, params=None):
    payload = {"jsonrpc": "2.0", "id": 1, "method": method}
    if params: payload["params"] = params
    req = urllib.request.Request(
        "http://127.0.0.1:4096/mcp",
        data=json.dumps(payload).encode(),
        headers={"Content-Type": "application/json"},
    )
    with urllib.request.urlopen(req) as r:
        return json.loads(r.read())

# Overview of the active Kosha
print(kosha_call("tools/call", {"name": "kosha_search", "arguments": {}}))

# Write a fact under "Work" (hint is required — KOSHA enforces structure on write)
kosha_call("tools/call", {
    "name": "kosha_ingest",
    "arguments": {"content": "Migration 057 ships Friday.", "hint": "Work"},
})
Search & ingest — Node.js 18+ (no deps)
async function koshaCall(method, params) {
  const res = await fetch("http://127.0.0.1:4096/mcp", {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({ jsonrpc: "2.0", id: 1, method, params }),
  });
  return res.json();
}

// Read mode — query inside a scope (4 search modes total: overview / scope / query / query+scope)
const hits = await koshaCall("tools/call", {
  name: "kosha_search",
  arguments: { query: "migration 057", scope: "Work" },
});
console.log(hits);
Cursor / Continue — MCP HTTP config
{
  "mcpServers": {
    "kosha": {
      "url": "http://127.0.0.1:4096/mcp"
    }
  }
}

Drop into ~/.cursor/mcp.json or Continue's ~/.continue/config.json. Restart the IDE. kosha_search and kosha_ingest appear as native tools. Claude Desktop currently expects stdio MCP — an HTTP-bridge adapter ships in V1.1.

A note on hint: kosha_ingest requires a hint (a SURYA or sub-branch name like "Work") — KOSHA enforces structure on write. If your agent doesn't know where the fact belongs, call kosha_search first to discover the right branch, OR pass auto_route: true and KOSHA picks via Gemma path embeddings (requires Ollama + gemma4:e2b).

Get notified

Stay in the loop on V1.1.

We'll email when V1.1 ships — first-run auto-install of Ollama + Gemma 4, per-account encryption keys, and the pre-populated KOSHA tutorial Nabha.