Skip to main content

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:

  1. Document Scanning: Monitors directories for new, modified, or deleted documents
  2. Document Preprocessing: Cleans and normalizes text from various document formats
  3. Text Splitting: Breaks documents into smaller chunks for embedding
  4. Embedding Generation: Converts text chunks into vector embeddings
  5. Vector Storage: Stores embeddings in a vector database for efficient retrieval
  6. Retrieval: Finds relevant document chunks based on query similarity
  7. Augmentation: Enhances retrieved content using LLMs

Documentation

Comprehensive documentation is available in the docs directory:

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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sam_rag-0.1.2-py3-none-any.whl (138.0 kB view details)

Uploaded Python 3

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

Hashes for sam_rag-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 007af0415700f25374b8854e83f2ee0a9189dc10b86fa6cadd5b4c96034a5db6
MD5 2952b4109ebf481ebba0f815d3375897
BLAKE2b-256 dd374b31c60015853c73f7824be844f55ee3ddd05665ab7c9fd24cd86932021c

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page