跪拜 Guibai
← Back to the summary

Building a Digital Human Agent for R&D: A Three-Layer Architecture with Offline Knowledge, MCP, and Personalized Skills

Author: vivo Internet Search Team - Yang Zhan
Targeting the pain point that R&D personnel are heavily occupied by repetitive tasks such as problem troubleshooting and data verification, which squeeze out core development time, this article builds a lightweight "R&D Digital Human Agent System" based on the OpenTask large model. The system adopts a three-layer architecture of "offline knowledge base static support + MCP dynamic interface calls + personalized Skill reasoning", structuring personal private experience into a static repository, linking real-time online business systems, and replicating the individual's troubleshooting thought process and work habits. It achieves a full-process automated closed loop of problem acceptance, information retrieval, logical analysis, and solution output. The system has replaced over 80% of tedious tasks, features low invasiveness and self-evolution, allowing R&D personnel to truly focus on core technical work.

1-minute visual summary of key points👇

一、Project Background

In daily software development and operations, R&D personnel face the pain point that repetitive, transactional tasks account for a disproportionately high percentage of their time, severely squeezing out core development and architecture design work. A large amount of energy is consumed by low-value tasks such as problem troubleshooting, requirement verification, log analysis, problem localization, data lookup, and interface validation, leading to a significant drop in efficiency for high-value work like focused coding, technical tackling, and architecture optimization. The R&D workflow becomes redundant and fragmented.

Traditional AI programming assistants only support code completion, syntax correction, and code writing. They cannot adapt to the full R&D workflow, lack private offline knowledge adaptation, online business interface integration, and personalized problem analysis logic, and fail to match an individual's R&D habits.

Based on these pain points, relying on OpenTask (similar to WorkBuddy/CodeX), an intelligent Agent office tool, we independently developed a lightweight R&D Digital Human Agent System, positioning it as a personal digital mirror of the R&D engineer—thinking and handling problems like the engineer does. Around this goal, the system is expected to have three core capabilities:

Let this digital mirror replace humans in the entire process of problem reception, information retrieval, logical analysis, and solution output, automating tedious R&D tasks and freeing up R&D focus for core technical development.

二、Overall Design

This system uses the OpenTask large model as the core reasoning engine and adopts a three-layer architecture of "knowledge base static support + MCP dynamic calls + personalized Skill reasoning", balancing offline knowledge stability, online business real-time, and personal R&D workflow adaptability. The overall architecture is lightweight, low-invasive, and suits personal R&D daily office scenarios.

2.1 Design Thinking

Process steps:

1. User asks: simple command initiates consultation
2. Agent parses: identifies type · decomposes request
3. Knowledge matching + interface validation: offline retrieval · MCP real-time data
4. Skill reasoning: step-by-step derivation according to personal skill logic
5. Solution output: standardized result · problem closed loop
6. Self-evolution: accumulate high-frequency problems · iterate rules

2.2 Overall Architecture Components

OpenTask Large Model (core reasoning layer): Supports long code contexts, log text, and technical documents with a super-long context window, and supports offline local reasoning mode.

Digital Human Private Local Knowledge Base (static support layer): Carries the R&D personnel's personal private knowledge, runs completely offline locally, does not depend on external networks, has no data leakage risk, and provides the large model with exclusive, private, long-term static knowledge materials, solving the pain point that general large models do not know personal historical experience and internal project private data. Simply put: it is the digital human's "personal notebook + project archive room". All personal troubleshooting experience and internal private documents are stored locally and can be retrieved at any time.

MCP Online Interface Encapsulation (dynamic capability layer): MCP can be understood as a multi-end collaboration protocol / unified tool gateway, serving as a standardized channel for the digital human to connect to enterprise online business systems, third-party tools, and online services. It addresses the shortcoming that the offline knowledge base only has static historical data and cannot obtain real-time dynamic information.

Custom Skill System (personalized rules layer): Skill refers to reusable, customizable R&D-specific task skills. It is the core carrier for replicating an R&D engineer's unique troubleshooting ideas, workflow, and operating habits. Unlike the generalization ability of a generic large model, it represents the unique logic of that engineer.

Four-Layer Architecture (core-radiating)

Digital Human Private Local Knowledge Base Components

MCP Online Interface Encapsulation Components

Custom Skill System Components

