At 8 a.m., a $4 million payroll is due, but an expected customer payment hasn’t arrived. Leafy International’s treasury agent spots the gap in live payment data. It checks current balances and recommends a cash sweep from an overnight deposit. It’s enough to fund payroll while keeping Leafy’s $1 million minimum cash buffer intact.
Just as the treasurer reviews the proposal, an approved, time-stamped market feed flags a material EUR/USD move after a central bank announcement. The agent connects the signal to Leafy’s upcoming euro payment, refreshes the exposure, and flags it for review. A market alert is a reason to reassess, not permission to trade.
The treasurer views the rationale, data source, and update time, and then approves or delegates within the agreed mandate. If a balance, payment status, or foreign exchange (FX) rate changes before execution, the agent checks again. This is agentic treasury: Monitoring relevant conditions, recommending next steps, and helping carry them out only when authorized.
Leafy International is fictional, but the pressures and actions are real. Treasury teams are exploring how AI can improve decisions across payments, cash, working capital, and financial risk—and how to govern these systems.
Agentic treasury has two key requirements:
Context that stays current as balances, payments, and markets move
An independent check that confirms each action is authorized before it runs.
MongoDB provides the data layer for both, keeping the agent's context fresh as conditions change, and holding the controls and audit log that decide what the agent is allowed to do.
The industry shift to AI action
Cash and liquidity optimization remain persistent challenges for treasury teams. Nearly two-thirds of people surveyed by AFP cite cash management and forecasting as a top priority, while nearly 50% say they’re concerned about liquidity and cash planning. For the first time, AI and automation also ranked among the top five priorities, cited by 30% of respondents.
Similarly, Citi’s 2026 MEA treasury survey highlights that half of those surveyed point to cash visibility and forecasting and liquidity optimization as their biggest concerns.
Interest is already turning into practice. According to Strategic Treasurer's 2025 AI in Treasury & Finance Survey, 22% of companies already use agentic AI, with 18% reporting active use within their own treasury or finance department. Beyond current use, 25% are actively testing agentic tools, 32% have experimented with them, and 72% say they understand the technology.
Adoption is early, but agentic AI is no longer hypothetical. The opportunity lies in delivering timely, consolidated context that surfaces liquidity gaps earlier. This frees treasurers to focus on judgment and exceptions rather than monitoring out-of-date dashboards.
From batch snapshots to continuous operations
Traditional treasury workflows rely on batch processing of morning balance files and end-of-day reporting. This lag exposes teams to intraday liquidity risks and unhedged FX volatility. A continuous, real-time view of cash positioning and market data enables proactive liquidity management and dynamic risk mitigation.
Treasury agents need current, decision-ready context across authorized balances, payment and receipt status, deposit terms, FX rates, and relevant events. Not every signal update calls for action. The agents reassess only when a material signal could change a decision. Freshness should match urgency since payroll cutoffs need tighter checks than overnight-surplus reviews.
A continuous operating model runs on a repeatable loop:
Sense: Gather the current context (e.g., authorized balances, payment and receipt status, market signals) with each source and update time visible.
Plan: Compare the projected cash position with what must be funded, such as payroll and the required buffer. Identify any surplus available to deploy.
Propose: Explain a specific action, its rationale, and its expected effect on cash or exposure.
Check and act: Confirm that the action is authorized and the data is fresh enough for the decision’s urgency. Then execute, request approval, or stop.
The contextual layer: 4 data capabilities an agent needs
An agent is only as trustworthy as its context: balances, payments, market signals, policy, and memory, each with its source and age visible. Four data capabilities keep that context current and useful.
1. Detect relevant changes
Relevant events can include an overdue payment, a payment-status change, or an authorized FX or news feed. After the application ingests an external update into MongoDB, change streams can notify an agent of the change. The agent then refreshes its context and reassesses. Atlas Database Triggers build on change streams and automatically run a function when a matching change occurs, such as a payment-status update.
2. Absorb new shapes of information
Suppose an ISO 20022 feed adds a remittancePurpose field. Teams can validate and map it without reshaping historical payment information. MongoDB’s flexible document model lets new payments include the field while older ones retain their shape.
With schema validation, teams can require the remittancePurpose field on every new payment and block writes that break the rules at the database level. Validation levels and actions control how strictly those rules apply, so teams can roll out enforcement gradually without rewriting historical payments.
3. Retrieve by meaning, not just keywords
Explaining a recommendation may require market events, FX trends, invoice or remittance details, and the policy governing the decision. MongoDB Vector Search retrieves by semantic meaning and can rank candidates by relevance. Automated Embedding generates embeddings inside MongoDB, reducing the need for a separate pipeline. Keeping context alongside balances and payments helps connect relevant evidence to a decision.
4. Remember with agent memory
Short-term memory tracks the current payroll run, balances, and pending approvals. Long-term memory preserves reusable context, such as payroll calendars and target buffers. Time-sensitive details can expire while useful context carries forward. Proposed actions, checks, and outcomes remain in the audit log. These are among the approaches for managing agent memory with MongoDB.
Make delegation safe by design
Dependable agentic treasury requires decision-ready context and an independent, governed check before action. Timely data does not authorize action.
The Monetary Authority of Singapore’s Safeguards for Agentic Finance at Runtime (SAFR) offers what law firm Ashurst Perkins Coie calls the first reference framework of its kind for governing AI agents in financial services at runtime. It is not a regulatory compliance checklist.
In this framework, the agent submits a governance envelope containing the proposed action, its action trace, and relevant context. Four components work through that envelope:
Agent identity: Verifies the registered agent.
Controls repository: Supplies the policy, regulatory, and delegated-authority controls that the disposition engine applies.
Disposition engine: Evaluates each proposal against those controls and decides the outcome.
Audit log: Keeps a tamper-evident, append-only record of the envelope, mandate, checks, and outcome.
In the cash sweep example, the agent first assembles the context it needs: its authority, the deposit terms, the current balance, pending payments, and the freshness of the data. If a material input is stale, the agent refreshes it or pauses before submitting the action for governance. The check returns one of four outcomes:
Auto-execute: The action is routine, within mandate, and passes all checks.
Observe: The action proceeds, but is flagged for monitoring and later review.
Escalate: The action may be appropriate, but needs an authorized approver.
Deny: The action conflicts with a hard limit, customer instruction, or restriction.
Governance data also varies in shape. Policies, delegated-authority limits, action traces, and check results differ by product, jurisdiction, and mandate. This variety suits MongoDB’s flexible document model.
An FX hedge and a cash sweep, for example, have different structures yet both belong in the same governance envelope. A document can take the shape each action needs and can change as execution unfolds. No rigid, predefined table design is required.
Figure 1. One collection, different document structures: An FX hedge and a cash sweep each carry the fields their action needs, side by side as part of the governance envelope.

Hosting the controls repository, governance envelopes, and audit log in MongoDB puts the controls alongside the data they govern. The disposition engine then decides each outcome on current data rather than a copy, and the audit log shows what the engine relied on.
Independence also matters. The agent can submit an envelope, but it should not be able to change the controls it is judged against or rewrite the audit log. An insert-only audit role is a practical baseline against changes by the application. For higher assurance, safeguards such as application-level hash chaining or replication to immutable storage add independent tamper evidence.
Figure 2. From real-time data to governed action: One data layer keeps the agent’s context current, and an independent check decides whether each proposal proceeds.

Governed agents across treasury
The same governed approach applies to other recurring decisions:
Invest surplus cash: Once obligations are covered, the agent can propose an overnight placement with an approved institution within concentration and maturity limits. The agent can compare options—such as dynamic discounting or supply-chain finance—on effective return, funding cost, supplier participation, and fees, and not just the headline rate.
Hedge a foreign-currency payable: Leafy owes €2 million in 60 days, but holds U.S. dollars. A material FX move or credible news-sentiment shift prompts a fresh exposure check rather than an automatic trade. If policy calls for hedging 60% to 90% of the exposure, the agent could propose buying €1.5 million through a forward contract (75% of the exposure). The proposal shows the source, time stamp, and rationale for the treasurer's review.
Pool cash across subsidiaries: Before proposing an intercompany transfer, the agent checks the authorized route, timing, local restrictions, and cutoffs. If the route is not permitted or the information is stale, the agent pauses or blocks the proposal and explains why.
Start small, build confidence
Agentic AI in treasury doesn’t have to begin with autonomous execution. Choose one recurring, measurable use case, such as monitoring liquidity ahead of payroll. Compare recommendations with outcomes, strengthen the data and controls, and learn from implementation. Expand to approval-based actions, then automate only routine decisions that stay within mandate.
The next 8 a.m. liquidity surprise is coming. Have your treasury’s answer ready before the surprise becomes a problem.