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:
- Expense policies differ across companies
- Financial data must remain private and auditable
- The system needs to balance automation speed with conservative compliance decisions
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
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
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
Models used: Claude · GPT-4.0 · Amazon Titan models · lightweight classification models
Scale
- The assistant launched in early access in summer 2023 and opened to all customers in January 2024.“We launched this almost two years ago uh in early access in the summer 2023 and then opened it up to all customers in January of 2024.”transcript, stated
- Brex reports roughly 75% of expenses can be fully automated, which shifts finance work toward exception review.“about three out of four expenses can be fully automated now. That means no human had to manually touch those.”transcript, stated
- The system saves hundreds of thousands of hours monthly across customers, with one large-enterprise example around 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
- Compliance improved from manual baselines near 70% into the mid-90s, with some top customers near 99% employee compliance.“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“some of our our top customers have nearly 99% employee compliance”transcript, stated
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.
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.
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.
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.
Patterns
llm-as-judge (compliance-evaluation)
A second LLM evaluates human and AI-generated expense justifications against company-specific standards.
model-routing (llm-gateway)
Brex routes requests through a gateway that can redirect model calls and choose services independently of the client request.
cost-aware-routing (multi-model-orchestration)
Simple classification and keyword tasks use cheaper models while complex policy explanations route to Claude.
semantic-caching (cost-and-latency-control)
Repeated policy questions can reuse cached answers instead of calling the model multiple times.
privacy-preserving-processing (fintech-data-boundary)
Customer financial data stays inside Brex's AWS account and is not used to retrain models.
observability-tracing (auditability)
The gateway logs AI usage and Brex maintains audit trails for AI suggestions and actions.
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.
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.
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.
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.
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.
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.
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.
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.
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
Outcomes
- About three out of four expenses can be fully automated.
- Brex reports hundreds of thousands of hours saved monthly across customers.
- Compliance rates moved from roughly 70% manual baselines into the mid-90s.
The assistant has processed production expense workflows across Brex customers, with a single large enterprise example saving roughly 300 finance-staff hours per month.