Skip to main content

Overview

Shannon uses feature flags to control optional features, experimental functionality, and enterprise extensions without modifying code. This allows clean separation between:
  • Open-source core features (available to all)
  • Enterprise/private features (gated behind flags)
  • Experimental features (toggleable for testing)

Zero Recompilation

Enable/disable features without rebuilding services

Environment-Based

Different flags for dev/staging/production

Clean Separation

Enterprise features isolated from OSS core

Gradual Rollout

Test new features before full deployment

Configuration

Configuration File

Feature flags are defined in config/shannon.yaml under the features section:

Environment Variables

Feature flags can be overridden via environment variables:
Naming convention: SHANNON_FEATURE_<FLAG_NAME_UPPERCASE>

Priority Order

  1. Environment variables (highest priority)
  2. Config overlays (config/overlays/shannon.{env}.yaml)
  3. Base config (config/shannon.yaml)
  4. Code defaults (lowest priority)

Usage Patterns

In Go Code (Orchestrator)

In Python Code (LLM Service)

Conditional Imports Pattern

Use feature flags with conditional imports for clean separation:

Common Feature Flags

Best Practices

1. Default to Disabled

New features should default to false in base config:

2. Use Environment Overlays

Create environment-specific overlays for different deployments:
Load with:

3. Guard with Try/Except

Always use graceful fallback for enterprise/optional features:

4. Document Feature Requirements

Enterprise Feature Pattern

Shannon separates OSS core from enterprise extensions using feature flags:

File Structure

Conditional Workflow Routing

Testing with Feature Flags

Unit Tests

Integration Tests

Deployment Strategies

Canary Deployment

Enable features for subset of users:

A/B Testing

Route traffic based on feature flags:

Monitoring & Observability

Log feature flag usage for debugging:
Add metrics:

Migration Guide

Adding a New Feature Flag

1

Define Flag in Config

Add to config/shannon.yaml:
2

Update Go Struct

Add field to go/orchestrator/internal/config/shannon.go:
3

Use in Code

Gate functionality:
4

Add Tests

Test both enabled/disabled states:
5

Document

Update this page and environment variables documentation.

Environment Variables

Full list of configuration options

Vendor Adapters

Build vendor-specific integrations

Configuration Guide

Shannon configuration overview

Extending Shannon

Add custom features and workflows