# Letta

> Create and manage Letta agents with long-term memory: send them messages, read their replies, and manage their memory blocks, tools and models.

App · 20 actions. Web page: https://docs.lodol.com/docs/integrations/letta

## Actions

### Attach memory block

Give an agent a memory block to read and update.

**Inputs**

- Agent (`agent_id`, text, required): Agent id.
- Block (`block_id`, text, required): Block id.

**Outputs**

- `data` (object): Response.
- `next_cursor` (text): Continuation token, when returned by the service.

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "description": "example",
    "id": "example",
    "label": "example",
    "name": "example",
    "updated_at": "example",
    "value": "example"
  },
  "next_cursor": ""
}
```

### Create agent

Create an agent with a model, a system prompt, memory blocks and tools.

**Inputs**

- Name (`name`, text): Name.
- Description (`description`, text): Description.
- Model (`model`, text): Model.
- Embedding (`embedding`, text): Embedding.
- System (`system`, text): System.
- Memory blocks (`memory_blocks`, list): Memory blocks.
- Tool ids (`tool_ids`, list): Tool ids.
- Tags (`tags`, list): Tags.

**Outputs**

- `data` (object): Response.
- `next_cursor` (text): Continuation token, when returned by the service.

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "description": "example",
    "id": "example",
    "label": "example",
    "name": "example",
    "updated_at": "example",
    "value": "example"
  },
  "next_cursor": ""
}
```

### Create block

Create a memory block that agents can read and update.

**Inputs**

- Label (`label`, text, required): Label.
- Value (`value`, text, required): Value.
- Description (`description`, text): Description.
- Limit (`limit`, number): Limit. At least 1.
- Read only (`read_only`, true/false): Read only.

**Outputs**

- `data` (object): Response.
- `next_cursor` (text): Continuation token, when returned by the service.

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "description": "example",
    "id": "example",
    "label": "example",
    "name": "example",
    "updated_at": "example",
    "value": "example"
  },
  "next_cursor": ""
}
```

### Delete agent

Delete an agent.

**Inputs**

- Agent (`agent_id`, text, required): Agent id.

**Outputs**

- `data` (object): Response.
- `next_cursor` (text): Continuation token, when returned by the service.

**Example output**

```json
{
  "data": {},
  "next_cursor": ""
}
```

### Delete block

Delete a memory block.

**Inputs**

- Block (`block_id`, text, required): Block id.

**Outputs**

- `data` (object): Response.
- `next_cursor` (text): Continuation token, when returned by the service.

**Example output**

```json
{
  "data": {},
  "next_cursor": ""
}
```

### Delete tool

Delete a tool.

**Inputs**

- Tool (`tool_id`, text, required): Tool id.

**Outputs**

- `data` (object): Response.
- `next_cursor` (text): Continuation token, when returned by the service.

**Example output**

```json
{
  "data": {},
  "next_cursor": ""
}
```

### Detach memory block

Take a memory block away from an agent, without deleting it.

**Inputs**

- Agent (`agent_id`, text, required): Agent id.
- Block (`block_id`, text, required): Block id.

**Outputs**

- `data` (object): Response.
- `next_cursor` (text): Continuation token, when returned by the service.

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "description": "example",
    "id": "example",
    "label": "example",
    "name": "example",
    "updated_at": "example",
    "value": "example"
  },
  "next_cursor": ""
}
```

### Get agent

Get an agent's details, such as its model, system prompt, tools and memory.

**Inputs**

- Agent (`agent_id`, text, required): Agent id.

**Outputs**

- `data` (object): Response.
- `next_cursor` (text): Continuation token, when returned by the service.

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "description": "example",
    "id": "example",
    "label": "example",
    "name": "example",
    "updated_at": "example",
    "value": "example"
  },
  "next_cursor": ""
}
```

### Get block

Get a memory block's label, value and limits.

**Inputs**

- Block (`block_id`, text, required): Block id.

**Outputs**

- `data` (object): Response.
- `next_cursor` (text): Continuation token, when returned by the service.

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "description": "example",
    "id": "example",
    "label": "example",
    "name": "example",
    "updated_at": "example",
    "value": "example"
  },
  "next_cursor": ""
}
```

### Get tool

Get a tool's details, such as its description and arguments.

**Inputs**

- Tool (`tool_id`, text, required): Tool id.

**Outputs**

