Much of the recent momentum around generative AI has focused on making us more productive, using natural language to ask better questions, retrieve better answers, and automate individual tasks. The dominant pattern has been the intelligent chatbot: retrieval-augmented, context-aware, and responsive on demand.
While these systems have expanded into increasingly sophisticated workflows spanning HR, customer service, travel, and e-commerce, they still rely on a fundamental assumption: a human must initiate the interaction.
The next progression is fully autonomous agentic systems, platforms that continuously monitor data, reason over changing conditions, invoke tools, and make decisions in real time, without waiting for a prompt, without a human initiating the interaction.
In this article, we walk through one such system: an always-on autonomous risk platform in which agents continuously evaluate contracts and market conditions, coordinate analysis through tools, and generate timely risk insights without direct human interaction. The platform brings together Azure Kubernetes Service, Microsoft Foundry, and Azure DocumentDB.

The full implementation is available on GitHub: jonathanscholtes/contract-risk-mcp-foundry
The repository includes:
- Deployment scripts
- MCP tool servers
- Agent workflows
- Kubernetes manifests and Helm charts
- Observability configuration
Design Goals
The platform is built around a small set of explicit design goals:
- Continuous execution — no user prompts required
- Event-driven workflows — react to real-world changes
- Clear separation of concerns — reasoning vs execution vs state
- Deterministic computation — predictable risk calculations
- Auditability and replayability — explainable agent decisions
- Production-grade observability — metrics, logs, and traces
These goals directly shape the service choices and system boundaries described below.
High-Level Architecture
At a high level, the platform separates infrastructure execution, agent reasoning, and persistent state.
Core services
- Azure Kubernetes Service (AKS) — execution, orchestration, and scaling
- Microsoft Foundry — autonomous agent reasoning and coordination
- Azure DocumentDB — system of record and agent memory
- RabbitMQ — asynchronous job queue
- MCP (Model Context Protocol) — structured tool access

This separation allows each layer to evolve independently while keeping responsibilities explicit and observable.
Building Governed Autonomous Systems on Azure
Where agent autonomy is bounded by deterministic execution, explicit tooling, and full observability.
Modern autonomous systems require more than raw compute. They require governed autonomy, where agents operate independently, but within clear operational, security, and observability boundaries.
On Azure, these requirements map cleanly to three complementary layers: AKS for execution and orchestration, Microsoft Foundry for agent reasoning and governance, and Azure DocumentDB for durable state and memory. Together, they form a scalable foundation for event-driven agentic systems operating in regulated and high-risk domains.
AKS as the Execution and Orchestration Layer
AKS serves as the execution backbone for autonomous and event-driven workloads. It provides a deterministic environment for compute, messaging, and integration services, with strong isolation through namespaces, node pools, identity boundaries, and network policies.
Deterministic workloads such as schedulers, risk workers, and MCP services run within the cluster, while scaling is handled independently using queue depth and autoscaling policies. This ensures predictable behavior even as workload intensity fluctuates.
AKS is also the natural home for Model Context Protocol (MCP) services. By hosting MCP endpoints inside the cluster, the platform exposes controlled capabilities to agents while enforcing authentication, authorization, rate limits, and network controls.
Microsoft Foundry: Managing Models, Agents, and Reasoning
While AKS handles execution, Microsoft Foundry introduces structure and governance to reasoning itself. Foundry manages agent lifecycles, models, and execution context, providing observability and policy enforcement out of the box.
Agents encapsulate focused responsibilities, such as risk evaluation, market interpretation, or workflow coordination, and are deployed with identity, telemetry, and governance enabled by default.
A key capability of Foundry is native tool integration. Agents securely invoke MCP services hosted on AKS to retrieve data, submit jobs, and validate decisions. Every tool call and outcome is traced, making autonomous behavior observable and auditable.
Azure DocumentDB: Flexible, Scalable State for Agents
Autonomous systems are inherently stateful. Agents require durable memory, historical context, intermediate results, and schemas that evolve as workflows mature.
Azure DocumentDB provides a managed, schema-flexible document store well suited to these requirements. Contracts, market snapshots, risk results, and agent decisions are stored as documents, enabling replayability and auditability.
MongoDB compatibility allows teams to reuse existing drivers and tooling, while indexing and vector search support efficient retrieval of both structured state and semantic context, forming the foundation for advanced agent memory and retrieval-augmented reasoning.
Deployment Overview
Deployment is fully automated using scripts and infrastructure-as-code, currently implemented with Bicep and PowerShell.
.\deploy.ps1 `
-Subscription 'YOUR_SUBSCRIPTION' `
-Location 'eastus2' `
-UserObjectId 'YOUR_USER_OBJECT_ID' [optional for admin access to AKS and related services in DEMO/DEV Environments]
The deployment process:
- Provisions AKS, DocumentDB, and supporting resources
- Builds and pushes container images
- Deploys MCP servers and workers
- Deploys agents to Microsoft Foundry with Tools to MCP servers
- Configures observability
⚠️ Please note that deployment may take 30-45 minutes.
Real-Time System Observability
Deterministic risk calculations run on AKS, where Prometheus and Grafana provide visibility into execution, queue depth, and scaling behavior.
Microsoft Foundry complements this with built-in agent observability, allowing inspection of reasoning paths, tool usage, and execution timelines.
System Execution
Once the deployment is complete the service endpoints will be displayed, included the Grafana endpoint.
=== Service Endpoints ===
Grafana: http://<grafana-endpoint>
MCP Contracts: http://<mcp-contracts-endpoint>
MCP Risk: http://<mcp-risk-endpoint>
MCP Market: http://<mcp-market-endpoint>
Navigate to Grafana where the Contract Risk Operations Center - Enhanced Dashboard is already deployed.

This dashboard provides real-time visibility into both risk exposure and system behavior. It combines portfolio-level risk metrics with execution signals from the autonomous platform, making it possible to observe not just what decisions were made, but how and when they were produced.
- Portfolio risk signals (FX VaR, IR DV01, breach counts)
- Asynchronous job activity and completion rates
- Risk calculation latency (p50 / p95)
- Agent-generated outputs (risk memos)
- Contract and query activity by type
From this point forward, aside from initial data loading, the system operates autonomously. Agents determine which contracts to evaluate, when to execute risk calculations, and when to record or alert on threshold breaches and market shocks.
Agent Observability
With the system running autonomously, visibility into agent behavior becomes critical. Microsoft Foundry Control Plane provides a unified interface for observing and governing both models and agents.
Through Foundry’s observability tools, it is possible to:
- Inspect individual agent executions
- Review tool calls and decision paths
- Trace execution timelines end-to-end
- Correlate agent activity with downstream system effects
The following is an example output from the MarketShockAnalyst agent conversational Trace during a detected market volatility event:
Recommendations
-
Hedging Actions:
- Execute protective hedging strategies across elevated VaR contracts.
- Specifically prioritize EURUSD and USDJPY positions due to severe sensitivity.
-
Position Adjustments:
- For contracts nearing maturity (e.g., ctr-fx-011 and ctr-fx-005), ensure preemptive termination or renegotiation if feasible.
-
Risk Memos & Continuous Monitoring:
- Draft immediate risk memos for all affected contracts to notify counterparties and internal audit teams.
- Schedule daily sensitivity analysis until market stabilizes.
-
Emergency Threshold Activation:
- Contracts exceeding $90,000 VaR should be flagged for immediate position reviews or escalation to senior portfolio managers.
In addition, the platform provides full visibility into every tool invocation made by each agent through Microsoft Foundry’s built-in observability.
For each tool call, Foundry captures:
- The tool name
- The input arguments provided by the agent
- The structured output returned by the system
- Execution status and correlation identifiers
For example, when an agent submits an FX VaR calculation, the invocation is recorded end-to-end, including the contract identifier, risk parameters, and the resulting job submission metadata. This makes it possible to trace exactly which decision led to which computation, and how that computation progressed through the system.
This level of traceability ensures that autonomous decisions remain explainable, auditable, and operationally actionable.
Conclusion
This article explored the architecture and workflows behind an always-on autonomous agentic risk platform.
Rather than relying on prompt-driven interaction, the system treats autonomy as a first-class design principle. Agents are invoked by events, coordinate structured tool calls, and generate auditable, explainable decisions in real time.
While the example focuses on financial risk monitoring, the same architectural patterns extend to any domain that demands continuous evaluation, deterministic execution, and accountable decision-making from compliance and operations to monitoring, control systems, and beyond.

Leave a Reply