Our gradio app for MCP-powered memory.
A full RAG pipeline using Vectara, with an optional persistent memory system using a knowledge graph, built with Convex backend. This system allows for storing information about entities, their relations, and observations across multiple interactions.
This app is deployed on the current link: https://tangentleman--youtwo-gradio-gradio-app.modal.run
git clone https://github.com/TanGentleman/YouTwo
cd YouTwo
python -m venv .venv
source .venv/bin/activate
pip install -r requirements-extra.txt
python scripts/run_gradio_app.pycd YouTwo
modal deploy deployment/modal_app.pyThe knowledge graph memory server implements:
- Entity Management: Create, update, and delete entities with associated metadata
- Relationship Tracking: Track how entities relate to each other
- Journal System: Record timestamped entries that can be analyzed for entity extraction
- Semantic Search: Find semantically similar content using vector embeddings
- HTTP API: External integration with the knowledge graph
- Node.js (v14 or later)
- npm
- Clone the repository:
git clone https://github.com/TanGentleman/YouTwo
cd YouTwo/backend- Install dependencies:
npm install- Start the development server (You will be prompted to login to Convex):
npx convex devExpose all our backend functions easily using MCP or even http requests. See: https://docs.convex.dev/client/react/deployment-urls https://docs.convex.dev/ai/convex-mcp-server
The system provides both a JavaScript API and HTTP endpoints for managing the knowledge graph.
await createEntities({
entities: [
{
name: "John_Smith",
entityType: "person",
observations: ["Speaks fluent Spanish", "Graduated in 2019"]
}
]
});await createRelations({
relations: [
{
from: "John_Smith",
to: "Anthropic",
relationType: "works_at"
}
]
});const graph = await readGraph();const results = await searchNodes({ query: "Spanish speaker" });The system also exposes HTTP endpoints for external integration:
POST /entities- Create entitiesPOST /relations- Create relationsPOST /observations- Add observations to entitiesGET /graph- Read the entire knowledge graphGET /search?q=query- Search nodes by queryGET /nodes?names=name1,name2- Get specific nodes by nameDELETE /entities- Delete entitiesDELETE /observations- Delete observationsDELETE /relations- Delete relations
The system is built using Convex for the backend database and API. The codebase is structured as follows:
backend/convex/- Convex backend codeschema.ts- Database schema definitionentities.ts- Entity management functionsrelations.ts- Relation management functionsknowledge.ts- Knowledge graph query functionsjournals.ts- Journal entry managementembeddings.ts- Vector embedding functionsdistiller.ts- Knowledge extraction from journalsoperations.ts- Operation logging utilitieshttp.ts- HTTP API endpoints
MIT