> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jinba.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Anthropic

> Invoke responses from Claude

## Overview

The Anthropic tool allows you to interact with the Claude AI model. It provides a simple interface to send prompts and receive responses.

## Key Features

* `ANTHROPIC_INVOKE`
  * Send prompts to Claude AI
  * Receive structured responses via JSON
* `ANTHROPIC_AGENT`
  * Run a Claude Managed Agent loop as a single workflow step, with file read/write/edit and web tools
  * Mounts input files for the agent and returns files the agent produces

## Authentication

For further details, [click here](/en/pages/credentials/anthropic).

To get an Anthropic API key, please sign up at the [official Anthropic website](https://www.anthropic.com/) and follow the developer documentaiton.

**Note**: Treat API keys as sensitive information and never commit them to public repositories.

### Example: Asking Claude a Question

```yaml theme={null}
- id: claude
  tool: ANTHROPIC_INVOKE
  config:
    - name: version
      value: claude-3-7-sonnet-20250219
    - name: token
      value: "{{secrets.ANTHROPIC_API_KEY}}"
  input:
    - name: prompt
      value: What is the capital of France?
```

### Example: Running a Claude Managed Agent

`ANTHROPIC_AGENT` runs a Claude Managed Agent that can read, write, and edit files and use web tools autonomously. Input files (up to 20, passed via `files`) are mounted under `/workspace/inputs/` for the agent, and files the agent writes to `/mnt/session/outputs/` are returned as `result.files` — each entry has `content`, `filename`, and `fileType`, shaped so it can be passed directly to a downstream `OUTPUT_FILE` step. The agent's final text output is returned as `result.content`, along with `stop_reason` and `timed_out`.

Available models are `claude-opus-4-7` (default), `claude-sonnet-4-6`, and `claude-haiku-4-5-20251001`. The `timeout_sec` input sets a hard wall-clock timeout in seconds (60–1800, default 600). If you bring your own Anthropic API key, you must also supply your own `agent_id` and `environment_id` in config; in that case the model is fixed on your Anthropic-side Agent and the `model` selector is ignored.

```yaml theme={null}
- id: agent
  tool: ANTHROPIC_AGENT
  config:
    - name: model
      value: claude-opus-4-7
  input:
    - name: prompt
      value: |
        Read the attached CSV, analyze monthly sales trends,
        and write a summary report to /mnt/session/outputs/report.md
    - name: files
      value: "{{steps.input_file.result.url}}"
    - name: timeout_sec
      value: 900
```
