メインコンテンツへスキップ
POST
/
ai_agents
cURL
curl --request POST \
  --url https://api.box.com/2.0/ai_agents \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "ai_agent",
  "name": "My AI Agent",
  "access_state": "enabled",
  "icon_reference": "https://cdn01.boxcdn.net/app-assets/aistudio/avatars/logo_analytics.svg",
  "allowed_entities": [
    {
      "id": "11446498",
      "type": "user"
    }
  ],
  "ask": {
    "type": "ai_agent_ask",
    "access_state": "enabled",
    "description": "This is ASK Agent",
    "custom_instructions": "This is a custom instruction",
    "suggested_questions": [
      "What is in this file?",
      "What are the main highlights of this document?"
    ],
    "long_text": {
      "model": "azure__openai__gpt_4o_mini",
      "num_tokens_for_completion": 8400,
      "llm_endpoint_params": {
        "type": "openai_params",
        "temperature": 0,
        "top_p": 1,
        "frequency_penalty": 1.5,
        "presence_penalty": 1.5,
        "stop": "<|im_end|>"
      },
      "system_message": "You are a helpful travel assistant specialized in budget travel",
      "prompt_template": "It is `{current_date}`, consider these travel options `{content}` and answer the `{user_question}`.",
      "embeddings": {
        "model": "azure__openai__text_embedding_ada_002",
        "strategy": {
          "id": "basic",
          "num_tokens_per_chunk": 64
        }
      },
      "is_custom_instructions_included": false
    },
    "basic_text": {
      "model": "azure__openai__gpt_4o_mini",
      "num_tokens_for_completion": 8400,
      "llm_endpoint_params": {
        "type": "openai_params",
        "temperature": 0,
        "top_p": 1,
        "frequency_penalty": 1.5,
        "presence_penalty": 1.5,
        "stop": "<|im_end|>"
      },
      "system_message": "You are a helpful travel assistant specialized in budget travel",
      "prompt_template": "It is `{current_date}`, consider these travel options `{content}` and answer the `{user_question}`.",
      "is_custom_instructions_included": false
    },
    "basic_image": {
      "model": "azure__openai__gpt_4o_mini",
      "num_tokens_for_completion": 8400,
      "llm_endpoint_params": {
        "type": "openai_params",
        "temperature": 0,
        "top_p": 1,
        "frequency_penalty": 1.5,
        "presence_penalty": 1.5,
        "stop": "<|im_end|>"
      },
      "system_message": "You are a helpful travel assistant specialized in budget travel",
      "prompt_template": "It is `{current_date}`, consider these travel options `{content}` and answer the `{user_question}`.",
      "is_custom_instructions_included": false
    },
    "spreadsheet": {
      "model": "azure__openai__gpt_4o_mini",
      "num_tokens_for_completion": 8400,
      "llm_endpoint_params": {
        "type": "openai_params",
        "temperature": 0,
        "top_p": 1,
        "frequency_penalty": 1.5,
        "presence_penalty": 1.5,
        "stop": "<|im_end|>"
      }
    },
    "long_text_multi": {
      "model": "azure__openai__gpt_4o_mini",
      "num_tokens_for_completion": 8400,
      "llm_endpoint_params": {
        "type": "openai_params",
        "temperature": 0,
        "top_p": 1,
        "frequency_penalty": 1.5,
        "presence_penalty": 1.5,
        "stop": "<|im_end|>"
      },
      "system_message": "You are a helpful travel assistant specialized in budget travel",
      "prompt_template": "It is `{current_date}`, consider these travel options `{content}` and answer the `{user_question}`.",
      "embeddings": {
        "model": "azure__openai__text_embedding_ada_002",
        "strategy": {
          "id": "basic",
          "num_tokens_per_chunk": 64
        }
      },
      "is_custom_instructions_included": false
    },
    "basic_text_multi": {
      "model": "azure__openai__gpt_4o_mini",
      "num_tokens_for_completion": 8400,
      "llm_endpoint_params": {
        "type": "openai_params",
        "temperature": 0,
        "top_p": 1,
        "frequency_penalty": 1.5,
        "presence_penalty": 1.5,
        "stop": "<|im_end|>"
      },
      "system_message": "You are a helpful travel assistant specialized in budget travel",
      "prompt_template": "It is `{current_date}`, consider these travel options `{content}` and answer the `{user_question}`.",
      "is_custom_instructions_included": false
    },
    "basic_image_multi": {
      "model": "azure__openai__gpt_4o_mini",
      "num_tokens_for_completion": 8400,
      "llm_endpoint_params": {
        "type": "openai_params",
        "temperature": 0,
        "top_p": 1,
        "frequency_penalty": 1.5,
        "presence_penalty": 1.5,
        "stop": "<|im_end|>"
      },
      "system_message": "You are a helpful travel assistant specialized in budget travel",
      "prompt_template": "It is `{current_date}`, consider these travel options `{content}` and answer the `{user_question}`.",
      "is_custom_instructions_included": false
    }
  },
  "text_gen": {
    "type": "ai_agent_text_gen",
    "access_state": "enabled",
    "description": "This is ASK Agent",
    "custom_instructions": "This is a custom instruction",
    "suggested_questions": [
      "What is in this file?",
      "What are the main highlights of this document?"
    ],
    "basic_gen": {
      "model": "azure__openai__gpt_4o_mini",
      "num_tokens_for_completion": 8400,
      "llm_endpoint_params": {
        "type": "openai_params",
        "temperature": 0,
        "top_p": 1,
        "frequency_penalty": 1.5,
        "presence_penalty": 1.5,
        "stop": "<|im_end|>"
      },
      "system_message": "You are a helpful travel assistant specialized in budget travel",
      "prompt_template": "It is `{current_date}`, and I have $8000 and want to spend a week in the Azores. `{user_question}`",
      "embeddings": {
        "model": "azure__openai__text_embedding_ada_002",
        "strategy": {
          "id": "basic",
          "num_tokens_per_chunk": 64
        }
      },
      "content_template": "---{content}---",
      "is_custom_instructions_included": false
    }
  },
  "extract": {
    "type": "ai_agent_extract",
    "access_state": "enabled",
    "description": "This is ASK Agent",
    "custom_instructions": "This is a custom instruction",
    "long_text": {
      "model": "azure__openai__gpt_4o_mini",
      "num_tokens_for_completion": 8400,
      "llm_endpoint_params": {
        "type": "openai_params",
        "temperature": 0,
        "top_p": 1,
        "frequency_penalty": 1.5,
        "presence_penalty": 1.5,
        "stop": "<|im_end|>"
      },
      "system_message": "You are a helpful travel assistant specialized in budget travel",
      "prompt_template": "It is `{current_date}`, consider these travel options `{content}` and answer the `{user_question}`.",
      "embeddings": {
        "model": "azure__openai__text_embedding_ada_002",
        "strategy": {
          "id": "basic",
          "num_tokens_per_chunk": 64
        }
      },
      "is_custom_instructions_included": false
    },
    "basic_text": {
      "model": "azure__openai__gpt_4o_mini",
      "num_tokens_for_completion": 8400,
      "llm_endpoint_params": {
        "type": "openai_params",
        "temperature": 0,
        "top_p": 1,
        "frequency_penalty": 1.5,
        "presence_penalty": 1.5,
        "stop": "<|im_end|>"
      },
      "system_message": "You are a helpful travel assistant specialized in budget travel",
      "prompt_template": "It is `{current_date}`, consider these travel options `{content}` and answer the `{user_question}`.",
      "is_custom_instructions_included": false
    },
    "basic_image": {
      "model": "azure__openai__gpt_4o_mini",
      "num_tokens_for_completion": 8400,
      "llm_endpoint_params": {
        "type": "openai_params",
        "temperature": 0,
        "top_p": 1,
        "frequency_penalty": 1.5,
        "presence_penalty": 1.5,
        "stop": "<|im_end|>"
      },
      "system_message": "You are a helpful travel assistant specialized in budget travel",
      "prompt_template": "It is `{current_date}`, consider these travel options `{content}` and answer the `{user_question}`.",
      "is_custom_instructions_included": false
    }
  }
}
'
{
  "id": "1234567890",
  "origin": "CUSTOM",
  "name": "This is my Agent",
  "access_state": "enabled",
  "type": "ai_agent",
  "created_by": {
    "id": "11446498",
    "type": "user"
  },
  "created_at": "2022-01-01T00:00:00Z",
  "modified_by": {
    "id": "11446498",
    "type": "user"
  },
  "modified_at": "2022-01-01T00:00:00Z",
  "icon_reference": "https://cdn01.boxcdn.net/app-assets/aistudio/avatars/logo_analytics.svg",
  "allowed_entities": [
    {
      "id": "11446498",
      "type": "user"
    }
  ],
  "ask": {
    "type": "ai_agent_ask",
    "access_state": "enabled",
    "description": "This is ASK Agent",
    "custom_instructions": "This is a custom instruction",
    "suggested_questions": [
      "What is in this file?",
      "What are the main highlights of this document?"
    ],
    "long_text": {
      "model": "azure__openai__gpt_4o_mini",
      "num_tokens_for_completion": 8400,
      "llm_endpoint_params": {
        "type": "openai_params",
        "temperature": 0,
        "top_p": 1,
        "frequency_penalty": 1.5,
        "presence_penalty": 1.5,
        "stop": "<|im_end|>"
      },
      "system_message": "You are a helpful travel assistant specialized in budget travel",
      "prompt_template": "It is `{current_date}`, consider these travel options `{content}` and answer the `{user_question}`.",
      "embeddings": {
        "model": "azure__openai__text_embedding_ada_002",
        "strategy": {
          "id": "basic",
          "num_tokens_per_chunk": 64
        }
      },
      "is_custom_instructions_included": false,
      "warnings": [
        "MODEL_INACTIVE"
      ]
    },
    "basic_text": {
      "model": "azure__openai__gpt_4o_mini",
      "num_tokens_for_completion": 8400,
      "llm_endpoint_params": {
        "type": "openai_params",
        "temperature": 0,
        "top_p": 1,
        "frequency_penalty": 1.5,
        "presence_penalty": 1.5,
        "stop": "<|im_end|>"
      },
      "system_message": "You are a helpful travel assistant specialized in budget travel",
      "prompt_template": "It is `{current_date}`, consider these travel options `{content}` and answer the `{user_question}`.",
      "is_custom_instructions_included": false,
      "warnings": [
        "MODEL_INACTIVE"
      ]
    },
    "basic_image": {
      "model": "azure__openai__gpt_4o_mini",
      "num_tokens_for_completion": 8400,
      "llm_endpoint_params": {
        "type": "openai_params",
        "temperature": 0,
        "top_p": 1,
        "frequency_penalty": 1.5,
        "presence_penalty": 1.5,
        "stop": "<|im_end|>"
      },
      "system_message": "You are a helpful travel assistant specialized in budget travel",
      "prompt_template": "It is `{current_date}`, consider these travel options `{content}` and answer the `{user_question}`.",
      "is_custom_instructions_included": false,
      "warnings": [
        "MODEL_INACTIVE"
      ]
    },
    "spreadsheet": {
      "model": "azure__openai__gpt_4o_mini",
      "num_tokens_for_completion": 8400,
      "llm_endpoint_params": {
        "type": "openai_params",
        "temperature": 0,
        "top_p": 1,
        "frequency_penalty": 1.5,
        "presence_penalty": 1.5,
        "stop": "<|im_end|>"
      },
      "warnings": [
        "MODEL_INACTIVE"
      ]
    },
    "long_text_multi": {
      "model": "azure__openai__gpt_4o_mini",
      "num_tokens_for_completion": 8400,
      "llm_endpoint_params": {
        "type": "openai_params",
        "temperature": 0,
        "top_p": 1,
        "frequency_penalty": 1.5,
        "presence_penalty": 1.5,
        "stop": "<|im_end|>"
      },
      "system_message": "You are a helpful travel assistant specialized in budget travel",
      "prompt_template": "It is `{current_date}`, consider these travel options `{content}` and answer the `{user_question}`.",
      "embeddings": {
        "model": "azure__openai__text_embedding_ada_002",
        "strategy": {
          "id": "basic",
          "num_tokens_per_chunk": 64
        }
      },
      "is_custom_instructions_included": false,
      "warnings": [
        "MODEL_INACTIVE"
      ]
    },
    "basic_text_multi": {
      "model": "azure__openai__gpt_4o_mini",
      "num_tokens_for_completion": 8400,
      "llm_endpoint_params": {
        "type": "openai_params",
        "temperature": 0,
        "top_p": 1,
        "frequency_penalty": 1.5,
        "presence_penalty": 1.5,
        "stop": "<|im_end|>"
      },
      "system_message": "You are a helpful travel assistant specialized in budget travel",
      "prompt_template": "It is `{current_date}`, consider these travel options `{content}` and answer the `{user_question}`.",
      "is_custom_instructions_included": false,
      "warnings": [
        "MODEL_INACTIVE"
      ]
    },
    "basic_image_multi": {
      "model": "azure__openai__gpt_4o_mini",
      "num_tokens_for_completion": 8400,
      "llm_endpoint_params": {
        "type": "openai_params",
        "temperature": 0,
        "top_p": 1,
        "frequency_penalty": 1.5,
        "presence_penalty": 1.5,
        "stop": "<|im_end|>"
      },
      "system_message": "You are a helpful travel assistant specialized in budget travel",
      "prompt_template": "It is `{current_date}`, consider these travel options `{content}` and answer the `{user_question}`.",
      "is_custom_instructions_included": false,
      "warnings": [
        "MODEL_INACTIVE"
      ]
    }
  },
  "text_gen": {
    "type": "ai_agent_text_gen",
    "access_state": "enabled",
    "description": "This is ASK Agent",
    "custom_instructions": "This is a custom instruction",
    "suggested_questions": [
      "What is in this file?",
      "What are the main highlights of this document?"
    ],
    "basic_gen": {
      "model": "azure__openai__gpt_4o_mini",
      "num_tokens_for_completion": 8400,
      "llm_endpoint_params": {
        "type": "openai_params",
        "temperature": 0,
        "top_p": 1,
        "frequency_penalty": 1.5,
        "presence_penalty": 1.5,
        "stop": "<|im_end|>"
      },
      "system_message": "You are a helpful travel assistant specialized in budget travel",
      "prompt_template": "It is `{current_date}`, and I have $8000 and want to spend a week in the Azores. `{user_question}`",
      "embeddings": {
        "model": "azure__openai__text_embedding_ada_002",
        "strategy": {
          "id": "basic",
          "num_tokens_per_chunk": 64
        }
      },
      "content_template": "---{content}---",
      "is_custom_instructions_included": false,
      "warnings": [
        "MODEL_INACTIVE"
      ]
    }
  },
  "extract": {
    "type": "ai_agent_extract",
    "access_state": "enabled",
    "description": "This is ASK Agent",
    "custom_instructions": "This is a custom instruction",
    "long_text": {
      "model": "azure__openai__gpt_4o_mini",
      "num_tokens_for_completion": 8400,
      "llm_endpoint_params": {
        "type": "openai_params",
        "temperature": 0,
        "top_p": 1,
        "frequency_penalty": 1.5,
        "presence_penalty": 1.5,
        "stop": "<|im_end|>"
      },
      "system_message": "You are a helpful travel assistant specialized in budget travel",
      "prompt_template": "It is `{current_date}`, consider these travel options `{content}` and answer the `{user_question}`.",
      "embeddings": {
        "model": "azure__openai__text_embedding_ada_002",
        "strategy": {
          "id": "basic",
          "num_tokens_per_chunk": 64
        }
      },
      "is_custom_instructions_included": false,
      "warnings": [
        "MODEL_INACTIVE"
      ]
    },
    "basic_text": {
      "model": "azure__openai__gpt_4o_mini",
      "num_tokens_for_completion": 8400,
      "llm_endpoint_params": {
        "type": "openai_params",
        "temperature": 0,
        "top_p": 1,
        "frequency_penalty": 1.5,
        "presence_penalty": 1.5,
        "stop": "<|im_end|>"
      },
      "system_message": "You are a helpful travel assistant specialized in budget travel",
      "prompt_template": "It is `{current_date}`, consider these travel options `{content}` and answer the `{user_question}`.",
      "is_custom_instructions_included": false,
      "warnings": [
        "MODEL_INACTIVE"
      ]
    },
    "basic_image": {
      "model": "azure__openai__gpt_4o_mini",
      "num_tokens_for_completion": 8400,
      "llm_endpoint_params": {
        "type": "openai_params",
        "temperature": 0,
        "top_p": 1,
        "frequency_penalty": 1.5,
        "presence_penalty": 1.5,
        "stop": "<|im_end|>"
      },
      "system_message": "You are a helpful travel assistant specialized in budget travel",
      "prompt_template": "It is `{current_date}`, consider these travel options `{content}` and answer the `{user_question}`.",
      "is_custom_instructions_included": false,
      "warnings": [
        "MODEL_INACTIVE"
      ]
    }
  }
}
このリソースは、バージョン2024.0のエンドポイントで使用されています。 詳細については、 Box APIのバージョン管理を参照してください。Box SDKのバージョニング戦略について詳しく学ぶ。」

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json

