Skip to content

BaseMyAI/.github

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

BaseMyAI — The private memory database for AI agents

BaseMyAI

The private memory database for AI agents.

Local-first · Temporal · Encrypted · Agent-scoped · Hybrid recall

Repository · Documentation · Security · crates.io · PyPI


What is BaseMyAI?

BaseMyAI is an embedded Agent Memory Database for AI agents that need memory they can actually trust.

It stores agent memory inside a local encrypted .bmai database and gives agents persistent recall with vector search, temporal validity, memory layers, graph context, adaptive forgetting, and hybrid retrieval.

BaseMyAI is not another hosted vector database.

It is built for private assistants, coding agents, internal copilots, local-first tools, and products that cannot leak user memory to a cloud memory store.


Quick start

basemyai setup --fetch

export BASEMYAI_DB_KEY="change-me-use-a-real-secret-key"

basemyai init ./agent.bmai

basemyai remember ./agent.bmai \
  --agent assistant-42 \
  --layer semantic \
  "User is on the Pro plan."

basemyai recall ./agent.bmai \
  --agent assistant-42 \
  "current billing plan" \
  --hybrid

Core principles

Principle Description
Local-first by default Memory stays on the user's machine. No hosted memory backend by default.
Encrypted .bmai files Agent memory lives in a local encrypted BaseMyAI container.
Temporal memory Facts can expire or be invalidated, so stale memories do not silently win recall.
Agent-scoped isolation Each memory operation is scoped by agent_id to prevent cross-agent leakage.
Multi-layer memory Short-term, episodic, procedural, and semantic memories are treated differently.
Hybrid recall Vector search, BM25, graph context, and RRF fusion work together.
Inspectable memory Developers can inspect, export, import, invalidate, and debug memory behavior.
Rust foundation One engine powers Rust, Python, Node, CLI, MCP, and REST surfaces.

Why BaseMyAI exists

AI agents usually fail memory in one of three ways:

  1. They forget everything between sessions.
  2. They send sensitive memory to a hosted vector database.
  3. They recall outdated facts as if they were still true.

BaseMyAI fixes that by giving agents a dedicated memory database that is local, encrypted, temporal, and purpose-built for agent workflows.

A vector database can store embeddings.

BaseMyAI stores agent memory.


Memory model

BaseMyAI separates memory into four layers:

Layer Purpose Typical lifetime
short_term Active working context Short TTL
episodic Events, interactions, what happened and when Time-bounded
procedural Workflows, steps, habits, learned behaviors Long-lived
semantic Facts and knowledge Valid until invalidated

Every layer supports temporal validity through valid_from and valid_until.

That means an agent can remember that something used to be true without treating it as true forever.


Recall system

BaseMyAI recall is multi-signal by design.

Signal Role
Vector search Finds semantically similar memories.
BM25 full-text search Catches exact terms, IDs, names, filenames, and rare keywords.
Graph context Connects entities and relationships across memories.
Temporal filtering Removes expired or invalidated facts from active recall.
RRF fusion Merges ranking signals without brittle manual weights.

This makes recall more reliable than cosine similarity alone.


Security and privacy

BaseMyAI is built for developers who need memory they can control.

  • encrypted local .bmai files
  • no hosted memory backend by default
  • no silent model downloads
  • explicit setup for model provisioning
  • per-agent memory isolation
  • local-first operation
  • key supplied by the application or environment
  • designed for privacy-sensitive agents and internal tools

See the full security policy:

Security Policy


Supported environments

macOS macOS    Linux Linux    Windows Windows

BaseMyAI is built in Rust and designed for cross-platform local deployment.


Main repository

BaseMyAI/basemyai

The main repository contains:

  • Rust workspace
  • memory engine
  • CLI
  • MCP server
  • REST sidecar
  • Python binding
  • Node binding
  • architecture decisions
  • benchmarks
  • security policy
  • technical proofs

Consumption surfaces

Surface Status Use case
Rust crate Available Native Rust agents and embedded engines
Python SDK Available Python agent builders
Node SDK In progress / verify package name JavaScript and TypeScript agents
CLI Available Local inspection, scripting, automation
MCP server Available Claude Code and agent-tool integrations
REST sidecar Available Local HTTP integration for other languages

Product direction

BaseMyAI starts with a reliable libSQL-backed .bmai V1, then moves toward a native BaseMyAI engine while preserving the public memory database contract.

The long-term direction is full ownership over:

  • storage
  • indexing
  • vector search
  • graph traversal
  • memory events
  • future sync primitives
  • query language possibilities

The public contract stays simple:

a private memory database for AI agents.

The internal engine can evolve without turning BaseMyAI into a wrapper around someone else's database.


Contributing

BaseMyAI is being built as serious local AI memory infrastructure.

Useful places to start:

  • explore the main repository
  • read the architecture decisions
  • run the CLI locally
  • inspect the benchmark docs
  • open issues or discussions
  • test SDK and MCP workflows

Open the repository


Useful links

About

BaseMyAI organization profile

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors