SdkConfig class
Configuration for SDK entrypoint.
Constructors
-
SdkConfig({required String apiKey, required String model, String? systemPrompt, List<
ToolDefinition> tools = const [], int? maxTurns, PermissionHandler? permissionHandler, OnMessageCallback? onMessage, OnToolUseCallback? onToolUse, OnErrorCallback? onError, String? workDir, List<String> mcpServers = const [], bool includeSystemTools = true}) -
const
Properties
- apiKey → String
-
Anthropic API key.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- includeSystemTools → bool
-
Whether to include system tools (bash, file ops, etc.).
final
- maxTurns → int?
-
Maximum conversation turns before stopping.
final
-
mcpServers
→ List<
String> -
Additional MCP server configs.
final
- model → String
-
Model identifier.
final
- onError → OnErrorCallback?
-
Callback for errors.
final
- onMessage → OnMessageCallback?
-
Callback for assistant messages.
final
- onToolUse → OnToolUseCallback?
-
Callback for tool use events.
final
- permissionHandler → PermissionHandler?
-
Custom permission handler.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- systemPrompt → String?
-
System prompt.
final
-
tools
→ List<
ToolDefinition> -
Tool definitions to register.
final
- workDir → String?
-
Working directory for file operations.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited