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

# Anthropic

<Info>
  Before building an agent that uses an Anthropic model, you'll need to create an
  [Anthropic developer account](https://console.anthropic.com/) and get an API key.
</Info>

## Configuration

<ParamField path="name" type="AnthropicModel">
  The name of the [Anthropic model](https://docs.anthropic.com/en/docs/about-claude/models/overview) you
  want your agent to use. By default, your agent will use `claude-3-7-latest`.
</ParamField>

<ParamField path="secret" type="string">
  The name of the secret which contains your Anthropic API key. **NOTE:** This is the *name* of the
  secret, not your actual secret key!
</ParamField>

## Creating the Model

Calling `anthropic()` with no arguments will use all default values:

```ts theme={null}
import { Agent, anthropic } from '@ardent-ai/sdk';

const agent = new Agent({
  model: anthropic()
});
```

Passing a single `string` argument will set the model `name`:

```ts theme={null}
import { Agent, anthropic } from '@ardent-ai/sdk';

const agent = new Agent({
  model: anthropic('claude-4-0-opus')
});
```

Or, you can set every parameter by passing a configuration object:

```ts theme={null}
import { Agent, anthropic } from '@ardent-ai/sdk';

const agent = new Agent({
  model: anthropic({
    name: 'claude-4-0-opus',
    secret: 'MY_CUSTOM_ANTHROPIC_SECRET_NAME'
  })
});
```
