BAIEnterprise Digitalization · AI Application Development中文EN

Consulting Agent 3.0: Development Lessons

Date: 2026-09-07Category: Agent Framework ResearchTags: Consulting Agent · Development retrospective · State machines · Acceptance

A development retrospective on Consulting Agent 3.0: twelve key lessons, plus a self-examination of three recurring problems — state definitions revised again and again, no upfront performance budget for pages, and starting to build before thinking it through — and the three gates adopted for the next round.

Consulting Agent 3.0: Development Lessons

1. Overall judgment

The most important change in V3.0 is not a “stronger chat entry point”, but a shift of research responsibility: from “humans initiate item by item” to “the Agent drives progress, humans make the key judgments”. That requires the product, the state machines, permissions, evidence, and the front-end presentation to change at the same time; no single feature passing means the complete research loop stands.

As of 2026-09-07, V3 has formed a fairly complete Agent-led research skeleton and passed offline deterministic tests and Acceptance. The main risks of the next stage are not in the basic state machines, but in real external retrieval integration, real model behavior, scaled operation, and business-material boundaries.

2. Key lessons

2.1 Fix version behavior first, then extend capabilities

V2.x and V3.0 have different operating models. If “who initiates, who decides, who carries execution responsibility” is not written down first, V2’s step-by-step human confirmation easily gets copied into V3 — ending up neither automatic nor easy to audit.

Lesson: establish the version line, behavior contracts, and freeze points first, then build pages and runtime features.

2.2 Research objects and runtime objects must be separate

Question, Assignment, AgentExecution, Task, Run, Thread, and Artifact are not the same concept. Stuffing them all into one AgentState makes retries overwrite research intent, historical state mask current state, and recovery paths unable to judge responsibility.

Lesson: model research intent, a single execution, runtime control, and deliverables separately, and link them with IDs and events.

2.3 Agent-led does not mean unbounded automation

The Agent may choose ordinary research actions autonomously, but it cannot change the project scope on its own, read sensitive materials, call unauthorized external tools, or publish formal results. The point of V3 is not to remove humans, but to concentrate humans from “every step” onto a small number of high-value checkpoints.

Lesson: make autonomous actions, checkpoint actions, and forbidden actions explicit in the plan and tool policies.

2.4 Plans must be persisted data contracts

If a plan lives only in a Prompt or a model output, there is no way to answer “why was this question dispatched, what evidence was used, why rerun after failure, what happens next”. A V3 plan needs to persist task types, dependencies, expected deliverables, prohibitions, evidence requirements, tool permissions, quality metrics, and next actions.

Lesson: define the plan Schema first, then connect model generation; the model is one generator of the plan, not its only storage.

2.5 Stage advancement should be judged by content sufficiency

“All Work completed” is a simple but rigid rule; it easily lets leftover supplementary evidence that does not actually block later work slow the whole project. Stage review should judge whether current conclusions suffice to support the next stage, and write leftover issues, risks, and supplementary-evidence arrangements into the transition package.

Lesson: the review package, human approval, and stage start must be separate; generating a review must not produce irreversible side effects.

2.6 Failure classification decides whether the system can recover

Permission blocks, evidence gaps, model timeouts, tool failures, waiting for a human, and quality failures each call for a different handling action. Showing them all uniformly as “failed” leaves the Agent unable to repair in a targeted way, and makes humans misjudge the system state.

Lesson: state names should serve the next action; every failure state needs an explainable reason and a recovery path.

2.7 Targeted replanning is more reliable than full reruns

In a research task, usually only a few questions fail or lack evidence. A full rerun raises cost, introduces new drift, and overwrites existing evidence. V3 controls the repair scope by identifying the affected questions, saving replanning reasons, and limiting rerun counts.

Lesson: keep the original plan and the original failures, and add repair rounds; do not manufacture fake convergence by “overwriting old results”.

2.8 The evidence chain must be built before report writing

A report is only one view of the research results, not a source of facts. Evidence, Claim, Citation, source quality, human opinions, and quality gates should form at the question level; the report role only reads research results that already exist.

Lesson: form evidence-backed results first, then generate the report; the report must not start research on its own or write candidate content up as formal conclusions.

2.9 External retrieval must be governed as a separate data boundary

External retrieval is not finished by adding a Web Search tool to the tool list. It involves data-release permission, source quality, body extraction, timeliness, cross-validation, the distinction between candidate and formal evidence, and the mixing boundary between internal and public materials.

