agents-flex/agents-flex

Agents-flex is A lightweight Java AI agent development framework (positioned as a counterpart to Spring AI). It supports features such as RAG, MCP, Skills, Text2SQL , LLM Wiki, Sub-agents, Web Search, TTS (synchronous and streaming), and STT.

What it solves

Agents-Flex is a lightweight AI application development framework for the Java ecosystem. It provides a modular approach to building AI-powered applications, allowing developers to integrate LLMs, RAG, and agentic workflows without being locked into a specific runtime or application framework.

How it works

The framework organizes AI capabilities into discrete modules (e.g., agents-flex-chat, agents-flex-store, agents-flex-mcp). It uses unified abstractions like ChatModel, EmbeddingModel, and ImageModel to wrap provider-specific APIs. It implements a comprehensive tool-calling flow that supports annotation-based scanning and dynamic tool building, and includes a system of interceptors for modifying requests and responses.

Who it’s for

Java developers building intelligent customer service, enterprise knowledge bases, natural-language data analysis tools, and AI-assisted office tools, particularly those using Spring Boot or other JVM stacks.

Highlights

  • Java Native: Compatible with Java 8+ and integrates seamlessly with Spring Boot.
  • Comprehensive Tooling: Supports ReAct agents, routing agents, subagents, and MCP (Model Context Protocol) client integration.
  • Full RAG Stack: Includes document parsing, splitting, embedding, and integrations with numerous vector stores (e.g., Redis, Milvus, Qdrant).
  • Production-Ready: Features model routing, load balancing, circuit breaking, and OpenTelemetry-based observability.
  • Specialized Capabilities: Includes a Text2SQL system for data analysis and an "LLM Wiki" for hierarchical knowledge organization.