三、Core Function Implementation

Based on the four-layer architecture, the system implements four core capabilities: intelligent problem acceptance, multi-source information fusion analysis, personalized logical reasoning, and standardized solution output. The full process automatically replaces manual tedious operations.

3.1 Intelligent Problem Acceptance and Semantic Parsing

Users initiate consultations with simple commands. The Agent, leveraging OpenTask's semantic understanding, accurately identifies problem types (code errors, business exceptions, operations issues, process consultations, syntax questions, etc.), automatically decomposes the core request, problem scenario, and key parameters, filters invalid information, and locks the analysis direction, reducing communication cost.

1. Command understanding · Service initialization

Question Initialize filter service music-xxx

Initialization complete
Root directory: /Users/****/Documents/work/opentask
Service name: <your-business-service-name>
Service ID: <your-business-service-name>
DAG ID: <your-dag-id>
Process type: first initialization

The Agent accurately understands the intent of this command—locating the target service, loading its architecture and knowledge context, and preparing for subsequent problem analysis.

2. Problem acceptance · Key information extraction

Question: In the association word service, entering "iQOO 120W charger" makes the product card show "iQOO12 original accessory". Need to locate the source of the hint text.

Good, found the service ID: portal-xxx

Now let me extract the key information of the problem:

User input: "iQOO 120W charger"
Result: product card hint is "iQOO12 original accessory"
Core question: why is the hint "iQOO12 original accessory"

The Agent locates the service ID (portal-xxx), then automatically extracts the three elements of "user input / result / core question" from the user's description, locking the analysis direction.

3.2 Offline Local Knowledge Base

The large model has knowledge blind spots. The Agent prioritizes retrieving the local structured offline knowledge base, solving the pain point that generic large models don't understand private projects or personal accumulated experience. This section is organized in two parts: content and retrieval methods.

1. Offline library content

Offline knowledge base directory structure:

Looking at the offline knowledge base directory structure from another angle, it is organized into three categories: "project private library / personal repository / team offline document library":

1.1 Project private library
1.1.1 Public information
  ·Jargon / coded terms
  ·Scenario ⇄ service relationships
  ·Business-specific terms
1.1.2 Service information
  ·Source code
  ·Service basic info: name, version, release time, code commit info …
  ·Service architecture
    -Service nodes —— decomposed as independently as possible into small, fine-grained local nodes
    -RAG topology relations —— the connecting lines between points
1.2 Personal repository
  ·Local execution specifications
    -code logic interpreted directory
    -business logic interpreted directory
  ·Personal troubleshooting notes (docs directory)
    -Problem description
    -Location approach
1.3 Team offline document library
  ·Requirement documents
  ·High-level design documents

2. Deterministic retrieval based on predefined flowcharts

Flow and node modeling: a complete RAG task is broken into a directed node sequence (chain or DAG). Each node defines clear specifications, at least including:

The whole process forms a retrieval navigation map, essentially fixing "where to look, what to retrieve, in what output format" as node specifications. At execution time, it relies on the knowledge base, MCP, and Skill working together.

3.3 MCP Online Interface Dynamic Call and Validation

MCP can be understood as a multi-end collaboration protocol, a path connecting the digital human with online systems, enabling real-time data query (read) and online tool automation (write), so the digital human does not rely only on historical experience and addresses the shortcoming of offline knowledge bases (only static historical data, no real-time dynamic info).

Core Functions

① Service basic information: see file service-info.json, containing service name, version, release time, commit, and other metadata.

{
  "serviceId": "portal-xxx",
  "version": "10",
  "DAGId": "4228",
  "PROJECT_NAME": "search-biz",
  "git_address": "https://gitlab.your-company.com/java-project/search-biz.git",
  "git_branch": "portal-branch",
  "commit_id": "e792fcd70597663e1a032898f5427cce9d2bc6",
  "updateTime": "2026-01-14 20:01:50.0",
  "flowStatus": "true",
  "moduleInfo": {
    "module_name": "portal-xxx-3.4.5",
    "module_version": "",
    "desc": "v3.4.5 completed large-capacity battery parsing\r\nTT Yang\r\n2026-01-14 19:20:26"
  },
  "gateway": {
    "name": "common cluster (search)",
    "group": "common"
  },
  "fetchTime": "2026-06-17T07:14:39Z"
}

