跳到主要内容Skip to main content
Agent 框架与编排Agent Frameworks & Orchestration生产可用Production

Letta

letta-ai / letta

有状态 agent 平台:把记忆分成 core / recall / archival 三层,连同对话、工具调用与 agent 状态一起持久化,跨会话保留并允许 agent 自己编辑记忆。A stateful agent platform that splits memory into core, recall and archival tiers, persisting conversations, tool calls and agent state across sessions and allowing the agent to edit its own memory.

25.5k stars 2683 forks Python 语言Language Apache-2.0 许可License 最近推送Last push 2026-10-18

为什么选Why choose it

  • 解决无状态 chat 的遗忘问题;记忆不是简单向量库,而是可读写的分层结构。Memory tiers are explicit and inspectable.
  • 提供 REST server 与 Python/TS SDK,方便接自有前端或 IM。State persists beyond a single context window.
  • sleep-time agent 与记忆整理把“何时记、记什么”变成可配置流程。The agent can edit its own memory, which enables long-running work.

不适合Not for

记忆越多不等于越准,错误记忆会被反复放大,需要清理与审计。You need a stateless request-response service.
自托管要管 Postgres/pgvector、嵌入与模型成本。You cannot govern what the agent writes into memory.
不是通用工作流引擎,复杂业务编排仍要外接。不是通用工作流引擎,复杂业务编排仍要外接。

最小上手Minimum setup

  1. 用 Docker 起 Letta server,接一个模型;创建一个 agent 并给它一个工具。Create an agent and have a two-session conversation.
  2. 连续两轮对话后检查 memory blocks 是否按预期更新。Inspect core, recall and archival memory after each turn.
  3. 再试 archival memory 或 sleep-time agent,观察召回与整理结果。Test a correction and a deletion before trusting it with real data.

依赖与成本Dependencies and cost

Docker / Python;Postgres + pgvector;LLM API 或本地模型;嵌入模型。Check runtime, model weights and external service dependencies in the README.

许可与使用边界License and usage boundaries

Apache-2.0;模型、嵌入服务与记忆数据另计。Code is Apache-2.0; model weights, training data and generated content may have separate terms — check each before commercial use.

开源不等于可商用:GPL / AGPL 有传染性;代码许可、模型许可、生成内容许可要分开看。上线前读仓库 LICENSE 与模型卡,必要时让法务确认。Open source is not automatically commercial-use friendly: GPL / AGPL are copyleft; code, model and output licenses are separate. Read the LICENSE and model card before launch, and involve legal when needed.

替代与相邻Alternatives and neighbors

  • Mem0 — 生产可用Production,给 agent 加长期记忆层:抽取、存储、检索用户偏好与事实,支持向量/图存储后端。A long-term memory layer for agents: extract, store and retrieve user preferences and facts, with vector and graph backends.
  • Zep — 生产可用Production,面向 agent 的记忆服务:会话摘要、事实抽取、图记忆与检索,提供社区版和云服务。A memory service for agents: session summaries, fact extraction, graph memory and retrieval, with a community edition and cloud service.
  • LangGraph — 生产可用Production,把 agent 写成有状态图:节点、边、检查点、人工确认与回滚都能显式表达。Write an agent as a stateful graph: nodes, edges, checkpoints, human approval and rollback are explicit.

下一步Next steps

  • 打开 GitHub,先读 README、LICENSE、最近 release 与 issue。Open GitHub and read the README, LICENSE, latest release and issues first.
  • 按“部署依赖 / 显存 / 数据 / 网络 / 权限”列一张上手清单。Make an onboarding checklist for deployment dependencies, VRAM, data, network and permissions.
  • 用一个小样本跑通,再决定是否进生产;不要直接上生产数据。Run a small sample first, then decide on production; never start with production data.

GitHub 仓库 ↗GitHub repository ↗ 文档 ↗Docs ↗ 加入对比Add to compare

快照口径:stars / forks / language / license / pushed_at 来自 GitHub API 2026-11-20 快照;之后的变化没有回写。标签与“适合 / 不适合”是编辑判断,不是 GitHub 元数据。Snapshot: stars / forks / language / license / pushed_at come from the GitHub API snapshot on 2026-11-20; later changes are not written back. Tags and “fit / not fit” are editorial judgments, not GitHub metadata.
不背书:本站只做索引与风险提示,不审计代码、不保证安全、不替你做许可判断。仓库脚本与模型权重请自行审查。No endorsement: this site only indexes and flags risks; it does not audit code, guarantee security or make license decisions for you. Review repository scripts and model weights yourself.