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:
export MIKOSHI_LLM="openrouter/z-ai/glm-5.3"
export LLM_API_KEY="your-api-key"| Provider | MIKOSHI_LLM | Credentials |
|---|---|---|
| OpenRouter | openrouter/z-ai/glm-5.3 | LLM_API_KEY |
| Vercel AI Gateway | vercel_ai_gateway/zai/glm-5.3 | LLM_API_KEY |
| Anthropic | anthropic/claude-sonnet-5-5 | LLM_API_KEY |
| OpenAI | openai/gpt-6.1-sol | LLM_API_KEY |
| DeepSeek | deepseek/deepseek-v4-pro | LLM_API_KEY |
| AWS Bedrock | bedrock/us.anthropic.claude-sonnet-5-5 | AWS_PROFILE or access keys, plus AWS_REGION |
| Google Vertex AI | vertex_ai/gemini-4-argon | GOOGLE_APPLICATION_CREDENTIALS, VERTEXAI_PROJECT, VERTEXAI_LOCATION |
| Azure OpenAI | azure/your-deployment | AZURE_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.
# 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.
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-duplicationKeep 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.
{
"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
| Setting | What it does |
|---|---|
--max-budget 10 | Hard cap on model spend in USD across all agents. Headless runs stop cleanly when it is reached; interactive runs pause. |
--max-turns 300 | Maximum turns per agent (default 500). |
--scan-mode quick | Shallower, faster runs. See scan modes. |
MIKOSHI_REASONING_EFFORT | none to max. Default high, or medium in quick mode. |
MIKOSHI_LLM_INPUT_COST_PER_MTOK | With …_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
| Variable | Enables |
|---|---|
EXA_API_KEY | Web search and page reading for the agents (preferred). |
PERPLEXITY_API_KEY | Web search through Perplexity. |
POSTMAN_API_KEY | Postman collections as targets (postman://…). |
MIKOSHI_BLUE_TEAM=false | Turn off the blue-team report by default. |
TRACELOOP_BASE_URL | With 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.