The independent capabilities — search, extraction, quality scoring, candidate states, cache, audit, and human review — are done, but large-scale real verification in the V3 main research chain has not. Just because offline tests can simulate external results does not mean real external retrieval is stably integrated into the research flow.

Lesson: external retrieval must verify both “can it be called” and “do the results change the research plan, evidence, and conclusions”.

2.10 The front end should show actionable projections, not internal state dumps

Users need to know the current question, the current execution, the reason for waiting, evidence gaps, and the next action — not the raw AgentState, full Prompts, or all historical events. Read-only projections also keep historical failures and duplicate checkpoints from masking the current state.

Lesson: define the minimal structure each page needs at the API first; organize the front end around action decisions, with Trace providing on-demand historical detail.

2.11 Test conclusions must be expressed in layers

Deterministic tests suit verifying state machines, permissions, data contracts, idempotency, and failure recovery; Acceptance suits verifying the offline vertical loop; only real-model tests reveal model plan quality; only real external-retrieval tests reveal networks, Keys, quotas, and source quality; human / semantic evaluation judges whether conclusions are actually useful.

Lesson: test reports must state their testing boundary; do not read “715 tests passed” as “the production loop is accepted”.

2.12 Diagrams and documents must respect semantic boundaries too

A system feature-architecture diagram expresses feature blocks, not execution order; a workflow and data-flow diagram expresses participants, steps, and artifact hand-offs, not module layering. Mixing the two semantics gives product, development, and reviewers different understandings.

Lesson: diagrams, product documents, flow documents, and acceptance records each answer different questions; they reference each other but do not substitute for each other.

3. Where strengthening is most needed now

3.1 External retrieval into the research loop

Fill in these relations first:

任务类型 / 证据缺口
  → 外部来源计划
  → 搜索 / 提取
  → 来源质量与交叉验证
  → Evidence / Claim / Citation
  → 问题质量门
  → 阶段评审与后续计划

Suggested approach: run 3–5 real but controllable cases first, recording each query, source, extraction result, quality judgment, evidence binding, failure reason, and human decision, then widen the sample.

3.2 Real services and scale

These need separate verification: network fluctuation, missing Keys, exhausted quotas, pages refusing extraction, duplicate-query caching, timeout cancellation, concurrency caps, Worker restarts, and external-service degradation. None of them can be replaced by a Fake Runner or Mock Client alone.

3.3 Business evaluation and report quality

Structured quality metrics can check coverage, citations, and consistency, but cannot fully judge whether consulting advice has business value. Human evaluation dimensions should be kept, such as actionability of conclusions, fit of framing, quality of risk identification, and usefulness for decisions.

4. Problems in the development process, and a self-review

This section records not code defects themselves, but the development-method problems exposed when those defects kept recurring. Overall, this phase showed strong implementation ability, problem discovery, and sustained repair — but upfront modeling, scope convergence, performance budgets, and acceptance design were not stable enough. Much of the rework was not “technically impossible”, but began before object semantics, user paths, or completion criteria were thought through.

4.1 States revised repeatedly: state-machine design came after feature implementation

Symptoms

  • The states of projects, stages, Work, questions, plans, executions, and results were adjusted many times during development;
  • Semantics such as “in progress”, “completed”, “answered”, “passed”, “waiting for human”, and “quality failed” overlapped for a while;
  • Fixing one page or flow problem required changing backend state, front-end display, recovery logic, and test assertions at the same time;
  • Historical executions, latest executions, human checkpoints, and result states at times masked each other or were explained inconsistently.

Direct cause

At the start, the focus was on “getting features running first”, without first settling each object’s full lifecycle, state ownership, allowed transition actions, terminal states, and history-retention rules. Later, as stage review, quality gates, reruns, and human exceptions were added, the original state definitions carried semantics beyond their design scope.

Limitations in thinking that this exposed

  1. Object modeling came late: a tendency to design from pages and operations, then derive state backwards, instead of first building state machines from business objects and events.
  2. A strong local-repair tendency: when a page’s state looked wrong, the instinct was to fix the display or one interface first, without immediately checking the state’s full meaning across scheduling, recovery, reporting, and evaluation.
  3. Treating state as a field, not a contract: state was not bound from the start to commands, events, permissions, next actions, and history.

Improvements to make

  • Before development, output an “object – state – action – event – owner – next action” matrix;
  • Keep lifecycle state, quality state, human-collaboration state, and runtime state separate; one field must not express several dimensions;
  • Before adding a state, state: who writes it, who reads it, whether it can recover, whether it can retry, and whether it affects reports and historical data;
  • Write tests from state-transition tables and failure-scenario tables first, then pages;
  • Pages should show “current state + reason + next action”, not just a color or a state name.

