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 high-level memory API for AI agents, built on TypeAgent's Structured RAG.
What's New
- Hybrid search - Structured RAG + embedding similarity in parallel for best recall
- Structured memory - Entity/action/topic extraction via LLM, term-based indexing
- Embedding-only mode -
search_by_embedding()for fast similarity search without LLM - Multi-tenant support with hierarchical collections (
user:xiaoyuzhang) - PostgreSQL backend with pgvector for production deployment
Installation
pip install momex
Quick Start
import asyncio
from momex import Memory, MomexConfig, LLMConfig
async def main():
config = MomexConfig(
llm=LLMConfig(provider="openai", model="gpt-4o", api_key="sk-xxx"),
)
# Create a memory collection
memory = Memory(collection="user:xiaoyuzhang", config=config)
# Add memories — automatically extracts entities, actions, topics
await memory.add("My name is Xiaoyu, I love Python programming")
# Search — returns structured results you can feed to your own agent
results = await memory.search("Python")
for item in results:
print(f"[{item.type}] {item.text}")
asyncio.run(main())
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
- Found in the docs directory
- Quick install:
pip install typeagent - Download the PyBay '25 PowerPoint slides
- Download the PyBay '25 slides as PDF
- Watch the PyBay '25 video
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.
Metadata
Release files for momex 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| momex-0.2.2.tar.gz | 7.6 MB | With provenance | Details for momex-0.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| momex-0.2.2-py3-none-any.whl | Python 3 | none | any | Details for momex-0.2.2-py3-none-any.whl |
Total release size: 7.8 MB
Release files / momex-0.2.2.tar.gz
| Download URL | momex-0.2.2.tar.gz |
|---|---|
| Size | 7.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2b56ac502e9e6a073f83142db155fc5b9e68a932bb3ff6dff4fd4fd1cd2373bf
|
|
BLAKE2b-256 checksum How to use checksums |
c195e0a5dc49f7c856741d779870ee929c1e22064820954dead3f672dbf41bae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 8, 2026.
Transparency logRelease files / momex-0.2.2-py3-none-any.whl
| Download URL | momex-0.2.2-py3-none-any.whl |
|---|---|
| Size | 204.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
66d85b0f572a1c6b224c93cef791a1c892ec1890d15a9661bd56bd39efa77c0e
|
|
BLAKE2b-256 checksum How to use checksums |
5dd27c6b75794d884060bda79b8b7e03b0f9e4fae240e48196b4ad1728fcea23
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 8, 2026.
Transparency logSecurity for momex 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for momex-0.2.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 8, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.