② Service RAG topology: see file dag-structure.json, rendered as a service flow diagram, showing the invocation and connection relationships between nodes.

③ Local node detailed info: see file flowNodesInfo.json, recording node responsibilities, input/output contracts, and null-check rules.

{
  "nodeId": "main",
  "nodeName": "parameter initialization",
  "dagId": "DAG-0327290e",
  "codeLogic": "Parse request parameters, initialize context and default configuration",
  "businessLogic": "Validate source channel, keywords, pagination parameters; fill business defaults when missing",
  "input": {
    "keyword":  { "type": "string",  "nullable": false },
    "channel":  { "type": "string",  "nullable": false },
    "pageSize": { "type": "integer", "nullable": true, "default": 10 }
  },
  "output": {
    "ctx":      { "type": "object", "nullable": false },
    "valid":    { "type": "boolean","nullable": false }
  }
}

④ Source code retrieval: download code via git into the sourceCode directory for code-level analysis and localization.

⑤ Online service requests: real-time return of each node's execution status, input parameters, output parameters, time consumption, etc. Online requests return real-time status, I/O parameters, and timing, supporting fusion analysis of static knowledge plus dynamic data.

⑥ Online document content: pull requirement documents and other online docs to supplement real-time business context.

Core Requirements

MCP Provider:

MCP Consumer:

3.4 Custom Skill Step-by-Step Reasoning Analysis

Goal: Personalized Skill reasoning is the digital human Agent's exclusive R&D behavior and logic engine, the core differentiator that replicates an R&D engineer's unique troubleshooting approach, work habits, and business processing style.

Skill is the execution carrier that orchestrates the following three components according to the engineer's fixed working logic:

Throughout the full lifecycle, Skill cannot work independently of the Prompt system; the two are deeply bound and mutually driving, jointly defining the digital human's behavior boundary, thinking style, and output standards.

1. Skills Admission Conditions

Skill admission condition settings:

2. Skill Global Flow Orchestration Layer

Skill execution steps & order settings:

3. Prompt Settings for Execution Plan

Prompt execution plan settings:

4. Script Scripts for Fixed Actions

3.5 Standardized Result Output

After analysis, the Agent outputs structured results with clear, directly actionable content, completing the problem closed loop. This section explains from two dimensions: output content and expression style.

1. What content is output

2. Expression style

The output style can switch between "technical" and "popularized" to adapt to the audience. Two methods control this:

Complete Business Flow

3.6 Feature Demonstration

Phone price filter logic

Background: A user who has claimed a 6000+ government subsidy wants to jump directly to a list of eligible models above 6000, connecting the claim and usage steps to improve conversion efficiency.

Question: In the filter service, can it precisely filter out phones above 6000 yuan, excluding those in the 5000-6000 range?

🔴 Cannot precisely filter phones above 6000 yuan without including 5000-6000 yuan.

Three reasons:

  1. The price classification system has no "above 6000" option

The system uses a price classification (FilterItemEnum.MIN_PRICE, i.e., filterMap key=2) with only 6 hardcoded intervals:

There is no "6000 and above" category. "5000 and above" is a catch-all interval that includes all phones ≥5000, so it cannot distinguish 5000-6000 from 6000+.

  1. The filtering logic uses hardcoded inPriceRange

In FilterStrategy.java, the inPriceRange method hardcodes price range judgments:

1. User asks: simple command initiates consultation
2. Agent parses: identifies type · decomposes request
3. Knowledge matching + interface validation: offline retrieval · MCP real-time data
4. Skill reasoning: step-by-step derivation according to personal skill logic
5. Solution output: standardized result · problem closed loop
6. Self-evolution: accumulate high-frequency problems · iterate rules

As long as "5000 and above" is selected, all phones with price ≥5000 pass the filter, including those in the 5000-6000 range. The categories cannot be split because the granularity is insufficient.

四、Agent Extension Capabilities: What Else Can It Do

The core functions above focus on the main scenario of "problem troubleshooting and answering", but OpenTask-driven Agent capabilities go far beyond that. With strong code understanding, logical reasoning, and context generation, the Agent achieves a role leap from "passive answering" to "active empowerment", covering key stages of the R&D lifecycle.