4.2 Long page-access times: performance and runtime paths had no upfront budget

Symptoms

  • Long waits when opening pages, restarting services, building the front end, or loading dynamic data;
  • Sometimes the port, working directory, database, and service processes had to be confirmed before judging whether a slow page was a front-end problem, an API problem, or a startup-environment problem;
  • As research canvas, progress, details, historical Trace, materials, and checkpoints accumulated, the information load per page grew visibly;
  • A page returning HTTP 200 does not mean the first screen is usable, the data has loaded, or the user can quickly continue.

Direct causes

  • Page features accumulated step by step; first screen, details, and history were not split early enough;
  • Boundaries between backend projections, runtime state, and historical records were unstable early on, easily causing over-reading or repeated reading;
  • Front-end build and dynamic-import strategies were adjusted only as features grew;
  • Service verification focused more on “can it be reached” and rarely recorded first-screen, API, and data-volume timings per round;
  • Local service processes, working directories, and database paths were coupled, so environment startup waits were sometimes mistaken for page performance problems.

Limitations in thinking that this exposed

  1. Features over critical paths: priority went to “what can the page show”, without simultaneously asking “what must the user see first”.
  2. No performance-budget awareness: no acceptable ranges were set from round one for first screen, key APIs, list sizes, detail loading, and background tasks.
  3. Treating access success as usage success: HTTP 200, a rendered page, or a passing build only prove the chain exists, not that the interaction experience is acceptable.
  4. Runtime-environment diagnosis not done upfront: service paths, ports, databases, and caches were not fixed checklist items for page-performance investigation.

Improvements to make

  • Define for each core page a first-screen target, key API targets, a maximum first-screen data volume, and a detail loading strategy;
  • The first screen loads only the current project, current stage/Work, current question, and next action; historical Trace, full evidence, and large lists load on demand;
  • Keep using bounded read-only projections; avoid returning the full AgentState, all historical events, or full result bodies;
  • Paginate, filter, and lazy-load materials, questions, candidates, evidence, and Trace;
  • Record “service startup time, API response time, browser first-screen time, data volume” separately;
  • After each page change, do at least one real browser visit; do not replace experience verification with string checks or a bare HTTP 200.

4.3 Starting to build before thinking it through: repeated back-and-forth changes

Symptoms

  • After stage review packages were generated, stages nearly closed automatically; “review” and “start” were later split again;
  • Task types, external-material requirements, cross-validation requirements, and human-confirmation requirements were structured only after implementation;
  • Handling of automatic quality failures, evidence gaps, human waiting, and permission blocks needed repeated adjustment;
  • Only after pages were finished did it become clear that users also need to see checkpoints, recovery entry points, state reasons, and next actions;
  • The independent external-retrieval capability exists, but how it enters the Question → Evidence → Claim → Quality Gate → Stage Plan main chain still needs strengthening.

Direct causes

Part of the development went straight from “a feature needs adding” into code and pages, without first confirming:

  • Which user task this feature serves;
  • Which business object and state it changes;
  • How it relates to existing features;
  • How failure, waiting, withdrawal, and retry are handled;
  • What evidence proves it is done;
  • Whether this round is building a product capability, a demo capability, or a verification capability.

Limitations in thinking that this exposed

  1. Implementation impulse faster than problem definition: facing complex goals, the tendency was to scaffold structure, build pages, and wire interfaces first, then complete the semantics from run feedback.
  2. No “stop first” mechanism: when scope, objects, states, or acceptance criteria were still fuzzy, there was no forced pause to return to design confirmation.
  3. User-path thinking not upfront enough: development was sometimes organized by module or code file, not by “where the user enters, what they see, what they do, how they continue”.
  4. Local correctness easily mistaken for overall completion: after a single API, page, or test group passed, it was easy to feel the feature was nearly done, with cross-module loop verification scheduled too late.
  5. Exploration spread too wide: pushing Agent, stages, results, reports, materials, retrieval, pages, and diagrams in parallel easily mixes “research-direction exploration” with “what this version must deliver”.

Improvements to make

Before formal coding of each new feature, complete a one-page “feature upfront-design card”:

用户目标
  → 业务对象与边界
  → 主流程和异常流程
  → 状态 / 事件 / 权限变化
  → 页面入口与下一步动作
  → 持久化和审计产物
  → 验收案例与完成标准

