Skip to content

Commit 57a396d

Browse files
committed
docs(README): update documentation and improve readability
- Refactor README content for better structure and clarity - Add installation instructions for both PyPI and source installations - Clarify the relationship between this repository and the MemFuse server - Update example code and add contextual follow-up example - Improve documentation links and community support sections
1 parent eb61b05 commit 57a396d

File tree

1 file changed

+33
-44
lines changed

1 file changed

+33
-44
lines changed

README.md

Lines changed: 33 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -43,52 +43,41 @@
4343

4444
## About MemFuse
4545

46-
Large-language-model apps are stateless out of the box.
47-
Once the context window rolls over, yesterday's chat, the user's name, or that crucial fact vanishes.
46+
Large language model applications are inherently stateless by design.
47+
When the context window reaches its limit, previous conversations, user preferences, and critical information simply disappear.
4848

49-
**MemFuse** plugs a persistent, query-able memory layer between your LLM and a storage backend so agents can:
49+
**MemFuse** bridges this gap by providing a persistent, queryable memory layer between your LLM and storage backend, enabling AI agents to:
5050

51-
- remember user preferences across sessions
52-
- recall facts & events thousands of turns later
53-
- trim token spend instead of resending the whole chat history
54-
- learn continuously and self-improve over time
51+
- **Remember** user preferences and context across sessions
52+
- **Recall** facts and events from thousands of interactions later
53+
- **Optimize** token usage by avoiding redundant chat history resending
54+
- **Learn** continuously and improve performance over time
5555

56-
This repository contains the Python SDK for interacting with a MemFuse server. For more information about the MemFuse server and its features, please visit the [main MemFuse repository](https://github.com/memfuse/memfuse).
56+
This repository contains the official Python SDK for seamless integration with MemFuse servers. For comprehensive information about the MemFuse server architecture and advanced features, please visit the [MemFuse Server repository](https://github.com/memfuse/memfuse).
5757

5858
## Installation
5959

60-
First, ensure you have a MemFuse server running. To set up the MemFuse server locally:
60+
> **Note:** This is the standalone Client SDK repository. If you need to install and run the MemFuse server, which is essential to use the SDK, please visit the [MemFuse Server repository](https://github.com/memfuse/memfuse).
6161
62-
1. Clone the [main MemFuse repository](https://github.com/memfuse/memfuse):
63-
```bash
64-
git clone https://github.com/memfuse/memfuse.git
65-
cd memfuse
66-
```
67-
2. Once in the `memfuse` directory, install its dependencies and run the server using one of the following methods:
62+
You can install the MemFuse Python SDK using one of the following methods:
6863

69-
**Using pip:**
64+
**Option 1: Install from PyPI (Recommended)**
7065

71-
```bash
72-
pip install -e .
73-
python -m memfuse_core
74-
```
75-
76-
**Or using Poetry:**
77-
78-
```bash
79-
poetry install
80-
poetry run memfuse-core
81-
```
66+
```bash
67+
pip install memfuse
68+
```
8269

83-
Then, install the MemFuse Python SDK:
70+
**Option 2: Install from Source**
8471

8572
```bash
86-
pip install memfuse
73+
git clone https://github.com/memfuse/memfuse-python.git
74+
cd memfuse-python
75+
pip install -e .
8776
```
8877

8978
## Quick Start
9079

91-
Here's a basic example of how to use the MemFuse Python SDK with OpenAI:
80+
Here's a comprehensive example demonstrating how to use the MemFuse Python SDK with OpenAI:
9281

9382
```python
9483
from memfuse.llm import OpenAI
@@ -123,9 +112,9 @@ print(f"Response: {response.choices[0].message.content}")
123112
# Example Output: Response: Mars has a gravity of about 3.721 m/s², which is about 38% of Earth's gravity.
124113
```
125114

126-
<!-- Ask a follow-up question. MemFuse automatically recalls relevant context. -->
115+
### Contextual Follow-up
127116

128-
Now, ask a follow-up question. MemFuse will automatically recall relevant context from the previous turn:
117+
Now, ask a follow-up question. MemFuse will automatically recall relevant context from the previous conversation:
129118

130119
```python
131120
# Ask a follow-up question. MemFuse automatically recalls relevant context.
@@ -138,30 +127,30 @@ print(f"Follow-up: {followup_response.choices[0].message.content}")
138127
# Example Output: Follow-up: Some challenges of living on Mars include its thin atmosphere, extreme temperatures, high radiation levels, and the lack of liquid water on the surface.
139128
```
140129

141-
MemFuse will automatically manage recalling relevant information and storing new memories from the conversation within the specified `memory` scope.
130+
MemFuse automatically manages the retrieval of relevant information and storage of new memories from conversations within the specified `memory` scope.
142131

143132
## Examples
144133

145-
You can find more detailed examples in the [examples/](examples/) directory of this repository, showcasing:
134+
Explore comprehensive examples in the [examples/](examples/) directory of this repository, featuring:
146135

147-
- Basic and asynchronous operations
148-
- Continued conversations
149-
- Integrations with Gradio for chatbots (including streaming)
136+
- **Basic Operations:** Fundamental usage patterns and asynchronous operations
137+
- **Conversation Continuity:** Maintaining context across multiple interactions
138+
- **UI Integrations:** Gradio-based chatbot implementations with streaming support
150139

151140
## Documentation
152141

153-
- For detailed information about the MemFuse server, its architecture, and advanced configuration, please refer to the [main MemFuse documentation](https://memfuse.vercel.app/).
154-
- SDK-specific documentation and API references will be added here soon.
142+
- **Server Documentation:** For detailed information about the MemFuse server architecture and advanced configuration, visit the [MemFuse online documentation](https://memfuse.vercel.app/)
143+
- **SDK Documentation:** Comprehensive API references and guides will be available soon
155144

156145
## Community & Support
157146

158-
Join the MemFuse community:
147+
Join our growing community:
159148

160-
- **GitHub Discussions:** For roadmap voting, RFCs, Q&A in the [main MemFuse repository](https://github.com/memfuse/memfuse).
149+
- **GitHub Discussions:** Participate in roadmap discussions, RFCs, and Q&A in the [MemFuse Server repository](https://github.com/memfuse/memfuse)
150+
- **Issues & Features:** Report bugs or request features in this repository's [Python SDK Issues section](https://github.com/memfuse/memfuse-python/issues)
161151

162-
If MemFuse is helpful to you, please ⭐ star the [main repo](https://github.com/memfuse/memfuse) and this SDK repo!
152+
If MemFuse enhances your projects, please ⭐ star both the [server repository](https://github.com/memfuse/memfuse) and this SDK repository!
163153

164154
## License
165155

166-
This MemFuse Python SDK is licensed under the Apache 2.0 License. See the [LICENSE](LICENSE) file for more details.
167-
(You'll need to add a LICENSE file to this SDK repository, typically a copy of the Apache 2.0 license text).
156+
This MemFuse Python SDK is licensed under the Apache 2.0 License. See the [LICENSE](LICENSE) file for complete details.

0 commit comments

Comments
 (0)