songrongzhen/easy-agent
easy-agent是Agent组件,零改造接入,为存量系统赋予智能体(Agent)能力。
What it solves
Easy Agent is a development component for Java applications that simplifies the process of building AI agents. It allows developers to quickly expose business logic as tools for Large Language Models (LLMs), implement Retrieval-Augmented Generation (RAG) using local documents, and provide tool services via the Model Context Protocol (MCP).
How it works
The project is built as a Spring Boot Starter, integrating deeply with the Spring ecosystem. It uses a combination of annotations and SPIs to manage AI capabilities:
- Tool Registration: Methods marked with
@EasyToolare automatically discovered and registered in aToolRegistry, allowing them to be called by an LLM or an MCP client. - MCP Server: It implements a lightweight MCP HTTP server (JSON-RPC 2.0) that exposes these registered tools to clients like Claude Code.
- RAG Engine: It loads PDF, Excel, and HTML files from the classpath or URLs, chunks them into
DocumentChunkobjects, and stores them in memory (with a placeholder for PGVector). It supports multiple search strategies, including Embedding, Cosine similarity, and TF-IDF. - LLM Integration: It provides a unified HTTP client for OpenAI-compatible APIs, supporting providers like DashScope, DeepSeek, Ollama, and OpenAI, with built-in logic for automatic tool-call loops and retry mechanisms.
- Skill Generation: It provides meta-tools that allow users to generate business-specific Skill Markdown files based on the registered tools.
Who it’s for
Java developers using Spring Boot 3.5+ and JDK 17+ who want to add agentic capabilities to their existing business applications without rewriting their core logic.
Highlights
- Zero-Intrusion: Use
@EasyToolto turn existing service methods into AI tools without changing business code structure. - MCP Support: Native implementation of the Model Context Protocol for seamless integration with AI IDEs and clients.
- Flexible RAG: Supports automatic indexing of local PDF/Excel files and runtime addition of HTML knowledge bases.
- Multi-Model Compatibility: A single configuration for multiple OpenAI-compatible providers with automatic model-to-provider mapping.
- Governance: Fine-grained control over which tools are exposed via MCP using allow-lists and block-lists.
Related
- Project
- Project
- Project
- Dispatch
- Project