Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/claude_agent_sdk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
ContextUsageCategory,
ContextUsageResponse,
DeferredToolUse,
EffortLevel,
HookCallback,
HookContext,
HookEventMessage,
Expand Down Expand Up @@ -554,6 +555,7 @@ async def call_tool(name: str, arguments: dict[str, Any]) -> Any:
"StreamEvent",
"Message",
"ClaudeAgentOptions",
"EffortLevel",
"TaskBudget",
"TextBlock",
"ThinkingBlock",
Expand Down
7 changes: 5 additions & 2 deletions src/claude_agent_sdk/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
# Agent definitions
SettingSource = Literal["user", "project", "local"]

# Effort level for adaptive thinking and response generation
EffortLevel = Literal["low", "medium", "high", "xhigh", "max"]


class SystemPromptPreset(TypedDict):
"""System prompt preset configuration."""
Expand Down Expand Up @@ -96,7 +99,7 @@ class AgentDefinition:
initialPrompt: str | None = None # noqa: N815
maxTurns: int | None = None # noqa: N815
background: bool | None = None
effort: Literal["low", "medium", "high", "xhigh", "max"] | int | None = None
effort: EffortLevel | int | None = None
permissionMode: PermissionMode | None = None # noqa: N815


Expand Down Expand Up @@ -1864,7 +1867,7 @@ class ClaudeAgentOptions:
See https://docs.anthropic.com/en/docs/build-with-claude/adaptive-thinking.
"""

effort: Literal["low", "medium", "high", "xhigh", "max"] | None = None
effort: EffortLevel | None = None
"""Controls how much effort Claude puts into its response.

Works with adaptive thinking to guide thinking depth.
Expand Down