Executions API

実行はエージェントが実行されるときのインスタンスを表します。各実行は、メッセージ、ツール使用、結果、パフォーマンスメトリクスの完全な履歴をキャプチャします。Executions API を使用してエージェント アクティビティを監視し、タスク完了を追跡し、実行パターンを分析します。

ベース URL: https://us.teamday.ai/api/v1/executions

認証: Personal Access Token 必須


エンドポイント概要

メソッドエンドポイント説明状態
GET/executions実行をリスト表示🟡 テスト未了
GET/executions/[id]実行の詳細を取得🟡 テスト未了
GET/executions/[id]/tree実行ツリーを取得 (サブエージェント)🟡 テスト未了
POST/executions/[id]/cancel実行中の実行をキャンセル🟡 テスト未了

実装状況: 完了したがテスト未了


実行オブジェクト

プロパティ

{
  id: string              // 実行 ID (形式: exec_xxx)
  agentId: string         // 実行したエージェント
  organizationId: string  // 所有組織
  userId: string          // 実行をトリガーしたユーザー
  status: string          // "pending" | "running" | "completed" | "failed" | "cancelled"
  startedAt: string       // ISO 8601 タイムスタンプ
  completedAt?: string    // ISO 8601 タイムスタンプ (完了時)
  messages: Message[]     // 会話履歴
  toolCalls: ToolCall[]   // 実行中に使用されたツール
  error?: string          // エラーメッセージ (失敗時)
  metadata: object        // 追加実行コンテキスト
}

オブジェクト例

{
  "id": "exec_xyz789",
  "agentId": "agent_abc123",
  "organizationId": "org_456",
  "userId": "user_789",
  "status": "completed",
  "startedAt": "2025-12-09T10:30:00Z",
  "completedAt": "2025-12-09T10:30:45Z",
  "messages": [
    {
      "role": "user",
      "content": "Analyze this sales data",
      "timestamp": "2025-12-09T10:30:00Z"
    },
    {
      "role": "assistant",
      "content": "Based on the sales data analysis...",
      "timestamp": "2025-12-09T10:30:45Z"
    }
  ],
  "toolCalls": [
    {
      "tool": "read_file",
      "arguments": { "path": "sales_data.csv" },
      "result": "Success",
      "timestamp": "2025-12-09T10:30:20Z"
    }
  ],
  "metadata": {
    "model": "claude-sonnet-4-6",
    "tokensUsed": 1234,
    "duration": 45000
  }
}

実行をリスト表示

組織の実行履歴を取得し、オプションでエージェント別にフィルタリングします。

リクエスト

GET /api/v1/executions

ヘッダー:

Authorization: Bearer td_xxxxx...

詳細については、API ドキュメント を参照してください。