AiExecution
Type: Object
Represents a single, live instance of an AI team working on a specific problem. When you ask an AI 'Team' to do something—like 'generate a quote for this customer's book order'—an 'Execution' is created. This resource is the master record for that entire process. It tracks the overall status (e.g., running, completed, failed), holds the initial inputs (the customer's requirements), and aggregates the final results. It serves as the container for all the individual 'Tasks' that the AI agents will perform, providing a complete audit trail and high-level view of the automated workflow from start to finish.
Fields
| Name | Type | Args | Description | Deprecated |
|---|---|---|---|---|
| completedAt | DateTime | When the execution completed (successfully or with failure) | ||
| createdAt | DateTime! | When the execution was created | ||
| errorMessage | String | Error message if the execution failed | ||
| facts | [AiFact!]! | filter: AiFactFilterInputlimit: Intoffset: Intsort: [AiFactSortInput] | ||
| id | ID! | |||
| metadata | JsonString | Additional metadata for the execution | ||
| params | JsonString! | Input parameters for this execution (variables for template interpolation) | ||
| results | JsonString | Results from each task in the execution, keyed by task ID | ||
| startedAt | DateTime | When the execution started | ||
| state | String! | The current state of the execution: pending, running, completed, failed, or cancelled | ||
| tasks | [AiTask!]! | filter: AiTaskFilterInputlimit: Intoffset: Intsort: [AiTaskSortInput] | ||
| team | AiTeam! | |||
| teamId | ID! | |||
| updatedAt | DateTime! | When the execution was last updated |