# Consulting Agent 2.x: A Human–Agent Research Workbench

> From single-question Q&A to a project-level workbench: tasks can be archived, interrupted, and resumed, and evidence only enters the store after review.

- Period: 2026.08
- Status: Frozen
- Type: Original work by the author
- Tags: Research workbench, Checkpoint, Lease recovery, Evidence governance, Ontology & RAG
- Code: https://github.com/baifan11/consulting-agent
- Cover: https://me.ai-clover.com/covers/cover-consulting-agent-2.webp
- Original: https://me.ai-clover.com/en/projects/consulting-agent-2/

2.x changed the unit from "a question" to "a project". Projects, stages, Work items, question trees, and research rounds all became first-class objects in the system. People start research tasks on top of them and the agent assists with execution; research direction, business framing, whether a piece of evidence is believed, and important decisions all stay with humans. What it solves is not "let the model write one more passage" — it is moving a piece of research all the way from a business question to a reviewable deliverable: question decomposition, source retrieval, evidence formation, human judgment, agent execution, quality checks, and result traceability all happen in a single workflow.

## Core capabilities

- **A question-driven research workbench**: the basic unit is the research question, not a message; the hierarchy is Project → Stage / Work → question tree → research round → Agent / sub-agent execution.
- **Evidence-based output**: every result is linked to Evidence, Claims, Citations, the source catalog, Research Events, and Artifacts — not a lone piece of text.
- **Source processing and quality states**: text, PDF, PPTX, and OCR all enter the processing pipeline; sources carry archive / restore states and evidence carries eligibility states — material that hasn't passed the eligibility judgment never enters the formal evidence set.
- **Model, Skill, and MCP management**: unified registration, validation, enable/disable, probing, and agent binding, with audit throughout; MCP connects to external services in the agent-client pattern.
- **Quality evaluation and run monitoring**: a serial real-model evaluation plan, Artifact replay, and evidence / citation gates; failures are filed under categories such as timeout and `scope_blocked`, not just reported as "failed".

## The governed runtime

To hold up under long tasks, the runtime manages Task, Run, Thread, Checkpoint, Lease, Approval, and Artifact separately: tasks can queue, pause, wait for a human, and resume after review, and a task that stops halfway can be taken over by another Worker under a lease. One entry in the 2.0 freeze record stuck with me: an offline run stopped in a waiting-for-human state and was later resumed and ran to completion — that's exactly where you find out whether a long-task system works.

A few designs are worth calling out. Before a tool actually executes, it has to pass eight checks in a row: cancellation check, lease check, timeout check, approval-binding validation, tool-call budget, permission policy, and redaction audit — and only then the actual tool handler. Permissions aren't a log you append after execution; they're a row of gates in front of it. Traces are recorded in three separate layers — research-layer events, Runtime tool events, and management audit — because mixing them makes investigations painful. Research results enter the store only after human review, and can be admitted, returned, archived, restored, and revised; even after admission they keep a "research note" (research_note) provenance marker instead of being laundered into independent primary evidence. External search is off by default, and anything found outside goes into a candidate pool first and only counts as formal evidence after quality judgment and human confirmation.

## System architecture

The whole system has five layers:

1. **Interaction & entry layer**: a React interface, including the home page, the research workbench, agent details, reports, catalog, configuration, and monitoring pages.
2. **Consulting-research domain layer**: domain objects such as Project, Work, Question, Assignment, AgentExecution, ResearchEvent, and reports.
3. **Governed Runtime layer**: the Deep Agents / LangGraph agent loop, Control Plane, Tool Gate, Checkpoint, Lease Fence, and Workers.
4. **Capability & data services layer**: project corpus, results corpus, Memory, external retrieval, Tool Registry, and MCP Runtime.
5. **Persistence & external-boundary layer**: project state, tasks, research Jobs, Artifacts, Memory, token accounting, and external evidence are persisted separately, never mixed together.

The main flow runs: establish project context → generate and review a research plan → create research rounds and Assignments → run the Agent Loop inside the governed Runtime → mid-way human clarification, additional material, or tool approvals → form Evidence / Claim / Citation / Artifact → quality checks and human review → deliver, continue researching, or let a human decide whether it enters the project document store. The code repository holds only reproducible code, tests, and general documents; actual project material, runtime data, and model keys never go into Git — a rule this line set down back in 1.0.

## Version history and records

2.0 first stood up the workbench and the governed Runtime; 2.1 added research workflows, role teams, and governed sub-agents; 2.2 added dynamic routing between an ontology and RAG — a question is first classified to decide which retrieval path it takes, and evidence is allocated dynamically by tracing back to the source text. At the 2.0 freeze, 431 tests passed; for 2.2, real external vector retrieval was exercised on four business questions, and it's on record. Same caveat once more: these are records from the time, and full acceptance testing in the target environment was never finished — the README itself states that the real model, external retrieval, MCP connections, and enterprise deployment capability each need separate acceptance testing against the concrete environment.

## Diagrams

- Main flow (SVG, copied from the project repository): https://me.ai-clover.com/diagrams/consulting-agent-v2-main-flow.svg
- System architecture (SVG, copied from the project repository): https://me.ai-clover.com/diagrams/consulting-agent-v2-architecture.svg

## Updates

- 2026-08-20: 2.2 freeze: added dynamic routing between the ontology and RAG
