Skip to main content
Use Letta through Corsair: one client, typed API calls. Create an API key in Letta Cloud (app.letta.com). The baseUrl option points the plugin at another REST base, such as a proxy (https; plain http only for localhost). Things to know before you write:
  • Agents keep state. An agent has core memory blocks (always in its context), archival passages (searched when needed), attached tools, folders and files. agents.blocks.*, agents.passages.*, blocks.* and archives.* read and edit that memory directly.
  • Messages run the model. agents.messages.create and conversations.messages.create call the agent’s model and may run its tools, so they spend tokens and are destructive. agents.messages.createAsync runs in the background (poll runs.get); the streaming routes return the server-sent events as text.
  • Tools. tools.* manage custom tools, mcpServers.* connect MCP servers, and agents.tools.attach gives a tool to an agent. agents.tools.run and mcpServers.tools.run execute a tool directly.
  • Templates and identities (templates.*, agents.identities.*) are Letta Cloud features.
  • Routes Letta Cloud didn’t serve (11-27). On a free account, Letta Cloud had no route for archives.*, folders.*, templates.*, passages.search and agents.importFile (404, “Cannot GET”), though the reference lists them. They are kept as documented; expect a 404 until Letta serves them for your plan. Letta now steers new work to its Agent SDK and App Server; the REST API still answers.
  • Undocumented returns. Letta’s reference gives no return type for some routes (deletes, attach and detach, file open and close, tags, traces); those return the JSON Letta sends, unchecked, or { success: true } for an empty body.
What you get:
  • 129 typed API operations

Setup

1

Install

2

Add the plugin

corsair.ts
With multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.
3

Choose authentication

4

Connect a tenant

Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.

Example API calls

List agents
Send a message to an agent
See the full list on the API page.

What’s next

API reference

Every letta.api.* operation with input and output types.

Connect / OAuth

createLink, Hub delivery, and tenant connect flows.

Use with agents

Expose this plugin’s operations as MCP tools.