AIエージェント作成リクエストのスキーマ。

type
enum<string>
required

クエリの処理に使用されるエージェントのタイプ。

利用可能なオプション:
ai_agent
Example:

"ai_agent"

name
string
required

AIエージェントの名前。

Example:

"My AI Agent"

access_state
string
required

AIエージェントの状態。使用可能な値はenableddisabledenabled_for_selected_usersです。

Example:

"enabled"

icon_reference
string

AIエージェントのアイコン参照。これは、URL https://cdn01.boxcdn.net/app-assets/aistudio/avatars/<file_name>の形式で指定する必要があります。この場合、file_nameに使用可能な値はlogo_boxAi.pnglogo_stamp.pnglogo_legal.pnglogo_finance.pnglogo_config.pnglogo_handshake.pnglogo_analytics.pnglogo_classification.pngです。

Minimum string length: 1
Example:

"https://cdn01.boxcdn.net/app-assets/aistudio/avatars/logo_analytics.svg"

allowed_entities
タイプとIDが指定されたエンティティ · object[]

許可するユーザーまたはグループのリスト。

タイプとIDが指定されたエンティティ。 他のリソース内にネストされたときに使用されるユーザーのMini版の表示。

ask
AIエージェントの機能 (質問リクエスト) · object

クエリの処理に使用するAIエージェント。

