Skip to content

Latest commit

 

History

391 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Warning

One user has reported ~$30/day expense in Spanner and a concern that it is due to the RAG Corpus from this project. I do not see this in my own projects but I am investigating further. In the meantime, please carefully monitor your expenses.

GE SecOps Agent

Deploy security-focused AI agents to Gemini Enterprise with integrated access to SecOps SIEM, SOAR, Google Threat Intelligence, and Security Command Center through the Model Context Protocol (MCP).

Built with Google ADK (Agent Development Kit) and deployed via Vertex AI Reasoning Engine.

Watch the video

Table of Contents

Quick Start

Local Development (Recommended for Getting Started)

# Clone and setup
git clone --recurse-submodules https://github.com/googleSandy/ge-secops-agent.git
cd ge-secops-agent

# Configure environment
cp .env.example .env
# Edit .env with your Google Cloud credentials

# Install dependencies
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt

# Run locally with ADK Web
cd soc_agent
GOOGLE_GENAI_USE_VERTEXAI=True \
GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json \
GOOGLE_CLOUD_PROJECT=your-project-id \
GOOGLE_CLOUD_LOCATION=us-central1 \
adk web

This opens an interactive web UI at http://localhost:8000 where you can test all features instantly.

Production Deployment

# 1. Verify setup and configure IAM (one-time)
python manage.py vertex verify
python manage.py iam setup

# 2. Deploy to Reasoning Engine
just agent-engine-deploy

# 3. Register with Gemini Enterprise
just gem-ent-register

Run just to see all available commands.

Architecture

flowchart TB
    subgraph GE["Gemini Enterprise"]
        UI["User Interface<br/><i>Conversational UI</i>"]
    end

    subgraph RE["Vertex AI Reasoning Engine (us-central1)"]
        subgraph Orch["SOC Agent Orchestrator"]
            Model["gemini-3.1-pro-preview<br/><i>via global endpoint</i>"]

            subgraph RAG["Direct Tool Access"]
                RAGTool["VertexAiRagRetrieval<br/><i>us-east4</i>"]
                Runbooks["170+ SOC Runbooks<br/>IR Procedures<br/>Security Docs"]
            end

            subgraph Specialists["Sub-Agents"]
                CTI["CTI Researcher<br/><i>gemini-3-flash-preview</i><br/><br/>• Threat Intel<br/>• IOC Analysis<br/>• Threat Actors<br/>• Campaigns"]
                T1["Tier 1 Analyst<br/><i>gemini-3-flash-preview</i><br/><br/>• Alert Triage<br/>• Case Mgmt<br/>• Investigation<br/>• Escalation"]
            end
        end
    end

    subgraph MCP["MCP Security Servers"]
        SIEM["SecOps SIEM<br/><i>UDM Search, Entity Timeline<br/>IOC Prevalence, Alerts</i>"]
        SOAR["SecOps SOAR<br/><i>Case Management<br/>Findings, Collaboration</i>"]
        GTI["GTI<br/><i>IOC Lookup, Threat Actors<br/>Campaigns, MITRE ATT&CK</i>"]
        SCC["SCC<br/><i>Findings, Assets<br/>Compliance</i>"]
    end

    subgraph Cache["GTI Response Cache"]
        CacheTTL["File: 24h | IP: 12h<br/>Domain: 30m | URL: 30m"]
    end

    UI --> Orch
    RAGTool --> Runbooks
    Model --> RAG
    Model --> Specialists
    CTI --> SIEM & SOAR & GTI & SCC
    T1 --> SIEM & SOAR & GTI
    GTI --> Cache

    style GE fill:#4285f4,color:#fff
    style RE fill:#34a853,color:#fff
    style Orch fill:#fbbc04,color:#000
    style RAG fill:#ea4335,color:#fff
    style Specialists fill:#9334e6,color:#fff
    style MCP fill:#185abc,color:#fff
    style Cache fill:#137333,color:#fff
Loading

Key Design Decisions:

  • Orchestrator + Specialists: Single user-facing agent delegates to persona-based specialists
  • RAG Isolation: VertexAiRagRetrieval on orchestrator only (ADK constraint - cannot coexist with function tools)
  • MCP Integration: Security tools accessed via Model Context Protocol servers
  • Response Caching: GTI lookups cached with TTLs optimized by data volatility

Installation

Prerequisites

  • Python 3.10+
  • Google Cloud SDK configured
  • GCP project with billing enabled

Required APIs

gcloud services enable aiplatform.googleapis.com storage.googleapis.com \
  cloudbuild.googleapis.com compute.googleapis.com discoveryengine.googleapis.com

