Skip to content

feat: add xmem-antigravity plugin and groq support#215

Merged
ishaanxgupta merged 4 commits into
XortexAI:mainfrom
kanishkez:feat/antigravity-plugin-groq-provider
Jun 1, 2026
Merged

feat: add xmem-antigravity plugin and groq support#215
ishaanxgupta merged 4 commits into
XortexAI:mainfrom
kanishkez:feat/antigravity-plugin-groq-provider

Conversation

@kanishkez
Copy link
Copy Markdown
Contributor

antigravity is already mentioned in the README as a supported export format but there was no plugin for it. this adds plugin/xmem-antigravity following the exact same structure as xmem-claude.
also added groq as a model provider — it was the only major one missing from the registry.
changes:

  • plugin/xmem-antigravity with hooks, skills, commands, and scripts
  • native transcript.jsonl parser so antigravity sessions skip the LLM fallback
  • src/models/groq.py wired into settings + registry (default: llama-3.3-70b-versatile)
  • langchain-groq added to optional deps

antigravity is mentioned in the README as a supported export format but
there was no actual plugin for it. added plugin/xmem-antigravity with the
same structure as xmem-claude — hooks, skills, commands, and scripts.

also added a native transcript.jsonl parser in plugin-utils so antigravity
sessions don't need the LLM fallback that other formats use.

groq was the only major provider missing from the model registry. added
src/models/groq.py and wired it into settings, registry, and base.py.
default model is llama-3.3-70b-versatile.
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the xmem-antigravity plugin to enable persistent memory across Antigravity agent sessions, alongside adding backend support for Groq models to facilitate ultra-low-latency inference. Feedback on these changes highlights three key areas for improvement: first, the Groq API key validation needs to be integrated into the settings post-initialization check to prevent false-positive validation errors; second, the extractText utility should be updated to handle structured objects like tool calls so that critical transcript context is not lost; and third, a timeout should be added to the API fetch requests to prevent the plugin scripts from hanging indefinitely.

Comment thread src/config/settings.py
Comment thread plugin/xmem-antigravity/scripts/lib/plugin-utils.cjs
Comment thread plugin/xmem-antigravity/scripts/lib/xmem-client.cjs
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Jun 1, 2026

Greptile Summary

This PR adds a new plugin/xmem-antigravity package that mirrors xmem-claude for the Antigravity agent runtime, and wires Groq as a new model provider in the Python backend.

  • Antigravity plugin: includes SessionStart/Stop hooks, xmem-search/xmem-save skills, four commands, and a native transcript.jsonl parser (parseAntigravityTranscript) that reads Antigravity's {step_index, source, type, content} JSONL format directly instead of falling back to an LLM summarizer.
  • Groq provider: adds src/models/groq.py using ChatGroq, wired into the settings (groq_api_key, groq_model, groq_vision_model), the Provider literal type, the _BUILDERS/_KEY_MAP/_VISION_MODEL_MAP registries, and the validate_fallback_order validator.

Confidence Score: 5/5

Safe to merge — the new plugin and Groq provider are additive, isolated, and follow established patterns throughout the codebase.

The antigravity plugin is a faithful port of xmem-claude with correctly adapted field names and a well-scoped native JSONL parser. The Groq factory matches every other provider factory in structure. No existing code paths are modified in a breaking way.

No files require special attention.

Important Files Changed

Filename Overview
src/models/groq.py New Groq model factory following the same pattern as claude.py/ollama.py; guards against missing import and missing API key before constructing ChatGroq.
src/models/registry.py Groq added to _BUILDERS, _KEY_MAP, and _VISION_MODEL_MAP dictionaries; consistent with every other provider entry in the file.
src/config/settings.py Three new Groq fields (groq_api_key, groq_model, groq_vision_model) added; groq added to the valid_providers set in validate_fallback_order.
plugin/xmem-antigravity/scripts/lib/plugin-utils.cjs Core utility library; adds parseAntigravityTranscript for native JSONL parsing, redactSecrets, truncate, and config loaders. Logic mirrors xmem-claude's plugin-utils with Antigravity-specific field names.
plugin/xmem-antigravity/scripts/lib/xmem-client.cjs HTTP client for the XMem API; identical structure to xmem-claude's client with Antigravity-specific env var fallbacks.
plugin/xmem-antigravity/scripts/summary-hook.cjs Stop hook that reads transcript_path from stdin, builds a redacted tail via transcriptTail, and ingests it into XMem; always emits { continue: true } to avoid blocking session shutdown.
plugin/xmem-antigravity/scripts/context-hook.cjs SessionStart hook that searches XMem and injects context via hookSpecificOutput.additionalContext; degrades gracefully on error.
plugin/xmem-antigravity/hooks/hooks.json Registers context-hook and summary-hook for SessionStart and Stop events; structure is identical to the xmem-claude plugin.
src/models/base.py Adds groq to the Provider Literal type, keeping it in sync with the registry.

Sequence Diagram

sequenceDiagram
    participant AG as Antigravity Runtime
    participant CH as context-hook.cjs
    participant SH as summary-hook.cjs
    participant XC as XMemClient
    participant API as api.xmem.in

    AG->>CH: SessionStart (stdin JSON: cwd)
    CH->>XC: "search(project context query, top_k=6)"
    XC->>API: POST /v1/memory/search
    API-->>XC: "{ results: [...] }"
    XC-->>CH: formatted results
    CH-->>AG: "hookSpecificOutput { additionalContext: xmem-context }"

    AG->>SH: Stop (stdin JSON: cwd, transcript_path, session_id)
    SH->>SH: parseAntigravityTranscript(transcript_path)
    SH->>SH: "transcriptTail -> redactSecrets -> truncate"
    SH->>XC: "ingest(content, { source: antigravity, type: session-summary })"
    XC->>API: POST /v1/memory/ingest
    API-->>XC: ok
    XC-->>SH: done
    SH-->>AG: "{ continue: true }"
Loading

Reviews (2): Last reviewed commit: "Update plugin/xmem-antigravity/scripts/l..." | Re-trigger Greptile

Comment thread src/models/groq.py
Comment thread pyproject.toml
Comment thread plugin/xmem-antigravity/scripts/lib/plugin-utils.cjs
kanishkez and others added 3 commits June 1, 2026 18:15
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
@ishaanxgupta
Copy link
Copy Markdown
Member

Hi @kanishkez, thank you for the contribution

@ishaanxgupta ishaanxgupta merged commit 516843f into XortexAI:main Jun 1, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants