Rapid Integration of Advanced AI Models through Modular Architecture and Workflow Orchestration

harvey · Legal · 2025 · 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 platform model integration and workflow orchestration

Harvey needed to translate OpenAI's new Deep Research capability into a secure, reliable legal AI product quickly, despite sparse documentation, long-running streamed API behavior, and compatibility requirements with Harvey's workflow and transparency systems.

Constraints:

Architecture

Harvey integrated Deep Research through its AI-native platform architecture. A modular Workflow Engine composes model systems and agent behavior from low-code AI building blocks; thinking states expose plans, intermediate results, and user interventions; the citation engine incorporates Deep Research URL citations; and engineers used AI-assisted coding with full streamed-output logs in pydantic and JSON formats as context for humans and coding assistants. This let Harvey incorporate Deep Research less than 12 hours after OpenAI's API release.

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

flowchart LR
  A["Deep Research API"] --> B["Streamed API output logs"]
  B --> C["AI coding assistant"]
  C --> D["Engineering iteration loop"]
  D --> E["Workflow Engine"]
  A --> E
  E --> F["AI building blocks"]
  E --> G["Thinking states"]
  E --> H["Citation engine"]
  E --> I["Harvey product surfaces"]
  G --> J["Harvey users"]
  H --> J
  I --> J
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Deep Research API New OpenAI capability integrated into Harvey. Streamed API output logs, Workflow Engine
Streamed API output logs Pydantic and JSON event dumps used as development context. Deep Research API, AI coding assistant, Engineering iteration loop
AI coding assistant Assistant used by engineers to iterate on integration code. Streamed API output logs, Engineering iteration loop
Engineering iteration loop Human-led loop that explores the API and adapts it into Harvey's internal frameworks. AI coding assistant, Streamed API output logs, Workflow Engine
Workflow Engine Modular framework for composing model systems and orchestrating agent behavior. Deep Research API, AI building blocks, Thinking states, Citation engine, Harvey product surfaces
AI building blocks Low-code composable AI primitives sequenced by developers or called as tools by agents. Workflow Engine
Thinking states User-visible model reasoning/action states for oversight and intervention. Workflow Engine, Harvey users
Citation engine Traceability layer that incorporates Deep Research URL citations. Workflow Engine, Harvey users
Harvey product surfaces Workflows, Workflow Builder, and future unified workspace interfaces. Workflow Engine, Harvey users
Harvey users Legal professionals who evaluate, intervene, and verify workflow steps. Thinking states, Citation engine, Harvey product surfaces

Data flow

The Deep Research API emits long-running streamed events. Engineers dump those events into pydantic and JSON logs, use them as shared context for humans and AI coding assistants, implement compatible Workflow Engine blocks and thinking states, pass Deep Research actions through Harvey's orchestration layer, and attach Deep Research URL citations into Harvey's citation system so workflow steps can be traced and verified.

4 supporting quotes
“less than 12 hours after it was released by OpenAI.”article, stated
“Streaming mode for the API was a long-running operation with 20+ dynamic output types”article, stated
“This was used as context for both humans and AI tools to understand the API format and write code for it.”article, stated
“We successfully incorporated the URL citations produced by Deep Research into our citation system”article, stated

Why this architecture

Harvey could integrate a new model capability quickly because its platform had already invested in modular AI-native primitives: Workflow Engine orchestration, composable building blocks, thinking states, citations, and AI-assisted development practices. Those abstractions turned a brand-new API into another tool/workflow component rather than a one-off product rewrite.

3 supporting quotes
“Harvey is purpose-built for complex model systems and agents.”article, stated
“Underlying each of them is a modular and extensible framework for composing model systems and orchestrating agent behavior.”article, stated
“These blocks can be sequenced together by a developer or, in an agentic system, called as tools”article, stated

Models used: OpenAI Deep Research · AI-assisted coding tools

Scale

Alternatives considered (roads not taken)

Wait for stable docs and broad LLM knowledge before integrating

Rejected because: Harvey wanted to understand and use the API immediately despite little documentation.

“Deep Research was brand new and not part of base LLM knowledge, nor was there much documentation online at the time”article, stated

Treat Deep Research as an isolated feature

Rejected because: The integration needed compatibility with Workflow Engine and thinking states.

“We wanted to make the code compatible with our internal product frameworks, such as the Workflow Engine and thinking states”article, stated

Hide model reasoning and intermediate work from users

