You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<strong>The memory fabric for enterprise AI!!!</strong>
4
+
<strong>The memory fabric for enterprise AI</strong>
5
5
</p>
6
6
7
7
<palign="center">
8
-
<i>Memori plugs into the software and infrastructure you already use. It is LLM, datastore and framework agnostic and seamlessly integrates into the architecture you've already designed.</i>
<img src="https://img.shields.io/badge/⭐%20Give%20a%20Star-Support%20the%20project-orange?style=for-the-badge" alt="Give a Star">
31
+
<img src="https://img.shields.io/badge/Star%20on%20GitHub-Support%20Memori-orange?style=for-the-badge" alt="Star on GitHub">
37
32
</a>
38
33
</p>
39
34
40
35
---
41
36
42
-
## Getting Started
43
-
44
-
Install Memori:
45
-
46
-
```bash
47
-
pip install memori
48
-
```
49
-
50
-
## What's New In v3?
51
-
52
-
- Significant performance improvements using Advanced Augmentation.
53
-
- Threaded, zero latency replacement for the v2 extraction agent.
54
-
- LLM agnostic with support for all of the major foundational models.
55
-
- Datastore agnostic with support for all major databases and document stores.
56
-
- Adapter/driver architecture to make contributions easier.
57
-
- Vectorized memories and in-memory semantic search for more accurate context.
58
-
- Third normal form schema including storage of semantic triples for a knowledge graph.
59
-
60
-
## Example with OpenAI
61
-
62
-
```python
63
-
from openai import OpenAI
64
-
from memori import Memori
65
-
66
-
client = OpenAI(...)
67
-
mem = Memori().llm.register(client)
68
-
```
69
-
70
-
## Attribution
71
-
72
-
To get the most out of Memori, you want to attribute your LLM interactions to an entity (think person, place or thing; like a user) and a process (think your agent, LLM interaction or program).
73
-
74
-
If you do not provide any attribution, Memori cannot make memories for you.
Memori uses sessions to group your LLM interactions together. For example, if you have an agent that executes multiple steps you want those to be recorded in a single session.
39
+
Memori captures LLM interactions, enriches them, and makes them retrievable as high-quality context for future generations.
83
40
84
-
By default, Memori handles setting the session for you but you can start a new session or override the session by executing the following:
41
+
-**Low integration overhead**: wrap your existing LLM client and keep your current stack.
42
+
-**Attribution-aware memory**: organize memory by `entity`, `process`, and `session`.
43
+
-**Asynchronous augmentation**: extract structured memory without adding user-facing latency.
44
+
-**Flexible infrastructure**: supports multiple models, frameworks, and databases.
85
45
86
-
```python
87
-
mem.new_session()
88
-
```
89
-
90
-
or
91
-
92
-
```python
93
-
session_id = mem.config.session_id
94
-
95
-
# ...
46
+
## Install
96
47
97
-
mem.set_session(session_id)
48
+
```bash
49
+
pip install memori
98
50
```
99
51
100
-
## Suggested Setup
101
-
102
-
To make sure everything is installed in the most efficient manner, we suggest you execute the following once:
52
+
Optional one-time optimization:
103
53
104
54
```bash
105
55
python -m memori setup
106
56
```
107
57
108
-
This step is not necessary but will prep your environment for faster execution. If you do not perform this step, it will be executed the first time Memori is run which will cause the first execution (and only the first one) to be a little slower.
109
-
110
-
## Configure Your Database
111
-
112
-
1. Run this command once, via CI/CD or anytime you update Memori.
Supports sync, async, streamed, and unstreamed interaction modes.
195
140
141
+
### Frameworks and Platforms
142
+
143
+
- LangChain
144
+
- Agno
145
+
- Pydantic AI
196
146
- Nebius AI Studio
197
147
198
-
##Supported Database Integrations
148
+
### Database Connection Methods
199
149
200
-
-**DB API 2.0** - Direct support for any Python database driver that implements the [PEP 249 Database API Specification v2.0](https://peps.python.org/pep-0249/). This includes drivers like `psycopg`, `pymysql`, `MySQLdb`, `cx_Oracle`, `oracledb`, and `sqlite3`.
201
-
-**Django** - Native integration with Django's ORM and database layer
202
150
- SQLAlchemy
151
+
- DB API 2.0 (PEP 249 drivers such as `psycopg`, `pymysql`, `sqlite3`, and others)
152
+
- Django ORM integration
203
153
204
-
##Supported Datastores
154
+
###Datastores
205
155
206
-
-[CockroachDB](https://github.com/MemoriLabs/Memori/tree/main/examples/cockroachdb) - Full example with setup instructions
207
-
- MariaDB
208
-
-[MongoDB](https://github.com/MemoriLabs/Memori/tree/main/examples/mongodb) - Full example with setup instructions
156
+
- SQLite
157
+
- PostgreSQL
209
158
- MySQL
210
-
-[Neon](https://github.com/MemoriLabs/Memori/tree/main/examples/neon) - Full example with setup instructions
159
+
-MariaDB
211
160
- Oracle
212
-
-[PostgreSQL](https://github.com/MemoriLabs/Memori/tree/main/examples/postgres) - Full example with setup instructions
213
-
-[SQLite](https://github.com/MemoriLabs/Memori/tree/main/examples/sqlite) - Full example with setup instructions
161
+
-MongoDB
162
+
-Neon
214
163
- Supabase
164
+
- CockroachDB
215
165
216
-
## Examples
217
-
218
-
For more examples and demos, check out the [Memori Cookbook](https://github.com/MemoriLabs/memori-cookbook).
166
+
## Advanced Augmentation
219
167
220
-
## Memori Advanced Augmentation
221
-
222
-
Memories are tracked at several different levels:
223
-
224
-
- entity: think person, place, or thing; like a user
225
-
- process: think your agent, LLM interaction or program
226
-
- session: the current interactions between the entity, process and the LLM
227
-
228
-
[Memori's Advanced Augmentation](https://github.com/MemoriLabs/Memori/blob/main/docs/advanced-augmentation.md) enhances memories at each of these levels with:
168
+
Memori can enrich captured conversations into structured memory such as:
229
169
230
170
- attributes
231
171
- events
@@ -236,69 +176,52 @@ Memories are tracked at several different levels:
236
176
- rules
237
177
- skills
238
178
239
-
Memori knows who your user is, what tasks your agent handles and creates unparalleled context between the two. Augmentation occurs in the background incurring no latency.
179
+
Augmentation runs asynchronously and is available without an account (rate limited).
240
180
241
-
By default, Memori Advanced Augmentation is available without an account but rate limited. When you need increased limits, [sign up for Memori Advanced Augmentation](https://app.memorilabs.ai/signup) or execute the following:
181
+
Get higher limits:
242
182
243
183
```bash
244
184
python -m memori sign-up <email_address>
245
185
```
246
186
247
-
Memori Advanced Augmentation is always free for developers!
248
-
249
-
Once you've obtained an API key, simply set the following environment variable:
187
+
Set your API key:
250
188
251
189
```bash
252
-
export MEMORI_API_KEY=[api_key]
190
+
export MEMORI_API_KEY=<api_key>
253
191
```
254
192
255
-
## Managing Your Quota
256
-
257
-
At any time, you can check your quota by executing the following:
193
+
Check usage quota:
258
194
259
195
```bash
260
196
python -m memori quota
261
197
```
262
198
263
-
Or by checking your account at [https://memorilabs.ai/](https://memorilabs.ai/). If you have reached your IP address quota, sign up and get an API key for increased limits.
264
-
265
-
If your API key exceeds its quota limits we will email you and let you know.
266
-
267
-
## Command Line Interface (CLI)
268
-
269
-
To use the Memori CLI, execute the following from the command line:
199
+
## CLI
270
200
271
201
```bash
272
202
python -m memori
273
203
```
274
204
275
-
This will display a menu of the available options. For more information about what you can do with the Memori CLI, please reference [Command Line Interface](https://github.com/MemoriLabs/Memori/blob/main/docs/cli.md).
205
+
See full CLI docs in [`docs/cli.md`](https://github.com/MemoriLabs/Memori/blob/main/docs/cli.md).
276
206
277
-
## Contributing
207
+
## Documentation and Examples
278
208
279
-
We welcome contributions from the community! Please see our [Contributing Guidelines](https://github.com/MemoriLabs/Memori/blob/main/CONTRIBUTING.md) for details on:
- LLM support details: [`docs/features/llm.md`](https://github.com/MemoriLabs/Memori/blob/main/docs/features/llm.md)
214
+
- Database support details: [`docs/features/databases.md`](https://github.com/MemoriLabs/Memori/blob/main/docs/features/databases.md)
280
215
281
-
- Setting up your development environment
282
-
- Code style and standards
283
-
- Submitting pull requests
284
-
- Reporting issues
216
+
## Contributing
285
217
286
-
---
218
+
Contributions are welcome. See [`CONTRIBUTING.md`](https://github.com/MemoriLabs/Memori/blob/main/CONTRIBUTING.md) for setup, standards, and PR guidance.
0 commit comments