- `data` (object): Response.
- `next_cursor` (text): Continuation token, when returned by the service.

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "description": "example",
    "id": "example",
    "label": "example",
    "name": "example",
    "updated_at": "example",
    "value": "example"
  },
  "next_cursor": ""
}
```

### List agent blocks

List the memory blocks attached to an agent.

**Inputs**

- Agent (`agent_id`, text, required): Agent id.

**Outputs**

- `data` (list): Response.
- `next_cursor` (text): Continuation token, when returned by the service.

**Example output**

```json
{
  "data": [],
  "next_cursor": ""
}
```

### List agents

List your agents, optionally filtered by name.

**Inputs**

- After (`after`, text): After.
- Limit (`limit`, number): Limit. From 1 to 1000. Default: `100`.
- Name (`name`, text): Name.

**Outputs**

- `data` (list): Response.
- `next_cursor` (text): Continuation token, when returned by the service.

**Example output**

```json
{
  "data": [],
  "next_cursor": ""
}
```

### List blocks

List your memory blocks, optionally filtered by label.

**Inputs**

- After (`after`, text): After.
- Limit (`limit`, number): Limit. From 1 to 1000. Default: `100`.
- Label (`label`, text): Label.

**Outputs**

- `data` (list): Response.
- `next_cursor` (text): Continuation token, when returned by the service.

**Example output**

```json
{
  "data": [],
  "next_cursor": ""
}
```

### List messages

List an agent's conversation history, newest last.

**Inputs**

- Agent (`agent_id`, text, required): Agent id.
- After (`after`, text): After.
- Limit (`limit`, number): Limit. From 1 to 1000. Default: `100`.

**Outputs**

- `data` (list): Response.
- `next_cursor` (text): Continuation token, when returned by the service.

**Example output**

```json
{
  "data": [],
  "next_cursor": ""
}
```

### List models

List the language models agents can use.

**Inputs**: None.

**Outputs**

- `data` (list): Response.
- `next_cursor` (text): Continuation token, when returned by the service.

**Example output**

```json
{
  "data": [],
  "next_cursor": ""
}
```

### List tools

List the tools agents can use, optionally filtered by name.

**Inputs**

- After (`after`, text): After.
- Limit (`limit`, number): Limit. From 1 to 1000. Default: `100`.
- Name (`name`, text): Name.

**Outputs**

- `data` (list): Response.
- `next_cursor` (text): Continuation token, when returned by the service.

**Example output**

```json
{
  "data": [],
  "next_cursor": ""
}
```

### Search tools

Find tools by what they do.

**Inputs**

- Query (`query`, text, required): Query.

**Outputs**

- `data` (object): Response.
- `next_cursor` (text): Continuation token, when returned by the service.

**Example output**

```json
{
  "data": {},
  "next_cursor": ""
}
```

### Send message

Send messages to an agent and get its reply.

**Inputs**

- Agent (`agent_id`, text, required): Agent id.
- Messages (`messages`, list, required): Messages.

**Outputs**

- `data` (object): Response.
- `next_cursor` (text): Continuation token, when returned by the service.

**Example output**

```json
{
  "data": {},
  "next_cursor": ""
}
```

### Update agent

Change an agent's name, model, system prompt, tools or tags.

**Inputs**

- Agent (`agent_id`, text, required): Agent id.
- Name (`name`, text): Name.
- Description (`description`, text): Description.
- Model (`model`, text): Model.
- Embedding (`embedding`, text): Embedding.
- System (`system`, text): System.
- Tool ids (`tool_ids`, list): Tool ids.
- Tags (`tags`, list): Tags.

**Outputs**

- `data` (object): Response.
- `next_cursor` (text): Continuation token, when returned by the service.

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "description": "example",
    "id": "example",
    "label": "example",
    "name": "example",
    "updated_at": "example",
    "value": "example"
  },
  "next_cursor": ""
}
```

### Update block

Change a memory block's label, value, description or limits.

**Inputs**

- Block (`block_id`, text, required): Block id.
- Label (`label`, text): Label.
- Value (`value`, text): Value.
- Description (`description`, text): Description.
- Limit (`limit`, number): Limit. At least 1.
- Read only (`read_only`, true/false): Read only.

**Outputs**

- `data` (object): Response.
- `next_cursor` (text): Continuation token, when returned by the service.

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "description": "example",
    "id": "example",
    "label": "example",
    "name": "example",
    "updated_at": "example",
    "value": "example"
  },
  "next_cursor": ""
}
```
