Skip to content

Commit 4a1272a

Browse files
committed
Update readme
1 parent afea84e commit 4a1272a

2 files changed

Lines changed: 98 additions & 193 deletions

File tree

README.md

Lines changed: 98 additions & 175 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
11
[![Memori Labs](https://s3.us-east-1.amazonaws.com/images.memorilabs.ai/banner.png)](https://memorilabs.ai/)
22

33
<p align="center">
4-
<strong>The memory fabric for enterprise AI!!!</strong>
4+
<strong>The memory fabric for enterprise AI</strong>
55
</p>
66

77
<p align="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>
9-
</p>
10-
<p align="center">
11-
<a href="https://trendshift.io/repositories/15418">
12-
<img src="https://trendshift.io/_next/image?url=https%3A%2F%2Ftrendshift.io%2Fapi%2Fbadge%2Frepositories%2F15418&w=640&q=75" alt="Memori%2fLabs%2FMemori | Trendshif">
13-
</a>
8+
<i>Memori adds persistent memory to your LLM applications without changing your architecture. It is model, framework, and datastore agnostic.</i>
149
</p>
1510

1611
<p align="center">
@@ -33,99 +28,34 @@
3328

3429
<p align="center">
3530
<a href="https://github.com/MemoriLabs/Memori/stargazers">
36-
<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">
3732
</a>
3833
</p>
3934

4035
---
4136

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.
75-
76-
```python
77-
mem.attribution(entity_id="12345", process_id="my-ai-bot")
78-
```
79-
80-
## Session Management
37+
## Why Memori
8138

82-
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.
8340

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.
8545

86-
```python
87-
mem.new_session()
88-
```
89-
90-
or
91-
92-
```python
93-
session_id = mem.config.session_id
94-
95-
# ...
46+
## Install
9647

97-
mem.set_session(session_id)
48+
```bash
49+
pip install memori
9850
```
9951

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:
10353

10454
```bash
10555
python -m memori setup
10656
```
10757

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.
113-
114-
```python
115-
Memori(conn=db_session_factory).config.storage.build()
116-
```
117-
118-
2. Instantiate Memori with the connection factory.
119-
120-
```python
121-
from openai import OpenAI
122-
from memori import Memori
123-
124-
client = OpenAI(...)
125-
mem = Memori(conn=db_session_factory).llm.register(client)
126-
```
127-
128-
## Quickstart Example
58+
## Quickstart (OpenAI + SQLite)
12959

13060
```python
13161
import os
@@ -140,92 +70,102 @@ def get_sqlite_connection():
14070

14171

14272
client = OpenAI(api_key=os.getenv("OPENAI_API_KEY"))
143-
14473
memori = Memori(conn=get_sqlite_connection).llm.register(client)
145-
memori.attribution(entity_id="123456", process_id="test-ai-agent")
74+
75+
# Required so Memori can store contextual memory for this actor/workflow.
76+
memori.attribution(entity_id="user_123", process_id="assistant_demo")
14677
memori.config.storage.build()
14778

79+
client.chat.completions.create(
80+
model="gpt-4.1-mini",
81+
messages=[{"role": "user", "content": "My favorite color is blue."}],
82+
)
83+
84+
# Wait for async augmentation in short-lived scripts.
85+
memori.augmentation.wait()
86+
14887
response = client.chat.completions.create(
14988
model="gpt-4.1-mini",
150-
messages=[
151-
{"role": "user", "content": "My favorite color is blue."}
152-
]
89+
messages=[{"role": "user", "content": "What is my favorite color?"}],
15390
)
154-
print(response.choices[0].message.content + "\n")
91+
print(response.choices[0].message.content)
92+
```
15593

156-
# Advanced Augmentation runs asynchronously to efficiently
157-
# create memories. For this example, a short lived command
158-
# line program, we need to wait for it to finish.
94+
## Core Concepts
15995

160-
memori.augmentation.wait()
96+
### Attribution
16197

162-
# Memori stored that your favorite color is blue in SQLite.
163-
# Now reset everything so there's no prior context.
98+
Attribution tells Memori who the interaction belongs to and what workflow produced it.
16499

165-
client = OpenAI(api_key=os.getenv("OPENAI_API_KEY"))
100+
```python
101+
memori.attribution(entity_id="user_123", process_id="support_agent")
102+
```
166103

167-
memori = Memori(conn=get_sqlite_connection).llm.register(client)
168-
memori.attribution(entity_id="123456", process_id="test-ai-agent")
104+
If attribution is not set, memory cannot be built correctly.
169105

170-
response = client.chat.completions.create(
171-
model="gpt-4.1-mini",
172-
messages=[
173-
{"role": "user", "content": "What's my favorite color?"}
174-
]
175-
)
176-
print(response.choices[0].message.content + "\n")
106+
### Session Management
107+
108+
Sessions group related interactions together.
109+
110+
```python
111+
memori.new_session()
177112
```
178113

179-
## Supported LLM
114+
Reuse an existing session:
180115

181-
- Anthropic
182-
- Bedrock
183-
- Gemini
184-
- Grok (xAI)
185-
- OpenAI
116+
```python
117+
session_id = memori.config.session_id
118+
memori.set_session(session_id)
119+
```
186120

187-
_(unstreamed, streamed, synchronous and asynchronous)_
121+
### Schema Setup
188122

189-
## Supported Frameworks
123+
Build or migrate storage schema during deployment or after upgrades:
190124

191-
- Agno
192-
- LangChain
125+
```python
126+
Memori(conn=db_session_factory).config.storage.build()
127+
```
128+
129+
## Supported Integrations
130+
131+
### LLM Providers
132+
133+
- OpenAI
134+
- Anthropic
135+
- Google Gemini
136+
- xAI (Grok)
137+
- Bedrock (via LangChain)
193138

194-
## Supported Platforms
139+
Supports sync, async, streamed, and unstreamed interaction modes.
195140

141+
### Frameworks and Platforms
142+
143+
- LangChain
144+
- Agno
145+
- Pydantic AI
196146
- Nebius AI Studio
197147

198-
## Supported Database Integrations
148+
### Database Connection Methods
199149

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
202150
- SQLAlchemy
151+
- DB API 2.0 (PEP 249 drivers such as `psycopg`, `pymysql`, `sqlite3`, and others)
152+
- Django ORM integration
203153

204-
## Supported Datastores
154+
### Datastores
205155

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
209158
- MySQL
210-
- [Neon](https://github.com/MemoriLabs/Memori/tree/main/examples/neon) - Full example with setup instructions
159+
- MariaDB
211160
- 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
214163
- Supabase
164+
- CockroachDB
215165

216-
## Examples
217-
218-
For more examples and demos, check out the [Memori Cookbook](https://github.com/MemoriLabs/memori-cookbook).
166+
## Advanced Augmentation
219167

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:
229169

230170
- attributes
231171
- events
@@ -236,69 +176,52 @@ Memories are tracked at several different levels:
236176
- rules
237177
- skills
238178

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).
240180

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:
242182

243183
```bash
244184
python -m memori sign-up <email_address>
245185
```
246186

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:
250188

251189
```bash
252-
export MEMORI_API_KEY=[api_key]
190+
export MEMORI_API_KEY=<api_key>
253191
```
254192

255-
## Managing Your Quota
256-
257-
At any time, you can check your quota by executing the following:
193+
Check usage quota:
258194

259195
```bash
260196
python -m memori quota
261197
```
262198

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
270200

271201
```bash
272202
python -m memori
273203
```
274204

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).
276206

277-
## Contributing
207+
## Documentation and Examples
278208

279-
We welcome contributions from the community! Please see our [Contributing Guidelines](https://github.com/MemoriLabs/Memori/blob/main/CONTRIBUTING.md) for details on:
209+
- Product docs: [https://memorilabs.ai/docs](https://memorilabs.ai/docs)
210+
- Memori cookbook: [https://github.com/MemoriLabs/memori-cookbook](https://github.com/MemoriLabs/memori-cookbook)
211+
- Database examples: [https://github.com/MemoriLabs/Memori/tree/main/examples](https://github.com/MemoriLabs/Memori/tree/main/examples)
212+
- Architecture details: [`docs/features/architecture.md`](https://github.com/MemoriLabs/Memori/blob/main/docs/features/architecture.md)
213+
- 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)
280215

281-
- Setting up your development environment
282-
- Code style and standards
283-
- Submitting pull requests
284-
- Reporting issues
216+
## Contributing
285217

286-
---
218+
Contributions are welcome. See [`CONTRIBUTING.md`](https://github.com/MemoriLabs/Memori/blob/main/CONTRIBUTING.md) for setup, standards, and PR guidance.
287219

288220
## Support
289221

290-
- **Documentation**: [https://memorilabs.ai/docs](https://memorilabs.ai/docs)
291-
- **Discord**: [https://discord.gg/abD4eGym6v](https://discord.gg/abD4eGym6v)
292-
- **Issues**: [GitHub Issues](https://github.com/MemoriLabs/Memori/issues)
293-
294-
---
222+
- Discord: [https://discord.gg/abD4eGym6v](https://discord.gg/abD4eGym6v)
223+
- Issues: [https://github.com/MemoriLabs/Memori/issues](https://github.com/MemoriLabs/Memori/issues)
295224

296225
## License
297226

298-
Apache 2.0 - see [LICENSE](https://github.com/MemoriLabs/Memori/blob/main/LICENSE)
299-
300-
---
301-
302-
**Star us on GitHub** to support the project
303-
304-
[![Star History](https://api.star-history.com/svg?repos=MemoriLabs/memori&type=date)](https://star-history.com/#MemoriLabs/memori)
227+
Apache 2.0. See [`LICENSE`](https://github.com/MemoriLabs/Memori/blob/main/LICENSE).

SECURITY.md

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)