---
title: "Building an AI-Powered Operations Assistant with Spring AI and MongoDB Atlas — Part 3: Stateful Workflows and Human-in-the-Loop"
url: https://daily.dev/posts/building-an-ai-powered-operations-assistant-with-spring-ai-and-mongodb-atlas-part-3-stateful-work-chhiwkvty
source_url: https://foojay.io/today/building-an-ai-powered-operations-assistant-with-spring-ai-and-mongodb-atlas-part-3-stateful-workflows-and-human-in-the-loop
type: article
source: "Foojay.io"
published: 2026-06-29T09:44:26.601Z
updated: 2026-06-29T09:44:55.183Z
tags: ["java", "mongodb", "agentic-ai", "workflow-orchestration", "spring-ai"]
reading_time: 15
upvotes: 0
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Building an AI-Powered Operations Assistant with Spring AI and MongoDB Atlas — Part 3: Stateful Workflows and Human-in-the-Loop

**[Foojay.io](https://daily.dev/sources/foojayio)** · 15 min read · 0 upvotes · 0 comments

## Summary

Part 3 of a series on building an AI-powered operations assistant using Spring AI and MongoDB Atlas. This installment introduces stateful workflow checkpointing to handle multi-step incident investigations that span session boundaries. Key additions include: a checkpoint document stored in MongoDB tracking workflow state, current step, and status (RUNNING, WAITING_APPROVAL, COMPLETED, FAILED); a ServiceStatusTool annotated with @Tool that lets the model fetch real-time service metrics; ThreadLocal-based context propagation for passing conversation IDs into tool methods; ToolExecution audit documents for full traceability; and pause/resume API endpoints that rehydrate investigation state. MongoDB serves as a unified persistence layer for runbooks, conversation memory, long-term knowledge, and workflow checkpoints. The architecture allows horizontal scaling since workflow state lives outside any single instance.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://foojay.io/today/building-an-ai-powered-operations-assistant-with-spring-ai-and-mongodb-atlas-part-3-stateful-workflows-and-human-in-the-loop>

## Similar posts on daily.dev

- [Building an AI-Powered Operations Assistant with Spring AI and MongoDB Atlas — Part 2: Conversational Memory](https://daily.dev/posts/building-an-ai-powered-operations-assistant-with-spring-ai-and-mongodb-atlas-part-2-conversationa-zq3na1mno) · Foojay.io · 0 upvotes · 0 comments
- [Building a persistent conversational AI chatbot with Temporal](https://daily.dev/posts/building-a-persistent-conversational-ai-chatbot-with-temporal-tmri7xdsw) · Temporal · 2 upvotes · 0 comments
- [Building AI Systems with MongoDB: Implementing the Planning Pattern](https://daily.dev/posts/building-ai-systems-with-mongodb-implementing-the-planning-pattern-gnwjjdryu) · Foojay.io · 1 upvotes · 0 comments

---

Tags: [#java](https://daily.dev/tags/java), [#mongodb](https://daily.dev/tags/mongodb), [#agentic-ai](https://daily.dev/tags/agentic-ai), [#workflow-orchestration](https://daily.dev/tags/workflow-orchestration), [#spring-ai](https://daily.dev/tags/spring-ai)

[View this post on daily.dev](https://daily.dev/posts/building-an-ai-powered-operations-assistant-with-spring-ai-and-mongodb-atlas-part-3-stateful-work-chhiwkvty)
