gemini

A connection between Google's Gemini CLI, a command-line coding assistant, and agentkernel, a tool that runs code in isolated sandboxes.

In plain words
What is it for?
Use it to give Gemini sandbox controls, run commands in temporary or persistent sandboxes, or run Gemini itself inside an isolated sandbox.
Why use it?
It lets Gemini run commands away from the main computer, reducing the risk of generated or untrusted code affecting the host system.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/thrashr888/agentkernel/gemini
Clone the repo
git clone --depth 1 https://github.com/thrashr888/agentkernel
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 837 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00837
Opus 5 $0.00000 $0.00418
Sonnet 5 $0.00000 $0.00167
Haiku 4.5 $0.00000 $0.00084

Measured yesterday against content hash d48590105e5a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

gemini scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/agents/gemini.md · 129 lines

How it starts

The opening of the file, as written. The whole thing — 129 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Google Gemini CLI

Use Google's Gemini CLI with agentkernel for isolated code execution.

Integration Levels

Level How It Works Setup
MCP Tools Gemini calls agentkernel tools for sandbox management agentkernel plugin install gemini
Full Isolation Run Gemini CLI itself inside an agentkernel sandbox agentkernel sandbox create + agentkernel attach

Gemini CLI also has its own native Docker sandbox that is separate from agentkernel. That sandbox is managed by Gemini itself and cannot be replaced with a custom runtime.

Gemini runs locally, code execution is sandboxed via MCP:

# Install the MCP config into your project
agentkernel plugin install gemini

# This adds the agentkernel MCP server to .gemini/settings.json
# Gemini will have access to: run_command, create_sandbox, exec_in_sandbox, list_sandboxes, remove_sandbox

For global installation:

agentkernel plugin install gemini --global

MCP Tools

The agentkernel MCP server gives Gemini access to:

Tool Description
run_command Run a command in a temporary sandbox
create_sandbox Create a persistent sandbox
exec_in_sandbox Execute in an existing sandbox
remove_sandbox Remove a sandbox
list_sandboxes List all sandboxes

Full Isolation Mode

Run Gemini CLI itself inside an agentkernel sandbox:

# Create sandbox with Gemini pre-installed
agentkernel sandbox create gemini-dev --config examples/agents/gemini/agentkernel.toml

# Start the sandbox
agentkernel sandbox start gemini-dev

# Run Gemini with your API key
agentkernel attach gemini-dev -e GEMINI_API_KEY=$GEMINI_API_KEY

# Inside the sandbox:
gemini

Native Sandbox

Gemini CLI has its own Docker-based sandbox separate from agentkernel. Enable it with:

# Environment variable
GEMINI_SANDBOX=docker gemini

# CLI flag
gemini --sandbox

# Or in .gemini/settings.json
# { "sandbox": true }

Read the full file on GitHub · 129 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 129 lines · 0 tokens per session scan A d48590105e5a

Subscribe to this mod's changes

gemini is an agent published in the GitHub repository thrashr888/agentkernel (58 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 837 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.