Skip to main content

Synopsis

kong analyze [OPTIONS] BINARY

Description

Analyze a binary with Kong’s autonomous agent. Opens the binary in Ghidra, runs the five-phase pipeline (triage, analysis, cleanup, synthesis, export), and writes results to the output directory. Requires kong setup to be run first.

Arguments

ArgumentTypeRequiredDescription
BINARYPathYesPath to the binary file to analyze. Must exist.

Options

FlagTypeDefaultDescription
--headlessFlagfalseRun without TUI. Events are printed to stdout. Useful for CI/Docker.
-o, --outputPath./kong_outputOutput directory for results.
-f, --formatChoicesource, jsonOutput format(s). Choices: source, json, ghidra. Can be specified multiple times.
--ghidra-dirPathAuto-detectedOverride Ghidra installation directory.
-p, --providerChoiceFrom setupLLM provider. Choices: anthropic, openai, custom.
-m, --modelStringProvider defaultOverride the LLM model name.
--base-urlStringCustom OpenAI-compatible endpoint URL. Implies --provider custom.
--max-prompt-charsIntegerModel defaultOverride maximum prompt size in characters.
--max-chunk-functionsIntegerModel defaultOverride maximum functions per LLM batch.
--max-output-tokensIntegerModel defaultOverride maximum output tokens.

Global Options

FlagTypeDefaultDescription
-v, --verboseFlagfalseEnable verbose debug logging. Inherited by all subcommands.
--versionFlagShow Kong version and exit.

Examples

# Basic analysis with default provider
kong analyze ./stripped_binary

# Headless mode for CI
kong analyze ./binary --headless -o ./results -f json

# Use a specific provider and model
kong analyze ./binary --provider openai --model gpt-4o-mini

# Custom endpoint (Ollama)
kong analyze ./binary --provider custom \
  --base-url http://localhost:11434/v1 \
  --model mistral

# All output formats with verbose logging
kong analyze ./binary -v -f source -f json -f ghidra

# Override model limits for small context models
kong analyze ./binary --provider custom \
  --base-url http://localhost:11434/v1 \
  --model phi3 \
  --max-prompt-chars 50000 \
  --max-chunk-functions 20

Further reading

Last modified on March 20, 2026