Skip to content

[Platform] Meilisearch message store #239

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Guikingone
Copy link
Contributor

@Guikingone Guikingone commented Jul 31, 2025

Q A
Bug fix? no
New feature? yes
Docs? no
Issues None
License MIT

Hi 👋🏻

Here's a small POC to store message bags outside of memory (for long term agents), the implementation is built around MS but the main interfaces are defined (Redis, Doctrine, etc, any bridge can use it) for any bridge (and heavily inspired by the Store package).

Let me know if the idea is interesting, if not, feel free to close the PR 🙂

@Guikingone Guikingone changed the title [Platform] Meilisearch message bag [Platform][Poc] Meilisearch message bag Jul 31, 2025
@OskarStark
Copy link
Contributor

Wouldn't it be more related to Chat and the MessageStore?

@Guikingone
Copy link
Contributor Author

Ah yes, I wasn't sure about the interface to use, I'll check the store one.

Copy link
Contributor

@OskarStark OskarStark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR title and body would need an update please

@OskarStark OskarStark added the Platform Issues & PRs about the AI Platform component label Aug 1, 2025
@Guikingone
Copy link
Contributor Author

Yes, I need to finish the test in the same time, I'll push the updated version once it's done 🙂

@Guikingone Guikingone changed the title [Platform][Poc] Meilisearch message bag [Platform] Meilisearch message store Aug 1, 2025
Copy link
Member

@chr-hertel chr-hertel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great idea, thanks! added some minor comments.

I wonder tho if we should move that feature into the store component - WDYT?

);

$chat->initiate($messages);
$chat->submit(Message::ofUser('My name is Christopher.'));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$chat->submit(Message::ofUser('My name is Christopher.'));
$chat->submit(Message::ofUser('My name is Guillaume.'));

😆

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(feel free to omit this one - it's friday and my brain is already half way gone)

@Guikingone
Copy link
Contributor Author

@chr-hertel I agree, the Store component should contains everything related to storing messages, vectors and more, this way, we can easily "update" the API without forcing the release of Agent, plus, we can easily share the API thanks to interfaces.

Maybe we can move the classes/interfaces after this PR to prevent any bloating of it?

@chr-hertel
Copy link
Member

Maybe we can move the classes/interfaces after this PR to prevent any bloating of it?

Agreed 👍

@OskarStark
Copy link
Contributor

What about a dedicated MessageStore component? or too much?

@Guikingone
Copy link
Contributor Author

Guikingone commented Aug 1, 2025

@OskarStark Well, here's my humble opinion (I don't know how this package was initially designed and what are the "rules" that it must follow to comply with Symfony approach):

The Store package is enough, its description along with the documentation must be updated to inform that it "store" more than just vectors and is not "only designed" for RAG, this approach would allow to keep the current packages and add new features (like graph databases and more) without compromising the overall developer experience (too much packages tend to complicate the developer experience, you're using X namespaces, you don't know which one do what, etc)

Maybe we could find a new "way" to split the Store package (new sub namespaces and more, let's say Bridge then two namespaces VectorStore then MessageStore, simple examples to gave the idea) to keep it coherent and "open" for future modifications but IMO, it's enough for the "storage" part of the AI initiative.

@Guikingone Guikingone force-pushed the platform/memory_storage branch 2 times, most recently from d4a2fba to 3ca29bc Compare August 2, 2025 19:57
@Guikingone Guikingone requested a review from chr-hertel August 2, 2025 19:57
@chr-hertel
Copy link
Member

One thing I wonder is about having multiple conversations happening in parallel. Let's say per user. How would that work with this implementation? separate index?

@Guikingone
Copy link
Contributor Author

Actually, yes, multiple index.

Another solution might be to use a "session" per agent, the session is initiated by the agent (constructor call, maybe an UUID?) then sent to the message store to "lock" messages per agent.

I don't see a big technical bottleneck but IMO, this refactoring must be brought via another PR (I can work on it if you want).

@Guikingone Guikingone force-pushed the platform/memory_storage branch from 3ca29bc to 10e3653 Compare August 5, 2025 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform Issues & PRs about the AI Platform component
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants