# letta-code · Embedding interfaces

> 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.

- Runtime: [letta-code](https://ai-agents-review.com/runtime/letta-code.md)
- Column: [Embedding interfaces](https://ai-agents-review.com/column/embedding-interfaces.md) (Product integration)
- Mark: 4 s
- Default deployment: 4
- Best supported configuration: 4
- Page: https://ai-agents-review.com/cell/letta-code/embedding-interfaces

## Rationale

Headless stream-json plus a WebSocket app server with typed protocol, abort, `can_use_tool` control requests and an external-tool-call handler

## Rubric criteria for this column

- 0: Interactive UI only
- 1: Non-interactive CLI with text or JSON output only (scraping)
- 2: One supported programmatic interface (library **or** protocol) with an event stream, marked experimental or covering only part of the session lifecycle
- 3: Supported programmatic interface with typed events **and** session lifecycle control (start, follow-up/steer, interrupt, resume)
- 4: Level 3, plus host callbacks for approvals or host-executed tools **and** two or more transports or bindings (e.g. in-process plus network protocol)

## Review finding

Built in: headless `-p` with stream-json in/out; local WebSocket app server (default `ws://127.0.0.1:0`, non-loopback refused without token auth) with a typed client export. [opt: `--openai-api`] OpenAI-compatible routes. Letta Agent SDK and Letta REST API are external [D]. No ACP or MCP server. [I47][I48][I49][I50][I51][I52]

## Evidence cited by the mark

- [I47] letta-code — https://github.com/letta-ai/letta-code/blob/52a3bb3bc1999a2fd0f06b1dc2e4b0d94a925c21/src/headless.ts#L1445-L1461 — headless output/input format handling (text/json/stream-json) — [S]
- [I48] letta-code — https://github.com/letta-ai/letta-code/blob/52a3bb3bc1999a2fd0f06b1dc2e4b0d94a925c21/src/websocket/app-server.ts#L35 — default listen `ws://127.0.0.1:0`; non-loopback without auth refused at :151-155 — [S]
- [I50] letta-code — https://github.com/letta-ai/letta-code/blob/52a3bb3bc1999a2fd0f06b1dc2e4b0d94a925c21/src/app-server-client.ts#L1-L80 — typed app-server client (package export) — [S]

## Evidence also cited by the review finding

- [I49] letta-code — https://github.com/letta-ai/letta-code/blob/52a3bb3bc1999a2fd0f06b1dc2e4b0d94a925c21/src/websocket/app-server-auth.ts#L11-L83 — auth modes capability-token / signed-bearer-token — [S]
- [I51] letta-code — https://github.com/letta-ai/letta-code/blob/52a3bb3bc1999a2fd0f06b1dc2e4b0d94a925c21/src/websocket/app-server-openai.ts#L44-L45 — `--openai-api` routes `/v1/chat/completions`, `/v1/responses` — [S]
- [I52] letta-code — https://github.com/letta-ai/letta-code/blob/52a3bb3bc1999a2fd0f06b1dc2e4b0d94a925c21/src/tools/workflow/sdk-loader.ts#L7-L35 — loads external `@letta-ai/letta-agent-sdk` 0.8.38; API outside tree — [D]

## Grading record

- Grader A (default / best): 4 / 4
- Grader B (default / best): 4 / 4
