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 API wrapper for TypeAgent's Structured RAG.
- Agent API - High-level chat interface with automatic memory management
- Short-term memory - Session-based conversation history with persistence
- Long-term memory - Structured RAG with entity/action/topic extraction
- Multi-tenant support with hierarchical collections (
user:xiaoyuzhang) - PostgreSQL backend with pgvector for production deployment
pip install momeximport asyncio
from momex import Agent, MomexConfig, LLMConfig
async def main():
config = MomexConfig(
llm=LLMConfig(
provider="openai",
model="gpt-4o",
api_key="sk-xxx",
),
)
agent = Agent("user:xiaoyuzhang", config)
r = await agent.chat("My name is Xiaoyu, I love Python")
print(r.content)
r = await agent.chat("What's my name?")
print(r.content) # "Your name is Xiaoyu"
asyncio.run(main())| Level | API | Description |
|---|---|---|
| Level 1 | Agent |
Chat API with automatic memory (recommended) |
| Level 2 | Memory |
Manual control for custom agents |
See docs/momex.md for full documentation.
Working toward a shared understanding of the MVP for structured RAG.
This is an in-progress project aiming at a Pythonic translation of TypeAgent KnowPro and a few related packages from TypeScript to Python.
This library will send its input to an LLM hosted by a third party. Don't use it to index confidential information.
- 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
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.