JoyAgent-JDGenie

repository·data_agent·Indexed 11 days ago

https://github.com/jd-opensource/joyagent-jdgenie

An end-to-end, lightweight multi-agent product designed to bridge agent frameworks and applications. It features a Java Spring Boot backend for multi-agent support (Planning, Execution, and ReAct agents), a FastAPI-based genie-client (v0.1.0) for Model Context Protocol (MCP) servers, and specialized agents for report and PPT generation. It includes capabilities for code interpretation, deep search, and real-time communication via SSE.

Tokens
12.9K
Snippets
48
Records
72
Agent score
95%

What's inside JoyAgent-JDGenie

  1. Overview of Multimodal Knowledge Management (mRAG)

    data_agent

    Multimodal Knowledge Management (mRAG) is a comprehensive RAG (Retrieval-Augmented Generation) platform designed for multimodal documents. It provides an end-to-end pipeline for parsing, retrieving, and generating content from complex, heterogeneous data sources.

    Core Capabilities

    • End-to-End Multimodal Pipeline: Handles the full lifecycle from raw data parsing to cross-modal semantic retrieval and intelligent generation.
    • Broad Document Compatibility: Native support for PDF, Office suites, and images, with automatic recognition of complex structures.
    • Structured Information Extraction: Integrates the MinerU parsing framework to ensure high-fidelity extraction of document structures and multimodal content.
    • Decoupled Architecture: Core modules (parsing, embedding, retrieval, generation) are modular and extensible for enterprise customization.
    • Hybrid Retrieval System: Combines keyword, vector, and knowledge graph retrieval techniques for efficient cross-modal positioning.
    • Deployment Options: Provides both a Web UI and standard APIs, supporting local and private cloud deployments to ensure data privacy.
  2. Overview of JoyAgent-JDGenie

    data_agent

    JoyAgent-JDGenie is an end-to-end, lightweight, and general-purpose multi-agent product designed to solve the 'last mile' problem of quickly building multi-agent applications. Unlike many open-source projects that only provide SDKs or frameworks requiring further development, JoyAgent-JDGenie is a complete product that can directly answer queries or solve tasks (e.g., generating web-based or PPT-style reports from a single query).

    Key characteristics:

    • End-to-End Product: Includes frontend, backend, framework, engine, and core sub-agents (Report Generation, Code, PPT, File agents, etc.).
    • Extensible: Users can customize new scenarios by mounting relevant sub-agents or tools to the framework.
    • Lightweight & Independent: Does not depend on specific cloud ecosystems (unlike SpringAI-Alibaba or Coze).
    • High Performance: Achieved 75.15% accuracy on the GAIA Validation set and 65.12% on the Test set, outperforming several industry-known products.
  3. Overview of JoyDataAgent

    data_agent

    JoyDataAgent is a general-purpose intelligent data querying framework and product designed for end-to-end, out-of-the-box data analysis. It is built upon the JoyAgent-JDGenie platform and provides a complete pipeline including data governance, intelligent querying, diagnostic analysis, and actionable work suggestions.

    Key capabilities include:

    • Data Governance: Uses the DGP protocol to ensure data quality.
    • Intelligent Querying (TableRAG): Enables natural language querying of tables with high accuracy.
    • Diagnostic Analysis: Provides attribution tools (trend, cycle, anomaly, correlation, causality) and supports user-defined analysis workflows via SOPPlan.
    • High Performance: Achieved 75.74% accuracy on the Birdsql Test set, ranking 4th among 84 teams.
  4. Core features of Genie Backend

    data_agent

    The Genie Backend provides several high-level capabilities for agentic workflows:

    • Multi-Agent System: Supports various agent types including Planning Agents, Execution Agents, and ReAct Agents.
    • Code Interpreter: Capability to interpret and execute user-provided code snippets.
    • Deep Search: Advanced search functionality for locating information within large datasets.
    • File Operations: Support for reading, writing, and managing files.
    • SSE Real-time Communication: Uses Server-Sent Events (SSE) to push real-time data to clients.
  5. Genie Tool project structure overview

    data_agent

    The genie-tool directory is organized as follows:

    • genie_tool/api: API services.
    • genie_tool/model: Protocols and DataClasses.
    • genie_tool/prompt: Prompt repository.
    • genie_tool/tool: Tool execution logic.
    • genie_tool/util: Utility functions.
    • .env_template: Template for environment variables.
    • server.py: Entry point for starting the FastAPI service.
    • start.sh: Startup script.
  6. Core Sub-Agents in JoyAgent-JDGenie

    data_agent

    JoyAgent-JDGenie comes with several built-in core sub-agents that can be used or extended to handle specific tasks:

    • Report Generator Agent: For creating structured reports.
    • Code Agent: For executing or generating code.
    • PPT Agent: For generating presentation files.
    • File Agent: For managing and processing files.
  7. The DGP Protocol for Data Governance

    data_agent

    The DGP (Data Governance Protocol) is used to prepare tables for intelligent querying and analysis. To use JoyDataAgent effectively, users should govern their tables according to these principles:

    1. Table Design Principles

    • Do not mix detail tables (明细表) and metric tables (指标表).
    • Do not mix incremental tables (增量表) and full-load tables (全量表).

    2. Field Design Principles

    • Avoid field name confusion.
    • Clearly define the semantics for point-in-time metrics (时点指标) versus period metrics (时期指标).

    3. Field Value Design Principles

    • Provide semantic descriptions for enumeration values (枚举值).

    4. Data Lineage and Semantic Alignment (In Progress)

    • The system uses SQLAST parsing to build knowledge graphs of field, table, and operator lineage.
    • It performs semantic normalization to resolve conflicts in dimension definitions and ensures precise SQL generation through metric-operator pre-weaving.
  8. Perform Diagnostic Analysis and SOPPlan

    data_agent

    JoyDataAgent provides advanced diagnostic capabilities to move beyond routine reporting and provide 'new perspectives' on data.

    Attribution Analysis Tools

    The system includes several attribution methods to identify the causes of data changes:

    • Trend (趋势)
    • Cycle (周期)
    • Anomaly (异常)
    • Correlation (相关性)
    • Causality (因果)

    SOPPlan Mode

    While the system uses a standard Plan & Solve pattern, users can upgrade to SOPPlan mode. This allows users to define their own standard operating procedures (SOPs) for analysis, ensuring that the agent follows specific, pre-defined diagnostic workflows.

  9. How TableRAG and Intelligent Querying work

    data_agent

    JoyDataAgent uses a TableRAG approach to enable natural language querying of data through two main stages:

    1. Two-Stage Dynamic Selection: The system dynamically selects the appropriate tables and fields based on the user's query.
    2. Fine-Grained Query Decomposition: Complex questions are broken down into smaller, manageable semantic units, allowing for efficient retrieval and recall of specific table rows and columns.

    Key Features:

    • Adaptive Querying: Automatically adapts to different table types (e.g., Detail vs. Metric, Incremental vs. Full-load).
    • Visualized Results: Combines intelligent querying with automated chart generation for data visualization.
  10. Core Concepts of JoyAgent-JDGenie

    data_agent

    JoyAgent-JDGenie is a lightweight, general-purpose multi-agent product designed for end-to-end task completion.

    Key Architectural Concepts:

    • Multi-level & Multi-pattern Thinking: Combines different design patterns (like react and plan and executor) across multiple levels (work level and task level) to support complex planning.
    • Agent Framework Protocol: Supports various agent design patterns, multi-agent context management, and a high-concurrency DAG (Directed Acyclic Graph) execution engine for efficiency.
    • Tool Evolution: Instead of generating tools from scratch, the system uses an "auto-disassembly-and-reassembly" approach. It implicitly decomposes existing tools into atomic tools and recombines them using LLMs to create new, more reliable tools.
    • Cross-task Workflow Memory: Maintains memory across different tasks to recognize and leverage similar task patterns.
  11. Quickstart: Deploy JoyAgent-JDGenie via Docker

    data_agent

    You can use Docker to quickly launch the full service. This method involves cloning the repository, configuring backend and tool environment variables, building the image, and running the container.

    Configuration Steps:

    1. Backend: Update genie-backend/src/main/resources/application.yml with your base_url, apikey, model, max_tokens, and model_name.
      • Note for DeepSeek users: Set max_tokens to 8192 for deepseek-chat.
    2. Tools: Update genie-tool/.env_template with OPENAI_API_KEY, OPENAI_BASE_URL, DEFAULT_MODEL, and SERPER_SEARCH_API_KEY.
      • Note for DeepSeek users: Set DEEPSEEK_API_KEY and DEEPSEEK_API_BASE. Set DEFAULT_MODEL and all occurrences of ${DEFAULT_MODEL} to deepseek/deepseek-chat.

    Once configured, build and run the container.

    # 1. Clone the repo
    git clone https://github.com/jd-opensource/joyagent-jdgenie.git
    
    # 2. (Perform manual config steps mentioned above)
    
    # 3. Build the docker image
    docker build -t genie:latest .
    
    # 4. Run the container
    docker run -d -p 3000:3000 -p 8080:8080 -p 1601:1601 --name genie-app genie:latest
    
    # 5. Access via browser at http://localhost:3000