AgentR A Stateful and Recovery-Aware Software Architecture for LLM-based Auditable Workflows
This study addresses the critical challenges of state persistence and auditability in Large Language Model (LLM) applications by proposing AgentR, a stateful architecture. AgentR introduces a novel persistent state machine tailored for LLM workflows, integrating ACID-compliant cost logging and orphan task detection mechanisms. Through asynchronous orchestration, the system enables robust fault recovery and comprehensive end-to-end auditing. Experimental evaluations demonstrate that AgentR achieves a 99.2% task completion rate and a 4.3× parallel speedup. These results effectively validate the significant advantages of stateful design in enhancing the reliability, observability, and accountability of LLM-based systems.