# Monitor runs and handle feedback

Query agent runtime tasks, events, data parts, and resource operations, and view feedback and its statistics. Use this page to observe and handle completed runs; it does not create agents or initiate invocation.

## Prerequisites

Prepare credentials that can access the target workspace and related IDs obtained from invocations, tasks, or resource operations. For service endpoints, authentication, and general request formats, see [Prepare to call an API](../../api-call-basics.md).

Different observation targets require different IDs. Identify the target object from a list or the result of an upstream action first.

## Call sequence

1. Obtain the target task or resource-operation ID from an agent invocation or another task result.
2. List runtime tasks or resource operations first to locate the target object.
3. Query target task details, events, turn snapshots, and data parts, or query resource-operation details, to inspect current observable information.
4. To stop a resource operation, get its details first, then use the cancel action. To assess usage feedback, query feedback and statistics.

## API operations

### Query runtime tasks and data

| What you need to do | API operation | Use it when |
| --- | --- | --- |
| Query a runtime manifest | [Get the runtime manifest](../../../../reference/api/ai-studio/agents/runtime-observability/get-runtime-manifest.md) | View the runtime manifest. |
| Query runtime tasks | [List runtime tasks](../../../../reference/api/ai-studio/agents/runtime-observability/list-runtime-tasks.md) | Locate a target runtime task. |
| Query runtime task details | [Get a runtime task](../../../../reference/api/ai-studio/agents/runtime-observability/get-runtime-task.md) | You have a task ID and need to view the task. |
| Query runtime task events | [List runtime task events](../../../../reference/api/ai-studio/agents/runtime-observability/list-runtime-task-events.md) | View events for a target task. |
| Query a runtime turn snapshot | [Get a runtime turn snapshot](../../../../reference/api/ai-studio/agents/runtime-observability/get-runtime-turn-snapshot.md) | View turn information for a target task. |
| Query runtime data parts | [List data parts](../../../../reference/api/ai-studio/agents/runtime-observability/list-data-parts.md) | View data parts for a target task. |

### Query and handle resource operations

| What you need to do | API operation | Use it when |
| --- | --- | --- |
| Query resource operations | [List resource operations](../../../../reference/api/ai-studio/agents/operations/list-operations.md) | Locate a target resource operation. |
| Query resource-operation details | [Get a resource operation](../../../../reference/api/ai-studio/agents/operations/get-operation.md) | Before cancellation or to confirm an operation result. |
| Cancel a resource operation | [Cancel a resource operation](../../../../reference/api/ai-studio/agents/operations/cancel-operation.md) | Confirm conditions and results on the action page before cancellation. |

### View feedback

| What you need to do | API operation | Use it when |
| --- | --- | --- |
| Query feedback | [List feedback](../../../../reference/api/ai-studio/agents/agent-feedback/list-feedback.md) | View feedback for the target scope. |
| Query feedback statistics | [Get feedback statistics](../../../../reference/api/ai-studio/agents/agent-feedback/get-feedback-statistics.md) | Aggregate feedback. |

## Confirm the result

Use [Get a runtime task](../../../../reference/api/ai-studio/agents/runtime-observability/get-runtime-task.md) or [Get a resource operation](../../../../reference/api/ai-studio/agents/operations/get-operation.md) to confirm current information for the target object. After submitting a cancellation request, query the resource-operation details again to confirm the observable result.

## Limitations and notes

Canceling a resource operation affects the target operation. Confirm conditions and results in [Cancel a resource operation](../../../../reference/api/ai-studio/agents/operations/cancel-operation.md) before proceeding.

## Next steps

- [Invoke agents and manage sessions](agent-invocation-sessions.md)
- [Automation tasks, callbacks, and task templates](automation-callbacks-task-templates.md)
