letta

letta-aiApache-2.0活跃维护 有专家点评

给大模型智能体加上持久记忆和状态管理,让 Agent 能跨会话记住信息、持续学习并自我改进。

Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.

0.16.8发布于 2026-05-14 17:14 UTC25,413star +30 / 7 天2,668fork同步于 2026-11-11 05:21 UTC

专家点评

上手难度:进阶更新于 2026-11-11

给 LLM 加一层可持久化的分层记忆,让 agent 跨会话保留状态,替代自己手写向量库加摘要拼接

适用场景

  • 长期陪伴型对话或助理:需要跨天记住用户偏好和历史,自己拼 RAG 加滚动摘要很快会失控,Letta 把记忆分层和淘汰策略做成框架内建
  • 多轮工具调用 agent:状态机、消息历史和记忆写入需要统一落库,用它省掉自己设计 session 持久化层
  • 把 agent 嵌进 TypeScript 后端:通过 Agent SDK 直接挂到现有服务里,不用另起一套 Python 运行时
  • 本地跑通 agent 原型做验证:CLI 交互式终端能直接对话,比先搭服务再写前端快

踩坑

  • 仓库已归档:源码迁到 letta-ai/letta-code,这里只剩 V1 API server,照着本仓库 README 装会拿到旧版本,新项目应直接看新仓库
  • 本地模型接入是 issue 里反复出现的诉求(Ollama 支持、Azure 模型在近期版本不可用),如果你的模型走非 OpenAI 官方端点,先确认当前版本的 provider 兼容性再投入
  • 跨设备记忆依赖 Letta Cloud,纯自托管时记忆只在本地实例内,多端同步要自己解决

同类对比

要更轻、只做记忆层而不接管 agent 循环,看 mem0;要完全自己掌控编排逻辑、不想被框架的消息模型绑住,直接用 LangGraph 加自建存储

怎么上手

由 README 提炼,执行前请确认
npm install -g @letta-ai/letta-code
letta
硬件要求按 README 说明

README 未说明

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

带记忆的有状态 AI Agent 平台,让智能体随时间学习并自我改进

给大模型智能体加上持久记忆和状态管理,让 Agent 能跨会话记住信息、持续学习并自我改进。

核心能力

  • 为智能体提供可持久化的长期记忆
  • 支持智能体随时间学习与自我改进
  • 提供交互式终端 UI 直接对话
  • 可运行本地或自托管的 App Server
  • 通过 Agent SDK 嵌入 TypeScript 应用

容易踩的坑

当前源码已迁至 letta-ai/letta-code,本仓库仅保留归档的 V1 API server;需先安装 Node.js 与 npm 才能全局安装;使用云端跨设备记忆需接入 Letta Cloud

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本0.16.8
  1. 0.16.8v0.16.8最新正式版2026-05-14 · 2026-05-14 17:14 UTC

    What's Changed

    Full Changelog: https://github.com/letta-ai/letta/compare/0.16.7...0.16.8

  2. 0.16.7v0.16.72026-03-31 · 2026-03-31 19:28 UTC
    查看更新说明

    Letta Server 0.16.7 Release Notes

    173 commits since 0.16.6 | Released March 31, 2026

    Highlights

    Self-hosted users: this is a big upgrade. The default global context window is raised from 32k to 128k, the context window reset bug (LET-7991) is fixed, and compaction has been overhauled. If you've been running curl commands to patch your config after every ADE load, most of that pain should be gone.

    Breaking Changes

    • Block limits are no longer enforced -- block limit validation has been deprecated and removed from the git memory sync path (#9977, #9983). Blocks can now grow freely. If you were relying on limits to cap per-turn cost, you'll need to manage block size via other means.

    Context Window & Compaction (21 fixes)

    The biggest category of fixes. Self-hosted users were hit hardest by these.

    • Global context window default raised from 32k to 128k (#9993) -- self-hosted servers no longer default to 32k for unknown models
    • Context window preserved on conversation model override (LET-7991, #9986) -- the bug where non-default conversations fell back to 32k is fixed
    • Compaction overflow fixes (#9897) -- addresses the double-compaction and runaway compaction loops
    • Compaction model resets on agent model change (#10031) -- switching your agent's model no longer leaves the old summarizer model behind
    • Summarizer prompt improved (#10314) -- now remembers plan files, GitHub PRs, and other structured content during summarization
    • BYOK summarization fixed (#10152) -- summarizer provider fallback no longer fires for BYOK requests
    • Better error surfacing -- context window exceeded errors now have descriptive messages (#10135, #10171), and system prompt size warnings during compaction (#10058)

    Gemini (2 fixes)

    • thought_signature preserved on function calls without reasoning (LET-8166, #10237) -- the bug blocking all Gemini 2.5+/3.x multi-turn tool calling is fixed
    • Streaming interface crash fixed (#10306) -- self.model now initialized in SimpleGeminiStreamingInterface constructor (LET-8129)

    Memory & memfs (10 fixes, 4 features)

    • available_skills block no longer duplicates in system prompt (#10006, #10011, #10021) -- three separate fixes for the skills block multiplying and inflating context (LET-8013)
    • Git memory sync deferred until stream close (#9951) -- reduces mid-stream sync failures
    • System prompt recompiles on agent creation with git memory (#9950) -- new git-enabled agents no longer start with empty compiled context
    • Projection-style git memory rendering (#10211) -- new rendering approach for memfs content in system prompts
    • Manual block edits via API trigger recompile (#9775) -- no more stale context after API block updates
    • Conversation recompile endpoint (#9848) -- POST /v1/conversations/{id}/recompile is now available

    Conversations (7 features)

    • Conversation forking (#10234, #10263) -- fork conversations with shared message history, including the default conversation
    • Sort conversations by last_message_at (#10190)
    • Idempotent conversation streaming (#10147) -- OTID-based retry safety
    • Request-scoped system overrides (#10227) -- per-request system prompt modifications

    Streaming & Reliability (13 fixes)

    • OTID retry hardening (#10229, #10209) -- stream resume with backoff, race condition fixes
    • Conversation lock released earlier (#10203) -- reduces contention on concurrent requests
    • Better error messages (#10207) -- known LLM errors now surface descriptive messages instead of generic failures
    • BYOK error tagging (#10204, #10311) -- errors now include is_byok flag for debugging
    • stream_incomplete diagnosis (#10033) -- BaseException catching to identify root causes

    Model Support (14 features, 20 fixes)

    • GPT-5.4 -- full support including mini, nano, and fast variants (#9798, #10043)
    • GLM-5
  3. 0.16.6v0.16.62026-03-04 · 2026-03-04 03:14 UTC
    查看更新说明

    Highlights

    • Expanded Conversations API support for default conversation / agent-direct mode.
    • New conversations now initialize with a compiled system message at creation time.
    • Fixed model_settings.max_output_tokens default behavior so it does not silently override existing max_tokens unless explicitly set.

    Conversations API updates

    • Added support for conversation_id="default" + agent_id across conversation endpoints (send/list/cancel/compact/stream retrieve).
    • Kept backwards compatibility for conversation_id=agent-* (deprecated path).
    • Added lock-key handling in agent-direct flows to avoid concurrent execution conflicts.

    Conversation/system-message behavior

    • Conversation creation now compiles and persists a system message immediately.
    • This captures current memory state at conversation start and removes first-message timing edge cases.

    Model/config updates

    • Added model support for:
      • gpt-5.3-codex
      • gpt-5.3-chat-latest
    • Updated defaults:
      • context window default: 32k → 128k
      • CORE_MEMORY_BLOCK_CHAR_LIMIT: 20k → 100k
    • Anthropic model settings now allow effort="max" where supported.
    • Gemini request timeout default increased to 600s.

    Memory / memfs updates

    • Git-backed memory frontmatter no longer emits limit (legacy limit keys are removed on merge).
    • Skills sync now maps only skills/{name}/SKILL.md to skills/{name} block labels.
    • Other markdown under skills/ is intentionally ignored for block sync.
    • Memory filesystem rendering now includes descriptions for non-system/ files and condenses skill display.

    Reliability and compatibility fixes

    • Added explicit LLMEmptyResponseError handling for empty Anthropic streaming responses.
    • Improved Fireworks compatibility by stripping unsupported reasoning fields.
    • Improved Z.ai compatibility by mapping max_completion_tokens to max_tokens.

    Full Changelog: https://github.com/letta-ai/letta/compare/0.16.5...0.16.6

  4. 0.16.5v0.16.52026-02-24 · 2026-02-24 19:02 UTC
    查看更新说明

    What's Changed

    Full Changelog: https://github.com/letta-ai/letta/compare/0.16.4...0.16.5

  5. 0.16.4v0.16.42026-01-29 · 2026-01-29 20:50 UTC
    查看更新说明

    What's Changed

    Full Changelog: https://github.com/letta-ai/letta/compare/0.16.2...0.16.4

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    Letta

    Build stateful agents with memory that can learn and improve over time.

    Letta (f.k.a. MemGPT) is actively developed. The current source code lives in letta-ai/letta-code, which includes the agent harness, interactive terminal UI, App Server, channels, and the runtime used by the desktop and web apps.

    Get started

    Install Letta from npm:

    npm install -g @letta-ai/letta-code
    

    Launch the interactive terminal UI:

    letta
    

    Run the App Server for local or self-hosted agents:

    letta server
    

    You can also use Letta through:

    See the Letta documentation for current installation, development, and deployment instructions.

    Historical source

    The archive branch contains the retired Letta V1 API server. Existing tags and releases remain available for reproducibility, but active projects should use the current source.