4.1 Solution Output — Complete Closed Loop from Problem to Solution

4.2 High-Level Design — Generate Standard Design Documents from Requirements

4.3 Code Generation — The Last Mile from Design to Implementation

After pasting a requirement document, the Agent can generate a complete high-level design and code changes at once—from requirement decomposition, architecture and interface design, to code drafts, covering the full "design → implementation" chain end to end.

High-level design output: Based on the pasted requirement document, the Agent automatically produces a complete design document covering requirement decomposition, architecture, and interface design.
Two detailed documents generated:
1. Impact of power recognition on association word intent and fix plan.md (334 lines)
2. Power recognition code implementation example.md (724 lines)

🎯 Modification requirements and corresponding solutions
✅ Requirement 1: Skip power judgment for model words and series words
Core logic: add power pattern detection detectPowerPattern() and remove extractPowerAndRemove()
Regex: \\d+[安aA瓦wW] (matches digit + 安/a/A/瓦/w/W, no space between)

✅ Requirement 2: Intent determination ensures accessory type is included
Data cable accessory: detect \\d+[安aA] → set dataCableIntentionFlag
Charger accessory: detect \\d+[瓦wW] → set chargerIntentionFlag

✅ Requirement 3: Sorting text score considers a and w field bonuses
Bonus logic: when power info is recognized, add 0.05 to mix_score
Ranking optimization: in dedup and final sorting, prioritize power-related association words

五、Implementation Results

Workload reduction: Replaces 80%+ of tedious tasks like problem lookup, troubleshooting, and data verification, greatly reducing fragmented time and effectively focusing on high-value work like core coding, architecture optimization, and technical tackling.

Error reduction: Leveraging standardized knowledge base and fixed Skill reasoning logic, avoids manual oversight, experience bias, and memory lapses, significantly improving troubleshooting accuracy and efficiency.

Experience accumulation: Structurally encapsulate scattered personal R&D experience into a knowledge base, reuse and solidify personal technical experience, achieving experience fixation and efficient reuse.

High adaptability: Lightweight deployment, no business intrusion, fully fits personal R&D scenarios. No need to modify existing business systems; ready to use.

六、Future Optimization Iterations

Based on current results and R&D pain points, subsequent iterations will focus on five dimensions: knowledge base intelligence, Skill reasoning refinement and Prompt decision-making, service-ization and external service capabilities, Loop closed-loop monitoring, and autonomous learning.

6.1 Knowledge Base Intelligence Upgrade

Optimize structuring capabilities, add automatic incremental updates to automatically capture new problems, solutions, and documents; improve vector retrieval accuracy for complex, ambiguous scenarios; classify and grade knowledge base content for precise scenario matching.

6.2 Skill Reasoning Refinement and Prompt Decision Mechanisms

Enrich the custom Skill rule library, create dedicated reasoning templates; add priority mechanisms, scenario-adaptive switching, and visual editing. Further introduce a joint Skill + Prompt decision mechanism:

6.3 Service-ization and External Service Capabilities

Currently the Agent runs locally, essentially a personal digital mirror. Future plans include exporting analysis capabilities through channels like WeChat official accounts, focusing on:

6.4 Loop Closed-Loop Monitoring Capability

Currently the flow is single-shot triggered. Future work introduces Loop closed-loop monitoring, allowing the Agent to continuously supervise whether the flow is actually executed to completion and whether the problem is fully resolved:

6.5 Autonomous Learning Capability Optimization

Introduce few-shot autonomous learning, allowing the Agent to automatically accumulate high-frequency problems, optimize answer logic, and iterate Skill rules during daily use, becoming increasingly precise and tailored to personal work habits, gradually achieving full-process autonomous and intelligent assistance.

七、Conclusion

This R&D assistance intelligent Agent based on OpenTask precisely addresses the core pain point of R&D personnel being overloaded with tedious daily tasks and core work being squeezed. Through the innovative architecture of offline knowledge base + MCP online interfaces + personalized Skill reasoning, it achieves automated, standardized, and personalized implementation of R&D problem troubleshooting, consulting, and analysis work, effectively improving personal R&D efficiency and reducing repetitive workload. Through continuous iterative optimization, it can further expand scenarios, raise intelligence levels, and become a personal full-process R&D intelligent assistant, maximizing the liberation of R&D productivity.