Skip to main content
Humancheck uses a YAML configuration file (humancheck.yaml) to control its behavior. This guide explains all available configuration options.

Configuration File Location

The configuration file is located at:
  • Default: ./humancheck.yaml (in the current directory)
  • Custom: Specify with --config PATH flag

Creating Configuration

Initialize a new configuration file:
humancheck init
This creates a humancheck.yaml file with default settings.

Configuration Options

API Server Configuration

# API Server Configuration
api_host: 0.0.0.0
api_port: 8000
  • api_host: Host to bind the API server (default: 0.0.0.0)
  • api_port: Port for the API server (default: 8000)

Dashboard Configuration

# Streamlit Dashboard Configuration
streamlit_host: 0.0.0.0
streamlit_port: 8501
  • streamlit_host: Host to bind the dashboard (default: 0.0.0.0)
  • streamlit_port: Port for the dashboard (default: 8501)

Database Configuration

SQLite (Development)

# Database Configuration
storage: sqlite
db_path: ./humancheck.db
  • storage: Database type (sqlite or postgresql)
  • db_path: Path to SQLite database file

PostgreSQL (Production)

# Database Configuration
storage: postgresql
db_url: postgresql+asyncpg://user:password@localhost/humancheck
  • db_url: PostgreSQL connection URL

Review Configuration

# Review Configuration
confidence_threshold: 0.8  # Reviews required when confidence < 0.8
require_review_for:
  - high-stakes
  - compliance
  - payment
  - data_deletion
  • confidence_threshold: Minimum confidence score for auto-approval
  • require_review_for: List of task types that always require review

Default Reviewers

# Default Reviewers
default_reviewers:
  - admin@example.com
  • default_reviewers: List of email addresses for default reviewers (used when no routing rules match)

Logging Configuration

# Logging
log_level: INFO  # DEBUG, INFO, WARNING, ERROR, CRITICAL
log_file: null   # Set path to enable file logging
  • log_level: Logging level
  • log_file: Path to log file (set to null to disable file logging)

MCP Configuration

# MCP Configuration
mcp_server_name: humancheck
mcp_version: 0.1.0
  • mcp_server_name: Name of the MCP server
  • mcp_version: MCP server version

Security Configuration

# Security (optional)
enable_auth: false
api_key: null  # Set API key for authentication
  • enable_auth: Enable API key authentication
  • api_key: API key for authentication (required if enable_auth: true)

Multi-tenancy Configuration

# Multi-tenancy
default_organization_name: Default Organization
  • default_organization_name: Name of the default organization

Environment Variables

You can override configuration values using environment variables with the HUMANCHECK_ prefix:
export HUMANCHECK_API_PORT=8001
export HUMANCHECK_DB_PATH=/var/lib/humancheck/db.sqlite
export HUMANCHECK_LOG_LEVEL=DEBUG

Complete Example

# Humancheck Configuration Example

# API Server Configuration
api_host: 0.0.0.0
api_port: 8000

# Streamlit Dashboard Configuration
streamlit_host: 0.0.0.0
streamlit_port: 8501

# Database Configuration
storage: sqlite
db_path: ./humancheck.db

# For PostgreSQL (production)
# storage: postgresql
# db_url: postgresql+asyncpg://user:password@localhost/humancheck

# Review Configuration
confidence_threshold: 0.8
require_review_for:
  - high-stakes
  - compliance
  - payment
  - data_deletion

# Default Reviewers
default_reviewers:
  - admin@example.com

# Logging
log_level: INFO
log_file: null

# MCP Configuration
mcp_server_name: humancheck
mcp_version: 0.1.0

# Security
enable_auth: false
api_key: null

# Multi-tenancy
default_organization_name: Default Organization

Production Configuration

For production deployments, consider:
  1. Use PostgreSQL: Switch from SQLite to PostgreSQL
  2. Enable Authentication: Set enable_auth: true and provide an API key
  3. Set Logging: Configure log file path
  4. Use Environment Variables: Store sensitive values in environment variables
  5. Configure Backup: Set up database backups

Next Steps