Lens

Configuration

Control every aspect of the Lens research engine through a centralized YAML configuration.

The Config File

By default, Lens looks for a lens.config.yaml in your project root. You can specify a custom path using the --config flag in the CLI or the config_path argument in the SDK.

yaml
# lens.config.yaml example
engine:
  threads: 8
  timeout: 60
  cache_dir: "./.lens_cache"

collectors:
  wikipedia:
    language: "en"
  arxiv:
    max_results: 10

pipelines:
  - name: "standard"
    steps: ["dedupe", "summarize"]

Engine Settings

engine.threads

Number of concurrent threads to use for parallel collection. Higher values increase speed but may trigger rate limits.

Default: 4

engine.timeout

Maximum time in seconds to wait for all collectors to complete before proceeding to synthesis.

Default: 30

engine.cache_dir

Directory where Lens stores cached API responses. Set to null to disable caching.

Default: "./.cache"

Environment Variables

Sensitive data like API keys and tokens can be set via environment variables. These will override any values in your YAML file.

Variable Overrides
LENS_GITHUB_TOKEN collectors.github.token
LENS_OPENAI_KEY pipelines.summarize.api_key

Security Tip

Never commit your lens.config.yaml to a public repository if it contains plain-text API tokens. Always use environment variables for production environments.