Skip to content

Gemini Local

The gemini_local adapter runs Google’s Gemini CLI locally. It supports session persistence with --resume, skills injection, and structured stream-json output parsing.

  • Gemini CLI installed (gemini command available)
  • GEMINI_API_KEY or GOOGLE_API_KEY set, or local Gemini CLI auth configured
FieldTypeRequiredDescription
cwdstringYesWorking directory for the agent process (absolute path; created automatically if missing when permissions allow)
modelstringNoGemini model to use. Defaults to auto.
promptTemplatestringNoPrompt used for all runs
instructionsFilePathstringNoMarkdown instructions file prepended to the prompt
envobjectNoEnvironment variables (supports secret refs)
timeoutSecnumberNoProcess timeout (0 = no timeout)
graceSecnumberNoGrace period before force-kill
yolobooleanNoPass --approval-mode yolo for unattended operation

The adapter persists Gemini session IDs between heartbeats. On the next wake, it resumes the existing conversation with --resume so the agent retains context.

Session resume is cwd-aware: if the working directory changed since the last run, a fresh session starts instead.

If resume fails with an unknown session error, the adapter automatically retries with a fresh session.

The adapter symlinks Paperclip skills into the Gemini global skills directory (~/.gemini/skills). Existing user skills are not overwritten.

Use the “Test Environment” button in the UI to validate the adapter config. It checks:

  • Gemini CLI is installed and accessible
  • Working directory is absolute and available (auto-created if missing and permitted)
  • API key/auth hints (GEMINI_API_KEY or GOOGLE_API_KEY)
  • A live hello probe (gemini --output-format json "Respond with hello.") to verify CLI readiness