<!-- BusyBot node reference — https://busybot.net/tools/claude-memory/ -->

> Node: Claude Memory (`claude_memory`) · Action · v1
> Category: AI · Credentials: Anthropic (`anthropic`)
> Updated: 2026-08-16

# Claude Memory

> Manage conversation memory — stores and retrieves context across messages using multi-turn conversation patterns.

## Overview

Claude Memory manages conversation context by maintaining message history. It stores previous exchanges and sends them as conversation history to Claude via POST /v1/messages. Supports three operations: "chat" (send a message with full conversation history), "summarize" (condense conversation history into a summary), and "clear" (reset conversation history). The tool trims history to a configurable maximum number of messages and returns the updated history alongside the response for downstream chaining.

**Category:** AI  
**Tool Name:** `claude_memory`  
**Version:** 1

**Appearance:** Icon: `anthropic` | Color: `#d4a574`

## Node Type

**Action** — processes input items and produces output

## Input / Output

| Direction | Port(s) |
|-----------|--------|
| Input | `Input` |
| Output | `Output`, `Error` |

## Credentials

This tool requires **Anthropic** credentials.
See the [Credentials Guide](https://busybot.net/credentials/anthropic/) for setup instructions.

### Operations

| Operation | Value | Description |
|-----------|-------|-------------|
| Chat | `chat` | Send a message with full conversation history and receive a response |
| Summarize | `summarize` | Condense the conversation history into a concise summary |
| Clear | `clear` | Reset the conversation history to start fresh |

### Parameters

`Summarize` and `Clear` take no parameters of their own — see All Operations.

#### Chat (`chat`)

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| User Message | `string` | Yes | — | The user message to send to Claude. Falls back to item.message or item.prompt if empty. Required for "chat" operation. Supports expressions like {{ $json.text }}. |

#### All Operations

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Model | `options` | No | `Claude Sonnet` | The Claude model to use for conversation. Always uses the latest version (auto-updated). |
| | | | | Options: Claude Opus (most capable — complex analysis, coding and multi-step reasoning), Claude Sonnet (balanced — strong quality at lower cost and latency), Claude Haiku (fastest — simple tasks, classification and high-volume work). Each option tracks the current release of its tier, so the underlying model ID updates without any change to your node. |
| System Prompt | `string` | No | — | Optional system prompt to set the model's behavior and context. Leave empty for default behavior. Supports expressions. |
| Conversation History | `string` | No | — | JSON array of {role, content} objects representing prior conversation turns. Can be a JSON string or expression referencing an array. Also reads from item.conversationHistory if empty. |
| Options | `collection` | No | `{}` | Advanced generation, history and output settings. |
| — Max Tokens | `number` | No | `4096` | Maximum number of tokens to generate in the response. |
| — Temperature | `number` | No | `1` | Sampling temperature (0-1). Lower values are more deterministic, higher values more creative. |
| — Max History Messages | `number` | No | `20` | Maximum number of history messages to include. Older messages are trimmed from the beginning. |
| — Response Field Name | `string` | No | `response` | The output field name where the Claude response text will be stored. |
| Include Input | `boolean` | No | `false` | Whether to include the original input item fields in the output alongside the response. |
| Max Concurrency | `number` | No | `10` | Maximum number of items to process concurrently. |

## Output Data

One output item per input item. The result text lands on the field named by Response Field Name (`response` by default), and every operation also returns `updatedHistory` — the conversation array to feed into the next node in the chain. Binary data on the input item is forwarded unchanged, and with Include Input on the original item fields are merged in alongside the result.

```json
{
  "response": "The assistant's reply",
  "updatedHistory": [
    { "role": "user", "content": "What did we decide about the API?" },
    { "role": "assistant", "content": "The assistant's reply" }
  ],
  "model": "claude-...",
  "usage": { "input_tokens": 860, "output_tokens": 190 },
  "stopReason": "end_turn"
}
```

What each operation returns:

| Operation | Fields on the output item |
|-----------|---------------------------|
| `chat` | The response field with the reply text, `updatedHistory` (the trimmed history plus this turn's user and assistant messages), `model`, `usage`, `stopReason` |
| `summarize` | The response field with the summary text, `updatedHistory` reset to a two-message primer carrying that summary forward, `model`, `usage`, `stopReason` — or, when there is nothing to summarize, the message `No conversation history to summarize.` and an empty `updatedHistory` |
| `clear` | The response field with the message `Conversation history cleared.` and an empty `updatedHistory`. No model call is made, so `model`, `usage` and `stopReason` are absent |

Chain the conversation forward by expression, e.g. `{{ $json.updatedHistory }}`.

## Usage Examples

- Chat with Claude while maintaining conversation context across multiple turns
- Summarize a long conversation history into key points
- Clear conversation history to start a fresh context
- Chain multiple Claude Memory nodes to build multi-step conversations
- Use conversation history from a database or previous workflow step

## Example Configuration

Chat with the history carried on the item:

```json
{
  "type": "claude_memory",
  "parameters": {
    "operation": "chat",
    "userMessage": "What were the key points from our earlier discussion?",
    "conversationHistory": "{{ $json.conversationHistory }}",
    "systemPrompt": "You are a helpful assistant with a concise communication style.",
    "options": {
      "maxTokens": 1024,
      "temperature": 0.7,
      "maxHistoryMessages": 20,
      "responseFieldName": "response"
    }
  }
}
```

Compress a long history before it grows past the context window:

```json
{
  "type": "claude_memory",
  "parameters": {
    "operation": "summarize",
    "conversationHistory": "{{ $json.conversationHistory }}",
    "includeInput": true,
    "maxConcurrency": 5,
    "options": {
      "maxTokens": 512,
      "temperature": 0.3,
      "maxHistoryMessages": 50,
      "responseFieldName": "summary"
    }
  }
}
```

Start a fresh context:

```json
{
  "type": "claude_memory",
  "parameters": {
    "operation": "clear",
    "conversationHistory": ""
  }
}
```

A stateful support bot — feed each node's `updatedHistory` into the next turn:

```json
{
  "type": "claude_memory",
  "parameters": {
    "operation": "chat",
    "userMessage": "{{ $json.userInput }}",
    "conversationHistory": "{{ $json.updatedHistory }}",
    "systemPrompt": "You are a customer support agent for Acme Corp.",
    "includeInput": true,
    "maxConcurrency": 10,
    "options": {
      "maxTokens": 2048,
      "temperature": 0.8,
      "maxHistoryMessages": 20,
      "responseFieldName": "response"
    }
  }
}
```

### Error Handling

| Mode | Behavior |
|------|----------|
| **stop** | Halts workflow on first error |
| **continue** | Skips failed items, passes successful ones through |
| **errorPort** | Routes failed items to Error output port |

## Tips

Claude Memory manages multi-turn conversation context by persisting message history and submitting it to Claude via POST /v1/messages, supporting chat, summarize, and clear operations. Choose this tool when a workflow requires stateful dialogue continuity, history condensation to prevent token overflow, or a full context reset between conversation sessions. It outputs the Claude response text and the updated message history array on the main channel, with failures routed to the error channel.