Skip to content

AI-driven, agentic batch processing with Spring Batch and Spring AI #4820

Open
@fmbenhassine

Description

@fmbenhassine

This issue is to explore the (crazy?) idea of introducing a new paradigm of how we instruct machines to perform data processing tasks in batch mode: AI-driven, agentic batch processing. Based on the following definition from Wikipedia - Agentic AI:

The core concept of agentic AI is the use of AI agents to perform automated tasks but without human intervention.

Automating tasks without human intervention is nothing more than batch processing if the tasks are data processing tasks. So
the idea here is to leverage AI agents to perform data processing tasks (ie steps) and use Spring Batch to orchestrate them in workflows (ie jobs).

Technically speaking, this would require a new implementation of the Step interface, let's say AiStep, which expects as input a configurable, clearly defined set of instructions in human language that an AI agent can perform. The step implementation would periodically save the progress state in the job repository to be able to restart the agent from where it left off in case of failure/restart. All the mechanics of state management that Spring Batch excels at still apply. AI steps could be mixed with classic (code-based) steps in the same workflow. This new feature could be shipped in a new module spring-batch-ai based on the excellent Spring AI project.

The main concern here would be determinism: How deterministic an AI agent can perform a data processing task based on a clearly defined set of instructions? In my experience with the latest models, AI agents are pretty mind-blowing good at following instructions when the prompt is precise enough.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions