---
title: "DSPy vs Letta: Which is Better in 2026? | App Stack Builder"
description: "DSPy vs Letta compared for 2026 — pricing, free tiers, features, pros & cons. See which agent framework tool is the better fit for your startup."
source: https://appstackbuilder.com/compare/dspy-vs-letta
retrieved: 2026-10-30
---

![](https://appstackbuilder.com/logos/dspy.png)

vs

![](https://appstackbuilder.com/logos/letta.png)

# DSPy vs Letta: Which is Better in 2026?

Agent Framework

Choosing between [DSPy](https://appstackbuilder.com/tools/dspy) and [Letta](https://appstackbuilder.com/tools/letta)? Both are popular agent framework tools. Below we compare them on pricing, free tiers, features, and pros & cons so you can pick the right fit for your stack.

DSPy is for: Teams with an evaluation set who want to optimize prompts and LLM pipelines against a metric instead of hand-tuning them.

Letta is for: Teams building agents that must remember users and context across sessions and restarts, with memory as the core design.

Quick verdict

There’s no single winner; pick on your constraint. Choose DSPy if you have examples and a metric, and want prompts tuned automatically. Choose Letta if your agent must remember users and past sessions over weeks or months.

## DSPy vs Letta — Side by Side

|                       | DSPy                                                                      | Letta                                                                    |
| --------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
| Category              | Agent Framework                                                           | Agent Framework                                                          |
| What it is            | Code library: framework for optimizing prompts and LLM programs           | Agent server and SDKs: agents with persistent memory                     |
| Languages             | Python                                                                    | Python and TypeScript SDKs                                               |
| Licence               | MIT                                                                       | Apache 2.0                                                               |
| Managed / paid option | None                                                                      | Letta API: free tier, Pro $20/month plus usage                           |
| Project status        | Active; 3.x                                                               | Active                                                                   |
| Pricing               | Free                                                                      | Free · paid from $20/mo                                                  |
| Starting price        | Free tier available                                                       | Free tier available                                                      |
| Free tier             | ✓                                                                         | ✓                                                                        |
| Rating                | 4.2                                                                       | 4.0                                                                      |
| Best for              | Agent Framework — prompt optimization, evaluation-driven, research-backed | Agent Framework — long-term memory, stateful agents, self-host or hosted |

## Pros & Cons

![](https://appstackbuilder.com/logos/dspy.png)

[DSPy](https://appstackbuilder.com/tools/dspy)

* ✓Replaces prompt tinkering with measurable optimisation
* ✓Strong research backing (Stanford)
* ✓Composes well with any model provider
* ✗A genuinely different mental model to learn
* ✗Optimisation runs cost tokens

![](https://appstackbuilder.com/logos/letta.png)

[Letta](https://appstackbuilder.com/tools/letta)

* ✓Memory is the design centre, not an add-on
* ✓Agents survive restarts with state intact
* ✓Comes from the MemGPT paper
* ✗Younger project with a moving API
* ✗Memory model is opinionated

## Key Features Compared

### DSPy

* ✓Signatures and modules replace hand-written prompts
* ✓Optimizers, including GEPA, that tune prompts against your metric
* ✓Works with most model providers
* ✓From Stanford NLP
* ✓MIT licence

### Letta

* ✓Persistent, self-editing agent memory (from the MemGPT research)
* ✓Agents keep their state across restarts
* ✓Self-hosted server, or the hosted Letta API
* ✓Hosted plans: free tier and Pro at $20 a month with pay-as-you-go usage
* ✓Letta Code, an open-source coding agent with memory across sessions
* ✓Apache 2.0 licence

### Choose DSPy if…

* ✓You have examples and a metric, and want prompts tuned automatically.
* ✓Your pipeline keeps breaking when you switch models, and you want to re-optimize instead of rewriting prompts.

[DSPy review & pricing ](https://appstackbuilder.com/tools/dspy)

### Choose Letta if…

* ✓Your agent must remember users and past sessions over weeks or months.
* ✓You want agents that keep state when the process restarts.
* ✓You want the choice of self-hosting or a hosted API.

[Letta review & pricing ](https://appstackbuilder.com/tools/letta)

## Frequently Asked Questions

Is DSPy better than Letta?⌄

There’s no single winner; pick on your constraint. Choose DSPy if you have examples and a metric, and want prompts tuned automatically. Choose Letta if your agent must remember users and past sessions over weeks or months.

What is the difference between DSPy and Letta?⌄

What it is — DSPy: Code library: framework for optimizing prompts and LLM programs. Letta: Agent server and SDKs: agents with persistent memory. Languages — DSPy: Python. Letta: Python and TypeScript SDKs. Licence — DSPy: MIT. Letta: Apache 2.0\. Managed / paid option — DSPy: None. Letta: Letta API: free tier, Pro $20/month plus usage. Project status — DSPy: Active; 3.x. Letta: Active.

DSPy vs Letta: which is cheaper?⌄

DSPy pricing: Free. Letta pricing: Free · paid from $20/mo. Confirm current pricing on each tool's official site, as plans change.

Which is rated higher, DSPy or Letta?⌄

In our catalog, DSPy rates 4.2 out of 5 and Letta rates 4.0 out of 5, so DSPy has a slight edge on reviews.

When should I skip both DSPy and Letta?⌄

Skip DSPy if you don’t have an evaluation set yet. DSPy’s optimizers need one to work. Skip Letta if you only need short-lived task agents. A lighter SDK is simpler.

Sources · tool facts checked October 2026

1. 1.[DSPy 3.3.1 release notesnewreleases.io ](https://newreleases.io/project/github/stanfordnlp/dspy/release/3.3.1)
2. 2.[Letta Code (Letta docs)docs.letta.com ](https://docs.letta.com/letta-code)

See more options in our guide to the [best agent framework tools for startups](https://appstackbuilder.com/categories/agent-framework).

## Still not sure which to pick?

Get a free, AI-powered tech stack — including the best agent framework pick for your budget and team — in 60 seconds.

[Build my stack free ](https://appstackbuilder.com/build-stack)
