Back
GoogleAntigravity
Conversation compaction controls, forward-looking budget scopes, and tool output token truncation
AI summary
Written by AI from the official notes. Check them for exact details.This release adds conversation compaction controls, budget scopes for session resumption, and token truncation limits.
- Introduces
CompactionConfigfor conversation history management. - Adds
BudgetScope.FORWARD_LOOKINGfor session budget enforcement. - Implements token output truncation limits for tool executions.
- Supports arithmetic operations on
UsageMetadatafor token management. - Preserves tool metadata during registration with
ToolWithSchema.
Why it matters: Developers and users of AI tools should care for improved session management and resource control.
Full release notes10 changes
This release introduces first-class conversation compaction controls via CompactionConfig, delta and forward-looking budget scopes for session resumption, tool output token truncation limits, and expanded arithmetic operations on UsageMetadata. It also delivers OS-level terminal sandboxing examples and automated tool wrapper reflection preservation.
- Compaction Configuration: Adds
CompactionConfigonAgentConfigto govern sliding-window conversation history compaction through an explicit token ceiling dial (token_threshold), deprecatingCapabilitiesConfig.compaction_threshold. - Forward-Looking Budget Scope: Adds
BudgetScope.FORWARD_LOOKINGtoBudgetConfigto enforce model call and token budgets across newly resumed execution turns without counting previous historical usage. - Tool Output Token Truncation: Exposes
tool_output_truncation_configacross agent configurations to cap token output volume initially forrun_commandexecutions in localharness. - UsageMetadata Arithmetic: Supports standard Python arithmetic protocols on
UsageMetadata, enabling scalar multiplications, scaling, and accumulating token counts using built-insum(). - Tool Wrapper Metadata Preservation: Preserves function signature, module name, annotations, and original callable references via
wrappedwhen registering tools withToolWithSchema. - Interactive REPL Policy Flattening: Automatically flattens nested policy lists during interactive REPL upgrades so nested command authorization rules correctly upgrade to prompt the user.
- Terminal Command Sandboxing Guide: Added getting-started guide and references demonstrating OS-level command sandboxing using
RunCommandConfig(enable_sandbox=True)paired with execution policies. - Tool Call Deserialization: Fixed dropped tool arguments during tool call handling when incoming payloads provide structured dictionary arguments rather than serialized JSON strings.
- Local Step Trajectory Tracking: Fixed missing provenance metadata by forwarding
trajectory_idfrom incoming tool calls to local connection execution steps. - Dynamic Content Proto Resolution: Fixed an
AttributeErrorwhen importingstruct_converterin external environments missing internal protobuf definitions by resolving descriptor types dynamically at runtime.