text_gen
AIエージェントの機能 (テキスト生成リクエスト) · object

テキストの生成に使用するAIエージェント。

extract
AIエージェントの機能 (抽出リクエスト) · object

メタデータ抽出に使用するAIエージェント。

Response

作成されたAIエージェントの定義。

AIエージェントインスタンスのFull版の表示。 AIエージェントインスタンスのStandard版の表示。

id
string
required

AIエージェントの一意の識別子。

Example:

"1234567890"

origin
string
required

AIエージェントのプロバイダ。

Example:

"CUSTOM"

name
string
required

AIエージェントの名前。

Example:

"This is my Agent"

access_state
string
required

AIエージェントの状態。使用可能な値はenableddisabledenabled_for_selected_usersです。

Example:

"enabled"

type
enum<string>

クエリの処理に使用されるエージェントのタイプ。

利用可能なオプション:
ai_agent
Example:

"ai_agent"

created_by
ユーザー (Base) · object

このエージェントを作成したユーザー。

created_at
string<date-time>

このAIエージェントが作成された時点のISO日時形式のタイムスタンプ。

Example:

"2022-01-01T00:00:00Z"

modified_by
ユーザー (Base) · object

このエージェントを直近で変更したユーザー。

modified_at
string<date-time>

このAIエージェントが最近変更された時点のISO日時形式のタイムスタンプ。

Example:

"2022-01-01T00:00:00Z"

icon_reference
string

AIエージェントのアイコン参照。

Minimum string length: 1
Example:

"https://cdn01.boxcdn.net/app-assets/aistudio/avatars/logo_analytics.svg"

allowed_entities
タイプとIDが指定されたエンティティ · object[]

許可するユーザーまたはグループのリスト。

タイプとIDが指定されたエンティティ。 他のリソース内にネストされたときに使用されるユーザーのMini版の表示。

ask
AIエージェントの機能 (質問) · object

質問に使用するAIエージェント。

text_gen
AIエージェントの機能 (テキスト生成) · object

テキストの生成に使用するAIエージェント。

extract
AIエージェントの機能 (抽出) · object

メタデータ抽出に使用するAIエージェント。