Scaling AI Agents for Financial Advisory Services with Compliance and Observability

range · Finance · 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: Regulated financial advisory agents

Range needed to scale AI financial-advice agents in production while meeting SEC auditability requirements, maintaining reliability despite provider outages, keeping latency low, and continuously judging whether generated advice was grounded, compliant, and useful.

Constraints:

Architecture

Range built a Mastra-based production agent platform with Rye as the flagship advisory agent, specialized onboarding and support agents, deterministic document workflows, sub-agent executions, custom logging/tracing, resilient model failover, and asynchronous post-generation LLM-as-judge checks. The system combines workflows for predictable document parsing with agents for open-ended financial advice and tool use.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  A["Range users"] --> B["Rye advisory agent"]
  A --> C["Onboarding workflows"]
  A --> D["Support diagnostic agents"]
  E["Mastra agent platform"] --> B
  E --> C
  E --> D
  E --> F["Logging and tracing system"]
  B --> G["Tax projection system"]
  B --> H["Resilient language model"]
  B --> I["Post-generation analysis"]
  C --> J["Structured output extraction"]
  C --> I
  H --> I
  F --> I
  I --> K["Human advisors and support staff"]
  D --> K
  K --> A
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Range users Customers asking financial planning, tax, onboarding, or support questions. Rye advisory agent, Onboarding workflows, Support diagnostic agents
Mastra agent platform Framework layer composing agents, workflows, sub-agent executions, hooks, and asynchronous checks. Rye advisory agent, Onboarding workflows, Support diagnostic agents, Logging and tracing system
Rye advisory agent Flagship AI financial advisor that uses Range's internal financial-advice technology and tools. Tax projection system, Resilient language model, Post-generation analysis
Tax projection system Internal tool with codified state and federal tax rules used by Rye for tax-planning questions. Rye advisory agent
Onboarding workflows Structured document parsing and data-collection workflows for customer onboarding. Structured output extraction, Post-generation analysis
Structured output extraction Document extraction stage that converts document content into expected formats. Onboarding workflows
Resilient language model Provider and model failover abstraction for outages, capacity constraints, and model-specific routing. Rye advisory agent, Post-generation analysis
Logging and tracing system Compliance and observability layer capturing metadata, thinking traces, steps, tool calls, metrics, archiving, and execution traces. Post-generation analysis
Post-generation analysis Asynchronous LLM-as-judge and policy pipeline for grounding, sentiment, corrections, compliance, and agent-specific quality metrics. Human advisors and support staff
Support diagnostic agents Internal agents that help support staff diagnose customer issues. Human advisors and support staff
Human advisors and support staff Range staff assisted by internal agents and responsible for regulated advisory and support operations. Range users

Data flow

Users ask Rye for financial advice such as tax planning. Rye calls Range's internal financial tools, including a tax projection system backed by codified state and federal tax rules. Other onboarding workflows process documents through structured extraction steps, while execution hooks log steps, tool calls, latency, success/failure, tokens, and traces. After generation, asynchronous judge pipelines evaluate grounding, sentiment, corrections, and compliance policies without blocking the user-facing response.

3 supporting quotes
“Rye will actually uh execute a tax projection um using our tax projection system that we built internally.”transcript, stated
“we have logging for things, uh, for sub-agent execution. Um, every single, you know, step starts, completes, tool call starts, stops.”transcript, stated
“it allows us to kick off this like asynchronous process as well to do this compliance and quality checks, um, in the background.”transcript, stated

Why this architecture

Range separates workflows from agents because deterministic document parsing benefits from predictable steps and latency, while open-ended financial advice benefits from agentic tool use. Compliance and observability are first-class because regulated advice requires explainability, and resilient model routing is needed because provider outages directly affect trust in financial conversations.

3 supporting quotes
“you really had two options in the early days. You had workflows or you had agents.”transcript, stated
“We are a uh SEC-registered uh investment advisor and what that means is there are certain uh SEC regulations we have to adhere to”transcript, stated
“we wanted to make sure that, again, our system was very resilient to, you know, outages and errors.”transcript, stated

