AutoGPT
AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
- 188k
- Python
- 2 h ago
Redis Vector Library (RedisVL) -- the AI-native Java client for Redis.
Repo redis/redis-vl-java, read from GitHub 1 min ago. redis has not joined Take My Repo.
redis/redis-vl-java is a public repo on GitHub by redis. Redis Vector Library (RedisVL) -- the AI-native Java client for Redis. It declares the MIT license on GitHub. It is written mainly in Java, has 24 stars and last changed on 2026-06-05. Nobody has reviewed it on Take My Repo yet, which says nothing about its quality. Read from GitHub on 2026-11-22.
In the maintainer's words. Shown from GitHub; Take My Repo does not keep a copy.
Redis Vector Library (RedisVL) is the ultimate Java client designed for AI-native applications harnessing the power of Redis.
RedisVL is your go-to client for:
Add RedisVL to your Java (17+) project using Maven or Gradle:
Maven:
<dependency> <groupId>com.redis</groupId> <artifactId>redisvl</artifactId> <version>0.12.2</version> </dependency>
Gradle:
implementation 'com.redis:redisvl:0.12.2'Choose from multiple Redis deployment options:
Redis Cloud: Managed cloud database (free tier available)
Redis on Docker: Docker image for development
docker run -d --name redis -p 6379:6379 -p 8001:8001 redis:latest
Redis Enterprise: Commercial, self-hosted database
Azure Managed Redis: Fully managed Redis Enterprise on Azure
Enhance your experience and observability with the free Redis Insight GUI.
Design a schema for your use case that models your dataset with built-in Redis and indexable fields (e.g. text, tags, numerics, geo, and vectors). Load a schema from a YAML file:
index: name: user-idx prefix: user storage_type: json fields: - name: user type: tag - name: credit_score type: tag - name: embedding type: vector attrs: algorithm: flat dims: 4 distance_metric: cosine datatype: float32
import com.redis.vl.schema.IndexSchema; IndexSchema schema = IndexSchema.fromYaml("schemas/schema.yaml");
Or load directly from a Java Map:
Map<String, Object> schemaMap = Map.of( "index", Map.of( "name", "user-idx", "prefix", "user", "storage_type", "json" ), "fields", List.of( Map.of("name", "user", "type", "tag"), Map.of("name", "credit_score", "type", "tag"), Map.of( "name", "embedding", "type", "vector", "attrs", Map.of( "algorithm", "flat", "datatype", "float32", "dims", 4, "distance_metric", "cosine" ) ) ) ); IndexSchema schema = IndexSchema.fromMap(schemaMap);
Create a SearchIndex class with an input schema to perform admin and search operations on your index in Redis:
import redis.clients.jedis.UnifiedJedis; import com.redis.vl.index.SearchIndex; // Define the index UnifiedJedis jedis = new UnifiedJedis("redis://localhost:6379"); SearchIndex index = new SearchIndex(schema, jedis); // Create the index in Redis index.create(true); // overwrite if exists
Load and fetch data to/from your Redis instance:
Map<String, Object> data = Map.of( "user", "john", "credit_score", "high", "embedding", new float[]{0.23f, 0.49f, -0.18f, 0.95f} ); // load list of maps, specify the "id" field index.load(List.of(data), "user"); // fetch by "id" Map<String, Object> john = index.fetch("john");
Define queries and perform advanced searches over your indices, including the combination of vectors, metadata filters, and more.
VectorQuery - Flexible vector queries with customizable filters enabling semantic search:
import com.redis.vl.query.VectorQuery; VectorQuery query = VectorQuery.builder() .vector(new float[]{0.16f, -0.34f, 0.98f, 0.23f}) .field("embedding") .numResults(3) .build(); // run the vector search query against the embedding field List<Map<String, Object>> results = index.query(query);
Incorporate complex metadata filters on your queries:
import com.redis.vl.query.filter.FilterQuery; // define a tag match filter FilterQuery tagFilter = FilterQuery.tag("user", "john"); // update query definition VectorQuery filteredQuery = query.toBuilder() .withPreFilter(tagFilter.build()) .build(); // execute query List<Map<String, Object>> results = index.query(filteredQuery);
HybridQuery - Native hybrid search combining text and vector similarity using Redis 8.4+ FT.HYBRID command with built-in score fusion:
import com.redis.vl.query.HybridQuery; import com.redis.vl.query.Filter; // Native hybrid search with LINEAR combination (Redis 8.4+) HybridQuery hybridQuery = HybridQuery.builder() .text("machine learning algorithms") .textFieldName("description") .vector(queryVector) .vectorFieldName("embedding") .filterExpression(Filter.tag("category", "AI")) .combinationMethod(HybridQuery.CombinationMethod.LINEAR) .linearAlpha(0.3f) // 30% text, 70% vector .numResults(10) .build(); List<Map<String, Object>> results = index.query(hybridQuery); // Automatically falls back to AggregateHybridQuery on older Redis versions
AggregateHybridQuery - Backward-compatible hybrid search using FT.AGGREGATE for Redis versions before 8.4:
import com.redis.vl.query.AggregateHybridQuery; AggregateHybridQuery aggQuery = AggregateHybridQuery.builder() .text("machine learning algorithms") .textFieldName("description") .vector(queryVector) .vectorFieldName("embedding") .alpha(0.7f) // 70% vector, 30% text .numResults(10) .build(); List<Map<String, Object>> results = index.query(aggQuery);
VectorRangeQuery - Vector search within a defined range paired with customizable filters
FilterQuery - Standard search using filters and the full-text search
CountQuery - Count the number of indexed records given attributes
Read more about building advanced Redis queries.
Integrate with popular embedding providers to greatly simplify the process of vectorizing unstructured data for your index and queries:
LangChain4J - Integration with LangChain4J embedding models
ONNX Models - Local embedding models via ONNX Runtime
DJL (Deep Java Library) - Face recognition and embeddings
import com.redis.vl.utils.vectorize.LangChain4JVectorizer; import dev.langchain4j.model.cohere.CoherEmbeddingModel; // Using LangChain4J with Cohere CoherEmbeddingModel cohereModel = CoherEmbeddingModel.withApiKey(apiKey); LangChain4JVectorizer vectorizer = new LangChain4JVectorizer(cohereModel); float[] embedding = vectorizer.embed("What is the capital city of France?"); List<float[]> embeddings = vectorizer.embedBatch( List.of( "my document chunk content", "my other document chunk content" ) );
import com.redis.vl.utils.vectorize.SentenceTransformersVectorizer; // Using local ONNX model SentenceTransformersVectorizer vectorizer = new SentenceTransformersVectorizer("sentence-transformers/all-mpnet-base-v2"); float[] embedding = vectorizer.embed("What is the capital city of France?");
Learn more about using vectorizers in your embedding workflows.
Integrate with popular reranking providers to improve the relevancy of the initial search results from Redis:
import com.redis.vl.utils.rerank.CohereReranker; CohereReranker reranker = new CohereReranker(apiKey); List<Map<String, Object>> reranked = reranker.rerank( "What is the capital of France?", results, topK );
RedisVL supports Extensions that implement interfaces exposing best practices and design patterns for working with LLM memory and agents.
Increase application throughput and reduce the cost of using LLM models in production by leveraging previously generated knowledge with the SemanticCache.
import com.redis.vl.extensions.cache.llm.SemanticCache; import com.redis.vl.extensions.cache.llm.CacheConfiguration; // init cache with TTL and semantic distance threshold CacheConfiguration config = CacheConfiguration.builder() .name("llmcache") .ttl(360L) .distanceThreshold(0.1) .build(); SemanticCache cache = new SemanticCache(config, jedis); // store user queries and LLM responses in the semantic cache cache.store( "What is the capital city of France?", "Paris" ); // quickly check the cache with a slightly different prompt (before invoking an LLM) CacheResult result = cache.check("What is France's capital city?"); if (result.isHit()) { System.out.println(result.getResponse()); // Output: Paris }
Learn more about semantic caching for LLMs.
Build fast decision models that run directly in Redis and route user queries to the nearest "route" or "topic".
import com.redis.vl.extensions.router.SemanticRouter; import com.redis.vl.extensions.router.Route; import com.redis.vl.utils.vectorize.SentenceTransformersVectorizer SentenceTransformersVectorizer vectorizer = new SentenceTransformersVectorizer("sentence-transformers/all-mpnet-base-v2") List<Route> routes = List.of( Route.builder() .name("greeting") .references(List.of("hello", "hi")) .metadata(Map.of("type", "greeting")) .distanceThreshold(0.3) .build(), Route.builder() .name("farewell") .references(List.of("bye", "goodbye")) .metadata(Map.of("type", "farewell")) .distanceThreshold(0.3) .build() ); // build semantic router from routes SemanticRouter router = SemanticRouter.builder() .name("topic-router") .vectorizer(vectorizer) .routes(routes) .jedis(jedis) .build(); RouteMatch match = router.route("Hi, good morning"); System.out.println(match.getName()); // Output: greeting System.out.println(match.getDistance()); // Output: 0.273891836405
Learn more about semantic routing.
RedisVL includes an experimental VCR (Video Cassette Recorder) test system for recording and replaying LLM/embedding API calls. This enables:
The simplest way to use VCR is with the declarative annotations:
import com.redis.vl.test.vcr.VCRMode; import com.redis.vl.test.vcr.VCRModel; import com.redis.vl.test.vcr.VCRTest; @VCRTest(mode = VCRMode.PLAYBACK_OR_RECORD) class MyLLMTest { // Models are automatically wrapped by VCR @VCRModel(modelName = "text-embedding-3-small") private EmbeddingModel embeddingModel = createEmbeddingModel(); @VCRModel private ChatLanguageModel chatModel = createChatModel(); @Test void testEmbedding() { // First run: Records API response to Redis // Subsequent runs: Replays from Redis cassette Response<Embedding> response = embeddingModel.embed("What is Redis?"); assertNotNull(response.content()); } @Test void testChat() { String response = chatModel.generate("Explain Redis in one sentence."); assertNotNull(response); } }
| Mode | Description | API Key Required |
|---|---|---|
PLAYBACK |
Only use recorded cassettes. Fails if missing. | No |
PLAYBACK_OR_RECORD |
Use cassette if available, record if not. | Only for first run |
RECORD |
Always call real API and record response. | Yes |
OFF |
Bypass VCR, always call real API. | Yes |
Override the VCR mode at runtime without changing code:
# Record new cassettes VCR_MODE=RECORD OPENAI_API_KEY=your-key ./gradlew test # Playback only (CI/CD, no API key needed) VCR_MODE=PLAYBACK ./gradlew test
import com.redis.vl.test.vcr.VCREmbeddingModel; import com.redis.vl.test.vcr.VCRChatModel; import com.redis.vl.test.vcr.VCRMode; // Wrap any LangChain4J EmbeddingModel VCREmbeddingModel vcrEmbedding = new VCREmbeddingModel(openAiEmbeddingModel); vcrEmbedding.setMode(VCRMode.PLAYBACK_OR_RECORD); Response<Embedding> response = vcrEmbedding.embed("What is Redis?"); // Wrap any LangChain4J ChatLanguageModel VCRChatModel vcrChat = new VCRChatModel(openAiChatModel); vcrChat.setMode(VCRMode.PLAYBACK_OR_RECORD); String response = vcrChat.generate("What is Redis?");
import com.redis.vl.test.vcr.VCRSpringAIEmbeddingModel; import com.redis.vl.test.vcr.VCRSpringAIChatModel; import com.redis.vl.test.vcr.VCRMode; // Wrap any Spring AI EmbeddingModel VCRSpringAIEmbeddingModel vcrEmbedding = new VCRSpringAIEmbeddingModel(openAiEmbeddingModel); vcrEmbedding.setMode(VCRMode.PLAYBACK_OR_RECORD); EmbeddingResponse response = vcrEmbedding.embedForResponse(List.of("What is Redis?")); // Wrap any Spring AI ChatModel VCRSpringAIChatModel vcrChat = new VCRSpringAIChatModel(openAiChatModel); vcrChat.setMode(VCRMode.PLAYBACK_OR_RECORD); String response = vcrChat.call("What is Redis?");
@VCRModel fields are wrapped with VCR proxiessrc/test/resources/vcr-data/ via Redis AOF/RDBComplete working examples are available:
Run the demos without an API key (uses pre-recorded cassettes):
./gradlew :demos:langchain4j-vcr:test ./gradlew :demos:spring-ai-vcr:test
Learn more about VCR testing.
In the age of GenAI, vector databases and LLMs are transforming information retrieval systems. With emerging and popular frameworks like LangChain4J and Spring AI, innovation is rapid. Yet, many organizations face the challenge of delivering AI solutions quickly and at scale.
Enter Redis – a cornerstone of the NoSQL world, renowned for its versatile data structures and processing engines. Redis excels in real-time workloads like caching, session management, and search. It's also a powerhouse as a vector database for RAG, an LLM cache, and a chat session memory store for conversational AI.
The Redis Vector Library bridges the gap between the AI-native developer ecosystem and Redis's robust capabilities. With a lightweight, elegant, and intuitive interface, RedisVL makes it easy to leverage Redis's power. Built on the Jedis client, RedisVL transforms Redis's features into a grammar perfectly aligned with the needs of today's AI/ML Engineers and Data Scientists.
RedisVL is more than a low-level client wrapper — it's an SDK plus a set of patterns, examples, and docs for AI-native Redis usage. At a high level it helps Java teams:
RedisVL is positioned around these primary use cases:
In practice, adoption tends to fall into three buckets, which maps to how you should pick APIs:
| You are… | Use… |
|---|---|
| Building a Java vector-search layer directly on Redis | The basic schema / index / query APIs |
| Building a RAG assistant or retrieval chain with LangChain4J | The com.redis.vl.langchain4j adapters |
| Looking for reusable AI infrastructure patterns | The extensions (cache, router, message history) |
The main entry point is SearchIndex, which holds the schema and Redis connection behavior and exposes index lifecycle and query operations. Treat the demos and notebooks as reference implementations, not production architecture templates.
This is a multi-module Gradle (Kotlin DSL) project:
| Module | Description |
|---|---|
core/ |
The main product code, published as the com.redis:redisvl Maven artifact. This is the customer-facing deliverable. |
docs/ |
A dedicated Antora documentation site (not just a README supplement), including generated Javadocs. Treated as a maintained, first-class artifact and part of the delivery pipeline. |
demos/ |
Sample applications: rag-multimodal (JavaFX multimodal RAG demo), langchain4j-vcr, and spring-ai-vcr (record/replay testing demos). Important for adoption and validation, but not shipped artifacts. |
notebooks/ |
Jupyter notebooks for interactive walkthroughs — enablement and onboarding material for developers evaluating the library. |
Key package areas inside core (com.redis.vl.*):
index — index creation, loading, querying, and fetch operationsschema — schema and field definitionsquery — vector, text, count, aggregation, and hybrid query objectsstorage — Redis Hash and Redis JSON storage behaviorlangchain4j — LangChain4J adapters for embedding store, retriever, chat memory, and document storeextensions.cache — semantic cache and embeddings cacheextensions.router — semantic routerextensions.messagehistory — message history and semantic message historyutils.vectorize — vectorizer integrations for LangChain4J and local ONNX modelsutils.rerank — reranking utilitiestest.vcr — VCR-style record/replay support for LLM-related testscompileOnly) — include only the providers you need.This means you can use RedisVL in a basic Redis/vector-search mode without adopting every AI integration, while still being able to opt into richer AI-framework integrations when needed.
Check out the notebooks directory for interactive Jupyter notebook examples:
The notebooks use Java kernel support via JJava. To run them:
Start the notebook environment:
cd notebooks
docker compose up -dAccess Jupyter Lab: Navigate to http://localhost:8888/
Stop when done:
docker compose down
See the notebooks README for more details.
For additional help, check out the following resources:
Please help us by contributing PRs, opening GitHub issues for bugs or new feature ideas, improving documentation, or increasing test coverage. Read more about how to contribute!
FT.HYBRID support: Redis 8.4+This project is licensed under the MIT License - see the LICENSE file for details.
This project is supported by Redis, Inc on a good faith effort basis. To report bugs, request features, or receive assistance, please file an issue.
redis/redis-vl-java is a public repo on GitHub by redis. Redis Vector Library (RedisVL) -- the AI-native Java client for Redis.
It declares the MIT license on GitHub.
Its maker tagged it for macOS, Windows and Linux, or as Docker or cross-platform. That is declared by the maker; Take My Repo has not tested it.
Open "Take it" on its page: Take My Repo writes an install plan for your machine and hands it to your AI agent (Claude Code, Codex or Cursor), which asks you before each step. Take My Repo has not tested it on any machine.
Its last change on GitHub was on 2026-06-05. GitHub counts 4 open issues and pull requests. Take My Repo does not judge from that whether it is maintained.
Nobody has reviewed it on Take My Repo yet, which says nothing about its quality.

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Langflow is a powerful tool for building and deploying AI-powered agents and workflows.
Reverse engineer anything with agents, from app behavior down to native binaries.
The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
Stop renting your intelligence. Own it with AnythingLLM. Everything you need for a powerful local-first agent experience
For developers, who are building real-time data-driven applications, Redis is the preferred, fastest, and most feature-rich cache, data structure server, and document and vector query engine.

🚀 A robust, performance-focused, and full-featured Redis client for Node.js.
This page is also available as structured data, with the same sources and dates.
/api/v1/resources/gh/redis/redis-vl-javaTake My Repo has not tested this on your machine. Requirements come from the project's own documentation.