Box Developerドキュメント
最新バージョン

エージェントIDを指定してAIエージェントを取得

get
https://api.box.com/2.0
/ai_agents/:agent_id

このエンドポイントはバージョン2024.0です。引き続き使用するために 変更は必要ありません。詳細については、 **Box APIのバージョン管理**を参照してください。

agent_idパラメータを使用してAIエージェントを取得します。

リクエスト

bearer [ACCESS_TOKEN]
application/json

パスパラメータ

stringパス内必須
1234

取得するエージェントID。

クエリパラメータ

string arrayクエリ内省略可能
ask,text_gen,extract

レスポンスで返されるフィールド。

レスポンス

エージェントを含む成功したレスポンス。

予期しないクライアントエラー。

予期しないサーバーエラー。

get
エージェントIDを指定してAIエージェントを取得
このドキュメント内で一部のAPIを試せるようになりました。
ログイン

リクエストの例

TypeScript Gen
await client.aiStudio.getAiAgentById(createdAgent.id, {
  queryParams: {
    fields: ['ask' as string],
  } satisfies GetAiAgentByIdQueryParams,
} satisfies GetAiAgentByIdOptionalsInput);
Python Gen
client.ai_studio.get_ai_agent_by_id(created_agent.id, fields=["ask"])
.NET Gen
await client.AiStudio.GetAiAgentByIdAsync(agentId: createdAgent.Id, queryParams: new GetAiAgentByIdQueryParams() { Fields = Array.AsReadOnly(new [] {"ask"}) });

レスポンスの例

{
  "id": "1234567890",
  "type": "ai_agent",
  "access_state": "enabled",
  "allowed_entities": [
    {
      "id": "11446498",
      "type": "user"
    }
  ],
  "ask": {
    "type": "ai_agent_ask",
    "access_state": "enabled",
    "basic_text": {
      "is_custom_instructions_included": false,
      "llm_endpoint_params": {
        "type": "openai_params",
        "frequency_penalty": 1.5,
        "presence_penalty": 1.5,
        "stop": "<|im_end|>",
        "temperature": 0,
        "top_p": 1
      },
      "model": "azure__openai__gpt_4o_mini",
      "num_tokens_for_completion": 8400,
      "prompt_template": "It is `{current_date}`, consider these travel options `{content}` and answer the `{user_question}`.",
      "system_message": "You are a helpful travel assistant specialized in budget travel"
    },
    "basic_text_multi": {
      "is_custom_instructions_included": false,
      "llm_endpoint_params": {
        "type": "openai_params",
        "frequency_penalty": 1.5,
        "presence_penalty": 1.5,
        "stop": "<|im_end|>",
        "temperature": 0,
        "top_p": 1
      },
      "model": "azure__openai__gpt_4o_mini",
      "num_tokens_for_completion": 8400,
      "prompt_template": "It is `{current_date}`, consider these travel options `{content}` and answer the `{user_question}`.",
      "system_message": "You are a helpful travel assistant specialized in budget travel"
    },
    "custom_instructions": "This is a custom instruction",
    "description": "This is ASK Agent",
    "long_text": {
      "embeddings": {
        "model": "azure__openai__text_embedding_ada_002",
        "strategy": {
          "id": "basic",
          "num_tokens_per_chunk": 64
        }
      },
      "is_custom_instructions_included": false,
      "llm_endpoint_params": {
        "type": "openai_params",
        "frequency_penalty": 1.5,
        "presence_penalty": 1.5,
        "stop": "<|im_end|>",
        "temperature": 0,
        "top_p": 1
      },
      "model": "azure__openai__gpt_4o_mini",
      "num_tokens_for_completion": 8400,
      "prompt_template": "It is `{current_date}`, consider these travel options `{content}` and answer the `{user_question}`.",
      "system_message": "You are a helpful travel assistant specialized in budget travel"
    },
    "long_text_multi": {
      "embeddings": {
        "model": "azure__openai__text_embedding_ada_002",
        "strategy": {
          "id": "basic",
          "num_tokens_per_chunk": 64
        }
      },
      "is_custom_instructions_included": false,
      "llm_endpoint_params": {
        "type": "openai_params",
        "frequency_penalty": 1.5,
        "presence_penalty": 1.5,
        "stop": "<|im_end|>",
        "temperature": 0,
        "top_p": 1
      },
      "model": "azure__openai__gpt_4o_mini",
      "num_tokens_for_completion": 8400,
      "prompt_template": "It is `{current_date}`, consider these travel options `{content}` and answer the `{user_question}`.",
      "system_message": "You are a helpful travel assistant specialized in budget travel"
    }
  },
  "created_at": "2022-01-01T00:00:00Z",
  "created_by": {
    "id": "11446498",
    "type": "user"
  },
  "extract": {
    "type": "ai_agent_extract",
    "access_state": "enabled",
    "basic_text": {
      "is_custom_instructions_included": false,
      "llm_endpoint_params": {
        "type": "openai_params",
        "frequency_penalty": 1.5,
        "presence_penalty": 1.5,
        "stop": "<|im_end|>",
        "temperature": 0,
        "top_p": 1
      },
      "model": "azure__openai__gpt_4o_mini",
      "num_tokens_for_completion": 8400,
      "prompt_template": "It is `{current_date}`, consider these travel options `{content}` and answer the `{user_question}`.",
      "system_message": "You are a helpful travel assistant specialized in budget travel"
    },
    "custom_instructions": "This is a custom instruction",
    "description": "This is ASK Agent",
    "long_text": {
      "embeddings": {
        "model": "azure__openai__text_embedding_ada_002",
        "strategy": {
          "id": "basic",
          "num_tokens_per_chunk": 64
        }
      },
      "is_custom_instructions_included": false,
      "llm_endpoint_params": {
        "type": "openai_params",
        "frequency_penalty": 1.5,
        "presence_penalty": 1.5,
        "stop": "<|im_end|>",
        "temperature": 0,
        "top_p": 1
      },
      "model": "azure__openai__gpt_4o_mini",
      "num_tokens_for_completion": 8400,
      "prompt_template": "It is `{current_date}`, consider these travel options `{content}` and answer the `{user_question}`.",
      "system_message": "You are a helpful travel assistant specialized in budget travel"
    }
  },
  "icon_reference": "https://cdn01.boxcdn.net/app-assets/aistudio/avatars/logo_analytics.svg",
  "modified_at": "2022-01-01T00:00:00Z",
  "modified_by": {
    "id": "11446498",
    "type": "user"
  },
  "name": "This is my Agent",
  "origin": "CUSTOM",
  "text_gen": {
    "type": "ai_agent_text_gen",
    "access_state": "enabled",
    "basic_gen": {
      "content_template": "---{content}---",
      "embeddings": {
        "model": "azure__openai__text_embedding_ada_002",
        "strategy": {
          "id": "basic",
          "num_tokens_per_chunk": 64
        }
      },
      "is_custom_instructions_included": false,
      "llm_endpoint_params": {
        "type": "openai_params",
        "frequency_penalty": 1.5,
        "presence_penalty": 1.5,
        "stop": "<|im_end|>",
        "temperature": 0,
        "top_p": 1
      },
      "model": "azure__openai__gpt_4o_mini",
      "num_tokens_for_completion": 8400,
      "prompt_template": "It is `{current_date}`, and I have $8000 and want to spend a week in the Azores. `{user_question}`",
      "system_message": "You are a helpful travel assistant specialized in budget travel"
    },
    "custom_instructions": "This is a custom instruction",
    "description": "This is ASK Agent"
  }
}