Documentation Index
Fetch the complete documentation index at: https://docs.qoder.com/llms.txt
Use this file to discover all available pages before exploring further.
POST /v1/agents
新しい Agent 設定を作成します。
ヘッダー
| ヘッダー | 必須 | 説明 |
|---|
| Authorization | はい | Bearer <PAT> |
| Content-Type | はい | application/json |
| Idempotency-Key | いいえ | 冪等キー、重複作成を防止 |
リクエストボディ
| フィールド | 型 | 必須 | 説明 |
|---|
name | string | はい | Agent 名、1-256 文字 |
model | string / object | はい | モデル識別子、文字列("ultimate" など)またはオブジェクト |
system | string | いいえ | システムプロンプト(System Prompt) |
description | string | いいえ | Agent の説明 |
tools | array | いいえ | ツール設定リスト |
mcp_servers | array | いいえ | MCP サーバー設定リスト |
metadata | object | いいえ | カスタムメタデータのキーバリュー |
リクエスト例
curl -X POST "https://openapi.qoder.sh/api/v1/cloud/agents" \
-H "Authorization: Bearer $QODER_PAT" \
-H "Content-Type: application/json" \
-d '{
"name": "doc-test-agent",
"model": "ultimate",
"system": "あなたはドキュメントテストアシスタントです"
}'
レスポンス例
HTTP 201 Created
{
"type": "agent",
"id": "agent_019eXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"name": "doc-test-agent",
"description": "",
"model": "ultimate",
"system": "あなたはドキュメントテストアシスタントです",
"instructions": "あなたはドキュメントテストアシスタントです",
"tools": [],
"mcp_servers": [],
"default_environment": "",
"version": 1,
"created_at": "2026-05-18T15:26:39.61669Z",
"updated_at": "2026-05-18T15:26:39.61669Z"
}
レスポンスフィールド
| フィールド | 型 | 説明 |
|---|
type | string | 固定値 "agent" |
id | string | Agent の一意識別子、プレフィックス agent_ |
name | string | Agent 名 |
description | string | Agent の説明 |
model | string | モデル識別子 |
system | string | システムプロンプト |
instructions | string | 指示内容(system フィールドと同期) |
tools | array | ツール設定リスト |
mcp_servers | array | MCP サーバー設定 |
default_environment | string | デフォルトの実行環境 |
version | integer | 現在のバージョン番号、1 から開始してインクリメント |
created_at | string | 作成時刻(ISO 8601) |
updated_at | string | 最終更新時刻(ISO 8601) |
エラーコード
| HTTP | type | トリガー条件 |
|---|
| 400 | invalid_request_error | 必須フィールド name の欠落 |
| 400 | invalid_request_error | name の長さが 256 文字を超過 |
| 400 | invalid_request_error | 必須フィールド model の欠落 |
| 400 | invalid_request_error | mcp_servers または skills の設定形式エラー |
| 401 | authentication_error | PAT が無効または期限切れ |
| 403 | permission_error | この操作を実行する権限がない |
エラーレスポンス例
{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "name must be between 1 and 256 characters"
}
}