Docs / Strand / connectors/ai-anthropic
Anthropic Claude Connector
Send prompts to Anthropic Claude models and receive completions from your Strand workflows. Use this connector for analysis, writing, code generation, classification, and any task that benefits from a large language model.
Direction: Read / Write | Type: ai.anthropic
Prerequisites
You need an Anthropic API key:
- Go to console.anthropic.com/settings/keys
- Click Create Key
- Copy the key (it starts with
sk-ant-)
Connector Setup
Create an Anthropic Claude connector from the Connectors page.
Configuration Fields
| Field | Required | Default | Description |
|---|---|---|---|
| Name | Yes | - | Friendly name (e.g., "Claude Production") |
| API Key | Yes | - | Anthropic API key (encrypted at rest) |
| Model | No | claude-sonnet-5 |
Default model for all nodes using this connector |
| Temperature | No | 0.7 |
Response randomness (0--1). Lower = more deterministic |
| Max Tokens | No | 1000 |
Maximum response tokens (1--200,000) |
| Timeout | No | 120 |
Request timeout in seconds (10--600) |
Note: Anthropic's temperature range is 0--1, narrower than OpenAI and Google (0--2).
Operations
Chat Completion
Generate a chat completion response from a Claude model. This is the single operation exposed by the connector.
Operation ID: chat
The prompt is sent as a user message. If System Instructions are configured on the node, they are sent as the system message preceding the prompt.
Models
| Model | Best for |
|---|---|
claude-sonnet-5 |
Balanced performance and cost (default) |
claude-opus-5 |
Highest capability for complex tasks |
claude-opus-4-8 |
Previous generation, high capability |
claude-sonnet-4-6 |
Previous generation, balanced |
claude-haiku-4-5 |
Fast and cost-effective for simple tasks |
You can use any valid Anthropic model name -- the field is free text, so newer models work as soon as Anthropic releases them, and older ones keep working until Anthropic retires them. Use the plain model ID without a date suffix.
Node Configuration
When you drag an Anthropic Claude connector node onto the canvas, these fields are available in the node inspector. They apply to this specific node and override connector-level defaults where noted.
| Field | Required | Default | Description | |
|---|---|---|---|---|
| Prompt | Yes | `{{ payload \ | tojson }}` | Prompt sent to the model. Supports Jinja2 templates |
| System Instructions | No | - | Markdown instructions that set the model's persona and behavior | |
| Model | No | connector default | Override the model for this node only | |
| Temperature | No | connector default | Override temperature (0 = deterministic, 1 = most creative) | |
| Max Tokens | No | connector default | Override maximum response tokens | |
| Timeout | No | connector default | Override request timeout in seconds (10--600) | |
| Max Retries | No | 2 |
Retries on transient errors such as rate limits and server errors (0--5) | |
| MCP Servers | No | - | MCP server connectors to attach as tools for this call | |
| Memory Enabled | No | false |
Persist conversation history across workflow runs | |
| Memory TTL | No | 3600 |
Seconds to retain history (60--2,592,000). Resets on each access | |
| Memory Max Messages | No | 20 |
Maximum messages kept in memory. Oldest are trimmed first (2--100) |
Output
A successful chat completion returns:
{
"response": "Based on the data provided, there are three key findings...",
"model": "claude-sonnet-5",
"provider": "anthropic",
"usage": {
"prompt_tokens": 150,
"completion_tokens": 89,
"total_tokens": 239
}
}
When memory is enabled, the output includes "memory_enabled": true. When MCP tools are called, the output includes an "mcp_tools_called" array. If retries occurred, a "retries" count is included.
Access the response in downstream nodes:
{{ steps.NODE_ID.output_payload.response }}
{{ steps.NODE_ID.output_payload.usage.total_tokens }}
Example Workflow
Summarize daily sensor data with ongoing context:
- Schedule Trigger fires every evening at 6 PM
- HTTP node fetches the day's sensor readings from your API
- Anthropic Claude node analyzes the data:
- System Instructions:
You are an IoT data analyst. Summarize sensor readings and flag anomalies. When memory is on, reference trends from previous days. - Prompt:
Today's sensor data:\n{{ payload.readings | tojson }} - Temperature:
0.3 - Memory Enabled:
true - Memory TTL:
604800(7 days) - Memory Max Messages:
30
- Slack node posts the summary to #sensor-reports
- Router node checks for flagged anomalies and sends urgent alerts if found
Because memory is enabled, the model builds on its prior analysis each day and can identify trends over the week.
Retries
The node automatically retries on transient errors -- rate limits (429), server errors (5xx), timeouts, and connection failures. Retries use exponential backoff with jitter and respect Retry-After headers from Anthropic. Non-retryable errors (invalid API key, bad request) fail immediately.
Conversation Memory
Toggle Memory Enabled on and the node will remember every exchange across workflow runs. Each node gets its own isolated, account-scoped memory that is securely persisted across runs. See AI Connectors for full details on memory behavior, TTL, trimming, and when to enable it.
MCP Tool Access
AI nodes can call external tools via MCP servers. Add one or more MCP server connectors to the MCP Servers field and the model will have access to those tools during its response.
Errors
| Error | Meaning |
|---|---|
| Anthropic API key is required | API key not configured on the connector |
| Invalid Anthropic API key | Key is incorrect or revoked. Generate a new one |
| Rate limit exceeded | Too many requests. The node will retry automatically |
| Request timeout | The model took too long. Increase the timeout setting |
| Overloaded | Anthropic's servers are temporarily overloaded. The node will retry automatically |
Related
- AI Connectors -- shared node config, memory, MCP, and examples for all providers
- OpenAI | Google Gemini
- MCP Server -- for tool access
Tendrl