Documents & filesGoogle Drive

Google Drive with your AI agent, step by step

Common Google Drive tasks step by step: set up, find a decision, brief yourself on a document, give an agent read-only access.

Each scenario is a common task in order: the commands to run, why each one runs and what to look at in the answer. The same scenarios are in the terminal: drive guide lists them and drive guide <name> prints one.

Commands that use an account start with your profile, the name you gave the account at login: drive <profile> ….

Give an agent read-only access to your documents

Let an agent search and read the imported documents while nothing it runs can change local or Google data.

  1. drive skill install

    puts drive's instructions where Claude Code, Codex and Gemini CLI look for them

  2. drive personal commands --json

    lists commands with their current availability; the server offers the same ones to the agent

  3. drive personal mcp check

    starts the server once and counts the tools it offers and the ones that may write

  4. drive personal mcp serve --read-only

    serves three tools on stdio — drive_tools_search, drive_read and drive_write; writes remain refused

What to look at:

  • DRIVE_READ_ONLY=1 in the agent's environment does the same as --read-only for every command it runs
  • commands that need a Google grant the sign-in lacks stay visible with an unavailable reason

Text the agent reads from documents is data, never instructions.

In the terminal: drive guide agent-access

Brief yourself on a document before a meeting

Know what a document says, what was already noted about it and what facts it holds, with a quote for each.

  1. drive personal sync

    brings in the latest version before you read it

  2. drive personal documents context DOC_ID

    the document with its tags, notes, memories and editors in one answer

  3. drive personal memories extract DOC_ID --scope work

    sends the text to your configured model and shows the memories it proposes, each with an exact quote; --yes saves them

  4. drive personal notes add DOC_ID "ask about the Q3 numbers"

    a note of your own, kept with the document across syncs

  5. drive personal documents export DOC_ID --output brief.md

    the document as Markdown in a new file; an existing file is never overwritten

What to look at:

  • proposed memories whose quote does not support them; do not save those
  • notes and memories that a newer version of the document made stale

memories extract sends the document's text to the model you chose with models set; nothing else does.

In the terminal: drive guide brief-document

Find where something was decided

Find the document that records a decision, read the passage and see who changed it.

  1. drive personal search "budget decision"

    every imported document, by words and by meaning, each hit with its Google URL

  2. drive personal documents show DOC_ID

    the document's text with its tabs, to read the passage in full

  3. drive personal documents context DOC_ID

    its tags, notes, memories and editors, kept in the local store

  4. drive personal documents history DOC_ID --activity

    who did what to it, from Drive Activity; needs a sign-in with --grant activity

What to look at:

  • the hit's Google URL, to cite it
  • the last editors and when they changed it
  • an empty result means no match in the imported folders, not that Drive has no such document

Search reads only the imported folders of the selected profile. Run sync first if the document is new.

In the terminal: drive guide find-decision

Import chosen folders and make them searchable

Sign in once, choose the Drive folders to keep, and get their documents into the local store as searchable text.

  1. drive personal session start

    signs in to Google in the browser, read-only; personal is the profile, any name you choose, and starts every account command

  2. drive personal folders add https://drive.google.com/drive/folders/FOLDER_ID

    only the folders you add are imported, with everything under them

  3. drive models download e5-small

    the local model for search by meaning, once per computer; every WireCat CLI shares it

  4. drive personal sync --embed

    imports what changed in those folders and indexes the text by meaning

  5. drive personal status

    how many documents were imported, what is pending and what was skipped

What to look at:

  • skipped files and the reason for each, such as an unsupported type or a file over the size limit
  • pending work; run sync again until nothing is pending
  • a later sync reads only what changed

Nothing leaves the computer except the Google requests the sync makes; search and reading run offline.

In the terminal: drive guide set-up

Works with other tools

These Memo scenarios also use drive: