session-bridge
Integrates with Google Antigravity CLI (agy) sessions to import, export, and convert conversations between agy and omp, including reading AGY transcripts and creating saved AGY conversations.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@session-bridge Import my latest omp session into this conversation"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
omp-agy-bridge
Bidirectional session bridge between oh-my-pi (
omp) and Google Antigravity CLI (agy).
Move seamlessly back and forth between omp and agy without losing conversation context, tool history, or workspace continuity — via CLI, MCP server, or built-in Agent Skills.
Zero dependencies — pure Python 3 standard library (
bridge.py+ stdio JSON-RPC 2.0mcp_server.py).Native AGY → OMP conversion — writes genuine, resumable OMP v3
.jsonlsession trees directly into~/.omp/agent/sessions/<encoded-cwd>/soomp -r <id>opens the full history natively with 1:1toolCall/toolResultpairing and automatic default-model restoration.Smart OMP → AGY handoff — walks OMP's branched
id/parentIdtree, respects compaction summaries andcontext_editpruning, fits massive multi-megabyte sessions cleanly within a configurable character budget, archives the complete verbatim transcript on disk, and either injects directly into your activeagysession via MCP or launches/creates a savedagyconversation.Sandbox-friendly — running as a host stdio MCP server lets both
agyandompread each other's session stores seamlessly across any workspace.
Architecture
flowchart LR
OMP["oh-my-pi (omp)<br/>~/.omp/agent/sessions/*.jsonl"]
AGY["Antigravity CLI (agy)<br/>~/.gemini/antigravity-cli/"]
subgraph Bridge["omp-agy-bridge (Pure Python 3 Stdlib)"]
CORE["bridge.py<br/>Tree Parser • Compaction-Aware Formatter<br/>Native OMP v3 Writer • AGY API/CLI Seeder"]
CLI["CLI: omp-agy"]
MCP["Stdio MCP Server: session-bridge<br/>(6 tools, JSON-RPC 2.0)"]
SKILLS["Agent Skills<br/>AGY + OMP SKILL.md"]
end
OMP <--> CORE
AGY <--> CORE
CLI --> CORE
MCP --> CORE
SKILLS -.guides.-> MCPRelated MCP server: Antigravity MCP Server
Quickstart
One-command install (recommended)
git clone https://github.com/Mahyardana/omp-agy-bridge.git
cd omp-agy-bridge
./install.shinstall.sh automatically:
Installs the core modules to
~/.local/share/omp-agy-bridge/Installs
omp-agyandomp-agy-mcpto~/.local/bin/Registers the
session-bridgeMCP server in both AGY (~/.gemini/config/mcp_config.json) and OMP (~/.omp/agent/mcp.json)Installs the
session-bridgeskill in both AGY (~/.gemini/config/skills/) and OMP (~/.omp/agent/skills/)
Restart agy / omp so they pick up the new MCP server and skills.
Alternative (
pip/uv): You can also install the Python package viapip install -e .(oruv tool install .), which exposes theomp-agyandomp-agy-mcpconsole entrypoints.
Usage
1. Inside agy or omp (Natural Language via MCP + Skill)
Just talk to either agent:
In
agy:"Import my latest omp session"
"List my omp sessions for this repo and import the most recent one"
"Export this conversation to omp"
In
omp:"Import my latest agy session"
"Convert my latest agy conversation into a native omp session"
"Export this session to agy"
2. Terminal CLI (omp-agy)
# List recent sessions across both tools (filter by source, workspace, or keyword)
omp-agy list
omp-agy list --source omp --cwd .
omp-agy list --query auth --limit 10
# Preview turns from any session
omp-agy show omp latest --start 0 --limit 10
omp-agy show agy latest --no-tools
# AGY -> OMP (writes a native resumable OMP v3 .jsonl session)
omp-agy agy2omp latest --open # Convert & immediately launch `omp -r <id>`
omp-agy agy2omp <id-prefix> --mode full # Full native toolCall/toolResult history (default)
omp-agy agy2omp <id-prefix> --mode compact # Merges tool actions into compact turn summaries
omp-agy agy2omp <id-prefix> --mode conversation # Pure user/assistant text turns only
# OMP -> AGY
omp-agy omp2agy latest --open # Immediately open interactive `agy -i` in workspace
omp-agy omp2agy latest --create # Create a saved AGY conversation for `agy -r <id>`
omp-agy omp2agy latest --file-only # Write handoff + full verbatim markdown archive only3. MCP Tools Exposed (session-bridge)
Tool | Description |
| List |
| Load an OMP session directly into the active conversation (compaction-aware, budget-capped, with full verbatim archive on disk). |
| Load an AGY conversation directly into the active conversation. |
| Convert an AGY conversation into a native resumable OMP v3 |
| Export an OMP session into AGY (creates a saved conversation via |
| Paginate message-by-message through any |
How It Works Under the Hood
AGY → OMP (Native Session Tree Writer)
Reads AGY metadata (
title,workspace_uris,step_count) from~/.gemini/antigravity-cli/conversation_summaries.db(read-only) and turns frombrain/<id>/.system_generated/logs/transcript_full.jsonl.Strips internal AGY metadata wrappers (
<ADDITIONAL_METADATA>,<USER_SETTINGS_CHANGE>, system efficiency nudges) while preserving user requests, assistant responses, thinking blocks, and tool executions.Maps AGY tools (
run_command,read_file,write_file,edit_file,search_web) to OMP equivalents (bash,read,write,edit,web_search) and guarantees strict 1:1toolCall↔toolResultpairing.Detects your default OMP model from
~/.omp/agent/config.yml(modelRoles.default) and emitsmodel_changeentries soomp -r <id>restores cleanly withoutSessionModelRestoreError.Encodes the workspace
cwdusing OMP's directory bucketing convention (reusing existing matching session folders when present) and writes the.jsonlatomically.
OMP → AGY (Compaction-Aware Handoff + Archive)
Walks OMP's
id/parentIdtree along the active branch, respectingcompactionboundaries andcontext_editdeletions.Always saves the complete verbatim markdown transcript to
~/.local/share/omp-agy-bridge/exports/so nothing is ever lost.Produces a budget-aware handoff (preserving compaction summaries/initial goals + as many recent turns verbatim as fit within
max_chars), usable directly in your current AGY session via MCP, launched interactively withagy -i, or seeded into a saved AGY conversation viaConversationService/agy -p.
Running Tests
python3 -m unittest discover -s tests -vUninstall
./uninstall.shLicense
Available Tools
6 toolsexport_agy_to_ompA
Convert an Antigravity (agy) conversation into a NATIVE resumable oh-my-pi (omp) v3 .jsonl session file under ~/.omp/agent/sessions// so you can immediately resume it with omp -r <id> or omp -c.
Inputs: cwd, mode, title, session, +2 more.
export_omp_to_agyA
Export an oh-my-pi (omp) session into Antigravity (agy). Saves a full verbatim transcript archive and handoff file, and optionally creates a new saved AGY conversation immediately resumable via agy -r <id>.
Inputs: cwd, model, session, max_chars, +3 more.
import_agy_sessionA
Import an Antigravity (agy) conversation into the CURRENT conversation context (ideal when running inside omp). Reads the AGY transcript, formats a clean handoff transcript within the char budget, and archives the complete verbatim transcript on disk.
Inputs: cwd, session, max_chars, include_tools, +1 more.
import_omp_sessionA
Import an oh-my-pi (omp) session into the CURRENT conversation context (ideal when running inside agy). Reconstructs the active branch (respecting omp compaction summaries), formats a clean handoff transcript within the char budget, and archives the complete verbatim transcript on disk for on-demand lookup.
Inputs: cwd, session, max_chars, include_tools, +2 more.
list_sessionsA
List saved coding agent sessions from oh-my-pi (omp) and/or Antigravity (agy), newest first, with session IDs, titles, workspace paths, timestamps, and sizes.
Inputs: cwd, limit, query, source.
read_session_turnsA
Paginate through any omp or agy session message-by-message (useful for inspecting earlier middle turns of very large sessions without overwhelming context).
Inputs: source (required), cwd, limit, session, +4 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool maps to a distinct operation (list, import, export, paginate) and the import/export tools encode source and direction explicitly in their names, so selection is largely unambiguous. The only soft spot is import_agy_session vs export_agy_to_omp, which both move agy content but into different destinations (context vs native omp file) and require reading descriptions to separate.
All tools are snake_case and verb-first (list_, import_, export_, read_) with the same noun vocabulary (session/sessions, omp, agy). The source/target suffixes are applied symmetrically, making the pairs predictable.
Six tools is well-scoped for a session bridge: enumerate, read, import each direction, export each direction. Every tool covers a distinct quadrant of the matrix with no filler.
The list/read/import/export matrix across both omp and agy is covered, including pagination for large sessions. Minor gaps remain: no search or filter of sessions by keyword/workspace, and no way to manage, prune, or delete the archived verbatim transcripts written to disk.
Maintenance
Related MCP Connectors
Sync coding-agent sessions and resume them in any other agent: Claude Code, Codex, Cursor, more.
Private memory, scratchpads, context export/restore and task handoff for AI agents.
Shared memory and context across ChatGPT, Claude, Claude Code, Codex, Cursor and 20+ AI tools
Persistent cross-session memory shared by Codex, Claude Code, ChatGPT, and other AI agents.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables Codex users to delegate engineering, refactoring, auditing, and test execution tasks to Google Antigravity CLI as a persistent autonomous subagent, with tools for managing sessions and running prompts.1MIT
- AlicenseBqualityCmaintenanceEnables MCP clients such as Claude Code and Cursor to delegate long multi-step coding tasks to Google Antigravity CLI, generate read-only plans and code reviews, digest large codebases, and manage background sessions in isolated git worktrees.15152 npm2MIT
- AlicenseAqualityBmaintenanceEnables orchestration of Google Antigravity agents and CLI sessions by spawning, steering, listing, inspecting transcripts of, and archiving multiple child chat sessions across projects and GitHub issues.5Apache 2.0
- AlicenseBqualityBmaintenanceEnables persistent, lossless local session memory for Google Antigravity by preserving compaction context, Q&A continuity, and verified file paths, while exposing searchable SQLite FTS5 memory and transcript tools. It provides eight MCP tools for pinning decisions, searching sessions and transcripts, and checking memory status.8MIT