Skip to content
Mikoshi

Docs

Configuration

Mikoshi needs one thing to run: a model. Everything else (cost caps, timeouts, the sandbox, web search) has a sensible default you can override.

Choose a model

Mikoshi reaches models through LiteLLM, so any provider it supports works. Set the model id as provider/model and your key:

shell
export MIKOSHI_LLM="openrouter/z-ai/glm-5.3"
export LLM_API_KEY="your-api-key"
ProviderMIKOSHI_LLMCredentials
OpenRouteropenrouter/z-ai/glm-5.3LLM_API_KEY
Vercel AI Gatewayvercel_ai_gateway/zai/glm-5.3LLM_API_KEY
Anthropicanthropic/claude-sonnet-5-5LLM_API_KEY
OpenAIopenai/gpt-6.1-solLLM_API_KEY
DeepSeekdeepseek/deepseek-v4-proLLM_API_KEY
AWS Bedrockbedrock/us.anthropic.claude-sonnet-5-5AWS_PROFILE or access keys, plus AWS_REGION
Google Vertex AIvertex_ai/gemini-4-argonGOOGLE_APPLICATION_CREDENTIALS, VERTEXAI_PROJECT, VERTEXAI_LOCATION
Azure OpenAIazure/your-deploymentAZURE_API_KEY, AZURE_API_BASE, AZURE_API_VERSION

Mikoshi checks it can reach the model before the scan starts and stops with LLM CONNECTION FAILED if it can’t.

Local and self-hosted models

Point Mikoshi at Ollama, LM Studio, vLLM or any OpenAI-compatible server with LLM_API_BASE. Nothing leaves your network.

shell
# Ollama
export MIKOSHI_LLM="ollama/qwen3-vl"
export LLM_API_BASE="http://localhost:11434"

# Any OpenAI-compatible server or internal gateway
export MIKOSHI_LLM="openai/your-model"
export LLM_API_BASE="https://llm.internal.example/v1"
export LLM_API_KEY="your-bearer-token"
export LLM_EXTRA_HEADERS='{"X-Tenant":"security"}'

Cheaper models for sub-agents

The root agent always runs on MIKOSHI_LLM. To run sub-agents on cheaper models, list them from lowest to highest effort; agents pick a level per task. All must use the same provider or LLM_API_BASE.

shell
export MIKOSHI_LLM="openrouter/<large-model>"
export MIKOSHI_EFFORT_LLMS="openrouter/<small-model>,openrouter/<large-model>"
export MIKOSHI_DEDUPE_MODEL="openrouter/<small-model>"   # finding de-duplication

Keep settings in a config file

Instead of exporting variables in every shell, put them in ~/.mikoshi/cli-config.json. Any variable on this page can go under env. Variables set in the environment take precedence.

~/.mikoshi/cli-config.json
{
  "env": {
    "MIKOSHI_LLM": "openrouter/z-ai/glm-5.3",
    "LLM_API_KEY": "sk-...",
    "MIKOSHI_REASONING_EFFORT": "high"
  }
}

Once a run reaches the model, Mikoshi saves the settings you exported (your API key included) to this file, readable only by you, so later runs reuse them. An empty variable (export LLM_API_KEY="") removes a saved value.

Use a different file per project or environment with mikoshi --config ./mikoshi.config.json …. Keep files that contain keys out of version control; in CI, pass keys as secrets instead.

Control cost and run time

SettingWhat it does
--max-budget 10Hard cap on model spend in USD across all agents. Headless runs stop cleanly when it is reached; interactive runs pause.
--max-turns 300Maximum turns per agent (default 500).
--scan-mode quickShallower, faster runs. See scan modes.
MIKOSHI_REASONING_EFFORTnone to max. Default high, or medium in quick mode.
MIKOSHI_LLM_INPUT_COST_PER_MTOKWith …_OUTPUT_COST_PER_MTOK: USD prices per million tokens for models LiteLLM can’t price, so --max-budget still works.

Every run records what it spent in run.json under llm_usage.

Optional features

VariableEnables
EXA_API_KEYWeb search and page reading for the agents (preferred).
PERPLEXITY_API_KEYWeb search through Perplexity.
POSTMAN_API_KEYPostman collections as targets (postman://…).
MIKOSHI_BLUE_TEAM=falseTurn off the blue-team report by default.
TRACELOOP_BASE_URLWith TRACELOOP_API_KEY: export OpenTelemetry traces to your own collector.

The CLI sends no telemetry. The full list of variables, including timeouts and sandbox settings, is in the reference.