DEV Community

Vedant Sonawane
Vedant Sonawane

Posted on AI-assisted

How We Built FinSentry: Autonomous Multi-Agent Cloud Cost Optimization in Discord

The $200k/Year Cloud Money Pit

Every engineering team that scales on AWS shares the same problem: staging and ephemeral environments quietly bleed budget.

Developers spin up Kubernetes node groups for testing, unattached gp3 storage disks sit idle with zero IOPS, and oversized staging databases run uninterrupted over weekends. The problem isn't lack of visibility—it's that engineers live in team chat (Discord/Slack), not in AWS Cost Explorer. By the time finance notices at month-end, thousands of dollars are already gone.

For the Flip the Switch Hackathon, we built FinSentry: a collaborative multi-agent FinOps unit that operates directly inside engineering channels to detect anomalies, draft Infrastructure-as-Code remediations, and execute cost reductions in real time.


The Architecture: A Checks-and-Balances Swarm

Automating cloud infrastructure changes is high-risk. A single hallucinating bot could terminate a production disk or downsize a cluster during high-traffic load.

To solve this, FinSentry implements a four-agent checks-and-balances pipeline built on Switch:

  1. @auditor (Anomaly Detection & Cost Intelligence):
    Monitors cloud billing telemetry against historical baselines. When a non-production environment spikes (e.g., +$18,400/month above baseline), Auditor alerts the team channel and triggers an automated investigation.

  2. @metrics (Cloud Telemetry & Utilization Analysis):
    Queries infrastructure metrics across CloudWatch and Datadog. It filters out active workloads and identifies unattached resources (0-IOPS storage volumes, under-utilized node pools, oversized instance families).

  3. @coder (IaC & Guardrail Enforcement):
    Drafts automated Terraform changes and enforces safety policies: every disk scheduled for cleanup must have an automated backup snapshot created before termination. Coder renders a structured FinOps Approval Card directly in chat.

  4. @dev (Workload & Release Validation):
    Acts as the advocate for application stability. Audits cluster memory/CPU requests and verifies that downsizing the cluster maintains a >40% headroom buffer—guaranteeing zero application evictions or deployment disruptions.


Human-in-the-Loop & Real-Time Cloud Sync

FinSentry does not make unilateral infrastructure changes. Full control remains with the engineering lead.

  • The team reviews the proposed Terraform diff and resource allocations in Discord.
  • When the Lead Architect issues an approval (@coder approve all), Coder applies the change.
  • Our cloud infrastructure and cost dashboard synchronizes in real time: active monthly run-rate drops from $42,600/mo to $24,200/mo, saving $220,800/year with zero downtime.

Hands-Free Voice Operations with Wispr Flow

During incident reviews and weekly FinOps standups, speed matters. By integrating Wispr Flow, team leads can trigger full audits hands-free using natural voice commands at 160+ WPM directly into Discord:

"@auditor run weekly finops audit for staging-us-east-1"


Key Takeaways

  1. Bring Agents to the Context: AI shouldn't live in an isolated browser tab. Having agents collaborate in public team channels creates shared context and trust.
  2. Specialization Prevents Hallucination: Splitting detection, telemetry, code generation, and safety checks across dedicated agents produces far more reliable automation than a single monolithic prompt.
  3. Safety Policies First: IaC automation is only viable when fail-safe policies (like pre-termination snapshots and capacity checks) are hardcoded into the workflow.

👉 Repository & Workflows: https://github.com/Vedant1442/finsentry

Top comments (0)