A document-ingesting agent that monitors specified directories, keeping stored documents up to date in a vector database for Retrieval-Augmented Generation (RAG) queries.
Project description
Solace Agent Mesh RAG
A document-ingesting agent that monitors specified directories, keeping stored documents up to date in a vector database for Retrieval-Augmented Generation (RAG) queries.
About Solace Agent Mesh
Solace Agent Mesh (SAM) is an open-source framework for building event-driven, multi-agent AI systems where specialized agents collaborate on complex tasks. It provides a standardized way for agents to communicate, share data, and integrate with external systems while keeping components loosely coupled and production-ready.
SAM helps you:
- Build event-driven multi-agent systems on Solace Event Mesh
- Connect agents, tools, gateways, and services through a common runtime
- Extend projects with installable plugins such as
sam-rag
Learn more in the Solace Agent Mesh documentation and the main project repository.
Overview
The Solace Agent Mesh RAG system provides a complete RAG pipeline that includes:
- Document Scanning: Monitors directories for new, modified, or deleted documents
- Document Preprocessing: Cleans and normalizes text from various document formats
- Text Splitting: Breaks documents into smaller chunks for embedding
- Embedding Generation: Converts text chunks into vector embeddings
- Vector Storage: Stores embeddings in a vector database for efficient retrieval
- Retrieval: Finds relevant document chunks based on query similarity
- Augmentation: Enhances retrieved content using LLMs
Documentation
Comprehensive documentation is available in the docs directory:
- Architecture Guide: Overview of the SAM RAG architecture and components
- Configuration Guide: Detailed explanation of configuration options
- Tools and Lifecycle Guide: Documentation for tools and lifecycle functions
Installation
Add the RAG Plugin to Solace Agent Mesh
solace-agent-mesh plugin add <your-new-component-name> --plugin sam-rag
This will create a new component configuration at configs/plugins/.yaml. You need to configure proper values by updating this file. Export at least the following environment variables to work with the default configuration. For more advance settings, please visit the Configuration Guide.
export SOLACE_BROKER_URL=ws://localhost:8008
export SOLACE_BROKER_USERNAME=admin
export SOLACE_BROKER_PASSWORD=admin
export SOLACE_BROKER_VPN=default
export SOLACE_IS_QUEUE_TEMPORARY=true
export OPENAI_MODEL_NAME=<LLM MODEL NAME>
export OPENAI_API_KEY=<LLM KEY>
export OPENAI_API_ENDPOINT=<LLM ENDPOINT>
export QDRANT_URL=<QDRANT CLUSTER URL>
export QDRANT_API_KEY=<QDRANT API KEY>
export QDRANT_COLLECTION=<A NAME FOR QDRANT COLLECTION>
export QDRANT_EMBEDDING_DIMENSION=1024
export DOCUMENTS_PATH=<PATH OF SOURCE DOCUMENTS IN LOCAL DISK>
Key Configuration Sections
- Scanner Configuration: Document source and monitoring settings
- Preprocessor Configuration: Text extraction and cleaning settings
- Splitter Configuration: Document chunking settings
- Embedding Configuration: Vector embedding settings
- Vector Database Configuration: Storage and retrieval settings
- LLM Configuration: Language model settings for augmentation
- Retrieval Configuration: Search parameters
Usage
Running the RAG System
solace-agent-mesh run
Querying the RAG System
Open the SAM UI on the browser.
Ingesting documents
(Option1): Store documents in a specific directory and configure the directory path in the rag.yaml file.
After running SAM, the plugin ingests documents in background automatically.
(Option2): Open the SAM UI on the browser (by default http://localhost:8000), attach files to a query such as "ingest the attached document to RAG".
This query persistently stores the attachments in file system and index them in vector database.
Retrieving documents
Use SAM UI on the browser (by default http://localhost:8000) or any other interfaces and send a query such as "search documents about and return a summary and referenced documents". It retrieves top similar documents and returns a summary of documents align with their original documents.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sam_rag-0.1.2-py3-none-any.whl.
File metadata
- Download URL: sam_rag-0.1.2-py3-none-any.whl
- Upload date:
- Size: 138.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
007af0415700f25374b8854e83f2ee0a9189dc10b86fa6cadd5b4c96034a5db6
|
|
| MD5 |
2952b4109ebf481ebba0f815d3375897
|
|
| BLAKE2b-256 |
dd374b31c60015853c73f7824be844f55ee3ddd05665ab7c9fd24cd86932021c
|
Provenance
The following attestation bundles were made for sam_rag-0.1.2-py3-none-any.whl:
Publisher:
release.yaml on SolaceLabs/solace-agent-mesh-core-plugins
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sam_rag-0.1.2-py3-none-any.whl -
Subject digest:
007af0415700f25374b8854e83f2ee0a9189dc10b86fa6cadd5b4c96034a5db6 - Sigstore transparency entry: 1247386143
- Sigstore integration time:
-
Permalink:
SolaceLabs/solace-agent-mesh-core-plugins@4c851a5c67c0d8783496668dafcf1221dc6c2944 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/SolaceLabs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@4c851a5c67c0d8783496668dafcf1221dc6c2944 -
Trigger Event:
workflow_dispatch
-
Statement type: