File size: 1,697 Bytes
6e68a92
 
 
 
 
 
 
 
 
 
 
a371500
 
6e68a92
 
0a25329
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
title: Central Memory Agent
emoji: 🦀
colorFrom: yellow
colorTo: indigo
sdk: gradio
sdk_version: 6.0.1
app_file: app.py
pinned: false
license: mit
short_description: Storing Memories and Agentic Retrieval with MCP
tags:
- mcp-in-action-track-consumer
---

# Central Memory Agent

Central Memory Agent is a Gradio-based chatbot application designed to store and retrieve information. It provides a user-friendly interface and exposes tools as MCP (Model Context Protocol) endpoints for seamless integration with MCP clients.

---

## Features

- **Chatbot Interface**: Interact with the memory system to store and retrieve information.
- **Memory Storage**: Add content to memory with metadata (category, topic).
- **Memory Retrieval**: Search stored information using agentic retrieval.
- **MCP Endpoints**: Access `populate_memory` and `search_memory` tools via MCP clients.

---

## Usage

1. **Run the Application**:
   ```bash
   uv run main.py
   ```

2. **Interact with the Chatbot**:
   - Use the chatbot interface to store and retrieve memories.

3. **Connect MCP Clients**:
   - Access the `populate_memory` and `search_memory` tools via MCP endpoints.

---

## Project Structure

- `main.py`: The main application file that launches the Gradio interface.
- `utility.py`: Contains the `populate_memory` and `search_memory` tools.
- `agent.py`: Manages retrieval states and builds retrieval graphs.
- `clients.py`: Defines the language model and vector store clients.
- `pyproject.toml`: Project configuration and dependencies.

---

## Acknowledgments

- Built with [Gradio](https://gradio.app/).
- Powered by [LangChain](https://langchain.com/) and [Qdrant](https://qdrant.tech/).