AgentNexus
Multi-Agent,MCP,RAG,SpringAI1.0.0,RE-ACT
claude mcp add --transport stdio wozhenbang2004-agentnexus docker run -i wozhenbang2004/AgentNexus:latest \ --env DB_URL="jdbc:mysql://localhost:3306/agent_nexus" \ --env DB_USER="root" \ --env DB_PASSWORD="your-db-password" \ --env PGVECTOR_URL="jdbc:postgresql://localhost:5432/agent_vectordb" \ --env MODEL_API_KEY="your-model-api-key" \ --env PGVECTOR_USER="postgres" \ --env NACOS_NAMESPACE="default" \ --env NACOS_SERVER_URL="http://localhost:8848" \ --env PGVECTOR_PASSWORD="your-pgv-password" \ --env TOOL_CALLBACK_ENABLED="true"
How to use
AgentNexus is a Java-based enterprise intelligent agent infrastructure that stores models, tools, memories, prompts, and other core components in a database and supports API-driven, hot-reloadable agent assembly. It leverages a Brain model for autonomous multi-agent orchestration, a pluggable tools system, a production-ready RAG layer with vector storage via PgVector, and API-triggered dynamic recomposition of agents without restarting the service. You can trigger updates, load new configurations, and assemble temporary agent teams on the fly through REST endpoints or via Nacos as a config source. This enables real-time, low-latency reconfiguration for complex tasks such as autonomous task planning, tool invocation, and memory-enabled conversations across sessions. The system also supports building workflows by chaining multiple agents and scheduling tasks with Cron for automated processes such as reporting or data analysis. To get started, deploy the service (for example via Docker), ensure your databases and Nacos configuration are accessible, and begin querying the API to create or modify agents, assign tools, and manage memory to support your business workflows.
How to install
Prerequisites:
- Java 17+ (or a compatible JDK)
- Maven 3.6+
- MySQL 8.0+ and PostgreSQL 15+ (with pgvector extension for vector storage)
- Nacos 2.2.0+ (config center)
- Docker (optional but recommended for quick setup)
Install steps:
-
Clone the repository (or pull the pre-built Docker image if provided):
- git clone https://github.com/wozhenbang2004/AgentNexus.git
- cd AgentNexus
-
Set up databases:
- Create MySQL database (e.g., agent_nexus) and run the schema.sql from sql/ to initialize tables.
- Create PostgreSQL database and install/enable the pgvector extension.
-
Configure Nacos:
- Start Nacos (Docker or standalone).
- In Nacos, create a Data ID named agent-nexus-dev.yml (or any name you prefer) under the DEFAULT_GROUP with YAML format. Paste application.yml content as a template and modify database URLs and API keys as needed.
-
Build and run (if building from source):
- mvn clean package -DskipTests
- java -jar target/AgentNexus.jar
-
Docker-based run (if using Docker image):
- Ensure environment variables for DB, PgVector, and Nacos are configured (see mcp_config for placeholders).
- Run: docker run -i your-image-name with the appropriate -e VAR=value options as needed, or use docker-compose if provided by the project.
-
Access API documentation:
- Swagger: http://localhost:8091/swagger-ui.html (port may vary based on configuration)
Note: Adjust ports, endpoints, and environment variables according to your deployment environment.
Additional notes
Tips and common issues:
- Ensure the PgVector extension is installed and accessible for PostgreSQL; otherwise, the RAG features may fail.
- If you use Nacos for dynamic config, verify the Data ID and Group match what AgentNexus expects; mismatch can lead to no updates being loaded.
- When hot-reloading configurations, changes to models, tools, or memories should reflect within milliseconds, but very large configurations may take longer to assemble.
- Enable tool auto-registration by ensuring any Bean implementing java.util.function.Function is registered in the Spring context; this allows tools to be automatically discovered as Agent tools.
- Check environment variable mappings carefully when using Docker to ensure database connections and API keys are correctly provided.
- For persistent chat memory, ensure the ChatMemoryRepository is connected to the underlying database to achieve cross-session memory.
Related MCP Servers
ai-engineering-hub
In-depth tutorials on LLMs, RAGs and real-world AI agent applications.
mcp-agent
Build effective agents using Model Context Protocol and simple workflow patterns
SearChat
Search + Chat = SearChat(AI Chat with Search), Support OpenAI/Anthropic/VertexAI/Gemini, DeepResearch, SearXNG, Docker. AI对话式搜索引擎,支持DeepResearch, 支持OpenAI/Anthropic/VertexAI/Gemini接口、聚合搜索引擎SearXNG,支持Docker一键部署。
sdk-typescript
A model-driven approach to building AI agents in just a few lines of code.
prism-insight
AI-based stock analysis and trading system
aser
Aser is a lightweight, self-assembling AI Agent frame.