Zum Hauptinhalt springen

Configuration Reference

The core execution engine of azuma nori relies on a centralized JSON configuration (config.json). The Standalone Client manages this file for you automatically in your .nori directory, but understanding its structure is crucial for power-users and future CI/CD integrations.

Core Properties

A standard config.json is composed of several root configurations:

1. ModelConfig

Defines the LLM provider, target model, and authorization mechanism used for inference.

  • Provider: The AI provider (e.g., Anthropic, OpenAI, Google, or local executables).
  • ModelId: The specific model variant (e.g., claude-sonnet-5). Model IDs are illustrative — use the current ID from your provider.
  • ConnectionType: Dictates how the model is reached: "DirectAPI" (calls the provider's cloud API with an API key) or "CLI" (proxies through a pre-authorized local agent CLI like Claude/Gemini CLI).
  • CliBinaryPath: Explicit path to the agent CLI executable. When empty, resolves from PATH.
  • Endpoint: Overrides the default provider API URL. Useful for routing requests through internal corporate proxies or targeting an on-premise Private Azure OpenAI deployment.
  • ApiKey: The authentication token.
    • Security Best Practice: Use the ${ENV_VAR} syntax (e.g., ${OPENAI_API_KEY}) to resolve keys from the runtime environment. This guarantees your secret keys are never hardcoded inside the config.json text file.
  • TestDirectory: Specific to the TestConnection execution scope, this dictates where a safe diagnostic probe is executed to verify connectivity.

2. AnalysisConfig

Controls the behaviour and resource utilization of the policy evaluation engine.

  • Model: Optional per-phase override of type ModelOverrideConfig (see below). Unset fields fall back to the top-level ModelConfig.
  • Depth: Controls the thoroughness of the evaluation (Light, Medium, Extreme).
  • Parallelism: Limits the number of concurrent sub-agents the orchestrator will spawn, ensuring you don't exhaust local CPU threads or hit API rate limits.
  • MaxBudgetUsd: Implements a hard cap on API spend per run. The engine will halt if projected token costs exceed this threshold.
  • GenerateSummaries: A boolean flag that dictates whether the final summarization step will produce an executive briefing in addition to raw finding data.
  • CompressWikiContext: Compresses prose-heavy local index content by up to 60%, drastically reducing token payload size without sacrificing factual integrity.
  • SkipExisting: A resumability flag. When enabled, the engine scans the .nori cache for previously completed findings and only evaluates outstanding controls, saving time and money on interrupted runs.

3. WikiConfig

Controls the generation of the local codebase indices.

  • Model: Optional override of type ModelOverrideConfig for the wiki generation phase (allows selecting a cheaper model for mechanical scanning).
  • Concise: A boolean flag. When true, instructs the wiki builder to generate concise, fact-dense pages to cap verbosity and save token costs in downstream evaluations.
  • Parallelism: Number of concurrent wiki indexing tasks.
  • SkipExisting: Resumability flag to skip already generated wiki pages.
  • MaxBudgetUsd: Spend cap per wiki agent call (Claude CLI only).

4. DocIndexConfig

Controls the generation of document evidence summaries.

  • Model: Optional override of type ModelOverrideConfig for document indexing (e.g., pointing to a Claude CLI model for visual parsing of PDFs and diagrams).
  • Parallelism: Number of concurrent document indexing tasks.
  • MaxExtractChars: Limits the characters of extracted text passed to text-only summaries (defaults to 120_000 to prevent runaway prompt size).
  • MaxSourceBytes: Size guard (e.g. 52_428_800 bytes) above which files are marked Unsupported to protect against zip-bombs or pathologically large files.
  • MaxBudgetUsd: Spend cap per summarizer agent call (Claude CLI only).

Model Overrides

Where Model overrides are configured (for Analysis, Wiki, or DocIndex blocks), they use the ModelOverrideConfig structure. Leave fields empty to fall back to the top-level project model configuration:

  • Provider: Overrides provider type (e.g. Google).
  • ModelId: Overrides model variant (e.g. gemini-2.5-flash).
  • Endpoint: Custom endpoint URL override.
  • ConnectionType: Overrides connection type (DirectAPI vs CLI).

Local Overrides

Like all standard .NET Core applications, nori supports a configuration hierarchy. If you create an appsettings.local.json file in the execution directory, those values will transparently override the matching properties in config.json. This is ideal for testing configuration tweaks locally without modifying the shared project configuration.