Denis Shulyaka 43f2937ac6
Add Anthropic integration (#33952)
* Add Anthropic integration

* Update anthropic.markdown

* Update anthropic.markdown

* Update source/_integrations/anthropic.markdown

Co-authored-by: TheJulianJES <TheJulianJES@users.noreply.github.com>

* Minor style tweaks

* Apply suggestions from code review

---------

Co-authored-by: TheJulianJES <TheJulianJES@users.noreply.github.com>
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2024-08-03 08:29:10 +02:00

3.9 KiB

title, description, ha_category, ha_release, ha_iot_class, ha_config_flow, ha_codeowners, ha_domain, ha_integration_type, ha_platforms, related
title description ha_category ha_release ha_iot_class ha_config_flow ha_codeowners ha_domain ha_integration_type ha_platforms related
Anthropic Conversation Instructions on how to integrate Anthropic Claude as a conversation agent
Voice
2024.9 Cloud Polling true
@Shulyaka
anthropic service
conversation
docs title
/voice_control/voice_remote_expose_devices/ Exposing entities to Assist
docs title
/voice_control/assist_create_open_ai_personality/ Create an AI personality
url title
https://console.anthropic.com/settings/keys Anthropic API key
url title
https://www.anthropic.com Anthropic
url title
https://claude.ai Claude

The Anthropic {% term integrations %} adds a conversation agent powered by Anthropic, such as Claude 3.5 Sonnet, in Home Assistant.

Controlling Home Assistant is done by providing the AI access to the Assist API of Home Assistant. You can control what devices and entities it can access from the {% my voice_assistants title="exposed entities page" %}. The AI can provide you information about your devices and control them.

Legal note: Anthropic currently limits the API usage to organizations only, more info here: Can I use the Claude API for individual use?

This integration does not integrate with sentence triggers.

Prerequisites

Generating an API Key

The Anthropic API key is used to authenticate requests to the Anthropic API. To generate an API key, take the following steps:

  1. Log in to the Anthropic portal or sign up for an account.
  2. Enable billing with a valid credit card on the plans page.
  3. Visit the API Keys page to retrieve the API key you'll use to configure the integration.

{% include integrations/config_flow.md %}

{% include integrations/option_flow.md %} {% configuration_basic %} Instructions: description: Instructions for the AI on how it should respond to your requests. It is written using Home Assistant Templating.

Control Home Assistant: description: If the model is allowed to interact with Home Assistant. It can only control or provide information about entities that are exposed to it.

Recommended settings: description: If enabled, the recommended model and settings are chosen.

{% endconfiguration_basic %}

If you choose not to use the recommended settings, you can configure the following options:

{% configuration_basic %}

Model: description: The model that will complete your prompt. See models for additional details and options.

Maximum Tokens to Return in Response: description: The maximum number of tokens to generate before stopping. Note that our models may stop before reaching this maximum. This parameter only specifies the absolute maximum number of tokens to generate. Different models have different maximum values for this parameter. See models for details.

Temperature: description: Amount of randomness injected into the response. Use temperature closer to 0.0 for analytical / multiple choice, and closer to 1.0 for creative and generative tasks. Note that even with temperature of 0.0, the results will not be fully deterministic.

{% endconfiguration_basic %}