Skip to main content

Memory system for AI agents with Structured RAG, built on TypeAgent

Project description

Fork Changes

I've been keeping an eye on this repo for a while. I'm also personally interested in personal assistant agents, and I've been trying to find best practices for memory. Structured RAG is a great design, but since this is an experimental project, the feature set isn't complete yet. So I forked the original repo and added more features, aiming to make it work for more general use cases and projects.

This fork adds Momex - a simplified, collection-based API wrapper for TypeAgent's Structured RAG.

What's New

  • src/momex/ - High-level memory API package
  • Hierarchical collections with : separator (company:engineering:alice)
  • Prefix queries across multiple collections
  • Auto fact extraction and deduplication via LLM
  • Importance scoring (health info ranks higher than casual info)
  • PostgreSQL backend support (via pgvector)
  • Soft delete and restore
  • YAML configuration support
  • Export to JSON

Quick Start

from momex import Memory, query

# Add memories with hierarchical identity
alice = Memory(collection="company:engineering:alice")
alice.add("I like Python")

bob = Memory(collection="company:engineering:bob")
bob.add("I prefer Java")

# Query with prefix - searches all matching collections
answer = query("company:engineering", "What languages do people like?")
# Searches both alice and bob

answer = query("company", "Who likes Python?")
# Searches entire company

See docs/momex.md for full documentation.


Python package 'typeagent'

This is an experimental prototype

Working toward a shared understanding of the MVP for structured RAG.

This is sample code

This is an in-progress project aiming at a Pythonic translation of TypeAgent KnowPro and a few related packages from TypeScript to Python.

Warning

This library will send its input to an LLM hosted by a third party. Don't use it to index confidential information.

Documentation

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

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

momex-0.1.0.tar.gz (26.1 kB view details)

Uploaded Source

Built Distribution

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

momex-0.1.0-py3-none-any.whl (33.2 kB view details)

Uploaded Python 3

File details

Details for the file momex-0.1.0.tar.gz.

File metadata

  • Download URL: momex-0.1.0.tar.gz
  • Upload date:
  • Size: 26.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for momex-0.1.0.tar.gz
Algorithm Hash digest
SHA256 608beac3b661aeaf03944eeb057a1f28756abdea04d04f76a2d296324fcb2f84
MD5 5e04b9b73d4a148fef666cc9601df556
BLAKE2b-256 972dc26bff1d16ba37dc5177c1404d85e3ead8cfe733d004dfe5f62557803bd9

See more details on using hashes here.

File details

Details for the file momex-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: momex-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 33.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for momex-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b7e425b0a22e93d5a37391cfd19403d0a2ddd4c6715c16e3dec417c707de765e
MD5 ee6857389f7c3101651c83b938f13eb9
BLAKE2b-256 6867017276adabf04ea76163b1197931a2d45d5dadf28a5fe560a64538d7e4aa

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