Rejected because: Harvey treats transparency and user intervention as core legal-workflow requirements.

“we provide users with visibility into an agent’s plan and how decisions are made with the user in the loop.”article, stated

Patterns

tool-use-orchestration (orchestration)

The Workflow Engine lets model systems compose blocks and lets agents call building blocks as tools.

“These blocks can be sequenced together by a developer or, in an agentic system, called as tools to create and execute end-to-end workflows for a particular legal task.”article, stated

context-engineering (context)

Engineers dumped streamed API outputs into pydantic and JSON logs as context for humans and AI coding tools.

“This was used as context for both humans and AI tools to understand the API format and write code for it.”article, stated

human-in-the-loop-gate (workflow)

Thinking states let users follow, evaluate, intervene, tweak parameters, and rerun actions.

“* Intervene at any step—adding context, tweaking parameters, or rerunning actions—to course-correct and ensure the final output matches their intent.”article, stated

observability-tracing (trust)

Harvey incorporated Deep Research URL citations into its citation system so workflow steps could be traced and verified.

“We successfully incorporated the URL citations produced by Deep Research into our citation system, so every step of the workflow can be traced and verified. This is essential for trust and verification in legal applications and also streamlines our development process.”article, stated

Tradeoffs

Build on modular platform primitives.

Chose Workflow Engine and composable AI building blocks over One-off Deep Research integration.

Rationale: The modular architecture reduced development time and minimized regression risk.

“reducing overall development time, increasing flexibility, and minimizing the risk of regression elsewhere in the system.”article, stated

Expose thinking states to users.

Chose Visible plans, intermediate results, and user interventions over Opaque long-running model execution.

Rationale: Legal users need to evaluate intermediate work and course-correct before final output.

“* Evaluate intermediate results in an easy-to-ingest format.”article, stated
“* Follow along with real-time context about what the models are thinking as they work.”article, stated

Use AI-assisted development with explicit API context.

Chose Engineer-facilitated AI coding loop grounded in event logs over Manual integration without AI tools or relying on model prior knowledge.

Rationale: The API was new, so the coding assistant needed concrete streamed-output context.

“In this scenario, we found it most effective for an engineer to facilitate an iteration loop with an AI coding assistant.”article, stated

Gotchas (what bit them)

New AI APIs may be absent from model knowledge and documentation.

Root cause: Deep Research had just launched, so base LLMs and online docs did not fully describe it.

Resolution: Use full streamed-output logs as context for humans and AI coding assistants.

“Deep Research was brand new and not part of base LLM knowledge, nor was there much documentation online at the time”article, stated
“This was used as context for both humans and AI tools to understand the API format and write code for it.”article, stated

Streaming APIs can hide complex dynamic behavior.

Root cause: The streaming mode was long-running and had more than 20 output types.

Resolution: Explore event logs iteratively and adapt them into Harvey's Workflow Engine and thinking states.

“Streaming mode for the API was a long-running operation with 20+ dynamic output types, which would need multiple rounds of iteration and exploration”article, stated

Legal AI users need verification, not just generated answers.

Root cause: Complex legal work requires trust and auditability.

Resolution: Incorporate URL citations and thinking states so each step can be traced, verified, and corrected.

“This is essential for trust and verification in legal applications and also streamlines our development process.”article, stated

Evaluation

Harvey's reported validation centers on integration readiness: event-log exploration, compatibility with internal Workflow Engine/thinking states, successful citation incorporation, internal testing, and planned early access.

Metrics: Less than 12-hour integration time · 20+ dynamic output types handled · URL citations incorporated · Internal testing · Early access readiness

3 supporting quotes
“less than 12 hours after it was released by OpenAI.”article, stated
“We successfully incorporated the URL citations produced by Deep Research into our citation system, so every step of the workflow can be traced and verified.”article, stated
“This feature is currently undergoing internal testing and will be available more broadly soon, starting with an early access period.”article, stated

Outcomes

The source reports a less-than-12-hour integration, 20+ dynamic streaming output types, multiple product surfaces under Workflow Engine, and a staged release from internal testing to early access.

3 supporting quotes
“less than 12 hours after it was released by OpenAI.”article, stated
“We successfully incorporated the URL citations produced by Deep Research into our citation system, so every step of the workflow can be traced and verified.”article, stated
“Building Deep Research is one major stride towards that vision, expanding Harvey’s AI capabilities towards increasingly complex and reliable”article, stated