Setup Steps

  1. Clone and configure:

    git clone --recurse-submodules https://github.com/googleSandy/ge-secops-agent.git
    cd ge-secops-agent
    cp .env.example .env
    # Edit .env with your configuration
  2. Install dependencies:

    pip install -r requirements.txt
  3. Verify setup and configure IAM:

    python manage.py vertex verify
    python manage.py iam setup
  4. Deploy:

    just agent-engine-deploy
    # Save AGENT_ENGINE_RESOURCE_NAME to .env
  5. Register with Gemini Enterprise:

    just gem-ent-register

Configuration

See .env.example for all environment variables. Key variables:

Variable Description
GCP_PROJECT_ID Google Cloud Project ID
GCP_PROJECT_NUMBER Project number (numeric)
GCP_LOCATION Deployment region (e.g., us-central1)
GCP_STAGING_BUCKET GCS bucket for staging (gs://...)
CHRONICLE_PROJECT_ID SecOps SIEM project
CHRONICLE_CUSTOMER_ID SecOps customer ID
SOAR_URL SOAR platform URL
SOAR_API_KEY SOAR API key
GTI_API_KEY Google Threat Intelligence API key
RAG_CORPUS_ID RAG corpus resource name

Usage

Example Queries

"What's the procedure for handling a ransomware incident?"
"Analyze the APT29 threat actor and their recent campaigns"
"Triage this phishing alert for user john.doe@company.com"
"Hunt for lateral movement using SMB in the last 7 days"
"Check IP 198.51.100.42 reputation and search for related activity"

Common Commands

just agent-engine-deploy      # Deploy agent
just agent-engine-redeploy    # Redeploy existing agent
just gem-ent-register      # Register with Gemini Enterprise
just gem-ent-update        # Update registration
just agent-engine-warmup      # Pre-warm MCP connections
just status                   # Check system status

RAG Corpus Management

just rag-list                 # List all RAG corpora
just rag-create "Security Runbooks"
just rag-info RAG_CORPUS_ID=projects/.../ragCorpora/...
just rag-delete RAG_CORPUS_ID=projects/.../ragCorpora/...

Gemini Enterprise Integration

Important

When creating apps via API/CLI, include --app-type APP_TYPE_INTRANET and --industry-vertical GENERIC for visibility in the Gemini Enterprise UI.

Tip

To view all of your deployed Reasoning Engine (Agent Engine) backend runtimes in the Google Cloud Console (including private, remote A2A specialist agents that are not directly registered in Gemini Enterprise Agent Platform), you can navigate to the Google Cloud Agent Platform Runtimes page: https://console.cloud.google.com/agent-platform/runtimes?project=your-project-id

Create via Console (Recommended):

  1. Navigate to Vertex AI > Search & Conversation > Apps
  2. Click Create App > Select Agent type
  3. Copy App ID to .env as GEM_ENT_APP_ID
  4. Run just gem-ent-register

CLI Reference

justfile Python CLI
just agent-engine-list python manage.py agent-engine list
just gem-ent-register python manage.py gem-ent register
just rag-list python manage.py rag list
just status python manage.py workflow status

Run python manage.py --help for all commands.

Local Development

ADK Web (Recommended)

cd soc_agent
GOOGLE_GENAI_USE_VERTEXAI=True \
GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json \
GOOGLE_CLOUD_PROJECT=your-project-id \
GOOGLE_CLOUD_LOCATION=us-central1 \
adk web

Opens http://localhost:8000 with:

  • Real-time chat with agent
  • Live tool call visualization
  • Instant iteration without deployment

Testing MCP Servers

cd mcp-security/server/secops-soar/secops_soar_mcp
uv run server.py

Troubleshooting

Issue Solution
403/401 Auth Error gcloud auth application-default login
API not enabled gcloud services enable aiplatform.googleapis.com
MCP module missing git submodule update --init --recursive
Agent not in Gemini Enterprise just gem-ent-verify then just gem-ent-link-agent
Agent not responding gcloud logging tail "resource.type=aiplatform.googleapis.com/ReasoningEngine"

FAQ

Can I use this without SOAR? Yes. All security tool integrations are optional.

What AI models are supported? Default is gemini-3.1-pro-preview for orchestrator, gemini-3-flash-preview for sub-agents. Configurable in agent.py.

How do I update the agent?

git pull && just agent-engine-redeploy && just gem-ent-update

What are the costs? Vertex AI charges per API call. Security products require separate licensing.

Best Practices

  • Security: Use Secret Manager for credentials, enable audit logging
  • Development: Separate dev/staging/prod projects
  • Operations: Set budget alerts, monitor quotas

Resources

Support

About

Deploy custom SOC Agents to Gemini Enterprise Agent Platform

Topics

Resources

Stars

16 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages