Skip to main content
Glama
agy-session-search

agy-session-search

by ctx-o1

agy-session-search

Give your agent searchable memory of past Antigravity conversations. Find earlier decisions, debugging sessions, and saved plans using local transcript files.

Quick start

Requires Node.js 22.16+.

Point your coding agent at this repo:

Set up agy-session-search in my MCP client using the instructions here:
https://github.com/ctx-o1/agy-session-search

Add this server to your MCP configuration:

{
  "mcpServers": {
    "agy-session-search": {
      "command": "npx",
      "args": ["-y", "agy-session-search"]
    }
  }
}

For Antigravity, merge it into ~/.gemini/config/mcp_config.json (%USERPROFILE%\.gemini\config\mcp_config.json on Windows). Preserve your other server entries, then reload MCP servers.

Once connected, ask:

Find the conversation where we implemented OAuth token refresh retries in my-project. Read the matching steps and summarize the decision.

Related MCP server: ThreadSatchel

Tools

Tool

Description

search_sessions

Search messages and artifacts by keyword, phrase, or prefix. Filter by project, role, surface, or date.

list_sessions

Browse recent sessions with titles, projects, timestamps, and artifact names.

read_session

Read steps around a search hit, with optional full-transcript expansion.

read_artifact

List or read a session's Markdown artifacts.

reindex_sessions

Sync changed files or rebuild the index.

Queries support "exact phrases", prefix*, and uppercase OR. Tool output and thinking summaries are excluded from searches by default. Session reads accept a full ID or a unique prefix of at least six characters.

To have your agent use it automatically, add this to your project rules:

When I reference a past conversation or earlier decision, use agy-session-search
filtered by the current project, then read the matching steps before answering.

CLI

npx -y agy-session-search search "OAuth retry" --project my-project
npx -y agy-session-search list --limit 10
npx -y agy-session-search read SESSION_ID --around 14 --context 4
npx -y agy-session-search artifact SESSION_ID walkthrough.md
npx -y agy-session-search stats

Replace SESSION_ID with an ID or prefix from a result. Use --help for flags and --json for structured search, list, read, or artifact output.

Configuration

The default scan directories are ~/.gemini/antigravity/brain/ and ~/.gemini/antigravity-cli/brain/. Supported files are .system_generated/logs/transcript.jsonl and Markdown artifacts directly inside each session directory. transcript_full.jsonl is used for expanded reads when requested. Sessions without available transcripts can only contribute artifacts.

Environment variable

Flag

Description

AGY_BRAIN_DIRS

--dir <path> (repeatable)

Replace the default scan directories. Environment paths use ; on Windows and : elsewhere.

AGY_SESSION_SEARCH_DB

--db <path>

Set the SQLite cache path, or :memory: for a nonpersistent index.

AGY_SEARCH_ENGINE

--engine sqlite or --engine memory

Choose SQLite FTS5 or pure-JavaScript BM25. SQLite is the default, with automatic fallback to memory.

Flags override environment variables. Use absolute paths in MCP configuration. Custom directories have surface: custom; use a separate database path for each root configuration if overriding the cache location.

If searches return nothing, check stats for the scan directories and indexed counts, then try without a project filter. Available transcript files determine which conversations are searchable.

Development

npm ci
npm run typecheck
npm test

Tests build the package and use synthetic session fixtures. npm pack creates a clean release tarball.

License

MIT

Available Tools

5 tools
list_sessionsA

List recent Google Antigravity chat sessions with their title, inferred project/workspace, timestamps, turn count, and artifact names.

Inputs: limit, since, until, offset, +2 more.

read_artifactB

List or read markdown artifacts (such as implementation_plan.md, task.md, walkthrough.md) saved inside an Antigravity session.

Inputs: session_id (required), name, max_chars.

read_sessionA

Read a slice of turns/steps from a specific Antigravity session. Defaults to 11 steps, with at most 101 per call. Use around_step (from a search hit) or start_step/end_step. Continue with start_step set to the last returned step + 1.

Inputs: session_id (required), full, end_step, start_step, +5 more.

reindex_sessionsA

Incrementally sync (or force rebuild) the local Antigravity session search index and return index statistics.

Inputs: force.

search_sessionsA

Full-text BM25 search across local Google Antigravity chat sessions, transcripts, and markdown artifacts. Supports keywords, "exact phrases", prefix*, and project/date/role filters. Excludes noisy tool outputs by default unless include_tools=true.

Inputs: query (required), role, limit, since, +6 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool occupies a distinct slot in the workflow: enumerate (list_sessions), maintain the index (reindex_sessions), query (search_sessions), read transcript content (read_session), and read attached markdown files (read_artifact). The only near-pair, read_session vs read_artifact, is clearly separated by the descriptions (turns/steps vs markdown artifacts). No two tools could plausibly be swapped for the same task.

    Naming Consistency5/5

    All five names follow a strict snake_case verb_noun pattern (list_, reindex_, search_, read_, read_) with the shared 'session(s)'/'artifact' domain nouns. Verb choices accurately reflect the operation type, making the pattern predictable for an agent.

    Tool Count5/5

    Five tools is a tight, well-earned surface for a session search server: one to index, one to browse, one to search, and two to read results at different granularities. Nothing is redundant and nothing feels padded.

    Completeness4/5

    The lifecycle is covered end-to-end: build/refresh the index, list sessions, search, then drill into turns and artifacts, including pagination guidance for long transcripts. Minor gaps exist — no direct fetch of a single session's metadata by id, no cross-session artifact listing, and no index cleanup/delete — but these are workaroundable via search and list.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables searching, indexing, and recovering past AI chat sessions and agent actions from local AI coding tools, with optional vector database semantic search and direct filesystem access.
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI assistants to search and retrieve a locally stored archive of past conversations, notes, and captured Codex events, preserving full original text and provenance in SQLite full-text search. It offers read-only access through two tools, search_memory and get_memory, so context from earlier chats can be reused without pasting it again.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables agents to run cross-runtime, cross-machine BM25 full-text search over historical conversations from Hermes, Google Antigravity, OpenClaw, Codex, and Claude Code, and to retrieve any past session's full transcript by ID. Queries return only ranked matching snippets, so recall costs no extra tokens or embeddings.
      MIT