Skip to main content

remote::infinispan

Description

Infinispan is a remote vector database provider for Llama Stack. It allows you to store and query vectors in a distributed Infinispan cluster via HTTP REST API. Infinispan provides high-performance, scalable data storage with support for both vector similarity search and full-text search capabilities.

Features

  • Vector Similarity Search - Store and query embedding vectors with cosine similarity
  • Full-text/Keyword Search - Query documents using Infinispan Query DSL or Ickle queries
  • Hybrid Search - Combine vector and keyword search with configurable reranking (RRF or weighted)
  • Authentication - Supports both Basic and Digest authentication mechanisms
  • HTTPS/TLS Support - Secure connections with SSL certificate verification
  • Distributed Storage - Leverage Infinispan's distributed caching for scalability
  • HTTP REST API - Simple integration using standard HTTP protocol

Search Modes

Supported:

  • Vector Search (mode="vector"): Performs vector similarity search using embeddings
  • Keyword Search (mode="keyword"): Full-text search using Infinispan Query DSL/Ickle
  • Hybrid Search (mode="hybrid"): Combines vector and keyword search with configurable reranking

Configuration

Basic Configuration (HTTP)

vector_io:
- provider_id: infinispan
provider_type: remote::infinispan
config:
url: "http://localhost:11222"
username: "admin"
password: "password"
auth_mechanism: "digest"
persistence:
backend: "kv_default"
namespace: "vector_io::infinispan"

HTTPS Configuration with TLS

vector_io:
- provider_id: infinispan
provider_type: remote::infinispan
config:
url: "https://infinispan.example.com:11222"
username: "admin"
password: "password"
use_https: true
auth_mechanism: "basic"
verify_tls: true
persistence:
backend: "kv_default"
namespace: "vector_io::infinispan"

Environment Variables

You can use environment variables for sensitive configuration:

vector_io:
- provider_id: infinispan
provider_type: remote::infinispan
config:
url: "${env.INFINISPAN_URL}"
username: "${env.INFINISPAN_USERNAME}"
password: "${env.INFINISPAN_PASSWORD}"
persistence:
backend: "kv_default"
namespace: "vector_io::infinispan"

Usage

Starting Infinispan Server

The easiest way to get started is using Docker:

docker run -it -p 11222:11222 \
-e USER="admin" \
-e PASS="password" \
infinispan/server:latest

Authentication

Infinispan supports two authentication mechanisms:

  • Digest Authentication (recommended for HTTP): More secure than basic auth over HTTP
  • Basic Authentication (HTTPS only): Simple username/password authentication

Set the auth_mechanism parameter to either "digest" or "basic".

Documentation

Requirements

  • Infinispan Server 16.0+ (with vector search support)

Configuration

FieldTypeRequiredDefaultDescription
urlHttpUrlNohttp://localhost:11222/Infinispan server URL (e.g., http://localhost:11222)
usernamestr | NoneNoAuthentication username
passwordSecretStr | NoneNoAuthentication password
use_httpsboolNoFalseEnable HTTPS/TLS connection
auth_mechanismstrNodigestAuthentication mechanism: 'digest' or 'basic'
verify_tlsboolNoTrueVerify TLS certificates for HTTPS connections (set to False only for development/testing with self-signed certificates)
persistenceKVStoreReferenceNoConfig for KV store backend
persistence.namespacestrNoKey prefix for KVStore backends
persistence.backendstrNoName of backend from storage.backends

Sample Configuration

url: ${env.INFINISPAN_URL:=http://localhost:11222}
username: ${env.INFINISPAN_USERNAME:=admin}
password: ${env.INFINISPAN_PASSWORD:=}
use_https: false
auth_mechanism: digest
verify_tls: true
persistence:
namespace: vector_io::infinispan
backend: kv_default