Hybrid Agent Architecture with Open-Source Workers and Frontier Advisors for Legal AI

harvey · Legal · 2026 · source Agentic: yes · promotional bias: med · source-backed · extracted with prompt 0.5.6 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: legal AI agent execution and cost-efficient frontier-quality inference

Harvey and Fireworks needed a way to reach frontier-level quality on complex legal-agent tasks without sending every query through an expensive frontier model, while preserving legal-domain evaluation rigor, citation discipline, controllability, and a deployable training-to-serving path.

Constraints:

Architecture

Fireworks and Harvey evaluated two complementary system-level approaches on Harvey's Legal Agent Benchmark. The first is a hybrid agent harness where GLM 5.1 acts as the open-source worker responsible for most reasoning, drafting, and tool use, while Claude Opus 4.7 is exposed as a callable advisor tool that the worker invokes only when it needs help with retrieval, drafting, validation, or another difficult subtask. There is no separate router: the worker decides when to request the frontier advisor, producing sparse advisor usage and longer downstream worker trajectories. The second approach is Fireworks-native post-training of Kimi K2.6, using supervised fine-tuning on rubric-passing LAB trajectories and reinforcement fine-tuning against LAB evaluators, with the same Fireworks infrastructure handling training, evaluation, serving, and bit-for-bit handoff to production endpoints.

Diagram confidence: explicit (topology described by the source).

flowchart LR
  Legal_Agent_Benchmark["Legal Agent Benchmark"] --> Baseline_model_runners["Baseline model runners"]
  Legal_Agent_Benchmark --> Hybrid_harness["Hybrid harness"]
  Legal_Agent_Benchmark --> Post_training_pipeline["Post-training pipeline"]
  Hybrid_harness --> GLM_5_1_worker["GLM 5.1 worker"]
  GLM_5_1_worker --> Legal_task_tools["Legal task tools"]
  GLM_5_1_worker --> Claude_Opus_4_7_advisor["Claude Opus 4.7 advisor"]
  Post_training_pipeline --> Kimi_K2_6_model["Kimi K2.6 model"]
  Kimi_K2_6_model --> Fireworks_production_endpoint["Fireworks production endpoint"]
  Post_training_pipeline --> Fireworks_production_endpoint
  Legal_Agent_Benchmark --> Cost_and_quality_dashboard["Cost and quality dashboard"]
  Hybrid_harness --> Cost_and_quality_dashboard
  Post_training_pipeline --> Cost_and_quality_dashboard
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Legal Agent Benchmark Domain-specific evaluation suite that supplies legal tasks, rubrics, mean-score evaluation, and all-pass production-readiness scoring. Baseline model runners, Hybrid harness, Post-training pipeline
Baseline model runners Runs GLM 5.1, Kimi K2.6, DeepSeek V4 Pro, GPT-5.5, and Claude Opus 4.7 on the 100-task slice to establish cost and quality baselines. Legal Agent Benchmark
Hybrid harness Inspectable multi-agent harness that lets an open-source worker call a frontier advisor when needed. GLM 5.1 worker, Claude Opus 4.7 advisor, Legal Agent Benchmark
GLM 5.1 worker Open-source core model that performs most legal reasoning, drafting, tool calls, and advisor-invocation decisions. Claude Opus 4.7 advisor, Legal task tools, Hybrid harness
Claude Opus 4.7 advisor Frontier model exposed as a callable consultant for hard retrieval, drafting, validation, or second-opinion subtasks. GLM 5.1 worker
Legal task tools Task-specific retrieval, drafting, validation, and client-matter environment tools used by the worker. GLM 5.1 worker
Post-training pipeline Fireworks training workflow for supervised fine-tuning and reinforcement fine-tuning on LAB-derived data and rewards. Kimi K2.6 model, Legal Agent Benchmark, Fireworks production endpoint
Kimi K2.6 model Trillion-parameter mixture-of-experts open-source model used for SFT and RFT experiments. Post-training pipeline, Fireworks production endpoint
Fireworks production endpoint Shared serving endpoint that receives the trained checkpoint without a separate research-to-production handoff. Post-training pipeline
Cost and quality dashboard Compares all-pass, mean score, advisor usage, and total inference cost across configurations. Legal Agent Benchmark, Hybrid harness, Post-training pipeline

