Installation

SmartRAG is available as a NuGet package. Choose your preferred installation method:

.NET CLI
Package Manager
Package Reference
dotnet add package SmartRAG
Install-Package SmartRAG
<PackageReference Include="SmartRAG" Version="1.1.0" />

Basic Configuration

Configure SmartRAG in your Program.cs or Startup.cs:

// Program.cs
using SmartRAG;

var builder = WebApplication.CreateBuilder(args);

// Add SmartRAG services
builder.Services.AddSmartRAG(options =>
{
    options.AIProvider = AIProvider.Anthropic;
    options.StorageProvider = StorageProvider.Qdrant;
    options.ApiKey = "your-api-key";
});

var app = builder.Build();

Quick Example

Here's a simple example to get you started:

// Inject the document service
public class DocumentController : ControllerBase
{
    private readonly IDocumentService _documentService;
    
    public DocumentController(IDocumentService documentService)
    {
        _documentService = documentService;
    }
    
    [HttpPost("upload")]
    public async Task<IActionResult> UploadDocument(IFormFile file)
    {
        var document = await _documentService.UploadDocumentAsync(file);
        return Ok(document);
    }
    
    [HttpPost("search")]
    public async Task<IActionResult> Search([FromBody] string query)
    {
        var results = await _documentService.SearchAsync(query);
        return Ok(results);
    }
}

Next Steps

Now that you have SmartRAG installed and configured, explore these features:

Configuration

Learn about advanced configuration options and best practices.

Configure

API Reference

Explore the complete API documentation with examples.

View API

Need Help?

If you encounter any issues or need assistance: