Aethvion DB

A knowledge database engine built for agents.
Every fact — person, place, module, decision, task — is a typed entity in one uniform envelope, wired into a graph, deduplicated by name, and queryable in milliseconds.
Runs entirely on your machine. No data leaves your computer.

v0.1 — Early Development AGPL-3.0 GitHub ↗

The engine was battle-tested inside Aethvion Suite and is now extracted here as a standalone package. The API and storage format may still change before a stable release.

What It Is

AethvionDB is a local, file-backed knowledge store designed from the start for agentic use — for AI agents and local models to read and write structured knowledge against a single shared source of truth.

Unlike a wiki (documents) or a vector store (opaque chunks), AethvionDB keeps typed entities with explicit relationships. Nothing is duplicated: facts are stored once and referenced by ID, so the knowledge stays a graph rather than a pile of copies.

Where Project Mapper maps a single codebase, AethvionDB is the general-purpose knowledge layer: the brain of the workspace that many agents and systems can share.

How It Works

01

Write

Create a typed entity — person, place, module, decision, anything. A global name index is consulted first, so the same real-world thing never gets two records: atomic get-or-create.

02

Relate

Wire entities together with typed relations — depends_on, parent_of, calls, created_by, related_to — making the store a true knowledge graph, not a flat document pile.

03

Query

Traverse, search, or find neighbors and shortest paths. Hybrid keyword + vector search over entities, served from an in-memory cache backed by a single-file snapshot.

Features

Typed Entities + Relations

One schema for everything, graph-native. Every entity shares the same envelope: core, timeline, relations, properties, stubs.

Name-Index Deduplication

Atomic get-or-create against a global name index — no duplicate records for the same real-world thing.

Distillation

Extract a structured entity from raw text with an injected LLM backend.

Expansion

Grow the graph from stubs — sub-topics flagged as deserving their own entity — into fully-formed records.

Hybrid + Vector Search

Keyword and embedding similarity over entities, both built on the same store.

Graph Queries

Traverse, find neighbors, and compute shortest path between any two entities.

Validation

Schema and cross-entity consistency checks — duplicates, orphan stubs, broken relations, timeline ordering.

Baking

Export curated, flattened snapshots for downstream consumers that don't need the live graph.

Backups

Point-in-time copies with restore, plus support for multiple independent databases switched freely.

HTTP API

A versioned REST surface (/api/v1) with API keys, batch operations, cursor pagination, and section projection.

Performance

AethvionDB serves reads from an in-memory cache backed by a single-file snapshot, with an O(1) generation counter for freshness — no per-file stat() scans. Measured on a 30,352-entity / 36 MB database:

Operation Time
Warm entity list ~4 ms
Cold load (snapshot) ~350 ms (off the event loop)
Freshness check ~0.1 ms
Single write O(1) — patches the cache, no full rebuild

The list view is served a lightweight projection; full entity bodies load on demand. Writes patch the cache in place and bump the generation, so a single write never triggers a full rebuild.

Roadmap

The direction is to prove the engine through real use first, then package and expose it more broadly — the same path Project Mapper took.

☐ Stabilise the standalone package (extract cleanly from Aethvion Suite)

☐ First tagged release + install instructions

☐ Realtime change feed for a live memory dashboard

☐ Per-type schema / ontology enforcement

☐ MCP server — distill / upsert / search / graph as agent tools

Quick Start

# From a checkout (editable install)
pip install -e ".[dev]"

# Run the HTTP API (defaults to 127.0.0.1:7475)
aethviondb-server
#   docs at  http://127.0.0.1:7475/docs
#   API at   http://127.0.0.1:7475/api/v1

# Or use it as a library
from aethviondb import EntityWriter
w = EntityWriter()
entity, created = w.create("Ada Lovelace", entity_type="person")
print(w.get_by_name("Ada Lovelace")["id"])

Data is stored under ~/.aethvion/aethviondb by default (override with AETHVIONDB_DATA_DIR). The deterministic core — entities, graph, search, validation — works without an LLM backend; distillation/expansion/embeddings require one injected.