Financial Close & GL Variance Investigation
Oracle Fusion General Ledger · EBS GL
The business problem
A controller asks, “Why did operating expenses rise 18% this month?” Answering it means comparing periods, isolating abnormal accounts and drilling from GL balances to journals and subledger transactions.
Proposed solution
The crew decides what to investigate. It compares periods, isolates abnormal accounts, and drills from GL balances to journals and subledger transactions, correlating cost centers and suppliers.
It answers with evidence, for example: “Marketing rose $286K; about 74% came from three journals for the annual customer conference; no unusual manual-journal activity.” It then drafts flux commentary and proposed adjusting journals for review.
Workflow
- Collect General-Ledger Balances
- Compare Against Prior Period and Budget
- Detect Significant Variances
- Drill Down to Journals and Subledgers
- Investigate Root Cause and Reconcile
- Prepare Draft Adjustments for Review
- Obtain Controller Review
- Record Audit Trail
Agents and responsibilities
- Variance Detection: actual vs. prior period, budget and forecast against materiality thresholds.
- Drill-down: GL to journals to subledger: AP, AR, FA, payroll.
- Explanation: RAG over accounting policies, the close checklist and prior commentary.
- Reconciliation: intercompany and suspense accounts.
- Journal Proposal: draft adjusting entries only, never posted by an agent.
Oracle ERP integration
Oracle objects: Ledgers, period balances, journal batches, headers and lines, chart-of-accounts segments and subledger accounting entries; E-Business Suite GL_BALANCES and GL_JE_HEADERS/LINES.
Shared Oracle integration: a Python MCP server exposing typed read tools (Fusion Cloud REST resources, BI Publisher/OTBI reports, read-only SQL views for E-Business Suite) and a small set of write tools that execute only after human approval.
Technology stack
Project stack: Claude Agent SDK (subagents for drill-down) · CrewAI + MCP · Gemini and GPT runtimes · read-only SQL and OTBI tools
- Orchestration: CrewAI crews define role-based agents, tasks and hand-offs. Oracle tools attach through CrewAI MCP server adapters, so every agent calls the same governed tool layer.
- Agent runtimes: Claude Agent SDK with Claude is the primary build and reasoning runtime. It uses subagents for deep investigation, MCP for tool access, and pre-tool-use hooks that block any ERP write lacking an approval token. The same agents run on Google ADK with Gemini and OpenAI Agents SDK with GPT through a common model-adapter interface, switched by configuration.
- Engineering: Python, Pydantic-validated agent outputs, a pytest scenario-evaluation harness comparing Claude, Gemini and GPT on accuracy, latency and cost, OpenTelemetry tracing and Docker, built in VS Code with Claude Code.
Controls and safeguards
- SQL runs only against approved read-only views with row limits.
- All figures are computed by SQL, never by the model, and each explanation cites its journals.
- Proposed journals pass through standard GL approval.
- Grounding and control (shared platform): RAG over policies, contracts and approval matrices in Oracle Database 23ai AI Vector Search; a deterministic rule engine for tolerances, thresholds and SoD; an immutable audit log of evidence, tool calls, model, approver and outcome.
Validation plan
Scope: A ledger seeded with accrual misses, misclassifications, FX movements and intercompany mismatches.
Targets
Reference build in progress. The figures below are validation targets for the build, not measured results.
- 95%+ Seeded variances found
- 85%+ Correct root cause