Data flow

A 100-task distribution-mirrored LAB slice is run through candidate open-source and frontier models to establish mean-score, all-pass, and cost baselines. In the hybrid harness, GLM 5.1 executes the legal task, calls tools, drafts outputs, and invokes Claude Opus 4.7 as an advisor only when it reaches uncertain retrieval, drafting, or validation steps; the advisor response then informs further worker turns. In the post-training path, Kimi K2.6 is run through LAB, rubric-passing trajectories become SFT data, RFT uses per-criterion LAB rewards, and the resulting checkpoint is served from the same Fireworks endpoint used for production traffic.

3 supporting quotes
“A frontier advisor as a callable tool. Treating Opus 4.7 as an advisor the worker can call on hard sub-tasks unlocked the cost savings on the harness.”article, stated
“The GLM 5.1 worker does the bulk of the reasoning, drafting, and tool calls. There is no external router or orchestrator.”article, stated
“Run Kimi K2.6 through LAB, keep the completions that pass LAB’s rubric criteria (the high-quality trajectories), and drop them into a [Fireworks SFT job]”article, stated

Why this architecture

The architecture separates ordinary legal-agent work from the expensive moments that benefit from frontier intelligence. Open weights provide the controllable, lower-cost core; Claude Opus is used as a sparse callable advisor; and LAB makes both mean quality and strict all-pass readiness visible. The post-training path addresses a different lever by making the open-source model more domain-specific while keeping training and serving on the same infrastructure so improvements are deployable without conversion drift.

3 supporting quotes
“The customer ask is no longer ‘how do we get the smartest model on every query.’ It is ‘how do we get frontier-quality outputs on the queries that need them, and a model we control on the queries that don’t.’”article, stated
“open weights at the core, orchestration the team can inspect and tune, and the frontier model invoked as a callable tool rather than a load-bearing dependency.”article, stated
“Fireworks trains, evaluates, and serves on the same infrastructure, so a model fine-tuned against LAB is the same model, bit-for-bit, that serves production traffic.”article, stated

Models used: GLM 5.1 · Claude Opus 4.7 · Kimi K2.6 · DeepSeek V4 Pro · GPT-5.5 · open-source worker models · frontier advisor model

Scale

Alternatives considered (roads not taken)

Claude Opus 4.7 end-to-end on every legal task

Rejected because: It achieved 14/100 all-pass at $954, while the hybrid GLM+Opus advisor harness achieved 18/100 at $368.

“GLM 5.1 + Opus 4.7 advisor beats Claude Opus on cost and quality.”article, stated
“Against Opus the comparison is clean on both axes: −$586, +4 tasks all-pass.”article, stated

GLM 5.1 alone

Rejected because: It was cheap and competitive on mean score but the advisor added six more fully passing tasks, closing the production-readiness gap.

“Against the GLM-only baseline, the advisor adds +6 tasks all-pass for +$246 — the cost increase is real, but it is the cost of beating Opus”article, stated

Prompting only without post-training

Rejected because: The SFT section says passing trajectories were clean enough to produce a measurable lift with no reward model, relabeling, or architecture changes.

“No reward model, no human relabeling, no architecture changes. All-pass moved from 11 / 100 to 15 / 100 and mean score from 0.863 to 0.876”article, stated

Separate research and production deployment stacks

Rejected because: The post-training workflow emphasizes same-platform training and serving to avoid numeric drift and a research-to-production gap.

“no numeric drift between training and serving, no second deployment pipeline, no research-to-production gap.”article, stated

Patterns

multi-agent-orchestration (agent-architecture)

The hybrid harness coordinates an open-source worker and a frontier advisor, with the worker deciding when to call the advisor as a tool.

“the team built a small, opinionated multi-agent harness with the open-source worker at its core.”article, stated
“The worker pulls the advisor in itself, wherever it needs a second opinion: retrieval, drafting, validation.”article, stated

tool-use-orchestration (agent-architecture)

Claude Opus 4.7 is exposed as a callable advisor tool rather than the primary model for every task.

“The frontier model shows up as a callable tool, not as the dependency the product is built on top of.”article, stated
“Treating Opus 4.7 as an advisor the worker can call on hard sub-tasks unlocked the cost savings on the harness.”article, stated

cost-aware-routing (operations)

The harness makes frontier-model calls sparse and tunable, dialing advisor calls up for complex matters and down for routine ones.

“advisor is invoked just 0.83 times per task on average — sparse-but-targeted use.”article, stated
“it gives us a tunable cost/performance knob: dial advisor calls up on complex matters, down on routine ones.”article, stated

eval-driven-development (quality)

LAB provides both mean-score and all-pass metrics, guiding harness and post-training experiments against domain-specific legal rubrics.

“LAB uses two metrics. Mean score is the share of rubric criteria a model passes, averaged across the suite.”article, stated
“All-pass is strict: a task counts only when every criterion in its rubric passes.”article, stated

fine-tuning-adaptation (model-adaptation)

Kimi K2.6 is adapted through SFT on rubric-passing trajectories and RFT against per-criterion LAB rewards.

“Post-training on Fireworks is the model-side counterpart to harness engineering.”article, stated
“RFT trains against the LAB evaluators directly, with per-criterion rewards instead of just imitating passing trajectories.”article, stated

observability-tracing (operations)

Trace analysis is used to understand advisor invocation, worker turn-count expansion, and the advisor's steering role.

“The harness traces show a recognizable pattern. The worker’s turn count rises meaningfully versus a GLM 5.1-only run”article, stated
“Sparse advisor calls, denser worker activity downstream of them.”article, stated

Tradeoffs

Use a frontier model as advisor rather than primary dependency

Chose GLM 5.1 worker with callable Claude Opus 4.7 advisor over Claude Opus 4.7 end-to-end for every task.

Rationale: The hybrid harness beat Opus all-pass performance while costing a much smaller fraction of the standalone Opus run.

“GLM 5.1 + Opus 4.7 advisor beats Claude Opus on cost and quality.”article, stated
“at $368 across the 100 tasks, roughly 39% of Opus’s $954 standalone cost”article, stated

Let the worker self-trigger advisor calls

Chose worker-controlled advisor invocation over external router or orchestrator deciding when to invoke Opus.

Rationale: The design gives the worker adaptive access to second opinions during retrieval, drafting, or validation while keeping orchestration inspectable.

“There is no external router or orchestrator. The worker pulls the advisor in itself, wherever it needs a second opinion: retrieval, drafting, validation.”article, stated

Use all-pass as production-readiness metric

Chose strict all-pass alongside mean score over average rubric score alone.

Rationale: Average scores can look strong while leaving long-tail criteria incomplete, which is unacceptable for legal work.

“All-pass is strict: a task counts only when every criterion in its rubric passes. It is LAB’s grading metric for production-readiness”article, stated

Start post-training with a simple SFT recipe

Chose rubric-passing trajectories from LAB as SFT data over reward model, human relabeling, or architecture changes for the first lift.

Rationale: The team wanted a clean baseline and found that the LAB trajectory data was already good enough to improve all-pass.

“partly because the LAB trajectory data was already clean enough to use as-is and partly because we wanted a clean illustration of how much headroom is left”article, stated
“No reward model, no human relabeling, no architecture changes.”article, stated

Run post-training and serving on one platform

Chose Fireworks training, evaluation, and serving on the same endpoint over training in one environment and deploying through a second production stack.

Rationale: The same-platform loop is meant to avoid numeric drift and make the model-development loop tractable.

“Both efforts, like the training and harness in this post, run on the same Fireworks endpoint that serves the model in production.”article, stated
“a model team can fine-tune, evaluate against LAB, and ship the result without crossing a research-to-production gap.”article, stated

Gotchas (what bit them)

