antigravity
A native Dart client SDK for Google Antigravity, fully decoupled from the Flutter framework for server, CLI, and mobile compatibility.
0.9.2
527 downloads/mo
#787 most downloaded on pub.dev
TJMusiitwa/antigravity-sdk-dart
What this package is like to depend on
Last release 10 days ago
14 Aug 2026
Ships on a steady schedule
a new release about every 2 weeks
Nearly every release is documented
notes for 13 of 13 stable releases
Nothing withdrawn
no release was ever pulled
2 months old
13 releases · first in 2026
13 releases in the last 12 months
see the full history below
Release timeline
13 releases · Jun 2026 to Aug 2026Releases
latest 13-
0.9.214 Aug 2026Release notes
Open source →- Fix
RetryConfigSerialization:ModelAPIRetryConfig.toMap()/toJson()(and anyRetryConfigcontaining one) threwMapperException: Unknown type Durationand emitted a spuriousinitial_sleep_durationkey thatlocalharnessrejects. TheinitialSleepDurationDurationis a convenience argument, not a wire field, but was being generated as one.- Added
ModelAPIRetryConfig.raw()as the@MappableConstructor(), so only the integerinitialSleepDurationMsis serialized. The unnamed constructor still accepts eitherinitialSleepDurationMsorinitialSleepDuration.
- Fix Subagent Tool Protobuf Naming:
- Corrected
harness_side_toolsfield names for subagents inLocalConnectionStrategy("file_edit"and"write_to_file", matchinglocalharness.proto), resolvingunknown field "edit_file"errors when launching static subagents.
- Corrected
- CI & Example Automation:
- Added non-interactive terminal fallback (
stdin.hasTerminal) toexample/getting_started/human_in_the_loop.dartto prevent test runs from blocking on headless standard input.
- Added non-interactive terminal fallback (
- Fix
-
0.9.114 Aug 2026Release notes
Open source →- Critical Bug Fixes for Local Harness Execution:
- Trajectory Idle State Recognition: Added support for
STATE_FULLY_IDLE(andFULLY_IDLE) inLocalConnectiontrajectory state updates, properly emitting theidle_sentinelstep and preventingagent.chat()/response.text()from hanging at turn completion. - Tool Authorization Handshake: Added handler for
LIFECYCLE_HOOK_PRE_TOOL/PRE_TOOLinHookRouter, returning validpre_tool_resultdecisions (ALLOW/DENY) to the harness and resolving tool execution deadlocks. - Wire Path Normalization: Added wire-format URI normalization (
file:///,cns://) for tool call arguments inHookRouterto support path-based safety policies and canonical workspace containment.
- Trajectory Idle State Recognition: Added support for
- Critical Bug Fixes for Local Harness Execution:
-
0.9.013 Aug 2026Release notes
Open source →- Sync with Python SDK v0.1.11:
- Default Model Upgrade to Gemini 3.7 Flash: Updated default generative text model in
lib/src/models.darttogemini-3.7-flash. - Session Budget Enforcement (
BudgetConfig) & Stop Reasons (StopReason):- Introduced
BudgetConfigto configure session-level caps:maxModelCalls,maxToolCalls,maxInputTokens,maxOutputTokens,maxTotalTokens. - Added
StopReasonenum (unspecified,maxModelCallsExceeded,maxToolCallsExceeded,maxInputTokensExceeded,maxOutputTokensExceeded,maxTotalTokensExceeded,quotaExhausted). - Exposed
ChatResponse.stopReason,ChatResponse.usage, andConversation.lastTurnStopReason.
- Introduced
- Vertex AI Express Mode (
apiKey):- Added
apiKeysupport toVertexEndpointfor Vertex AI Express Mode authentication. - Implemented mutual exclusivity validation: rejects configurations passing both
apiKey(Express Mode) andproject/location(Standard Mode).
- Added
- Agent Behavior Standard (
AgentBehavior):- Renamed
AgentModeenum toAgentBehavior(autonomous,interactive), mapping toAGENT_BEHAVIOR_AUTONOMOUSandAGENT_BEHAVIOR_INTERACTIVEprotobuf values. - Provided
typedef AgentMode = AgentBehaviorand constructor/getter aliases for backward compatibility.
- Renamed
- Hierarchical & Nested Subagent Controls:
- Added
maxSubagentDepthandallowedSubagentsallowlist configuration onCapabilitiesConfigandSubagentCapabilities. - Enabled
BuiltinTools.startSubagenton custom subagents when configured in their capability toolsets. - Validated that
maxSubagentDepthandallowedSubagentscannot be set when subagents are disabled. - Added subagent allowlist validation on
BaseLocalAgentConfigensuring all referenced subagent names exist in the configuredsubagentslist.
- Added
- Step Metadata & Image Artifact Paths:
- Added
parentTrajectoryIdanddepthfields toStepand updatedStep.fromMapparser. - Added
outputPathtoGenerateImageResultand updatedtoString()to returnoutputPathwhen non-empty.
- Added
- Policy Enhancements:
- Made
handleroptional inaskUserpolicy builder for host platform delegation compatibility.
- Made
- New Example & Documentation:
- Added
example/getting_started/budget_limits.dartdemonstrating all 5 budget limits and stop reason inspection. - Updated
example/getting_started/subagents.dartshowcasing dynamic self-delegation, static subagents, and nested subagent hierarchies.
- Added
- SDK Version Bump & Dependency Synchronization:
- Updated package version to
0.9.0and MCP implementation version to0.9.0.
- Updated package version to
- Default Model Upgrade to Gemini 3.7 Flash: Updated default generative text model in
- Sync with Python SDK v0.1.11:
-
0.8.006 Aug 2026Release notes
Open source →- Sync with Python SDK v0.1.10 & Dart-Idiomatic Enhancements:
- Breaking API Change:
Conversation.lastTurnUsagesignature updated toUsageMetadata?(matching Python SDK v0.1.10) to returnnullwhen no token usage was recorded during a turn. - Gemini Prioritized Inference (
ServiceTier): IntroducedServiceTierenum (standard,priority,flex) and support inGeminiModelOptionsandUsageMetadatato configure high-priority model execution with automated fallback. - Live Token Usage Updates: Added support for live
UsageUpdateevent streaming over WebSockets, accumulating per-trajectory token usage live during execution. Added subtraction (-) operator support toUsageMetadata. - Agent Execution Modes (
AgentMode): IntroducedAgentModeenum (autonomous,interactive) inCapabilitiesConfigandSubagentCapabilitieswith interactive tool validation warnings (BuiltinTools.askQuestion). - Interactive CLI Spinner: Updated interactive CLI step spinner formatting (
formatStepSpinnerMessage) to display all active tool names during concurrent tool calls (e.g.Running tools 'tool_a', 'tool_b'...). - Tool Call Correlation ID: Added
callIdcorrelation support acrossToolCall,ToolResult,ToolExecutionException, and lifecycle hook payloads. - Flexible Context-Aware Lifecycle Hooks: Added
.stateless()factory constructors toFunctionInspectHook,FunctionDecideHook, andFunctionTransformHookto seamlessly support both(data)and(context, data)callback signatures. - ActionCompaction Handling: Emits context window compaction events over WebSockets and dispatches registered
OnCompactionHookhandlers. - Standardized System Instructions Strategy: Plain string instructions default to an appended system instruction strategy, while
CustomSystemInstructionscompletely replaces built-in instructions. - LiteRT Token Output Limit: Increased LiteRT default
maxOutputTokensfrom 8192 to 16,384 tokens to prevent truncation during complex generation.
- Breaking API Change:
- Sync with Python SDK v0.1.10 & Dart-Idiomatic Enhancements:
-
0.7.030 Jul 2026Release notes
Open source →- Sync with Python SDK v0.1.9 & Dart-Idiomatic Enhancements:
- Model-Call Retry & Backoff Configuration: Introduced
RetryConfig,ModelAPIRetryConfig, andModelOutputRetryConfigwithRetryConfig.benchmark()preset for controlling exponential backoff and output retry behavior acrossLocalAgentConfig,LocalOpenAIAgentConfig, andLiteRTAgentConfig. - Strongly-Typed
Duration& Jitter Ratio Validation: AddedDurationsupport (initialSleepDuration,serverTimeout) toModelAPIRetryConfigandMcpServerConfig. ValidatesjitterRangeas a ratio between0.0and1.0. - Strongly-Typed Logging with
package:logging:DebugConfigaccepts strongly-typedLevelobjects (level: Level.WARNING) or string names, validating levels and applying process-safe logger updates onAgent.start(). Uri&Uint8ListMedia Buffers: AddedUrigetters (uri,baseUri) onMcpStreamableHttpServerandModelEndpoint, plusMcpStreamableHttpServer.fromUri()factory constructor. AddedUint8List get bytesgetter onMediaContentandFileobject support infromFile().- Step & Turn Extensions: Added extension getters (
isUserTurn,isModelTurn,isFinished,isDone) onStep,StepSource, andStepStatus. - LiteRT Warm-up Timeout Scaling: Dynamically scales LiteRT engine warm-up timeouts based on context size (
maxContextTokens). - Expanded Audio Payload MIME Support: Added support for
audio/x-wav,audio/wave,audio/vnd.wave,audio/mp4,audio/webm, and additional audio formats. - Prompt Validation: Added strict validation in
Conversation.chat()to reject null, empty string, whitespace-only, or empty content prompts withAntigravityValidationException. - Hybrid Exception Hierarchy:
AntigravityValidationExceptionimplements bothExceptionandArgumentErrorfor backwards compatibility. - SDK Alignment: Bumped SDK version to
0.7.0aligned with Python SDKv0.1.9release.
- Model-Call Retry & Backoff Configuration: Introduced
- Sync with Python SDK v0.1.9 & Dart-Idiomatic Enhancements:
-
0.6.024 Jul 2026Release notes
Open source →- Sync with Python SDK v0.1.8:
- Default Model Upgrade to Gemini 3.6 Flash: Updated default generative text model in
lib/src/models.darttogemini-3.6-flash. - Prompt Sanitization: Strips null bytes (
\x00) and dangerous control characters (DEL,BEL,C1) from incoming string prompts at the wire boundary. - Tool Execution Exception: Introduced
ToolExecutionExceptioncarryingmessage,toolName, andserverNamemetadata when tool execution fails, with updated hook routing inHookRouter. - Subagent Custom & Templated System Instructions: Expanded
SubagentConfigsystem instructions to supportCustomSystemInstructionsandTemplatedSystemInstructions. - SDK Version Bump & Alignment: Bumping SDK version to 0.6.0 aligned with Python SDK v0.1.8 release updates.
- Default Model Upgrade to Gemini 3.6 Flash: Updated default generative text model in
- Sync with Python SDK v0.1.8:
-
0.5.018 Jul 2026Release notes
Open source →- Sync with Python SDK v0.1.7:
- Hierarchical Thread-Safe State Management: Introduced the
StateStoreclass for hierarchical context state sharing and lock/reentrancy support. RetargetedHookContextandToolContextto inherit fromStateStore. - Session Continuation Modes: Implemented
SessionContinuationModeto specify continuation behavior (RESUME,CREATE_OR_RESUME,CREATE_ONLY,SESSION_CONTINUATION_MODE_UNSPECIFIED) with validation checks onAgentConfig. - Dynamic Environment Hydration: Hydrates Vertex project and location parameters automatically from standard
GOOGLE_CLOUD_PROJECTandGOOGLE_CLOUD_LOCATIONenvironment variables when not explicitly passed, and enables Vertex mode automatically whenGOOGLE_GENAI_USE_VERTEXAIorGOOGLE_GENAI_USE_ENTERPRISEis set. - Websocket Retry Backoff & DNS Resolution: Refactored websocket connections in
LocalConnectionStrategyto retry on bothlocalhostand127.0.0.1to ensure reliable connections in containerized sandboxes. - Spinner Pause/Resume: Enhanced CLI
Spinnerwith pause and resume behaviors, and integrated them into user confirmation/question hooks to prevent prompt clobbering. - Custom Tool Execution Support: Added
custom_toolparsing support inStep.fromMapand filtered out tool calls from StepUpdate if they are local custom tools to prevent client duplicate events. - Addition Operator for Token Usage: Implemented
+addition operator onUsageMetadatafor clean accumulation of token usage. - Updated default image generation model to
'gemini-3.1-flash-lite-image'. - Added
ThinkingLevel.extraHigh('extra_high') level support.
- Hierarchical Thread-Safe State Management: Introduced the
- Sync with Python SDK v0.1.7:
-
0.4.111 Jul 2026Release notes
Open source →- Bug Fixes & Adjustments:
- Restored default workspaces (current working directory) and capabilities configuration on
BaseLocalAgentConfigto prevent silent sandboxing regressions. - Fixed client handshake protocol to announce the correct client version instead of a stale one.
- Added missing
read_url_contenttool field mapping inStep.fromMapparser. - Resolved
HttpClientsocket/connection leak in LiteRT loopback server health checks. - Documented public configuration fields on
LocalOpenAIAgentConfigandLiteRTAgentConfig.
- Restored default workspaces (current working directory) and capabilities configuration on
- Bug Fixes & Adjustments:
-
0.4.011 Jul 2026Release notes
Open source →- Local Inference & OpenAI Endpoint Support:
- Added support for local Gemma execution using LiteRT via
LiteRTAgentConfigandLiteRTConnectionStrategy(which manages a python loopback HTTP server). - Added support for any OpenAI-compatible completions API (e.g. Ollama, LM Studio) via
LocalOpenAIAgentConfigandLocalOpenAIConnectionStrategy.
- Added support for local Gemma execution using LiteRT via
- Multimodal Tool Outputs:
- Enabled custom tools to return media assets (images, audio, video, documents) directly via a single tool response without needing separate follow-up turns. Media is extracted and sent as
supplemental_mediaintool_response.
- Enabled custom tools to return media assets (images, audio, video, documents) directly via a single tool response without needing separate follow-up turns. Media is extracted and sent as
- Model Context Protocol (MCP):
- Decoupled tool calls and safety policy engines from legacy
mcp_string prefix synthesis, utilizing explicitserverNameattributes in tool evaluation.
- Decoupled tool calls and safety policy engines from legacy
- Alias Deserialization Support:
- Handled
results/entriesalias inListDirectoryResultandoutput/combined_outputalias inRunCommandResult.
- Handled
- Automated Binary Discovery Updates:
- Added version checking logic to verify if the cached
localharnessbinary is out of date. - Automatically triggers a re-download/upgrade if the cached binary version is older than the SDK's default version (
0.1.6).
- Added version checking logic to verify if the cached
- Local Inference & OpenAI Endpoint Support:
-
0.3.101 Jul 2026Release notes
Open source →-
Fix Tool Error Hook Dispatching:
- Resolved a bug where
OnToolErrorHookwas never dispatched for either client-side custom tool failures or harness-side built-in tool failures. - Implemented client-side tool error dispatching in
local_connection.dartwith support for recovery values. - Added routing for
LIFECYCLE_HOOK_ON_TOOL_ERRORandON_TOOL_ERRORhook requests inhook_router.dartand covered it with a unit test.
- Resolved a bug where
-
Dart 3 Modernization:
- Refactored core classes
ConnectionandConnectionStrategyto use Dart 3abstract interface classmodifiers. - Marked
MediaContentas asealed classto restrict subclass hierarchy and support compiler-level exhaustiveness checks. - Modernized
registerHook,allow,deny, andaskUserto leverage case type pattern matching inside switch statements. - Refactored policy bucket index resolution (
_bucketIndex), file change triggers (onFileChange), shorthand model builder (_buildShorthandModels), and step state mappings (Step.fromMap) to use clean switch expressions and logical OR patterns. - Updated local connection classes to implement rather than extend the new interface classes.
- Added conditional imports in
lib/src/types/content.dartto support running the package on the web.
- Refactored core classes
-
-
0.3.026 Jun 2026Release notes
Open source →- Synchronize updates from Python SDK (v0.1.5):
- Added new
read_url_contentbuiltin tool and itsReadUrlContentResultstructured output. - Added
StepType.thinkingto enum representation for telemetry tracking. - Implemented the
HookRouterto process WebSocket-basedCallHookRequestturn and tool lifecycle hooks delegated by the harness. - Added support for telemetry
PreStepHookandPostStepHookinsideHookRunnerand connection parser. - Implemented
_StepTrackerto prevent duplicate step hooks or non-linear state transitions. - Supported error and cancelled propagation in
trajectory_state_updateevents. - Historical Step Absorption: Aligned startup handshake to await and parse pre-existing conversation history and usage metadata from
initialize_conversation_response, populating them immediately inConversationon start.
- Added new
- Synchronize updates from Python SDK (v0.1.5):
-
0.2.121 Jun 2026 -
0.2.021 Jun 2026Release notes
Open source →- Model Configuration Overhaul: Replaced the monolithic
GeminiConfigwith a more flexibleModelTargetand polymorphicModelEndpointclass hierarchy (GeminiAPIEndpoint,VertexEndpoint). - Subagents Feature: Introduced
SubagentConfigandSubagentCapabilitiesallowing definition and inclusion of subagents in the main agent's configuration. - New Builtin Tools: Added
SearchWebtool and relatedSearchWebResultstructured output. - Enhanced Configuration: Support for environment variables (
env) inMcpStdioServer. RemovedimageModelfromCapabilitiesConfigto favor the new generic model targeting features.
0.1.3
- Added support for Vertex AI configuration (project, location, vertex options) in
GeminiConfig. - Refactored Model Context Protocol (MCP) server configurations to run connections natively on the Go-based harness, removing client-side
McpBridgereferences. - Added
SlashCommandstructure to input content primitives to support built-in planning flows. - Integrated CLI
SpinnerintorunInteractiveLoopwith step-by-step progress tracking viaagent.conversation.receiveSteps(). - Enhanced policy engine with a 9-level priority model supporting prefix wildcards and custom MCP policy validators.
- Added
AntigravityCancelledExceptionandAntigravityExecutionExceptionfor robust error handling.
0.0.1
- Initial release of the Antigravity Dart SDK.
- Model Configuration Overhaul: Replaced the monolithic