Skip to content

Configuration

Skiritai can be configured via environment variables.

LLM Settings

VariableDescriptionDefault
OPENAI_API_KEYOpenAI API key
OPENAI_BASE_URLOpenAI-compatible endpointhttps://api.openai.com/v1
ANTHROPIC_API_KEYAnthropic API key
LLM_PROVIDERExplicit provider selection (openai / anthropic)Auto-detect
LLM_MODELModel namegpt-4o
LLM_MAX_RETRIESMax LLM call retries3
LLM_RETRY_BASE_DELAYBase delay for exponential backoff (seconds)2.0
LLM_RETRY_MAX_DELAYMax delay between retries (seconds)60.0

System Prompt

The AI agent's system prompt is resolved in this order:

  1. Case-levelprompt.md or prompt.txt in the case directory
  2. Env fileSYSTEM_PROMPT_FILE pointing to a markdown file
  3. Env inlineSYSTEM_PROMPT environment variable
  4. Built-in default — Chinese-language prompt shipped with Skiritai

Browser Settings

VariableDescriptionDefault
SKIRITAI_HEADLESS / HEADLESSRun browser headlessfalse
SKIRITAI_CHROME_PATH / CHROME_PATHCustom Chromium executable pathPlaywright's bundled Chromium
CICI detection (adds --no-sandbox automatically)

Logging

Skiritai uses Loguru.

VariableDescriptionDefault
SKIRITAI_LOG_LEVEL / LOG_LEVELLog levelINFO
SKIRITAI_LOG_DIRLog file directory.skiritai/logs
bash
SKIRITAI_LOG_LEVEL=DEBUG skiritai run .

Web Server

VariableDescriptionDefault
SKIRITAI_CASES_ROOTRoot directory for case discovery in web mode./examples
SKIRITAI_CORS_ORIGINS / CORS_ALLOWED_ORIGINSCORS allowed origins

Per-Case Files

FilePurpose
<case_dir>/prompt.md or prompt.txtCase-level custom system prompt (highest priority)
<case_dir>/scripts/<step>.pyAuto-generated replay script
<case_dir>/scripts/.<step>.solidifiedScript solidification marker
<case_dir>/.browser_sessionPersisted browser session info (CDP port + PID)
<case_dir>/.case_contextCase execution context snapshot

Released under the MIT License.