Skip to main content

FastBuilder.AI text memory graph cluster tool using Louvain

Project description

FastMemory

FastMemory is an ontological clustering engine that transforms flat, unstructured text embeddings into a structured, agent-navigable functional memory graph using the CBFDAE (Component, Block, Function, Data, Access, Event) taxonomy.

Developed by FastBuilder.AI, FastMemory bridges the gap between shallow vector retrieval (RAG) and deterministic computational memory.

🤬 Developer Pain Points & The FastMemory Solution

Building reliable AI agents on top of massive Enterprise codebases and datasets is incredibly hard. FastMemory directly solves the three biggest pain points developers face today:

  1. RAG Hallucinations: Standard vector similarity retrieves unrelated text chunks just because they share keywords (e.g., retrieving the "Login Code" when the user asked about the "Login Bug Ticket"). FastMemory provides Deterministic Pathfinding through isolated functional clusters.
  2. Context Fragmentation: Naive text chunking destroys logical boundaries, losing the surrounding context of a function. FastMemory parses semantic topologies into grouped Cognitive Blocks, providing the AI with sibling functions and deterministic access restrictions.
  3. Graph DB Sync Overhead: Piping hierarchical data into Neo4J normally requires complex, fragile NLP and ETL pipelines. The FastMemory Rust engine does this natively in milliseconds using structural Louvain clustering.

🗺️ The Google Maps Analogy

Imagine opening Google Maps, but all you can see are roads and paths. There are no building names, no entry gates, no transaction information for the buildings, and no communication routing.

If you asked a humanoid robot to navigate to a hospital using this map, it would only see a "road to a doctor", a "road to a bed", a "road to a nurse", and a "road to a pharmacy." It would have a profoundly hard time knowing the modes and modality of how to actually behave, act, and pursue every target differently depending on context.

That is exactly what happens when you use standard RAG, semantic ontologies, or flat vector graphs.

Standard Ontology / RAG FastMemory CBFDAE Map

You simply have node-to-node semantic edges. You possess the "roads" (cosine similarity), but you lack the "buildings" (Functional Components) and the "rules of entry/engagement" (Access and Events).

FastMemory solves this. We utilize high-speed Community Detection (Louvain clustering) to mathematically derive and enhance this network of data for direct AI usage, translating raw text into executable cognitive blocks.


🔍 Features & Benefits

  • CBFDAE Ontology: Information isn't just stored; it is classified into Components, Blocks, Functions, Data, Access restrictions, and Events.
  • Deterministic Pathfinding: Eliminates RAG hallucinations. An AI doesn't "guess" the answer based on semantic proximity; it traverses a rigorous, rule-based logic graph.
  • The Agentic Query Engine: Deep recursive subtree targeting. When you query FastMemory, it doesn't just return a matching string—it returns the deepest logical encompassing Block, providing the AI with sibling functions and contextual boundaries.
  • Enterprise Native: Designed to sit on top of Datawarehouses, SAP, Databricks, AWS Glue, and Fabric.

📊 Before & After FastMemory

Standard vector RAG databases index chunks individually, often losing the multi-hop reasoning capability required to trace dependencies. FastMemory restructures these into event-driven, hierarchical memory blocks.

(You can open the interactive D3.js visualizations directly in your browser from the example/ directories!)

🏥 Health Science

Before: Flat Semantic Vectors After: Clustered Functional Memory Graph

🤖 Robotics

Before: Flat Semantic Vectors After: Clustered Functional Memory Graph

🚗 Driverless Cars

Before: Flat Semantic Vectors After: Clustered Functional Memory Graph

📈 Business Analytics

Before: Flat Semantic Vectors After: Clustered Functional Memory Graph

✉️ Email Analysis

Before: Flat Semantic Vectors After: Clustered Functional Memory Graph

📋 Audit Operations

Before: Flat Semantic Vectors After: Clustered Functional Memory Graph

🌍 World Events

Before: Flat Semantic Vectors After: Clustered Functional Memory Graph

📦 Installation

Rust (Cargo) - CLI Utility To install the standalone fastmemory CLI tool for terminal, server, or MCP usage:

cargo install fastmemory

Python (PyPI) - Native Import To install the high-speed Python module (built natively via PyO3) for direct integration into your Python AI applications:

pip install fastmemory

🚀 Usage Guide

FastMemory can be utilized natively from the command line, spun up as an enterprise REST server, or imported directly into your Python scripts.

1. Terminal CLI (via Cargo)

# Build the memory graph from an ATF Markdown file
$ fastmemory build data/input.md

# Instantly query the hierarchical graph
$ fastmemory query data/input.md "reimbursement"

2. Python (Direct Import)

By utilizing our pip module, your Python loops can pass markdown directly to the compiled Rust engine without any JSON/CLI overhead. The resulting graph JSON is computed instantly via Louvain community detection.

import fastmemory

# 1. Define or fetch your raw Action-Topology Format (ATF) text
markdown_text = """
## [ID: auth_module]
**Action:** Validate_Token
**Data_Connections:** session_uuid
**Access:** Role_Admin
**Events:** User_Login
"""

# 2. Pass strings synchronously into the Rust engine
cbfdae_json_graph = fastmemory.process_markdown(markdown_text)

print(cbfdae_json_graph)

3. Running as an Enterprise Service

FastMemory ships with a highly optimized embedded Axum web server and MCP (Model Context Protocol) integration for AI agents:

# Boot the REST API locally or enterprise-wide
$ fastmemory serve data/input.md --port 16743
# Query: curl http://localhost:16743/query?q=reimbursement

# Boot standard Stdio MCP (for Claude / Gemini IDE integration)
$ fastmemory mcp data/input.md

4. Enterprise Data Ingestion

In addition to positional file arguments, FastMemory supports enterprise-grade ingestion strings for dynamic pipelines:

  • Local Directories (--data): Pass a local directory to parse and cluster multiple ATF Markdown files continuously.
    $ fastmemory build --data /var/lib/fastmemory/data
    
  • Remote Pipelines (--datahost): Bind directly to Data Warehouses (Snowflake, BigQuery), Data Lakes (Databricks, Fabric), or S3 by passing a connection URI. FastMemory will securely intercept the URI and dynamically ingest the remote structures.
    $ fastmemory serve --port 16743 --datahost postgres://db_user:secret@localhost:5432/app
    $ fastmemory mcp --datahost s3://corporate-bucket/atfs/
    

[!TIP] Large Scale Graph DB Memory: When scaling FastMemory beyond local processing, the clustered JSON output explicitly maps into systems like Neo4J. FastMemory naturally supports partial topology updates. Please read our Production Scaling & Graph DB Ingestion Guide for detailed Python and Cypher deployment patterns.

5. Advanced Security & Federated Auth

Data access within FastMemory is rigorously secured at the graph layer. Utilizing the A_ (Access) node topology, you can map federated IAM rules (like AWS IAM or Azure AD) directly onto specific memory blocks.

  • Wrapper Implementation: Place an API Gateway ahead of fastmemory serve to enforce standard OAuth/SAML.
  • Code-Level Auth: AI agents parsing the memory graph will inherently see the A_Role_Admin nodes attached to functions, allowing the agent to deterministically self-regulate access before taking action.

🧠 Applications

Standard RAG Robot Brain FastMemory CBFDAE Robot Brain
  • Agentic Apps & SaaS: Integrate fastmemory mcp directly into your proprietary AI loops. Instead of sending agents to vector DBs, send them into a FastMemory graph where they can extract isolated, functional context blocks to execute SaaS workflows.
  • Fast Software Engineering: In FastBuilder.AI, FastMemory acts as the structural brain for rapid feature development. By indexing the entire application architecture into an ontological graph, coding agents can query precisely how a proposed change will impact distant, decoupled components.
  • The Possibilities are Endless: Medical diagnostics routing, autonomous drone navigation logic, enterprise compliance auditing, etc.

📄 License & Commercial Terms

This project is licensed under the MIT License.

COMMERCIAL USE EXCEPTION Notwithstanding the MIT License, any commercial entity, company, or organization that has generated gross revenue exceeding USD $20,000,000 in its most recently completed fiscal year or current interim year must obtain an explicit commercial license from FastBuilder.AI prior to using, copying, modifying, merging, publishing, distributing, sublicensing, or selling copies of this Software.

[!NOTE] When is the Commercial License Necessary? For standard projects involving small or moderate numbers of documents, any basic Python script or standard semantic dictionary will suffice. FastMemory, however, is a hyper-optimized, concurrent Rust Graph Processing Engine. If your enterprise is parsing, isolating, and synchronizing millions of documents into systems like Neo4J and executing real-time partial updates, this engine is designed for your scale. The commercial license ensures FastBuilder.AI can continue maintaining and pushing the limits of this high-performance architecture.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastmemory-0.3.0.tar.gz (413.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fastmemory-0.3.0-cp312-cp312-macosx_10_12_x86_64.whl (3.8 MB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

File details

Details for the file fastmemory-0.3.0.tar.gz.

File metadata

  • Download URL: fastmemory-0.3.0.tar.gz
  • Upload date:
  • Size: 413.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.11.5

File hashes

Hashes for fastmemory-0.3.0.tar.gz
Algorithm Hash digest
SHA256 7bac417083e6abae821cafc93e5ec5b1342175ade1537a57db766761212e70bf
MD5 a31cec1576f608284588f33dc73a489b
BLAKE2b-256 e4991100707a75b8b79fda734ba3a70380b247e9da5ad4ac18367491d8fd5c3c

See more details on using hashes here.

File details

Details for the file fastmemory-0.3.0-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for fastmemory-0.3.0-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 0cd5d6ddab0b1465aafbd1352bfc45bf06e0817acd5ba1b2e7d9c3672c76c9f9
MD5 d7590059e0887591754c45343e3a573d
BLAKE2b-256 4aa26a2b2be557b5d16f0f8d5b20516178cd7c3439e8111d55475d80bde87a0d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page