Models used: Rye AI agent · LLM-as-judge · Claude Opus · Gemini Pro · custom models · foundation models

Scale

Alternatives considered (roads not taken)

Use agents for every process

Rejected because: Range found workflows more appropriate for deterministic, latency-sensitive document parsing and similar structured processes.

“you really had two options in the early days. You had workflows or you had agents.”transcript, stated

Naive failover to Bedrock

Rejected because: If everyone fails over to the same backup provider during an Anthropic incident, the backup can suffer cascading outages.

“Turns out everybody's also failing over to Bedrock, and so you kind of have this like cascading sort of outages.”transcript, stated

Keep custom model training in workflow steps

Rejected because: As foundation models improved and workflows became more agentic, newer model capability ate the custom scaffolding.

“we I think the the model capability's getting better um sort of eat your scaffolding.”transcript, stated

OCR plus Textract plus LLM for document parsing

Rejected because: Better models let Range skip the OCR step in many cases and work more directly with document images.

“we found we were able to skip that OCR step in a lot of cases now.”transcript, stated

Patterns

tool-use-orchestration (orchestration)

Rye uses existing financial tools such as tax projection systems, while other agents and workflows call document parsing and support-diagnostic capabilities.

“Rye will actually uh execute a tax projection um using our tax projection system that we built internally.”transcript, stated
“We've codified all 50 uh states and federal uh tax codes as well.”transcript, stated

observability-tracing (observability)

Range hooks into the execution lifecycle to record step, tool-call, latency, success, failure, token, metadata, and trace information for both debugging and regulatory explainability.

“making sure we captured all of the different uh metadata and thinking traces uh across every single element tool call.”transcript, stated
“Um, we have metrics around latency, successes, failures, token usage.”transcript, stated

fallback-degradation (reliability)

Range built a resilient language model abstraction that can route around provider or model failures while controlling failover behavior to avoid cascading outages.

“we built something called the resilient language model.”transcript, stated
“Um, this allows us to do failover in a couple different ways. You can do things like failover from Anthropic API to Bedrock.”transcript, stated

llm-as-judge (evaluation)

Range uses asynchronous post-generation LLM judging to evaluate advice and agent outputs against grounding, sentiment, correction, compliance, and policy metrics.

“we use LLM as a judge to evaluate content after it's being evaluated across a bunch of different metrics”transcript, stated
“Some of the things just like at a really high level that we're checking for are around grounding rate.”transcript, stated

safety-policy-enforcement (governance)

Range encodes regulatory policies and required financial disclosures into post-generation compliance checks.

“a variety of different compliance and policy checks, um, things like as a SEC registered RIA, we have to think about things like, um, fiduciary standard”transcript, stated
“for certain type of responses you need that uh, content in the actual response as well.”transcript, stated

structured-output-contract (data)

Range's onboarding pipeline converts uploaded documents into specific structured formats after extraction.

“taking that text, passing it to an LLM, having it massage it and and use structured outputs to put in a specific format.”transcript, stated

Tradeoffs

Workflow versus agent abstraction

Chose workflows for deterministic document parsing and agents for open-ended advisory work over using agents everywhere.

Rationale: Workflows give predictable latency and structure, while agents fit open-ended tasks with tool use and less rigid execution paths.

“that's like a four-step process. You might, you know, pre-process some documents, classify them, extract the information from them, and then validate”transcript, stated
“for agents, you want to use when the task is open-ended for non-super latency-critical applications”transcript, stated

Build resilient model routing

Chose controlled failover across providers and models over simple Anthropic-to-Bedrock failover.

Rationale: Simple failover can concentrate load on the same backup and create cascading outages.

“You can do things like failover from Anthropic API to Bedrock. You can [clears throat] failover from Claude Opus 4/6 to, you know, Gemini 3.1 Pro.”transcript, stated
“you think you're being clever by saying like, "Oh, let's just failover to Bedrock." Turns out everybody's also failing over to Bedrock”transcript, stated

Post-generation evaluation

Chose asynchronous LLM-as-judge quality and compliance checks over blocking user-facing responses on all evaluation work.

Rationale: The asynchronous check gives live quality and compliance visibility without adding latency to the main response path.

“it gives us like a live kind of pulse on how our system is performing and what's working or if we need to do things like, you know, escalate to human”transcript, stated
“allows us to kick off this like asynchronous process as well to do this compliance and quality checks, um, in the background.”transcript, stated

Foundation models over custom workflow models

Chose newer foundation-model capabilities and AI-engineering abstractions over continuing custom model training for workflow injection points.

Rationale: Improved model capability reduced the need for custom scaffolding and moved effort up the stack.

“We were actually doing training on our own models to like inject in certain parts of that workflow to like optimize for latency.”transcript, stated
“I think the the model capability's getting better um sort of eat your scaffolding.”transcript, stated

Gotchas (what bit them)

Compliance logging requirements shape the architecture, not just the audit trail.

Root cause: SEC obligations require retention, auditability, metadata, and reasoning traces across agent execution.

Resolution: Range built custom logging, tracing, archiving, and lifecycle hooks around agents and workflows.

“there are certain uh SEC regulations we have to adhere to and from things around data retention and and so forth.”transcript, stated
“we needed to think about archiving, um, for, you know, to make sure we're adhering to the various regulator policies”transcript, stated

Backup-provider failover can cause cascading outages.

Root cause: Many systems fail over to the same backup service when the primary provider has capacity problems.

Resolution: Range built controlled failover through a resilient language model abstraction instead of a single naive backup route.

“Turns out everybody's also failing over to Bedrock, and so you kind of have this like cascading sort of outages.”transcript, stated
“you want to have control over how you're failing over, um, and really make sure that your models can be resilient.”transcript, stated

The wrong abstraction can add latency and unpredictability.

Root cause: Some tasks are structured workflows, while others are open-ended enough to justify agents.

Resolution: Range uses workflows for deterministic document parsing and agents where open-ended reasoning or tool use is needed.

“you really had two options in the early days. You had workflows or you had agents.”transcript, stated
“We over-indexed actually pretty heavily on workflows for some of the reasons I mentioned earlier, things around latency and so forth.”transcript, stated

Each production agent needs a different definition of quality.

Root cause: Tax advice, investment-news summaries, onboarding, and support diagnostics have different correctness and compliance criteria.

Resolution: Range built a post-generation pipeline where teams can plug in agent-specific policies and live metrics.

“the post-generation analysis of determining what is good is very different for a piece of financial advice that's like trying to make a tax projection for you versus something that's doing like a summary of like investment news”transcript, stated
“we have different aspects. Um one thing that maybe is not clear is that we, you know, we have over 15 agents right now running in production.”transcript, stated

Evaluation

Range evaluates financial-agent behavior after generation with LLM-as-judge and policy-specific checks, tracking grounding, sentiment, corrections, compliance policies, disclosures, latency, success, failure, token usage, and live metrics per agent.

Metrics: Grounding rate · User sentiment · Missing data or user corrections · Compliance and policy checks · Latency · Successes and failures · Token usage · Agent-specific real-time quality metrics

3 supporting quotes
“Some of the things just like at a really high level that we're checking for are around grounding rate.”transcript, stated
“Um, we have metrics around latency, successes, failures, token usage.”transcript, stated
“having like a live view of what that, you know, the live view of the metrics and what how that looks and is behaving in real time is has actually been very helpful.”transcript, stated

Outcomes

Range reports more than 15 production agents, about 25 technical staff building agents, codified tax logic for all 50 states plus federal rules, and production quality metrics monitored in real time.

3 supporting quotes
“we have over 15 agents right now running in production.”transcript, stated
“One interesting thing, you know, when as it relates to sort of people building at Range, we've actually been developing a lot of developer technology for um non-technical folks to contribute code.”transcript, stated
“we found we were able to skip that OCR step in a lot of cases now.”transcript, stated