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

> ## Agent Instructions
> Internal links on these pages omit the .md extension. Append .md to a docs page URL, or send an Accept: text/markdown header, to get that page as markdown.

# エージェントについて

> ローカルの設定ファイルを使って AI エージェントを定義します

<div className="dev-docs-banner">
  <div className="dev-docs-banner-content">
    <div className="dev-docs-banner-title">
      開発者向けドキュメントを表示しています
    </div>

    <div className="dev-docs-banner-text">
      このドキュメントは、Base44 開発者プラットフォームで作業する開発者向けです。アプリエディタでの AI エージェントについては、<a href="/Building-your-app/AI-agents-for-apps">AI エージェントの設定</a>を参照してください。
    </div>
  </div>
</div>

[AI エージェント](/ja/Building-your-app/AI-agents-for-apps) は、カスタマイズ可能な AI アシスタントです。アクションを実行し、ツールに接続して、チームメンバーやエンドユーザーを支援します。エージェントの動作、権限、ツールは、ローカルの JSONC 設定ファイルで定義します。

## エージェントを作成する

`base44/agents/` ディレクトリに JSONC 設定ファイルを作成します (エージェントごとに 1 ファイル)。その後、[`agents push`](/ja/developers/references/cli/commands/agents-push) を実行して Base44 に同期します。

## 例

```jsonc theme={null}
{
  "name": "customer_support",
  "description": "Handles customer support inquiries and ticket management",
  "instructions": "You are a friendly customer support agent. Help users resolve their issues politely and efficiently. If you cannot help, escalate to a human agent.",
  "model": "claude-sonnet-5",
  "tool_configs": [
    {
      "entity_name": "tickets",
      "allowed_operations": ["read", "create", "update"],
    },
    {
      "entity_name": "customers",
      "allowed_operations": ["read"],
    },
    {
      "function_name": "send_notification",
      "description": "Sends a push notification to the customer",
    },
    {
      "function_name": "escalate_to_human",
      "description": "Escalates the conversation to a human support agent",
    },
  ],
  "whatsapp_greeting": "Hi, I'm your support assistant. How can I help you today?",
  "selected_skill_names": ["refund-policy", "brand-voice"],
}
```

## フィールドリファレンス

エージェントの設定には JSONC を使います。各エージェントは、`base44/agents/` ディレクトリ内の個別のファイルで定義します。

### 必須フィールド

<ResponseField name="name" type="string" required>
  エージェントの一意の識別子です。小文字とアンダースコアを使います。名前はファイル名と一致させます。たとえば、`customer_support` という名前のエージェントは `customer_support.jsonc` に置きます。
</ResponseField>

<ResponseField name="description" type="string" required>
  エージェントの機能の簡単な説明です。
</ResponseField>

<ResponseField name="instructions" type="string" required>
  エージェントの動作、性格、ガイドラインを定義するシステムプロンプトです。
</ResponseField>

<ResponseField name="model" type="string" required>
  エージェントが実行される AI モデルです。Base44 に選択を任せるには `automatic` を使います。または、[サポートされているモデル](/ja/developers/backend/resources/models) の一覧からプリセット ID を設定します。たとえば `claude-sonnet-5` や `gpt_6_sol` です。

  Base44 がまだ認識している廃止済みのプリセット ID は、現在の代替モデルに自動でアップグレードされます。
</ResponseField>

### 任意フィールド

<ResponseField name="tool_configs" type="array">
  エージェントがアプリとやり取りするために使えるツールです。[ツールの設定](#tool-configuration) を参照してください。
</ResponseField>

<ResponseField name="whatsapp_greeting" type="string">
  このエージェントとの WhatsApp 会話でのウェルカムメッセージです。
</ResponseField>

<ResponseField name="selected_skill_names" type="array">
  このエージェントに割り当てる [エージェントスキル](/ja/developers/backend/resources/agents/agent-skills) の名前です。1 つのエージェントにつき最大 10 個のスキルを割り当てられます。
</ResponseField>

## ツールの設定

`tool_configs` 配列は、エージェントの機能を定義します。ツールには **エンティティツール** と **関数ツール** の 2 種類があります。

### エンティティツール

エンティティツールを使うと、エージェントはアプリの [エンティティ](/ja/developers/backend/resources/entities/overview) に対して CRUD 操作を実行できます。

<ResponseField name="entity_name" type="string" required>
  エンティティの名前です。アプリ内の既存のエンティティと一致する必要があります。
</ResponseField>

<ResponseField name="allowed_operations" type="array" required>
  エージェントがこのエンティティに対して実行できる操作です。有効な値は `"read"`、`"create"`、`"update"`、`"delete"` です。
</ResponseField>

### 関数ツール

関数ツールを使うと、エージェントはアプリの [バックエンド関数](/ja/developers/backend/resources/backend-functions/overview) を呼び出せます。

<ResponseField name="function_name" type="string" required>
  関数の名前です。アプリ内の既存の関数と一致する必要があります。
</ResponseField>

<ResponseField name="description" type="string" required>
  関数の機能の説明です。エージェントはこの説明をもとに、関数を呼び出すタイミングを判断します。
</ResponseField>

## TypeScript の型

エージェントの設定から TypeScript の型を生成できます。これにより、SDK コードでエージェント名の型安全性とオートコンプリートを利用できます。詳細は [動的型](/ja/developers/references/sdk/getting-started/dynamic-types) を参照してください。

## 関連項目

* [`agents pull`](/ja/developers/references/cli/commands/agents-pull): Base44 からローカルプロジェクトにエージェントの設定を同期します
* [`agents push`](/ja/developers/references/cli/commands/agents-push): ローカルのエージェント設定を Base44 にデプロイします
* [エージェントスキル](/ja/developers/backend/resources/agents/agent-skills): エージェント用の再利用可能な指示セットを定義します
* [`agents`](/ja/developers/references/sdk/docs/interfaces/agents): コードでエージェントを扱うための SDK リファレンスです
* [AI エージェントの設定](/ja/Building-your-app/AI-agents-for-apps): AI エージェントの作成と設定のガイドです

<Note>このページは AI によって翻訳されました。最も正確で最新の情報については、[英語版](/) を参照してください。</Note>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.