Trajectory: Agent 经验数据的标准格式 Letta 2026-07-25 5.5 KB 209.4K 748 ☆ 收藏 𝕏 文章列表 文章介绍了 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*
A AI 视频情报站开放 MCP,接上 Claude、Codex 每天替你找新选题 作者宣布其 AI 视频情报站正式开放 MCP 接口,支持 Claude Code、Codex 等 Agent 直接接入查询。文章介绍了接入方法(一条命令即可),并展示了几种典型用法:每天早上让 Agent 查询新起和升温的视频题材、查询某个题材的来源和时间线、追踪特定 AI 模型的动态,以及将情报站接入自己的工作流(如自动生成选题卡、晨会材料等)。情报站每天早上更新一期,提供题材归类、X 热议、开源项目、题材溯源等数据,同时说明了查询范围限制。不接 MCP 也可通过网页或开源版自行部署使用。 技术 › MCP Gary曹淦 2026-10-27 MCPClaude CodeCodexAgentAI视频选题工具开源情报站内容创作
全 全世界包括清北的编程课程都应该向斯坦福的CS146S Fall 2026看齐 作者对比斯坦福CS146S课程2025与2026两版课纲,指出新版砍掉了85%旧内容,反映编程领域AI化进展迅猛。课程转向Agent Skills、CLAUDE.md、MCP、模型路由、后台并行agent和软件工厂等内容,期末项目占比降至50%,新增30%分数来自向真实开源项目提PR。Claude Code之父Boris Cherny等业界嘉宾分享,其同时运行数千个Claude agent。课程材料公开,非斯坦福学生也可跟学,作者认为编程教育应紧跟AI Agent时代变革。 技术 › Claude Code WquGuru 2026-10-23 编程教育StanfordCS146SClaude CodeAgentMCP开源AI编程
万 万字长文|DeepSeek Harness 从 0 到 1:一切皆插件的 Agent,到底强在哪、怎么上手 本文是一篇面向小白的 DeepSeek Harness(DSH)完整上手教程。作者介绍了 DSH 的核心特点:门槛低(DeepSeek 账号登录即用)、一切皆插件(连 Agent 循环都可替换,社区插件超 6000 个)、过程可回放(轨迹功能)。文章详细讲解了下载安装、登录方式(账号与 API Key 两种)、界面各功能入口(模式、权限、模型、推理强度等)的含义,并分析了计费方式与省钱技巧,同时提醒它仍是预览版,未经过安全审计,需注意数据安全。后续还将涵盖插件市场、原理拆解、实战练习及与 Pi、Claude Code、Codex 的对比。 技术 › Agent 小墨同学 2026-10-22 DeepSeekHarnessAgent插件开源教程Claude CodeCodex模型调用
开 开源「提示语管理.skill」,就为快速选出最适合你的 Prompt(附 25个深度思考神级提示语) 作者分享了将25条思考类提示语(苏格拉底式提问、第一性原理、乔哈里视窗、逆向法等)封装为开源skill「老爷爷」的过程。受Matt Pocock的ask-matt路由启发,该skill可根据用户当前处境自动匹配最合适的提示语,解决「提示语存了一堆但从来不用」的问题。作者强调原提示语一字不改的原则,避免工程化改写导致的性能下降,并介绍了乔哈里视窗和逆向法两个实用方法,主张让AI负责挑选提示语、人负责感知问题的分工方式。 技术 › Skill 卡尔的AI沃茨 2026-10-21 PromptSkill提示语管理AgentClaude Code开源路由思考工具
如 如何用 Claude / DeepSeek 做资讯类视频(附提示词和开源风格 skill) 作者分享了使用 Claude Code(Opus 5.5)批量制作资讯类竖屏短视频的完整工作流。核心步骤包括:选题(AI 粗选、人工精选,信息源以推特和 Hacker News 为主)、素材准备(Gemini API 写脚本和 TTS 配音、Suno 背景音乐、背景图、logo 等)、编写初始提示词、让 Agent 撰写脚本并派子 agent 做对抗式审查、反复修改脚本与成片。文中提供了可直接复用的提示词模板,并开源了包含 18 套竖屏视频风格的 Claude Code skill(creator-style-kit),可用于固定视频的字体、配色、动效与音效风格。 技术 › Claude Code 陆三金 2026-10-20 Claude CodeSkillLLMTTSAgent短视频制作提示词Gemini内容创作开源
承 承诺已久的 Claude Opus 5.5 做资讯类视频教程终于来了,提示词流程skill 全公开 作者公开了使用 Claude Opus 5.5 制作 AI 资讯类视频的完整工作流程:包括从 X 和 Hacker News 选题、准备 Agent 所需工具(Gemini API 写脚本与 TTS 配音、Suno 背景音乐等)、编写初始提示词模版、让 Gemini 写脚本并由 Claude Code 派子 agent 进行对抗式审查,以及反复迭代修改脚本与视频。作者还开源了包含 18 套风格的 creator-style-kit 风格 skill,并指出选题是内容成败的关键,常见问题是画面信息密度过高和配音契合度问题。 技术 › Skill 陆三金 (@threeaus) 2026-10-20 ClaudeAgentClaude CodeSkillTTSGemini视频制作AI资讯提示词开源
H Huashu-motion正式发布:一键直出商业级产品宣传片的Skill 花叔开源了Huashu-motion,一个让Claude Code、Codex等coding agent一键生成商业级产品宣传片的skill。项目对标Apple、Google、Anthropic的发布片水准,通过分析21支真实发布片和142支高互动动效片,提炼出导演规则。用户只需一句话,agent就会读产品、出三个设计方向、写节奏单、自动配乐配音效,最后在浏览器编辑器中支持点选修改。作者一天内用它制作了约二十支宣传片,成本极低(约2元/支)。项目已在GitHub开源,附带20种运动语言、10个模板和完整方法文档。 技术 › Skill 花叔 2026-10-19 SkillClaude Code视频生成开源宣传片动效DeepSeekAgentHuashu-motion配乐
不 不吹不黑,AI PPT skill 到底哪家好? 作者萝卜哥用同样的提示词、大模型和 Agent,实测对比了 6 款免费开源的 AI PPT skill:PPT Master(5.2万星,原生 PPTX,功能最全)、Frontend Slides(2.86万星,HTML 幻灯片,先出三种风格预览)、Guizang PPT Skill(2.73万星,杂志风/瑞士风,带演讲者模式)、Html PPT Studio(8500星,演讲辅助最强)、Dashi PPT Skill(9500星,网页编辑器,咨询风)以及作者自研的萝卜 PPT(300+星,主打不乱改原文、逐页核对)。文章给出按场景选型的建议,并指出 AI PPT 效果很吃大模型能力,需结合自身需求试用选择。 技术 › Skill zhouluobo 2026-10-17 AI PPTSkillClaude Code开源AgentPPTXHTML幻灯片工具对比
H How to Turn Opus 5.5 Into a Reverse Engineering Machine with 8 Steps (full course) 文章介绍了开源项目 REA(Reverse Engineer Anything),一个可将 Claude Code、Codex、Cursor 等 AI Agent 接入 Ghidra、Hopper 等真实反汇编引擎的 MCP 服务器与 CLI 工具。REA 发布三个月即获得超过 10 万 GitHub Star,支持原生应用、Electron、APK、固件、智能合约字节码等多种目标的逆向分析。文中列举了多个实战成果,如用 Rust 重写 Adobe 系列应用、Super Mario Sunshine 原生 PC 移植等,并给出八步完整教程:从目标路由判断、五分钟安装配置、侦察定位,到最终完成通过一致性测试的代码重建,所有结论均标注为观察、推断或未知并附证据地址。 技术 › Claude Hanako 2026-10-17 REA逆向工程Claude CodeMCP反汇编GhidraAgent开源二进制分析教程
人 人大开源 EvoOntology:让 Claude Code / Codex 中的 Agent 查数据越用越准 中国人民大学开源了 EvoOntology,登顶 Hugging Face Daily Papers。传统做法是把数据字典塞进 prompt,但实验显示这反而使 Claude-Sonnet-5 得分下降 15 分。EvoOntology 让 Agent 自主维护数据本体:从问题出发整理指标定义与表关系,经真实数据验证后入库;通过 MCP 按需检索而非硬塞上下文;每次任务后分析出错点,只增量修改对应部分,新版需跑赢旧版才上线。该方法使 Claude-Sonnet-5 提升 8.8 分,GPT-5.5 在 DDR-Bench 上提升 26.7 分。已提供 Claude Code 和 Codex 插件,模型权重不变,变强的是 Agent 的数据说明书。 技术 › LLM Ren (@Ryrenz) 2026-10-17 EvoOntologyClaude CodeCodexAgent数据查询MCP本体开源论文自演化
看 看 diff、开终端、跑 agent,我给自己写了个 18 MB 的编辑器 作者在 AI 编程时代工作流已从手写代码转向与 Claude Code、Qoder CLI 等 agent 协作,日常以看 diff、stage/commit 为主,因此基于 Go 的 MyGo 框架自研了轻量编辑器 Mayoi。它支持 project tabs 多项目管理、Ghostty 终端集成、按段 stage/discard 的 diff 审查、⌘V 粘贴截图给 agent、Remote SSH 远程开发等功能。相比 VS Code(905 MB)和 Cursor(970 MB),Mayoi 仅 24 MB、内存约 180 MB。当前版本无 LSP、扩展和调试器,内置 Claude、Qoder、Matrix 主题,开源且支持 macOS、Windows、Linux。 技术 › 工具与效率 陈成 2026-10-15 编辑器AI编程Claude CodeGo开源AgentRemote SSHGit开发工具Mayoi
用 用 Codex 剪视频:剪映两天的活,我动嘴不到一小时(附开源 Skill) 作者分享用 Codex 结合 ChatCut 浏览器/桌面剪辑器自动剪口播视频的工作流:将原本在剪映需要一两天的剪辑工作压缩到一小时内。文章介绍了通过托管 MCP 插件让 Codex 或 Claude Code 直接操作剪辑时间线的安装方式,给出了四条核心指令(只读分析、按语义删减、插入内容并自查、最后刷字幕)和五道验收方法(重读项目状态、核对总时长、逐轨道检查、实际试听、复查字幕),并以片尾卡未跟随移动导致时长短两秒的实例说明:AI 报告'完成'不等于真正完成,验收环节必须由人掌握,这一原则适用于所有 Agent 交付的工作。 技术 › Codex MapleShaw 2026-10-15 CodexAgentChatCut视频剪辑MCPClaude Code工作流验收开源Skill