Autonomous agents based on Large Language Models (LLMs) have evolved from reactive assistants to systems capable of planning, executing actions via tools, and iterating over environment observations. However, they remain vulnerable to structural limitations: lack of native state, context degradation over long horizons, and the gap between probabilistic generation and deterministic execution requirements. This paper presents the ESAA (Event Sourcing for Autonomous Agents) architecture, which separates the agent's cognitive intention from the project's state mutation, inspired by the Event Sourcing pattern. In ESAA, agents emit only structured intentions in validated JSON (agent.result or issue.report); a deterministic orchestrator validates, persists events in an append-only log (activity.jsonl), applies file-writing effects, and projects a verifiable materialized view (roadmap.json). The proposal incorporates boundary contracts (AGENT_CONTRACT.yaml), metaprompting profiles (PARCER), and replay verification with hashing (esaa verify), ensuring the immutability of completed tasks and forensic traceability. Two case studies validate the architecture: (i) a landing page project (9 tasks, 49 events, single-agent composition) and (ii) a clinical dashboard system (50 tasks, 86 events, 4 concurrent agents across 8 phases), both concluding with run.status=success and verify_status=ok. The multi-agent case study demonstrates real concurrent orchestration with heterogeneous LLMs (Claude Sonnet 4.6, Codex GPT-5, Antigravity/Gemini 3 Pro, and Claude Opus 4.6), providing empirical evidence of the architecture's scalability beyond single-agent scenarios.
翻译:基于大语言模型(LLMs)的自主体已从反应式助手演变为能够进行规划、通过工具执行动作并对环境观察进行迭代的系统。然而,它们仍然面临结构性限制:缺乏原生状态、长周期上下文退化,以及概率性生成与确定性执行要求之间的差距。本文提出ESAA(面向自主体的Event Sourcing)架构,其灵感源自事件溯源模式,将主体的认知意图与项目状态变更分离。在ESAA中,主体仅以经过验证的JSON格式(agent.result或issue.report)发出结构化意图;一个确定性编排器负责验证意图、将事件持久化到仅追加日志(activity.jsonl)中、应用文件写入效果,并生成可验证的物化视图(roadmap.json)。该方案整合了边界契约(AGENT_CONTRACT.yaml)、元提示配置文件(PARCER)以及带哈希的重放验证(esaa verify),确保了已完成任务的不可变性和可追溯性。两个案例研究验证了该架构:(i)一个着陆页项目(9个任务,49个事件,单主体构成)和(ii)一个临床仪表盘系统(50个任务,86个事件,跨越8个阶段的4个并发主体),两者均以run.status=success和verify_status=ok结束。多主体案例研究展示了使用异构LLMs(Claude Sonnet 4.6、Codex GPT-5、Antigravity/Gemini 3 Pro和Claude Opus 4.6)的真实并发编排,为该架构在单主体场景之外的可扩展性提供了实证证据。