Mean score can hide production failure in legal tasks.

Root cause: Legal deliverables can be unusable when any required criterion is missed, even if most rubric items pass.

Resolution: Use all-pass alongside mean score to measure whether a task fully satisfies every criterion.

“a deal-team report that catches eight of ten risks is not 80% useful, it is materially incomplete.”article, stated
“A high mean with low all-pass is a generally strong model that fails the long tail of strict criteria.”article, stated

The advisor pattern depends on the worker knowing when it needs help.

Root cause: There is no external router, so the worker model itself must recognize uncertainty and invoke the frontier advisor appropriately.

Resolution: Monitor traces, advisor usage, and worker turn-count behavior to tune the harness and validate where the pattern holds.

“There is no external router or orchestrator. The worker pulls the advisor in itself, wherever it needs a second opinion”article, stated
“Trace analysis shows a recognizable behavioral pattern: the worker's turn count increases meaningfully compared to a GLM 5.1-only run”summary, stated

Research-to-production handoff can silently degrade trained models.

Root cause: Models trained in one environment often need conversion or redeployment elsewhere, creating opportunities for numeric drift or optimization loss.

Resolution: Use Fireworks-native training and serving so the checkpoint that trains against LAB is the same model served in production.

“no numeric drift between training and serving, no second deployment pipeline, no research-to-production gap.”article, stated
“same platform from prompt to checkpoint to production. The model that ships is the model that came off the training run”article, stated

Benchmark-slice results may not generalize to the full legal workload.

Root cause: The experiment uses a 100-task slice rather than the complete 1,250-task LAB benchmark and excludes undisclosed production cost factors such as training cost.

Resolution: Treat results as a strong system-design signal but validate on broader practice areas, full benchmarks, and real client work before deployment decisions.

“The 100-task slice is a snapshot. The joint team is already scoping the next set of experiments”article, stated
“Note: Cost figures throughout are estimates based on current serverless rates”article, stated

Evaluation

The team evaluates on a 100-task distribution-mirrored slice of Harvey's Legal Agent Benchmark using mean score, all-pass, standard error estimates, advisor invocation rates, and total inference cost. Post-training runs are evaluated continuously during RFT against LAB mean score, and cost comparisons use Fireworks serverless rates plus published frontier-model API pricing.

Metrics: 100-task LAB slice from 1,250 tasks and 24 practice areas · 75,000+ expert-written rubric criteria in LAB · GLM 5.1 mean score 0.8921 at $121 · Claude Opus 4.7 all-pass 14/100 at $954 · GLM 5.1 + Opus advisor all-pass 18/100 at $368 · advisor invoked 0.83 times per task on average · Kimi K2.6 SFT all-pass 15/100 at $84 · RFT final smoothed mean score 0.886 after 46 rollout steps

4 supporting quotes
“LAB uses two metrics. Mean score is the share of rubric criteria a model passes, averaged across the suite.”article, stated
“All-pass is strict: a task counts only when every criterion in its rubric passes.”article, stated
“Mean score standard error ≈ 0.009 (~1pp); all-pass standard error ≈ 2.5pp (≈2.5 tasks / 100), across re-runs”article, stated
“Cost figures throughout are estimates based on current serverless rates — Fireworks for open-source models (GLM 5.1, Kimi K2.6, DeepSeek V4 Pro)”article, stated

Outcomes

The results are strong but bounded: they are based on a 100-task slice, estimated inference costs, and a Fireworks/Harvey-authored case study. The most useful outcome is the production architecture pattern: sparse frontier advising plus domain-specific post-training, both evaluated against strict legal rubrics.

3 supporting quotes
“Harness engineering: an open-source GLM 5.1 worker self-triggers Claude Opus 4.7 as a callable advisor on sub-tasks where it improves outcomes”article, stated
“reaching 18 / 100 all-pass at $368 versus 14 / 100 for Opus end-to-end at $954.”article, stated
“mean score climbed from a 0.863 base to 0.876 with supervised fine-tuning (SFT) and 0.886 with reinforcement fine-tuning (RFT).”article, stated