Trajectory: Agent 经验数据的标准格式 ✍ Letta🕐 2026-07-25📦 5.5 KB 🟢 已读 𝕏 文章列表 文章介绍了 Trajectory,一个开源的数据格式标准化工具,旨在统一不同编码代理会话(如 Claude Code、Codex 等)的数据格式。该格式注重令牌效率,便于代理从过去的经验中学习,解决跨平台数据碎片化问题。 TrajectoryLettaAgent数据格式Claude Code开源机器学习 # Trajectory: A Standard Format for Agent Experience Data **作者**: Letta **日期**: 2026-07-24T06:07:03.000Z **来源**: [https://x.com/Letta_AI/status/2080535211473850822](https://x.com/Letta_AI/status/2080535211473850822) ---  Introducing trajectory, an open-source package that normalizes coding-agent sessions from @AnthropicAI Claude Code, @OpenAI Codex, @pidotdev, @LangChain deepagents, @openclaw, Letta Code, and other harnesses into one token-efficient format designed for agents learning from past experience. Agents today have a limited ability to learn from past experience to improve in the future. Furthermore, agent experience is split across many different harnesses: many users swap between harnesses such as Claude Code, Codex, and Letta Code - and organizations typically have individual users on a wide variety of harnesses depending on personal preference. Creating memories, learning, or dreaming therefore is limited to a single harness, and a single user. Learning across harnesses requires first creating a standard data format for the experience each harness produces. Today, learning is primarily done in token-space, where agents themselves process experience to learn system prompts, skills, or even harness-level modifications. An ideal data format for experience is therefore: 1. Standardized across harnesses, to avoid distraction from divergence in formats 2. Token-efficient, to enable agents to process experience as efficiently as possible While projects such as Harbor have introduced normalized formats for agent trajectories (ATIF), those formats are intended for full-fidelity replay and benchmarking - they preserve per-step token metrics, structured tool payloads, and untruncated outputs. The trajectory package formats trajectories across harnesses in a consistent, agent-friendly format. The format is designed for agents reading past sessions for memory formation, and minimizes token overhead from metadata. ## Trajectory schema A trajectory is a list of records in a standard format: assistant messages, user messages, reasoning, tool calls, and tool results. The first record contains metadata about the harness the trajectory was created in.  The full spec is defined in trajectory-v1.schema.json. The format keeps only the information needed to understand the agent's experience. It drops harness bookkeeping (per-line envelopes, duplicated payloads, UI event streams, encrypted reasoning blobs), and optionally truncates long tool results. On sessions we sampled, this results in a ~5x reduction in token counts compared to native session formats. ## Listing & formatting trajectories The trajectory package lets you list sessions from any harness and convert them into normalized trajectories. You can use the package to aggregate data across harnesses for indexing, or for processing with memory agents. ``` import { listTrajectories, normalizeTranscript } from "@letta-ai/trajectory"; import { readFileSync } from "fs"; // Discover local Claude Code sessions (also works for codex, letta-code, ...) const page = await listTrajectories({ source: "claude-code", limit: 10 }); // Normalize one into the standard record format const transcript = readFileSync(page.items[0].path, "utf8"); const { records, diagnostics } = normalizeTranscript({ source: "claude-code", transcript, }); ``` # How we're using trajectory The Letta Code harness now uses the trajectory format to normalize session data from other local agents like Claude Code and Codex. Past trajectory data is reviewed to bootstrap the agent's memory. With the trajectory format, agent dreaming can select and normalize sessions from every harness on the machine, so lessons learned in a Claude Code or Codex session inform the agent's memory the same way its own sessions do. We're exited about how aggregating experience across many harnesses (or even many users) can translate into learning and memory that makes better agents. ## Next steps Try out the package: ``` npm install -g @letta-ai/trajectory ``` You can also run `/init` in Letta Code to review experience from other harnesses: ``` npm install -g @letta-ai/letta-code ``` Read this post in its original format: https://www.letta.com/blog/trajectory/ ## 相关链接 - [Letta](https://x.com/Letta_AI) - [@Letta_AI](https://x.com/Letta_AI) - [84K](https://x.com/Letta_AI/status/2080535211473850822/analytics) - [trajectory](https://github.com/letta-ai/trajectory) - [@AnthropicAI](https://x.com/@AnthropicAI) - [@OpenAI](https://x.com/@OpenAI) - [@pidotdev](https://x.com/@pidotdev) - [@LangChain](https://x.com/@LangChain) - [@openclaw](https://x.com/@openclaw) - [dreaming](https://www.letta.com/blog/sleep-time-compute/) - [token-space](https://www.letta.com/blog/continual-learning/) - [agent trajectories (ATIF)](https://github.com/harbor-framework/harbor/blob/main/rfcs/0001-trajectory-format.md) - [trajectory](https://github.com/letta-ai/trajectory) - [trajectory-v1.schema.json](https://github.com/letta-ai/trajectory/blob/main/schema/trajectory-v1.schema.json) - [https://www.letta.com/blog/trajectory/](https://www.letta.com/blog/trajectory/) - [Upgrade to Premium](https://x.com/i/premium_sign_up) - [2:07 PM · Jul 24, 2026](https://x.com/Letta_AI/status/2080535211473850822) - [84.5K Views](https://x.com/Letta_AI/status/2080535211473850822/analytics) - [View quotes](https://x.com/Letta_AI/status/2080535211473850822/quotes) --- *导出时间: 2026/7/25 11:03:17* --- ## 中文翻译 # Trajectory:一种代理经验数据的标准格式 **作者**: Letta **日期**: 2026-07-24T06:07:03.000Z **来源**: [https://x.com/Letta_AI/status/2080535211473850822](https://x.com/Letta_AI/status/2080535211473850822) ---  隆重介绍 trajectory,这是一个开源包,旨在将来自 @AnthropicAI Claude Code、@OpenAI Codex、@pidotdev、@LangChain deepagents、@openclaw、Letta Code 以及其他工具的编码代理会话规范化为一种对 Token 友好的统一格式,专为代理从过往经验中学习而设计。 如今,代理从过往经验中学习以在未来改进的能力十分有限。此外,代理经验分散在许多不同的工具中:许多用户在 Claude Code、Codex 和 Letta Code 等工具之间切换使用——而组织内的不同用户通常根据个人偏好使用各种各样的工具。因此,创建记忆、学习或“做梦”往往局限于单一工具和单一用户。 要实现跨工具的学习,首先需要为每个工具产生的经验创建一种标准数据格式。目前,学习主要在 Token 空间中进行,代理在其中自行处理经验,以学习系统提示词、技能,甚至是工具层面的修改。因此,理想的经验数据格式应当: 1. 跨工具标准化,以避免因格式差异而分散注意力 2. Token 高效,以使代理能够尽可能高效地处理经验 尽管 Harbor 等项目已经引入了代理轨迹的规范化格式(ATIF),但这些格式旨在用于全保真回放和基准测试——它们保留了每步的 Token 指标、结构化工具负载和未截断的输出。trajectory 包则将跨工具的轨迹格式化为一致的、对代理友好的格式。该格式专为读取过往会话以形成记忆的代理而设计,并将元数据的 Token 开销降至最低。 ## Trajectory 架构 Trajectory 是标准格式的记录列表:包含助手消息、用户消息、推理、工具调用和工具结果。第一条记录包含创建该轨迹的工具的元数据。  完整的规范定义在 trajectory-v1.schema.json 中。 该格式仅保留理解代理经验所需的信息。它舍弃了工具的簿记信息(每行信封、重复负载、UI 事件流、加密推理块),并可选择截断过长的工具结果。在我们抽样的会话中,与原生会话格式相比,这使 Token 数量减少了约 5 倍。 ## 列出与格式化轨迹 trajectory 包允许您列出任何工具的会话并将其转换为规范化轨迹。您可以使用该程序包聚合跨工具的数据以进行索引,或供记忆代理处理。 ``` import { listTrajectories, normalizeTranscript } from "@letta-ai/trajectory"; import { readFileSync } from "fs"; // 发现本地 Claude Code 会话(也适用于 codex、letta-code 等) const page = await listTrajectories({ source: "claude-code", limit: 10 }); // 将其中一个规范化为标准记录格式 const transcript = readFileSync(page.items[0].path, "utf8"); const { records, diagnostics } = normalizeTranscript({ source: "claude-code", transcript, }); ``` # 我们如何使用 trajectory Letta Code 工具现在使用 trajectory 格式来规范化来自其他本地代理(如 Claude Code 和 Codex)的会话数据。过去的轨迹数据会被审查以引导代理的记忆。 有了 trajectory 格式,代理的“做梦”过程可以选择并规范化机器上每个工具的会话,因此在 Claude Code 或 Codex 会话中学到的教训,会像代理自己的会话一样为代理的记忆提供信息。我们对将许多工具(甚至许多用户)的经验聚合起来,转化为能够打造更优秀代理的学习和记忆感到兴奋。 ## 后续步骤 试用该包: ``` npm install -g @letta-ai/trajectory ``` 您也可以在 Letta Code 中运行 `/init` 来审查来自其他工具的经验: ``` npm install -g @letta-ai/letta-code ``` 阅读原文格式的文章: https://www.letta.com/blog/trajectory/ ## 相关链接 - [Letta](https://x.com/Letta_AI) - [@Letta_AI](https://x.com/@Letta_AI) - [84K](https://x.com/Letta_AI/status/2080535211473850822/analytics) - [trajectory](https://github.com/letta-ai/trajectory) - [@AnthropicAI](https://x.com/@AnthropicAI) - [@OpenAI](https://x.com/@OpenAI) - [@pidotdev](https://x.com/@pidotdev) - [@LangChain](https://x.com/@LangChain) - [@openclaw](https://x.com/@openclaw) - [dreaming](https://www.letta.com/blog/sleep-time-compute/) - [token-space](https://www.letta.com/blog/continual-learning/) - [agent trajectories (ATIF)](https://github.com/harbor-framework/harbor/blob/main/rfcs/0001-trajectory-format.md) - [trajectory](https://github.com/letta-ai/trajectory) - [trajectory-v1.schema.json](https://github.com/letta-ai/trajectory/blob/main/schema/trajectory-v1.schema.json) - [https://www.letta.com/blog/trajectory/](https://www.letta.com/blog/trajectory/) - [升级到 Premium](https://x.com/i/premium_sign_up) - [2:07 PM · Jul 24, 2026](https://x.com/Letta_AI/status/2080535211473850822) - [84.5K 次查看](https://x.com/Letta_AI/status/2080535211473850822/analytics) - [查看引用](https://x.com/Letta_AI/status/2080535211473850822/quotes) --- *导出时间: 2026/7/25 11:03:17*
用 用 Skills 给 AI Agent 注入设计品味 介绍了开源技能库 emilkowalski/skills,它能为 AI 编程 Agent 注入设计品味,解决 AI 生成 UI 动画和交互时缺乏质感的问题。文章详解了其核心功能、安装方法、实操流程,并对比了 Taste-Skill、Hallmark 等类似工具的差异。 技术 › 前端 ✍ sitin🕐 2026-07-15 AI设计前端Agent工具Claude CodeCursor开源交互UI
S Superpowers:Claude Code 效率暴涨 10 倍的秘密 文章介绍了 Claude Code 的开源技能库 Superpowers,它如同 AI 的导航系统,通过头脑风暴、计划拆解、子代理驱动开发和测试驱动四大核心工作流,自动引导用户从构思到上线。该系统有效降低了认知负荷,并通过严格的审查机制确保代码质量,是提升企业 AI 交付效率的利器。 技术 › Skill ✍ Miles.🕐 2026-05-22 Claude CodeSuperpowers工作流Agent测试驱动自动化开源效率工具开发实践LLM
I If You Are Not Using These 100 Repositories, You Are Using Claude Code Wrong 文章指出大多数用户仅将 Claude Code 视为简单的终端助手,而忽略了其通过第三方仓库扩展的强大潜力。作者介绍了涵盖官方工具、生态索引、插件及技能库的 100 个精选仓库,旨在帮助开发者构建从简单的智能编程工具到全功能的 Agent 系统,从而显著提升生产力。 技术 › Claude ✍ NeilXbt🕐 2026-05-19 Claude CodeAI编程插件Agent工具推荐开源开发效率AnthropicSDK生态圈
2 2026年个人Agent自建实战:用Vibe Coding 15天搭出工作系统 本文详细介绍了作者如何利用“Vibe Coding”理念和开源项目Nanobot,在15天内从零构建并迭代出一套个人Agent工作系统。文章提炼了一套可复制的方法论,涵盖轻量基座选择、Claude Code辅助开发、脚手架文件构建(CLAUDE.md、docs/)、需求规格化以及自动化测试配对五个关键步骤。作者特别强调了“先规划后编码”和“测试驱动”的重要性,旨在帮助非专业开发者也能快速上手。 技术 › Agent ✍ Xudong Han🕐 2026-05-06 AgentVibe CodingClaude CodeNanobot编程实战DevOps开源
为 为什么我劝你自己搭一个 Agent:从 OpenClaw 到 EvoPaw 的实践心得 作者分享了将个人助手 EvoPaw 从 CrewAI 迁移到 Claude Agent SDK,并最终自建框架的经历。文章深入探讨了为何即便有 OpenClaw 等成熟方案,个人仍应自建 Agent:为了避免陷入工具频繁迭代的“注意力税”,掌握数据主权与隐私,以及通过“偷”学开源代码和利用 Claude Code 等 AI 辅助工具降低开发门槛。作者认为,自建的过程是一个让系统真正理解个人工作流并伴随需求共同进化的过程。 技术 › Agent ✍ Xudong Han🕐 2026-05-01 AgentEvoPaw个人开发开源框架迁移数据主权Claude Code教程LinuxCopilot
开 开源「洁癖.Skill」,让你的Agent越用越聪明 文章介绍了一款名为“洁癖.Skill”的开源工具,旨在解决Agent长期使用后因上下文和文档混乱导致的“越用越笨”问题。该Skill通过自动审查和迭代项目的文档、记忆及配置文件(如CLAUDE.md),确保知识库的准确性,适用于Claude Code、Codex等多个平台。作者提出“合并优于追加,删除优于保留”的原则,强调在AI协作中保持信息纯净比信息海量更重要,这能让开发者通过“存档”机制实现Agent的持续进化。 技术 › Skill ✍ 数字生命卡兹克🕐 2026-04-29 AgentClaude开源工具与效率文档管理Claude Code洁癖.Skill提示工程上下文管理自动化
I If You're Not Using These 100 Repos, Delete CLAUDE CODE 文章指出许多人低估了 Claude Code 的潜力,仅仅将其视为普通的 AI 编码工具。作者通过整理 100 个最佳仓库,展示了如何利用 configs、plugins、skills 和 subagents 极大提升开发效率。文中详细列出了精选列表、官方 Anthropic 仓库以及技能集合等资源,帮助开发者构建强大的 AI 辅助开发工作流。 技术 › Claude Code ✍ kaize🕐 2026-04-26 Claude CodeAgentSkillsPluginsAnthropicDevOps工具与效率MCP开发工具开源
我 我逆向了Claude Design!免费开源!设计逻辑全公开 作者分享了其开源项目「huashu-design」,这是一个基于Claude的Agent设计技能。文章探讨了Agent-first与GUI-first设计理念的差异,详细介绍了huashu-design在品牌资产协议、自动生成PPT和iOS原型方面的功能,以及它与Claude Design的功能对比和使用限制。 技术 › Hermes ✍ 花叔🕐 2026-04-21 AgentClaude开源设计自动化UI/UX逆向工程工作流HermesAutoUIClaude Code
达 达尔文.skill发布:基于棘轮机制的无限进化系统 作者发布了达尔文.skill,这是一套基于Karpathy autoresearch思路的AI技能进化系统。它通过“棘轮机制”和“双重评估”自动优化Skill代码,只保留提升质量的修改。文章详细阐述了五大设计原则、8维度评分体系以及“人在回路”的重要性,实现了从1到N的系统性技能迭代。 技术 › Claude Code ✍ 花叔🕐 2026-04-14 Claude CodeSkillAgent自动化进化算法开源
H Hermes、Claude Code 与 OpenClaw 的区别对比 本文对比分析了近期热门的 Hermes Agent 与 Claude Code、OpenClaw 的区别。Hermes Agent 是一个轻量级、可自我学习的通用 Agent,定位介于三者之间。与 Claude Code 相比,它不绑定 IDE,支持多平台和 18+ 模型;与 OpenClaw 相比,它采用独特的“有限记忆”哲学和自学习循环机制,能自动沉淀个人技能笔记,更适合个人开发者私有化部署。 技术 › Agent ✍ Xiao Tan🕐 2026-04-07 HermesOpenClawClaude CodeAgentLLM自学习记忆管理开发工具开源对比评测
我 我用Obsidian + Claude Code搭了一个健脑房 本文详细介绍了作者如何构建基于Obsidian和Claude Code的个人工作流系统。文章提出了“未经人脑处理的知识不进仓库”和“输入服务于输出”两大原则,通过构建COO、CTO、心理医生等AI Agent角色,配合定时任务和自动化工作流,实现了一个具有问责机制、自动化记录和个人百科功能的数字“健脑房”,旨在提升思考质量与工作效率。 技术 › 工具与效率 ✍ Haoshan Hong🕐 2026-04-06 ObsidianClaude CodeAgent工作流个人知识管理AI自动化生产力提示词开源
我 我的 Vibe Coding 项目:从 WorkAny 到 FastClaw 作者分享了近三个月使用 Claude Code 进行 Vibe Coding 的实战经历,产出了多个与 Agent 生态相关的项目。包括桌面 Agent WorkAny、OpenClaw 托管服务 ClawHost、多租户 Agent OS FastClaw、微信桥接器 WeClaw、工具库 AnyClaw 等,展示了个人利用 AI 极速开发并构建产品生态的全过程。 技术 › Agent ✍ idoubi🕐 2026-04-06 Claude CodeVibe CodingAgentOpenClaw开源项目实战Full Stack工具WeClawFastClaw