diff --git a/src/strands/agent/agent.py b/src/strands/agent/agent.py index 66099cb1d..e2aed9d2b 100644 --- a/src/strands/agent/agent.py +++ b/src/strands/agent/agent.py @@ -22,7 +22,6 @@ Mapping, Optional, Type, - TypeAlias, TypeVar, Union, cast, @@ -51,6 +50,7 @@ from ..tools.executors._executor import ToolExecutor from ..tools.registry import ToolRegistry from ..tools.watcher import ToolWatcher +from ..types.agent import AgentInput from ..types.content import ContentBlock, Message, Messages from ..types.exceptions import ContextWindowOverflowException from ..types.tools import ToolResult, ToolUse @@ -67,8 +67,6 @@ # TypeVar for generic structured output T = TypeVar("T", bound=BaseModel) -AgentInput: TypeAlias = str | list[ContentBlock] | Messages | None - # Sentinel class and object to distinguish between explicit None and default parameter value class _DefaultCallbackHandlerSentinel: diff --git a/src/strands/types/agent.py b/src/strands/types/agent.py new file mode 100644 index 000000000..151c88f89 --- /dev/null +++ b/src/strands/types/agent.py @@ -0,0 +1,10 @@ +"""Agent-related type definitions for the SDK. + +This module defines the types used for an Agent. +""" + +from typing import TypeAlias + +from .content import ContentBlock, Messages + +AgentInput: TypeAlias = str | list[ContentBlock] | Messages | None