arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.12239cs.PLcs.AImath.CT
收藏

利用工程作为范畴架构

Harness Engineering as Categorical Architecture

Bogdan Banu

AI总结:

本文提出利用范畴架构三元组(G, Know, Phi)作为LLM代理的正式化框架,通过映射四个支柱到三元组组件,提供结构保证并验证了编译器在不同框架中的表现。

摘要:

代理 harness,由提示、工具、记忆和 orchestration 逻辑组成的系统层,已成为基于LLM的代理的核心工程抽象。然而,harness 设计仍然随意,没有正式理论指导其组合、编译下的属性保持或跨框架的系统比较。我们展示了从ArchAgents框架中的范畴架构三元组(G, Know, Phi)提供了这种正式化。代理外部化四个支柱(记忆、技能、协议、harness 工程)映射到三元组的组件:记忆作为合代数状态,技能作为操作代数组合对象,协议作为语法布线 G,而完整的harness 作为架构本身。结构保证-完整性门、基于质量的升级、支持的收敛检查-是Know级别的证书,其保持是结构重放:我们的编译器检查身份和验证器重放,而不是输出层正确性或模型行为。我们通过参考实现验证了这种对应关系,该实现包含编译器functor,目标为Swarms、DeerFlow、Ralph、Scion和LangGraph:四个配置编译器通过身份或重放保持三种命名证书类型,而LangGraph通过其共享的每阶段执行路径保持相同的证书。LangGraph编译器使用与原生运行时相同的每阶段方法创建一个节点 per stage,提供LangGraph原生可观测性而无需重新实现harness逻辑。一个端到端升级实验与真实LLM代理确认了基于质量的升级控制路径在此两个模型、一个任务实验中是模型参数化的。结果将范畴架构定位为harness工程背后的正式理论。

英文摘要:

The agent harness, the system layer comprising prompts, tools, memory, and orchestration logic that surrounds the model, has emerged as the central engineering abstraction for LLMbased agents. Yet harness design remains ad hoc, with no formal theory governing composition, preservation of properties under compilation, or systematic comparison across frameworks. We show that the categorical Architecture triple (G, Know, Phi) from the ArchAgents framework provides exactly this formalization. The four pillars of agent externalization (Memory, Skills, Protocols, Harness Engineering) map onto the triple's components: Memory as coalgebraic state, Skills as operad-composed objects, Protocols as syntactic wiring G, and the full Harness as the Architecture itself. Structural guarantees-integrity gates, quality-based escalation, supported convergence checks-are Know-level certificates whose preservation is structural replay: our compiler checks identity and verifier replay, not output-layer correctness or model behavior. We validate this correspondence with a reference implementation featuring compiler functors targeting Swarms, DeerFlow, Ralph, Scion, and LangGraph: the four configuration compilers preserve three named certificate types by identity or replay, and LangGraph preserves the same certificates through its shared per-stage execution path. The LangGraph compiler creates one node per stage using the same per-stage method as the native runtime, providing LangGraph-native observability without reimplementing harness logic. An end-to-end escalation experiment with real LLM agents confirms that the quality-based escalation control path is model-parametric in this two-model, one-task experiment. The result positions categorical architecture as the formal theory behind harness engineering.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