If any item cannot be explained, clarify the design first and do not enter large-scale implementation. Change the implementation order to:

  1. Write the business semantics and state transitions first;
  2. Then one minimal vertical loop;
  3. Then connect pages and real runs;
  4. Finally extend side features and visual details.

4.4 The overall capability gaps these problems point to

Taken together, what most needs strengthening now is not raw coding speed, but the following complex-system development capabilities:

Gap exposed Concrete manifestation Capability to build
Insufficient upfront abstraction States, objects, and boundaries adjusted repeatedly after implementation Complete domain models, state machines, and responsibility boundaries before coding
Insufficient system-wide impact analysis One state or page change causes rework in many places Before changing, check the impact on scheduling, recovery, API, UI, reports, and evaluation
Insufficient user critical-path awareness More and more features; first screen and continuing work get slower Organize the product around user tasks and critical paths, not feature stacking by module
Insufficient performance-engineering awareness Access success and access usability not distinguished Establish budgets for time, data volume, concurrency, and background tasks
Acceptance design lagging Build first, then work out “how to prove it is done” Define offline, integration, real-run, and human acceptance for each slice as it is built
Insufficient scope control Multiple exploration lines in parallel; loops converge slowly Distinguish must-deliver for this version, verification experiments, and later candidates

These are improvable points exposed at the current development stage, not a verdict of insufficient ability. On the contrary, this phase showed strong debugging, tracing, repair, and the ability to gradually structure fuzzy problems; the next step is to move that “repair after problems appear” ability forward into “constrain before problems appear”.

4.5 Mandatory self-check list for the next round

Before starting to code:

  • Can the user’s task be stated in one sentence?
  • Are the objects, boundaries, ownership, and exclusions clear?
  • Are the normal path, exception path, waiting-for-human path, and recovery path drawn?
  • Are states, events, permissions, and next actions defined?
  • Is it known what the first screen shows and what loads later?
  • Is there a minimal vertical acceptance case?

Before submitting:

  • Is there a real or controlled loop that walks through across modules?
  • Have historical data, duplicate calls, failure, retry, restart, and human takeover been verified?
  • Are HTTP 200, offline tests passing, real service availability, and business quality passing distinguished?
  • Have data volume, page timing, service paths, and runtime databases been checked?
  • Are unfinished external dependencies, real models, and large-scale verification written down explicitly?

4.6 Adjustments to how development proceeds from here

Future work will no longer default to “think of a feature and expand it across many modules at once”, but use three gates:

设计闸门:对象、边界、状态、用户路径清楚
    ↓
纵向闭环闸门:数据、API、页面、持久化、审计和测试走通
    ↓
发布闸门:真实依赖、性能、失败恢复和业务质量完成对应层级验证

This reduces repeated state revisions, surfaces overly heavy page-access paths earlier, and avoids investing heavily in pages and side features while core semantics are not yet stable.

  • Do not turn V3 into a long form flow where every step waits for a human;
  • Do not replace research, runtime, and delivery objects with one “big AgentState”;
  • Do not mask local evidence gaps with full reruns;
  • Do not treat external web-page abstracts directly as formal evidence;
  • Do not write candidate ontologies, business-term extensions, or model inferences up as confirmed facts;
  • Do not substitute offline Fake test results for real-service acceptance;
  • Do not auto-close stages, questions, or checkpoints just to “look complete”;
  • Do not commit project materials, runtime databases, .env, or model Keys to the release repository.

6. Follow-up implementation suggestions

Near term: complete real external-retrieval verification

Build a small benchmark set covering internal materials, public sources, source conflicts, timeliness, extraction failure, and permission blocks, and complete the Evidence / Claim / Citation write-back chain.

Mid term: scale and runtime reliability

Add persistent queues, cross-process leases, rate limiting, retry backoff, external-service degradation, cost metering, and runtime monitoring; make the difference between local single-process capability and production multi-instance capability explicit.

Long term: business evaluation and delivery

Bring human evaluation, report versions, decision adoption, results reflow, and follow-up research results into a traceable loop, then reassess whether to widen the Agent’s autonomous permissions.

7. Closing

V3.0 already has the product and engineering skeleton for “the Agent can lead research progress”. The key of the next stage is not more pages or more complex recursion, but proving that external retrieval information can be safely brought into question research, evidence judgment, quality gates, and stage plans in real scenarios — and that on failure it is explainable, recoverable, and human-takeover-able.