Feature Request: Hybrid Local-Cloud Context Orchestration via Edge-Assisted Pruning

Feature Request: Hybrid Local-Cloud Context Orchestration via Edge-Assisted Pruning

Is your feature request related to a problem? Please describe. Yes. Currently, when working on larger codebases with Antigravity, developers face a trade-off: either pass too little context (causing the model to miss architectural dependencies) or pass the entire workspace (which heavily inflates token consumption, increases costs, and degrades response latency).

Describe the solution you’d like We propose a three-tier hybrid context architecture that utilizes local client resources to prune context before sending requests to the cloud:

  1. LSP/Tree-sitter Indexing (Local): Antigravity should leverage the local Language Server Protocol (LSP) to instantly map imports, class structures, and function definitions without consuming LLM tokens.

  2. On-Device Mini-Model (Local Gatekeeper): Integrate a highly compact, code-specialized on-device model (e.g., LiteRT-LM / Gemma 2B) within the IDE extension. This model evaluates the user’s prompt against the LSP map and selects only the strictly relevant files and dependency fragments.

  3. Distributed Agentic Orchestration (Cloud-to-Local): If the powerful cloud model (Gemini 3.5 Flash/Pro) realizes it lacks context mid-inference, it should be able to send a lightweight execution command back to the local client (e.g., EXECUTE: find_dependencies("TargetClass")) instead of requiring a manual user prompt or a full repository upload.

Describe alternatives you’ve considered Manually copy-pasting relevant code blocks into the chat prompt, which is tedious and error-prone, or utilizing massive context windows that drastically increase token costs and processing time.

Additional context / Value Proposition

  • Massive Cost Reduction: Reduces average token usage per prompt.

  • Performance Boost: Smaller context payloads result in much faster time-to-first-token (TTFT) from the cloud engine.

  • Privacy & Security: Less “noise code” leaves the developer’s local machine.

Ps.: Yes Gemini helped me to structure and translate my suggestion into English. :slight_smile: