Skip to content

Sec-Gemini SDK Documentation

Welcome to the Sec-Gemini SDK documentation. This site is for trusted testers with access to the Sec-Gemini platform and an API key from secgemini.google/keys.

Sec-Gemini is a security AI meta-harness from Google that combines advanced tools and near-real-time data to perform complex security workflows autonomously. It orchestrates reasoning, tool execution, and data retrieval into end-to-end security operations — from reconnaissance and vulnerability analysis to incident triage and reporting.

The sec-gemini Python package ships everything you need to interact with Sec-Gemini. One install gives you:

  • Terminal UI (TUI) — A keyboard-centric terminal interface for managing sessions, chatting with the agent, and monitoring tool execution in real time. Launch with sec-gemini.

  • Python SDK — An asyncio-native client for programmatic control over sessions, message streaming, file uploads, skills, and tool management. Import SecGemini and build custom automation.

  • Bring Your Own Tools (BYOT) — Securely connect tools running on your local machine to the cloud agent via an outbound tunnel. No inbound ports required. Ships with 35 baseline tools (file ops, shell, Python/JavaScript execution, network) and supports plugging in custom FastMCP servers.

  • MCP Server — Exposes Sec-Gemini as an MCP server so AI coding assistants like Claude Code and Gemini CLI can drive sessions, manage tools, and stream results directly.

  • Skills — Extend the agent’s capabilities with markdown-based instructions tailored for specific security tasks. Upload via SDK or TUI.

The SDK connects to the Sec-Gemini cloud platform, which runs the agent and its tool ecosystem. You interact through whichever interface fits your workflow — the TUI for interactive use, the SDK for scripting, or the MCP server for AI-assisted workflows. BYOT optionally bridges your local environment to the cloud agent so it can execute tools on your machine.

graph TB
  subgraph "PyPI: sec-gemini"
      TUI["sec-gemini<br/>(Terminal UI)"]
      SDK["Python SDK<br/>(SecGemini client)"]
      BYOT_CLI["sec-gemini-byot<br/>(BYOT Client)"]
      MCP_CLI["sec-gemini-mcp<br/>(MCP Server)"]
  end

  subgraph "Your Machine"
      LOCAL_TOOLS["Local Tools<br/>(file, shell, Python, JS, network)"]
      CUSTOM_MCP["Your Custom MCPs"]
  end

  subgraph "Sec-Gemini Cloud"
      PLATFORM["Sec-Gemini Platform"]
  end

  TUI --> SDK
  SDK --> PLATFORM
  BYOT_CLI --> PLATFORM
  BYOT_CLI --> LOCAL_TOOLS
  BYOT_CLI --> CUSTOM_MCP
  MCP_CLI --> SDK

Get started with the Installation & Quick Start guide.