This assumes your logs are managed by Chronicle.
If this is not the case, take a look at the Advanced Usage section below.
In this setting, Sec-Gemini will query the logs in your Chronicle instance via your local network connection.
Once the TUI is ready and a new session is established, prompt Sec-Gemini to perform a forensics investigation.
If you want Sec-Gemini to perform an unhinted investigation (i.e., operate in threat hunting mode), your prompt can be as simple as:
Perform a forensics investigation on the available logs.
When a starting point is available, or if you want to focus the agent’s attention on a specific part, you may provide the information in the prompt itself.
Here are good examples of additional information to provide:
an (approximate) incident time, e.g., 2026-05-06 13:00
a hostname
an account or username
a specific filename
For instance:
Perform a forensics investigation on the available logs.
An alert was triggered at 2026-05-06 13:00 on hostname "machine1234".
If your logs are not too large (e.g., a few GBs), you can store them in a local SQLite3 database file, which Sec-Gemini repeatedly queries during the investigation.
The SQLite3 database file must contain two tables with the following schemas:
[sshd, pid: 31357] Received disconnect from 218.157.73.75: 11: Bye Bye [preauth]
enrichment
TEXT
Extra enrichment details or metadata (optional)
tags: [is_tor_ip]
Notice that log records do not need to be parsed or otherwise structured beyond providing a timestamp.
You may use arbitrary values for the log_type field, or even a single value for all records, as long as each value has a corresponding entry in the log_descriptions table below.
Syslog line event data., File system stat event data.
To run the Sec-Gemini TUI for digital forensics using logs stored in an SQLite DB file, use the following command:
Terminal window
sec-geminidfir--sqlite=PATH_TO_FILE.DB
Alternatively, if you have multiple SQLite database files, each corresponding to exactly one investigation, you can name them following the TICKET_ID.db convention (where ticket IDs are numerical, e.g., 12345.db) and place them in the same directory.
You can launch the TUI by providing the path to the directory instead of a single file:
If there are multiple database files in the directory, you must specify the target investigation ID in the prompt so Sec-Gemini can load the corresponding file:
Perform a forensics investigation on the logs with ticket ID 12345.
If your logs are stored in an external database, queryable via an API, or require custom preprocessing, you can write a custom Python script that implements the LogStore interface.
Sec-Gemini will dynamically load your class and use your custom implementation to query logs during the investigation.
To do this, create a Python file (e.g., my_logstore.py) that inherits from LogStore (from sec_gemini.logs_mcp.common.logstore) and implements the describe_logs and search_logs asynchronous methods.
Here is a template demonstrating how to structure your custom log store:
import datetime
import sys
from sec_gemini.logs_mcp.common import logstore as ls
classMyCustomLogStore(ls.LogStore):
def__init__(self):
# You can access command line arguments passed to the script via sys.argv.
# This is useful for passing API tokens, file paths, or custom query configs.
If your custom script requires command-line arguments (e.g., database credentials or environment flags), you can pass them within the same string option:
If your logs are managed in a Timesketch server, you can perform autonomous investigations directly against your sketches.
In this setup, you run a stateless Timesketch BYOT Client container alongside your Timesketch server to establish an outbound reverse tunnel, allowing the cloud agent to query logs in-place.
For setup and deployment steps, see the official Timesketch Investigation View Setup Guide.
To perform an investigation where the logs server runs locally on your workstation while the investigation itself is managed via the Web UI or Python SDK, you can perform a split execution.
The forensics capability of Sec-Gemini is designed to operate on logs that are both massive in quantity (multiple TBs) and sensitive. To give Sec-Gemini the ability to access the logs under investigation, you run a local logs server.
Note that when using the sec-gemini dfir command, this step is automated.
The local logs server is built into the sec-gemini-byot binary. There are currently three supported log sources for the local logs server: