AI-Powered Financial Assistant for Automated Expense Management

brex · Finance · 2023 · source Agentic: yes · promotional bias: med · source-backed · extracted with prompt 0.5.0 (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: Corporate expense management and financial compliance

Brex needed to automate expense documentation, policy guidance, and compliance review while preserving auditability and trust for sensitive financial workflows.

Constraints:

Architecture

Brex Assistant is a fintech expense automation system built on Amazon Bedrock/Claude behind Brex’s own LLM Gateway. Card, receipt, calendar, inbox, location, transaction, and policy signals feed expense memo/category/policy workflows. Application code calls the gateway through OpenAI/Anthropic-compatible clients; the gateway routes to the appropriate model/service, standardizes responses, handles errors, logs usage, and supports rate/cost controls. A second LLM compliance judge evaluates AI and human expense inputs against company-specific standards. Caching, Bedrock autoscaling/concurrency controls, built-in and domain-specific guardrails, audit trails, and customer-level disable/intercept controls support production privacy and compliance.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  brex-assistant[Brex Assistant] --> expense-context-sources[Expense context sources]
  brex-assistant --> llm-gateway[LLM Gateway]
  llm-gateway --> amazon-bedrock[Amazon Bedrock]
  llm-gateway --> model-orchestrator[Model orchestrator]
  model-orchestrator --> similarity-search[Similarity search]
  expense-context-sources --> similarity-search
  amazon-bedrock --> guardrails[Guardrails]
  llm-gateway --> semantic-cache[Semantic cache]
  brex-assistant --> compliance-judge[Compliance judge]
  compliance-judge --> expense-workflow[Expense workflow]
  llm-gateway --> audit-trail[Audit trail]
  customer-control-plane[Customer control plane] --> llm-gateway
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
brex-assistant User-facing assistant embedded in expense and finance workflows, including search-style policy Q&A and automated expense handling. expense-context-sources, llm-gateway, compliance-judge, expense-workflow
expense-context-sources Receipt data, card-network data, calendar, inbox, location, transaction details, and company policy context. brex-assistant, similarity-search
llm-gateway Central routing, standardization, logging, error handling, cost/rate-control, and model-redirection layer for AI calls. brex-assistant, amazon-bedrock, model-orchestrator, audit-trail
amazon-bedrock Enterprise GenAI platform providing Claude access, AWS security boundary, guardrails, autoscaling, concurrency controls, and knowledge-base capabilities. llm-gateway, guardrails
model-orchestrator Chooses cheaper/faster models for simple classification or keyword extraction, Claude for nuanced language, and chains traditional ML/similarity outputs into LLM interpretation. llm-gateway, similarity-search
similarity-search Finds documentation from similar past expenses to inform how the model should approach new expense scenarios. expense-context-sources, model-orchestrator
compliance-judge Second LLM process that evaluates AI- and user-generated expense inputs for completeness, clarity, correctness, and policy violations. brex-assistant, expense-workflow
expense-workflow Marks compliant expenses, pushes back for more clarity, flags anomalous/non-compliant transactions, and supports review-by-exception finance operations. brex-assistant, compliance-judge
semantic-cache Caches repeated policy answers for a period to reduce latency and model cost. llm-gateway
guardrails Bedrock/Anthropic filters plus domain-specific safeguards tuned to prevent inappropriate outputs in financial contexts. amazon-bedrock, llm-gateway
audit-trail Record of AI suggestions and actions used to trace what the AI did and why. llm-gateway
customer-control-plane Customer-level ability to disable assistant features or intercept requests for cautious accounts. llm-gateway

Data flow

When a user swipes a Brex card or asks an expense question, the assistant gathers receipt, card-network, calendar, inbox, location, transaction, and policy context. Product code calls Brex’s LLM Gateway rather than a model directly. The gateway selects or redirects the model/service, logs the request, enforces operational controls, and may route simple classification to lightweight models or nuanced policy language to Claude. Generated memos, GL codes, or justifications then pass through the same LLM compliance judge used for human inputs; passing expenses are marked compliant, while low-quality inputs trigger user pushback. Cached answers handle repeated policy questions, and all suggestions/actions remain auditable.

5 supporting quotes
“When you swipe your Brex card, it is already fetching the receipt using card network data, determining the expense category from context and writing a memo if needed using context clues from your calendar and inbox.”transcript, stated
“Instead of our application calling an AI model directly, it calls the gateway using you know either anthropic or or openAI client libraries with the base URL overridden.”transcript, stated
“The gateway then figures out which model or service should handle the request regardless of what the client actually uh specifies.”transcript, stated
“we have two processes. First is how AI generates compliance information.”transcript, stated
“This is a process powered by another LLM that weighs the user's compliance input, memos, receipts, attendees, etc. against uh a company's bar for expense justification.”transcript, stated

Why this architecture

Brex uses a gateway-centered architecture because fintech AI has to remain private, auditable, configurable by customer, and cheap enough to run at workflow scale. Bedrock/Claude gives an AWS security boundary and managed model capabilities; Brex’s gateway keeps model selection, logging, cost controls, and future model migration outside product code. The compliance judge is separate because generated expense documentation must be held to the same company-specific bar as human submissions, not trusted merely because it came from AI.

4 supporting quotes
“because Brex already runs on AWS bedrock was a natural fit. We get enterprisegrade security and our data stays within our AWS security boundary”transcript, stated
“This design gives us a lot of flexibility. We can redirect model requests from one type to another”transcript, stated
“AI isn't given a free pass. We don't assume it's always right, whether it's a human or a model. The response goes through the same judging logic.”transcript, stated
“Uh overall our architecture marries the strengths of of AWS's Genai platform with our own orchestration layer uh to deliver a secure, efficient and flexible uh assistant.”transcript, implied

Models used: Claude · GPT-4.0 · Amazon Titan models · lightweight classification models

Scale

Alternatives considered (roads not taken)

Applications calling model providers directly

Rejected because: Direct calls would spread model choice, error handling, logging, and cost/rate controls across product code instead of centralizing them.

“Instead of our application calling an AI model directly, it calls the gateway using you know either anthropic or or openAI client libraries with the base URL overridden.”transcript, stated

One large model for every assistant request

Rejected because: A single model is not optimal for simple classification, nuanced policy explanation, and chained interpretation workloads.

“one size doesn't fit all. We learned that a single LM, no matter how powerful, isn't optimal for every scenario.”transcript, stated

A pure chat interface for expense assistance

Rejected because: Usage split into simple Q&A and richer UI actions, so Brex moved assistant functionality into search with inline answers and normal results.

“we originally launched the assistant as a chat interface to help employees with expense related questions”transcript, implied
“it quickly became clear that chat wasn't the right experience.”transcript, stated

Static policy rules without external data integrations

Rejected because: Spend context often lives outside the policy rule itself, so calendar/location/transaction data improves reasoning quality.

“Most of the signal for spend uh for spend behavior exists outside our platform.”transcript, stated
“Integrating calendar, location, and transaction data allows the model to reason more like a human would, filling the gaps that static policy rules miss.”transcript, stated

Patterns

llm-as-judge (compliance-evaluation)

A second LLM evaluates human and AI-generated expense justifications against company-specific standards.

“that's where our AI compliance judge kicks in. This is a process powered by another LLM that weighs the user's compliance input, memos, receipts, attendees, etc. against uh a company's bar”transcript, stated

model-routing (llm-gateway)

Brex routes requests through a gateway that can redirect model calls and choose services independently of the client request.

“The gateway then figures out which model or service should handle the request regardless of what the client actually uh specifies.”transcript, stated

cost-aware-routing (multi-model-orchestration)

Simple classification and keyword tasks use cheaper models while complex policy explanations route to Claude.

“For straightforward tasks, we might call a cheaper, faster model. Uh, for example, a lightweight model to classify the type of request or to extract keywords.”transcript, stated

semantic-caching (cost-and-latency-control)

Repeated policy questions can reuse cached answers instead of calling the model multiple times.

“if five people ask what's my travel budget and the answer is the same. We don't need to hit the model five times. We'll reuse results for a period to save cost”transcript, stated

privacy-preserving-processing (fintech-data-boundary)

Customer financial data stays inside Brex's AWS account and is not used to retrain models.

“None of our customers data leaves uh our AWS account or is used to retrain models.”transcript, stated

observability-tracing (auditability)

The gateway logs AI usage and Brex maintains audit trails for AI suggestions and actions.

“The gateway also standardizes responses, handles errors, logs everything. This is huge for monitoring usage and controlling costs.”transcript, stated

Tradeoffs

How strict the compliance assistant should be.

Chose err on the side of caution over accepting low-quality or ambiguous justifications to maximize automation.

Rationale: Brex prioritizes compliance trust over allowing questionable expense submissions through.

“The key takeaway is that every input is judged equally. The system errors on the side of caution when quality is low.”transcript, stated

How to hide model infrastructure from product code.

Chose a custom gateway with overridden base URLs over calling each model provider directly from applications.

Rationale: The gateway allows model redirection, response standardization, error handling, logging, and cost controls in one place.

“model directly, it calls the gateway using you know either anthropic or or openAI client libraries with the base URL overridden.”transcript, stated

How much model power to use per request.

Chose task-appropriate model routing and chaining over using the largest model for all expense workflows.

Rationale: Brex reduces compute waste while still routing nuanced policy language to a stronger model.

“This orchestration ensures users get the right answer quickly without us burning compute on an oversized model every time.”transcript, stated

Which assistant interface to emphasize after launch.

Chose search-style inline AI answers plus traditional results/navigation over a standalone chat-first expense assistant.

Rationale: Real usage split between quick Q&A and richer UI actions, so search preserved flow while still exposing AI answers.

“Once we recognized that split, it made sense to move the assistance functionality into our search bar.”transcript, stated
“users can ask a question and either get an immediate answer in line or be taken directly to the right page v via intelligent search results”transcript, stated

How to reduce repeated policy-question cost and latency.

Chose cache repeated answers for a period over calling the model for every semantically repeated question.

Rationale: Repeated budget or policy questions often have the same answer, so caching avoids unnecessary model calls.

“if five people ask what's my travel budget and the answer is the same. We don't need to hit the model five times.”transcript, stated

Gotchas (what bit them)

AI-generated compliance text cannot be trusted just because AI wrote it.

Root cause: Different companies set different bars for what counts as complete and correct expense justification.

Resolution: Judge AI and human submissions with the same compliance-judge logic and push back when quality is low.

“AI isn't given a free pass. We don't assume it's always right, whether it's a human or a model. The response goes through the same judging logic.”transcript, stated

Static policy rules miss contextual signals needed for expense reasoning.

Root cause: Important spend context often lives outside the expense platform in calendars, locations, and transaction timing.

Resolution: Integrate calendar, location, and transaction data so the model can infer business context.

“Most of the signal for spend uh for spend behavior exists outside our platform.”transcript, implied

Fintech AI must be traceable after the fact.

Root cause: Compliance and audit workflows require explanations of what AI suggested or did.

Resolution: Maintain records of AI suggestions and actions as an audit trail.

“we also have a record of AI suggestions and actions an audit trail. Uh so if if an issue ever arises, we can trace back what the AI did and why.”transcript, stated

Evaluation

Brex tracks workflow automation, compliance rates, hours saved, usage, cost, and auditability through the gateway and business metrics.

Metrics: expense automation rate · hours saved · compliance rate · AI usage · cost · rate limits · audit traceability

“about three out of four expenses can be fully automated now. That means no human had to manually touch those.”transcript, stated
“We've effectively pushed compliance rates into the mid90s in terms of percentage. Now, that's a big jump from the 70% we often see when it's all manual.”transcript, stated

Outcomes

The assistant has processed production expense workflows across Brex customers, with a single large enterprise example saving roughly 300 finance-staff hours per month.

“we're seeing on the order of hundreds of thousands of hours saved every month. Uh to make it relatable, for a large for a single large enterprise, that's roughly 300 hours saved per month”transcript, stated
“finance professionals and employees waste a lot of hours on processes like typing up expense memos, attaching receipts or manually auditing transactions.”transcript, implied