# Flyte SDK

These are the docs for Flyte SDK version 2.0

Flyte is the core Python SDK for the Union and Flyte platforms.

## Directory

### Classes

| Class | Description |
|-|-|
| [`flyte.AppHandle`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte/apphandle/page.md) | Protocol defining the common interface between local and remote app handles. |
| [`flyte.Backoff`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte/backoff/page.md) | Exponential backoff policy applied between user retries. |
| [`flyte.BaseCheckpoint`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte/basecheckpoint/page.md) | Base type for task checkpoint helpers. |
| [`flyte.Cache`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte/cache/page.md) | Cache configuration for a task. |
| [`flyte.CachePolicy`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte/cachepolicy/page.md) | Protocol for custom cache version strategies. |
| [`flyte.Checkpoint`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte/checkpoint/page.md) | Checkpoint helper using `flyte. |
| [`flyte.ConditionWebhook`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte/conditionwebhook/page.md) | Webhook configuration for a condition notification. |
| [`flyte.Cron`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte/cron/page.md) | Cron-based automation schedule for use with `Trigger`. |
| [`flyte.Device`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte/device/page.md) | Represents a device type, its quantity and partition if applicable. |
| [`flyte.Environment`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte/environment/page.md) | Base class for execution environments, shared by `TaskEnvironment` and. |
| [`flyte.FixedRate`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte/fixedrate/page.md) | Fixed-rate (interval-based) automation schedule for use with `Trigger`. |
| [`flyte.Image`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte/image/page.md) | Container image specification built using a fluent, two-step pattern:. |
| [`flyte.ImageBuild`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte/imagebuild/page.md) | Result of an image build operation. |
| [`flyte.Link`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte/link/page.md) |  |
| [`flyte.PodTemplate`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte/podtemplate/page.md) | Custom PodTemplate specification for a Task. |
| [`flyte.Resources`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte/resources/page.md) | Resources such as CPU, Memory, and GPU that can be allocated to a task. |
| [`flyte.RetryStrategy`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte/retrystrategy/page.md) | Retry strategy for a task. |
| [`flyte.ReusePolicy`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte/reusepolicy/page.md) | Configure a task environment for container reuse across multiple task invocations. |
| [`flyte.Secret`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte/secret/page.md) | Secrets are used to inject sensitive information into tasks or image build context. |
| [`flyte.TaskEnvironment`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte/taskenvironment/page.md) | Define an execution environment for a set of tasks. |
| [`flyte.Timeout`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte/timeout/page.md) | Timeout bounds for a task. |
| [`flyte.Trigger`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte/trigger/page.md) | Specification for a scheduled trigger that can be associated with any Flyte task. |
| [`flyte.ai.agents.AccessDenied`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.ai.agents/accessdenied/page.md) | Raised when a write targets a read-only or reserved prefix. |
| [`flyte.ai.agents.Agent`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.ai.agents/agent/page.md) | A flyte-native tool-use agent harness. |
| [`flyte.ai.agents.AgentEvent`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.ai.agents/agentevent/page.md) | Lightweight event emitted by the agent loop. |
| [`flyte.ai.agents.AgentProtocol`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.ai.agents/agentprotocol/page.md) | Minimal protocol that any agent must satisfy to work with. |
| [`flyte.ai.agents.AgentResult`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.ai.agents/agentresult/page.md) | Outcome of a single agent invocation. |
| [`flyte.ai.agents.AgentTool`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.ai.agents/agenttool/page.md) | A normalized tool descriptor used by :class:`Agent`. |
| [`flyte.ai.agents.ConcurrencyError`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.ai.agents/concurrencyerror/page.md) | Raised when an ``expected_sha`` precondition does not match the current state. |
| [`flyte.ai.agents.LLMMessage`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.ai.agents/llmmessage/page.md) | Provider-agnostic shape returned by :data:`LLMCallable`. |
| [`flyte.ai.agents.MCPServerSpec`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.ai.agents/mcpserverspec/page.md) | Declarative spec for a remote MCP server that exposes tools. |
| [`flyte.ai.agents.MemoryMeta`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.ai.agents/memorymeta/page.md) | Per-file metadata sidecar (sha256, actor, timestamp, …) for a memory entry. |
| [`flyte.ai.agents.MemoryStore`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.ai.agents/memorystore/page.md) | Conversation transcript + path-addressed artifact memory backed by :class:`flyte. |
| [`flyte.ai.agents.MemoryStoreError`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.ai.agents/memorystoreerror/page.md) | Base class for :class:`MemoryStore` errors. |
| [`flyte.ai.agents.ToolFn`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.ai.agents/toolfn/page.md) | The tool under invocation, handed to a :data:`ToolCallHandler`. |
| [`flyte.ai.agents.agent.Agent`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.ai.agents.agent/agent/page.md) | A flyte-native tool-use agent harness. |
| [`flyte.ai.agents.agent.AgentEvent`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.ai.agents.agent/agentevent/page.md) | Lightweight event emitted by the agent loop. |
| [`flyte.ai.agents.memory.AccessDenied`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.ai.agents.memory/accessdenied/page.md) | Raised when a write targets a read-only or reserved prefix. |
| [`flyte.ai.agents.memory.ConcurrencyError`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.ai.agents.memory/concurrencyerror/page.md) | Raised when an ``expected_sha`` precondition does not match the current state. |
| [`flyte.ai.agents.memory.MemoryMeta`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.ai.agents.memory/memorymeta/page.md) | Per-file metadata sidecar (sha256, actor, timestamp, …) for a memory entry. |
| [`flyte.ai.agents.memory.MemoryStore`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.ai.agents.memory/memorystore/page.md) | Conversation transcript + path-addressed artifact memory backed by :class:`flyte. |
| [`flyte.ai.agents.memory.MemoryStoreError`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.ai.agents.memory/memorystoreerror/page.md) | Base class for :class:`MemoryStore` errors. |
| [`flyte.ai.agents.protocol.AgentProtocol`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.ai.agents.protocol/agentprotocol/page.md) | Minimal protocol that any agent must satisfy to work with. |
| [`flyte.ai.agents.protocol.AgentResult`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.ai.agents.protocol/agentresult/page.md) | Outcome of a single agent invocation. |
| [`flyte.ai.chat.AgentChatAppEnvironment`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.ai.chat/agentchatappenvironment/page.md) | An :class:`~flyte. |
| [`flyte.ai.chat.CustomTheme`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.ai.chat/customtheme/page.md) | Declarative color theme for the Agent Chat UI. |
| [`flyte.ai.chat.app.AgentChatAppEnvironment`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.ai.chat.app/agentchatappenvironment/page.md) | An :class:`~flyte. |
| [`flyte.ai.chat.app.CustomTheme`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.ai.chat.app/customtheme/page.md) | Declarative color theme for the Agent Chat UI. |
| [`flyte.ai.mcp.FlyteMCPAppEnvironment`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.ai.mcp/flytemcpappenvironment/page.md) | Serve a Flyte-facing MCP server over HTTP (FastMCP + Starlette + Uvicorn). |
| [`flyte.ai.mcp.MCPAppEnvironment`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.ai.mcp/mcpappenvironment/page.md) | Serve a FastMCP server over HTTP (Starlette + Uvicorn). |
| [`flyte.app.AppEndpoint`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.app/appendpoint/page.md) | Embed an upstream app's endpoint as an app parameter. |
| [`flyte.app.AppEnvironment`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.app/appenvironment/page.md) | Configure a long-running app environment for APIs, dashboards, or model servers. |
| [`flyte.app.ConnectorEnvironment`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.app/connectorenvironment/page.md) | Configure a connector environment for custom Flyte connectors. |
| [`flyte.app.Domain`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.app/domain/page.md) | Subdomain to use for the domain. |
| [`flyte.app.Link`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.app/link/page.md) | Custom links to add to the app. |
| [`flyte.app.Parameter`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.app/parameter/page.md) | Parameter for application. |
| [`flyte.app.Port`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.app/port/page.md) |  |
| [`flyte.app.RunOutput`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.app/runoutput/page.md) | Use a run's output for app parameters. |
| [`flyte.app.Scaling`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.app/scaling/page.md) | Controls replica count and autoscaling behavior for app environments. |
| [`flyte.app.Timeouts`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.app/timeouts/page.md) | Timeout configuration for the application. |
| [`flyte.app.extras.FastAPIAppEnvironment`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.app.extras/fastapiappenvironment/page.md) |  |
| [`flyte.app.extras.FastAPIPassthroughAuthMiddleware`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.app.extras/fastapipassthroughauthmiddleware/page.md) | FastAPI middleware that automatically sets Flyte auth metadata from request headers. |
| [`flyte.app.extras.FlyteWebhookAppEnvironment`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.app.extras/flytewebhookappenvironment/page.md) | A pre-built FastAPI app environment for common Flyte webhook operations. |
| [`flyte.clustered.ClusterFailurePolicy`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.clustered/clusterfailurepolicy/page.md) | Failure and restart policy for the JobSet as a whole. |
| [`flyte.clustered.ClusteredTaskEnvironment`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.clustered/clusteredtaskenvironment/page.md) | A TaskEnvironment that emits a Kubernetes JobSet for distributed multi-node training. |
| [`flyte.clustered.ClusteredTaskTemplate`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.clustered/clusteredtasktemplate/page.md) | Task template for ``ClusteredTaskEnvironment``. |
| [`flyte.clustered.TorchRun`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.clustered/torchrun/page.md) | TorchRun launcher configuration for a ClusteredTaskEnvironment. |
| [`flyte.config.Config`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.config/config/page.md) | This the parent configuration object and holds all the underlying configuration object types. |
| [`flyte.connectors.AsyncConnector`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.connectors/asyncconnector/page.md) | This is the base class for all async connectors, and it defines the interface that all connectors must implement. |
| [`flyte.connectors.AsyncConnectorExecutorMixin`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.connectors/asyncconnectorexecutormixin/page.md) | This mixin class is used to run the connector task locally, and it's only used for local execution. |
| [`flyte.connectors.ConnectorRegistry`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.connectors/connectorregistry/page.md) | This is the registry for all connectors. |
| [`flyte.connectors.ConnectorService`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.connectors/connectorservice/page.md) |  |
| [`flyte.connectors.Resource`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.connectors/resource/page.md) | This is the output resource of the job. |
| [`flyte.connectors.ResourceMeta`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.connectors/resourcemeta/page.md) | This is the metadata for the job. |
| [`flyte.errors.ActionAbortedError`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.errors/actionabortederror/page.md) | This error is raised when an action was aborted, externally. |
| [`flyte.errors.ActionNotFoundError`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.errors/actionnotfounderror/page.md) | This error is raised when the user tries to access an action that does not exist. |
| [`flyte.errors.BaseRuntimeError`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.errors/baseruntimeerror/page.md) | Base class for all Union runtime errors. |
| [`flyte.errors.CodeBundleError`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.errors/codebundleerror/page.md) | This error is raised when the code bundle cannot be created, for example when no files are found to bundle. |
| [`flyte.errors.ConditionAlreadyExistsError`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.errors/conditionalreadyexistserror/page.md) | This error is raised when the user tries to create a condition that already exists within the action. |
| [`flyte.errors.ConditionFailedError`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.errors/conditionfailederror/page.md) | This error is raised when a condition fails during execution. |
| [`flyte.errors.ConditionNotFoundError`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.errors/conditionnotfounderror/page.md) | This error is raised when the user tries to access a condition that does not exist. |
| [`flyte.errors.ConditionTimedoutError`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.errors/conditiontimedouterror/page.md) | This error is raised when a condition is not signaled within its specified timeout. |
| [`flyte.errors.CustomError`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.errors/customerror/page.md) | This error is raised when the user raises a custom error. |
| [`flyte.errors.DeploymentError`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.errors/deploymenterror/page.md) | This error is raised when the deployment of a task fails, or some preconditions for deployment are not met. |
| [`flyte.errors.ImageBuildError`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.errors/imagebuilderror/page.md) | This error is raised when the image build fails. |
| [`flyte.errors.ImagePullBackOffError`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.errors/imagepullbackofferror/page.md) | This error is raised when the image cannot be pulled. |
| [`flyte.errors.InitializationError`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.errors/initializationerror/page.md) | This error is raised when the Union system is tried to access without being initialized. |
| [`flyte.errors.InlineIOMaxBytesBreached`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.errors/inlineiomaxbytesbreached/page.md) | This error is raised when the inline IO max bytes limit is breached. |
| [`flyte.errors.InvalidImageNameError`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.errors/invalidimagenameerror/page.md) | This error is raised when the image name is invalid. |
| [`flyte.errors.InvalidPackageError`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.errors/invalidpackageerror/page.md) | Raised when an invalid system package is detected during image build. |
| [`flyte.errors.LogsNotYetAvailableError`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.errors/logsnotyetavailableerror/page.md) | This error is raised when the logs are not yet available for a task. |
| [`flyte.errors.ModuleLoadError`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.errors/moduleloaderror/page.md) | This error is raised when the module cannot be loaded, either because it does not exist or because of a. |
| [`flyte.errors.NonRecoverableError`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.errors/nonrecoverableerror/page.md) | Raised when an error is encountered that is not recoverable. |
| [`flyte.errors.NotInTaskContextError`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.errors/notintaskcontexterror/page.md) | This error is raised when the user tries to access the task context outside of a task. |
| [`flyte.errors.OOMError`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.errors/oomerror/page.md) | This error is raised when the underlying task execution fails because of an out-of-memory error. |
| [`flyte.errors.OnlyAsyncIOSupportedError`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.errors/onlyasynciosupportederror/page.md) | This error is raised when the user tries to use sync IO in an async task. |
| [`flyte.errors.ParameterMaterializationError`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.errors/parametermaterializationerror/page.md) | This error is raised when the user tries to use a Parameter in an App, that has delayed Materialization,. |
| [`flyte.errors.PrimaryContainerNotFoundError`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.errors/primarycontainernotfounderror/page.md) | This error is raised when the primary container is not found. |
| [`flyte.errors.RemoteTaskNotFoundError`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.errors/remotetasknotfounderror/page.md) | This error is raised when the user tries to access a task that does not exist. |
| [`flyte.errors.RemoteTaskUsageError`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.errors/remotetaskusageerror/page.md) | This error is raised when the user tries to access a task that does not exist. |
| [`flyte.errors.RestrictedTypeError`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.errors/restrictedtypeerror/page.md) | This error is raised when the user uses a restricted type, for example current a Tuple is not supported for one. |
| [`flyte.errors.RetriesExhaustedError`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.errors/retriesexhaustederror/page.md) | This error is raised when the underlying task execution fails after all retries have been exhausted. |
| [`flyte.errors.RuntimeDataValidationError`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.errors/runtimedatavalidationerror/page.md) | This error is raised when the user tries to access a resource that does not exist or is invalid. |
| [`flyte.errors.RuntimeSystemError`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.errors/runtimesystemerror/page.md) | This error is raised when the underlying task execution fails because of a system error. |
| [`flyte.errors.RuntimeUnknownError`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.errors/runtimeunknownerror/page.md) | This error is raised when the underlying task execution fails because of an unknown error. |
| [`flyte.errors.RuntimeUserError`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.errors/runtimeusererror/page.md) | This error is raised when the underlying task execution fails because of an error in the user's code. |
| [`flyte.errors.SlowDownError`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.errors/slowdownerror/page.md) | This error is raised when the user tries to access a resource that does not exist or is invalid. |
| [`flyte.errors.TaskInterruptedError`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.errors/taskinterruptederror/page.md) | This error is raised when the underlying task execution is interrupted. |
| [`flyte.errors.TaskTimeoutError`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.errors/tasktimeouterror/page.md) | This error is raised when the underlying task execution runs for longer than the specified timeout. |
| [`flyte.errors.TraceDoesNotAllowNestedTasksError`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.errors/tracedoesnotallownestedtaskserror/page.md) | This error is raised when the user tries to use a task from within a trace. |
| [`flyte.errors.UnionRpcError`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.errors/unionrpcerror/page.md) | This error is raised when communication with the Union server fails. |
| [`flyte.extend.AsyncFunctionTaskTemplate`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.extend/asyncfunctiontasktemplate/page.md) | A task template that wraps an asynchronous functions. |
| [`flyte.extend.ImageBuildEngine`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.extend/imagebuildengine/page.md) | ImageBuildEngine contains a list of builders that can be used to build an ImageSpec. |
| [`flyte.extend.ImageBuilder`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.extend/imagebuilder/page.md) |  |
| [`flyte.extend.ImageChecker`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.extend/imagechecker/page.md) |  |
| [`flyte.extend.TaskTemplate`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.extend/tasktemplate/page.md) | Task template is a template for a task that can be executed. |
| [`flyte.extras.BatchStats`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.extras/batchstats/page.md) | Monitoring statistics exposed by `DynamicBatcher. |
| [`flyte.extras.ContainerTask`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.extras/containertask/page.md) | This is an intermediate class that represents Flyte Tasks that run a container at execution time. |
| [`flyte.extras.CostEstimator`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.extras/costestimator/page.md) | Protocol for records that can estimate their own processing cost. |
| [`flyte.extras.DynamicBatcher`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.extras/dynamicbatcher/page.md) | Batches records from many concurrent producers and runs them through. |
| [`flyte.extras.Prompt`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.extras/prompt/page.md) | Simple prompt record with built-in token estimation. |
| [`flyte.extras.Sleep`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.extras/sleep/page.md) | Route a task to the backend `core-sleep` plugin. |
| [`flyte.extras.SleepTask`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.extras/sleeptask/page.md) |  |
| [`flyte.extras.TokenBatcher`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.extras/tokenbatcher/page.md) | Token-aware batcher for LLM inference workloads. |
| [`flyte.extras.TokenEstimator`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.extras/tokenestimator/page.md) | Protocol for records that can estimate their own token count. |
| [`flyte.extras.shell.FlagSpec`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.extras.shell/flagspec/page.md) | How to render a typed input as a CLI flag in ``{flags. |
| [`flyte.extras.shell.Glob`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.extras.shell/glob/page.md) | A multi-file output bundle. |
| [`flyte.extras.shell.Stderr`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.extras.shell/stderr/page.md) | Capture the task's stderr as a typed output. |
| [`flyte.extras.shell.Stdout`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.extras.shell/stdout/page.md) | Capture the task's stdout as a typed output. |
| [`flyte.git.GitStatus`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.git/gitstatus/page.md) | A class representing the status of a git repository. |
| [`flyte.io.DataFrame`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.io/dataframe/page.md) | A Flyte meta DataFrame object, that wraps all other dataframe types (usually available as plugins, pandas. |
| [`flyte.io.Dir`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.io/dir/page.md) | A generic directory class representing a directory with files of a specified format. |
| [`flyte.io.EmptyDir`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.io/emptydir/page.md) | A sentinel :class:`Dir` representing 'no directory was produced'. |
| [`flyte.io.File`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.io/file/page.md) | A generic file class representing a file with a specified format. |
| [`flyte.io.HashFunction`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.io/hashfunction/page.md) | A hash method that wraps a user-provided function to compute hashes. |
| [`flyte.io.extend.DataFrameDecoder`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.io.extend/dataframedecoder/page.md) |  |
| [`flyte.io.extend.DataFrameEncoder`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.io.extend/dataframeencoder/page.md) |  |
| [`flyte.io.extend.DataFrameTransformerEngine`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.io.extend/dataframetransformerengine/page.md) | Think of this transformer as a higher-level meta transformer that is used for all the dataframe types. |
| [`flyte.models.ActionID`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.models/actionid/page.md) | A class representing the ID of an Action, nested within a Run. |
| [`flyte.models.ActionPhase`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.models/actionphase/page.md) | Represents the execution phase of a Flyte action (run). |
| [`flyte.models.CheckpointPaths`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.models/checkpointpaths/page.md) | Paths the platform provides for this task's checkpoint output and optional previous-attempt input. |
| [`flyte.models.CodeBundle`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.models/codebundle/page.md) | A class representing a code bundle for a task. |
| [`flyte.models.GroupData`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.models/groupdata/page.md) |  |
| [`flyte.models.NativeInterface`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.models/nativeinterface/page.md) | A class representing the native interface for a task. |
| [`flyte.models.PathRewrite`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.models/pathrewrite/page.md) | Configuration for rewriting paths during input loading. |
| [`flyte.models.RawDataPath`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.models/rawdatapath/page.md) | A class representing the raw data path for a task. |
| [`flyte.models.SerializationContext`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.models/serializationcontext/page.md) | This object holds serialization time contextual information, that can be used when serializing the task and. |
| [`flyte.models.TaskContext`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.models/taskcontext/page.md) | A context class to hold the current task executions context. |
| [`flyte.notify.Email`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.notify/email/page.md) | Send email notifications. |
| [`flyte.notify.NamedDelivery`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.notify/nameddelivery/page.md) | Use a pre-configured delivery channel by name. |
| [`flyte.notify.NamedRule`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.notify/namedrule/page.md) | Reference a pre-defined notification rule by name. |
| [`flyte.notify.Notification`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.notify/notification/page.md) | Base notification class. |
| [`flyte.notify.Slack`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.notify/slack/page.md) | Send Slack notifications with optional Block Kit formatting. |
| [`flyte.notify.Teams`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.notify/teams/page.md) | Send Microsoft Teams notifications with optional Adaptive Cards. |
| [`flyte.notify.Webhook`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.notify/webhook/page.md) | Send custom HTTP webhook notifications (most flexible option). |
| [`flyte.prefetch.HuggingFaceModelInfo`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.prefetch/huggingfacemodelinfo/page.md) | Information about a HuggingFace model to store. |
| [`flyte.prefetch.ShardConfig`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.prefetch/shardconfig/page.md) | Configuration for model sharding. |
| [`flyte.prefetch.StoredModelInfo`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.prefetch/storedmodelinfo/page.md) | Information about a stored model. |
| [`flyte.prefetch.VLLMShardArgs`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.prefetch/vllmshardargs/page.md) | Arguments for sharding a model using vLLM. |
| [`flyte.remote.Action`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/action/page.md) | A class representing an action. |
| [`flyte.remote.ActionDetails`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/actiondetails/page.md) | A class representing an action. |
| [`flyte.remote.ActionInputs`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/actioninputs/page.md) | A class representing the inputs of an action. |
| [`flyte.remote.ActionOutputs`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/actionoutputs/page.md) | A class representing the outputs of an action. |
| [`flyte.remote.App`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/app/page.md) |  |
| [`flyte.remote.Condition`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/condition/page.md) | A remote Condition registered within an action of a run. |
| [`flyte.remote.Project`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/project/page.md) | A class representing a project in the Union API. |
| [`flyte.remote.Run`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/run/page.md) | A class representing a run of a task. |
| [`flyte.remote.RunDetails`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/rundetails/page.md) | A class representing a run of a task. |
| [`flyte.remote.Secret`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/secret/page.md) |  |
| [`flyte.remote.Settings`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/settings/page.md) | Hierarchical configuration settings with inheritance support. |
| [`flyte.remote.Task`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/task/page.md) |  |
| [`flyte.remote.TaskDetails`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/taskdetails/page.md) |  |
| [`flyte.remote.TimeFilter`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/timefilter/page.md) | Filter for time-based fields (e. |
| [`flyte.remote.Trigger`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/trigger/page.md) | Represents a trigger in the Flyte platform. |
| [`flyte.remote.User`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/user/page.md) | Represents a user in the Flyte platform. |
| [`flyte.report.Report`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.report/report/page.md) |  |
| [`flyte.sandbox.CodeTaskTemplate`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.sandbox/codetasktemplate/page.md) | A sandboxed task created from a code string rather than a decorated function. |
| [`flyte.sandbox.ImageConfig`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.sandbox/imageconfig/page.md) | Configuration for Docker image building at runtime. |
| [`flyte.sandbox.SandboxedConfig`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.sandbox/sandboxedconfig/page.md) | Configuration for a sandboxed task executed via Monty. |
| [`flyte.sandbox.SandboxedTaskTemplate`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.sandbox/sandboxedtasktemplate/page.md) | A task template that executes the function body in a Monty sandbox. |
| [`flyte.storage.ABFS`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.storage/abfs/page.md) | Any Azure Blob Storage specific configuration. |
| [`flyte.storage.GCS`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.storage/gcs/page.md) | Any GCS specific configuration. |
| [`flyte.storage.S3`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.storage/s3/page.md) | S3 specific configuration. |
| [`flyte.storage.Storage`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.storage/storage/page.md) | Data storage configuration that applies across any provider. |
| [`flyte.syncify.Syncify`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.syncify/syncify/page.md) | A decorator to convert asynchronous functions or methods into synchronous ones. |
| [`flyte.types.FlytePickle`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.types/flytepickle/page.md) | This type is only used by flytekit internally. |
| [`flyte.types.Renderable`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.types/renderable/page.md) |  |
| [`flyte.types.TypeEngine`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.types/typeengine/page.md) | Core Extensible TypeEngine of Flytekit. |
| [`flyte.types.TypeTransformer`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.types/typetransformer/page.md) | Base transformer type that should be implemented for every python native type that can be handled by flytekit. |
| [`flyte.types.TypeTransformerFailedError`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.types/typetransformerfailederror/page.md) |  |

### Packages

| Package | Description |
|-|-|
| [`flyte`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte/_index) | Flyte SDK for authoring compound AI applications, services and workflows. |
| [`flyte.ai.agents`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.ai.agents/_index) | flyte. |
| [`flyte.ai.agents.agent`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.ai.agents.agent/_index) | Agent — a flyte-native tool-use agent harness. |
| [`flyte.ai.agents.memory`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.ai.agents.memory/_index) | Dir-backed memory for :class:`flyte. |
| [`flyte.ai.agents.protocol`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.ai.agents.protocol/_index) | Agent protocol for the flyte. |
| [`flyte.ai.chat`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.ai.chat/_index) | flyte. |
| [`flyte.ai.chat.app`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.ai.chat.app/_index) | AgentChatAppEnvironment — FastAPI-based chat UI for any Agent. |
| [`flyte.ai.mcp`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.ai.mcp/_index) |  |
| [`flyte.app`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.app/_index) |  |
| [`flyte.app.extras`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.app.extras/_index) |  |
| [`flyte.clustered`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.clustered/_index) |  |
| [`flyte.config`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.config/_index) |  |
| [`flyte.connectors`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.connectors/_index) |  |
| [`flyte.connectors.utils`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.connectors.utils/_index) |  |
| [`flyte.durable`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.durable/_index) | Flyte durable utilities. |
| [`flyte.errors`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.errors/_index) | Exceptions raised by Union. |
| [`flyte.extend`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.extend/_index) |  |
| [`flyte.extras`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.extras/_index) | Flyte extras package. |
| [`flyte.extras.shell`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.extras.shell/_index) | Shell task — wrap a CLI tool packaged in a container image. |
| [`flyte.git`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.git/_index) |  |
| [`flyte.io`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.io/_index) | ## IO data types. |
| [`flyte.io.extend`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.io.extend/_index) |  |
| [`flyte.models`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.models/_index) |  |
| [`flyte.notify`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.notify/_index) | Task Notifications API for Flyte 2. |
| [`flyte.prefetch`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.prefetch/_index) | Prefetch utilities for Flyte. |
| [`flyte.remote`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/_index) | Remote Entities that are accessible from the Union Server once deployed or created. |
| [`flyte.report`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.report/_index) |  |
| [`flyte.sandbox`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.sandbox/_index) | Sandbox utilities for running isolated code inside Flyte tasks. |
| [`flyte.storage`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.storage/_index) |  |
| [`flyte.syncify`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.syncify/_index) | # Syncify Module. |
| [`flyte.types`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.types/_index) | # Flyte Type System. |

## Subpages

- [Classes & Protocols](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/classes/page.md)
- [Packages](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/page.md)

---
**Source**: https://github.com/unionai/unionai-docs/blob/main/content/api-reference/flyte-sdk/_index.md
**HTML**: https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/
