# View Task Execution Overview

Use the AI Studio SDK to read recent task execution status rollups for a workspace. The overview provides counts for running, succeeded, failed, pending, and total tasks, along with the statistical window in days; it does not replace querying individual task or workflow run statuses.

(sdk-ai-studio-task-overview-flow)=
## Task workflow

Provide a verified workspace ID to read the recent execution summary for that workspace. If failed tasks or workloads requiring tracking are identified, navigate to the relevant resource task page to read detailed metrics using the specific task or run ID.

(sdk-ai-studio-task-overview-prepare)=
## Prerequisites

| Required item | How to obtain | Role on this page |
| --- | --- | --- |
| Authenticated client | Created during initial connection setup. | Read workspace-scoped execution summaries. |
| Workspace ID | Obtained from workspace creation, listing, or operator selection. | Define the statistical scope. |

(sdk-ai-studio-task-overview-read)=
## Read the execution overview

The following example reads the status counts and statistical window for recent tasks in a workspace. The overview is intended only to identify workloads that need further investigation; do not treat these aggregate numbers as the final outcome of any single run.

:::::{tab-set}
:sync-group: sdk-language

::::{tab-item} Python
:sync: python

```python
import os

import moi_product_sdk as sdk

client = sdk.new_with_personal_access_token(
    os.environ["PRODUCT_API_BASE_URL"],
    os.environ["PRODUCT_API_KEY"],
)
overview = client.dashboard("<workspace-id>").task_execution_overview()

print(overview.running)
print(overview.success)
print(overview.failed)
print(overview.pending)
print(overview.total)
print(overview.window_days)
```

::::

::::{tab-item} Go
:sync: go

```go
package main

import (
	"context"
	"fmt"
	"os"

	sdk "github.com/matrixorigin/matrixflow/sdk/go-sdk"
)

func main() {
	ctx := context.Background()
	client, err := sdk.NewWithPersonalAccessToken(
		os.Getenv("PRODUCT_API_BASE_URL"),
		os.Getenv("PRODUCT_API_KEY"),
	)
	if err != nil {
		panic(err)
	}
	overview, err := client.Dashboard("<workspace-id>").TaskExecutionOverview(ctx)
	if err != nil {
		panic(err)
	}

	fmt.Println(overview.Running)
	fmt.Println(overview.Success)
	fmt.Println(overview.Failed)
	fmt.Println(overview.Pending)
	fmt.Println(overview.Total)
	fmt.Println(overview.WindowDays)
}
```

::::

:::::

(sdk-ai-studio-task-overview-next)=
## Next steps

For workflow runs that require attention, use [Run and track workflows](../数据处理/运行并跟踪工作流.md#sdk-ai-studio-workflow-run-inspect) to read specific run states and execution results.
