# letta-code vs pi

> Levels are per column and must not be summed, averaged or ranked. A level states which written criterion the runtime's source meets. It is not a measure of quality or task success. Higher is not always preferable.

Source: "Agent runtime comparison: ten open-source agent runtimes, source review", study of 2026-11-28. Mark notation: `3` is the level in the default deployment; `1→4 [opt: …]` is level 1 by default and level 4 in the named configuration; `s` source-verified, `d` documented or test only. Service dependencies are classes (E embedded, O on demand, R resident service, X external server required), not levels.

Page: https://ai-agents-review.com/compare/letta-code-vs-pi

## Programmable capabilities

| Column | letta-code | pi | Marks differ |
|---|---|---|---|
| [Capability interface](https://ai-agents-review.com/column/capability-interface.md) | [3 s](https://ai-agents-review.com/cell/letta-code/capability-interface.md) | [3→4 [config: activate built-in tool_search] s](https://ai-agents-review.com/cell/pi/capability-interface.md) | yes |
| [Reusable computation](https://ai-agents-review.com/column/reusable-computation.md) | [3 s](https://ai-agents-review.com/cell/letta-code/reusable-computation.md) | [2 s](https://ai-agents-review.com/cell/pi/reusable-computation.md) | yes |
| [Capability transfer](https://ai-agents-review.com/column/capability-transfer.md) | [2 d](https://ai-agents-review.com/cell/letta-code/capability-transfer.md) | [2 d](https://ai-agents-review.com/cell/pi/capability-transfer.md) | no |

## Evidence and memory

| Column | letta-code | pi | Marks differ |
|---|---|---|---|
| [Durable evidence](https://ai-agents-review.com/column/durable-evidence.md) | [2 d](https://ai-agents-review.com/cell/letta-code/durable-evidence.md) | [2 s](https://ai-agents-review.com/cell/pi/durable-evidence.md) | no |
| [Context recovery](https://ai-agents-review.com/column/context-recovery.md) | [2→3 [opt: experimental local backend] d](https://ai-agents-review.com/cell/letta-code/context-recovery.md) | [2 s](https://ai-agents-review.com/cell/pi/context-recovery.md) | yes |
| [Memory maintenance](https://ai-agents-review.com/column/memory-maintenance.md) | [4 s](https://ai-agents-review.com/cell/letta-code/memory-maintenance.md) | [0 s](https://ai-agents-review.com/cell/pi/memory-maintenance.md) | yes |

## Specialist collaboration

| Column | letta-code | pi | Marks differ |
|---|---|---|---|
| [Specialist definition](https://ai-agents-review.com/column/specialist-definition.md) | [3 s](https://ai-agents-review.com/cell/letta-code/specialist-definition.md) | [1 s](https://ai-agents-review.com/cell/pi/specialist-definition.md) | yes |
| [Continuation](https://ai-agents-review.com/column/continuation.md) | [2 s](https://ai-agents-review.com/cell/letta-code/continuation.md) | [0→3 [alt: pi-durable checkpointed child tasks] s](https://ai-agents-review.com/cell/pi/continuation.md) | yes |
| [Coordination](https://ai-agents-review.com/column/coordination.md) | [3 s](https://ai-agents-review.com/cell/letta-code/coordination.md) | [0→1 [alt: pi-durable] s](https://ai-agents-review.com/cell/pi/coordination.md) | yes |

## Execution controls

| Column | letta-code | pi | Marks differ |
|---|---|---|---|
| [Confinement](https://ai-agents-review.com/column/confinement.md) | [2 s](https://ai-agents-review.com/cell/letta-code/confinement.md) | [0→2 [alt: Docker / OpenShell / Gondolin (documented)] d](https://ai-agents-review.com/cell/pi/confinement.md) | yes |
| [Credential handling](https://ai-agents-review.com/column/credential-handling.md) | [1 s](https://ai-agents-review.com/cell/letta-code/credential-handling.md) | [1 s](https://ai-agents-review.com/cell/pi/credential-handling.md) | no |
| [Budget enforcement](https://ai-agents-review.com/column/budget-enforcement.md) | [2 s](https://ai-agents-review.com/cell/letta-code/budget-enforcement.md) | [1→2 [alt: pi-durable maxTurns] s](https://ai-agents-review.com/cell/pi/budget-enforcement.md) | yes |

## Product integration

| Column | letta-code | pi | Marks differ |
|---|---|---|---|
| [Embedding interfaces](https://ai-agents-review.com/column/embedding-interfaces.md) | [4 s](https://ai-agents-review.com/cell/letta-code/embedding-interfaces.md) | [4 s](https://ai-agents-review.com/cell/pi/embedding-interfaces.md) | no |
| [Declarative configuration](https://ai-agents-review.com/column/declarative-configuration.md) | [1 s](https://ai-agents-review.com/cell/letta-code/declarative-configuration.md) | [1 s](https://ai-agents-review.com/cell/pi/declarative-configuration.md) | no |
| [Durable execution](https://ai-agents-review.com/column/durable-execution.md) | [2 d](https://ai-agents-review.com/cell/letta-code/durable-execution.md) | [2→3 [alt: pi-durable] s](https://ai-agents-review.com/cell/pi/durable-execution.md) | yes |

## Operations and verification

| Column | letta-code | pi | Marks differ |
|---|---|---|---|
| [Service dependencies](https://ai-agents-review.com/column/service-dependencies.md) | [X (+E alt: local backend) s](https://ai-agents-review.com/cell/letta-code/service-dependencies.md) | [E s](https://ai-agents-review.com/cell/pi/service-dependencies.md) | yes |
| [Execution records](https://ai-agents-review.com/column/execution-records.md) | [1 d](https://ai-agents-review.com/cell/letta-code/execution-records.md) | [2 s](https://ai-agents-review.com/cell/pi/execution-records.md) | yes |
| [Result checks](https://ai-agents-review.com/column/result-checks.md) | [2 s](https://ai-agents-review.com/cell/letta-code/result-checks.md) | [2 s](https://ai-agents-review.com/cell/pi/result-checks.md) | no |

## Rationales

### Capability interface

- letta-code: Mods and host-injected external tools; per-subagent tool lists; MCP not native; no deferral/search (level 4 unmet)
- pi: Extensions, built-in MCP client, host-registered SDK tools (R8), per-session set; tool_search registered but inactive by default

### Reusable computation

- letta-code: Workflow script, args and journal saved, re-run by scriptPath; crons hold prompts, no scheduled workflow or typed params
- pi: Skills with scripts persist; codemode scripts not saved; pi-durable journal replay is not unit re-run (level 3 unmet)

### Capability transfer

- letta-code: Skill install and MemFS restore are [D]; fork type carries conversation; no dependency checking (level 3 unmet)
- pi: Pi package install (npm/git/local) documented [D]; fork/clone exist; no dependency checking (level 3 unmet)

### Durable evidence

- letta-code: Cloud messages server-side [D] plus client transcript copy; no retention policy; local file rewritten on fork
- pi: Append-only JSONL trees with tool calls; no retention policy, manual delete only (level 3 unmet)

### Context recovery

- letta-code: Cloud compaction/search [D] caps D; local mode keeps rows with default BM25 search and recall subagent
- pi: Originals in JSONL; recovery via file lists and temp-file paths only; no transcript search tool (level 3 unmet)

### Memory maintenance

- letta-code: MemFS auto-enabled on Cloud (index.ts:1808); reflection every 25 steps; rebase-retry/backoff; git versioning (not Windows/detached headless)
- pi: No learned-memory facility and no maintenance instruction; AGENTS.md and skills are guidance files

### Specialist definition

- letta-code: Markdown frontmatter sets tools, model, prompt; L4 unmet: child forced --permission-mode unrestricted, widening when parent interactive
- pi: Subagents exist only as shipped example extension; example code does not count toward B

### Continuation

- letta-code: Follow-ups via agent_id reuse child conversation; live state in memory; unresolved: resume of ephemeral API children after restart
- pi: No subagents in core CLI (example only); pi-durable checkpointed children with restart limit 5

### Coordination

- letta-code: Depth 2, 32 concurrent tasks, process-group cancel; L4 unmet: no tree-wide budget for Task children (messaging server-side [D])
- pi: No subagents in core CLI; pi-durable children and signals exist; unresolved: pi-durable depth/concurrency caps, cancellation

### Confinement

- letta-code: OS sandbox default-on only for memory subagents; main shell unconfined under unrestricted mode; network never isolated
- pi: No approvals or OS boundary in the CLI; documented alternative deployments count at B but are capped at 2 (rule 1)

### Credential handling

- letta-code: Full env inherited plus injected LETTA_API_KEY; only exact-match redaction and Bun keychain; L2 unmet: no denylist
- pi: Full env to bash; only inheritEnv:false for MCP and !command keychain lookups; L2 unmet: no denylist

### Budget enforcement

- letta-code: Workflow maxCostUsd is a per-call parameter of a default tool (R1); post-step, per run; main agent reporting only
- pi: CLI reports usage only with a 3-retry cap; the pi-durable stack enforces a maxTurns work limit when set (R3); no cost admission

### Embedding interfaces

- letta-code: Headless stream-json plus a WebSocket app server with typed protocol, abort, `can_use_tool` control requests and an external-tool-call handler
- pi: In-process `createAgentSession` (with customTools) plus RPC JSONL with prompt/steer/follow_up/abort/fork; typed events

### Declarative configuration

- letta-code: JSON spread over defaults; no schema; unknown keys pass through
- pi: Settings files explicitly not validated at runtime despite published schemas; only `models.json` is type-checked

### Durable execution

- letta-code: Cloud background runs and busy handling are server-side [D], so the evidence cap is 2. Local mode loses runs on a crash
- pi: CLI rejects concurrent prompts; orphaned calls get only synthetic transform-time errors, not recorded. pi-durable resumes or settles failed; unresolved: disconnect

### Service dependencies

- letta-code: Default API mode needs a reachable Letta server every turn; the local backend uses provider endpoints only
- pi: Single Node process, no daemon or DB; MCP and fd/rg run as children

### Execution records

- letta-code: Local transcript/debug files; background failures often only in the debug log; tool-error recording unresolved; server records [D]
- pi: JSONL includes tools, failures and retries, but the telemetry contract ships no exporter, so level-3 optional telemetry is unmet

### Result checks

- letta-code: Hooks: exit 2 blocks, but errors and timeouts fail open; Stop-hook re-prompts have no stated cap
- pi: Extension hooks can block or force another turn, with no stated cap; arguments are validated structurally
